@zaber/motion 2.14.5 → 2.14.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,7 +24,8 @@ export declare class OscilloscopeData {
24
24
  */
25
25
  getTimebase(unit?: Time | Native): number;
26
26
  /**
27
- * Get the sample interval that this data was recorded with.
27
+ * Get the user-specified time period between receipt of the start command and the first data point.
28
+ * Under some circumstances, the actual delay may be different - call GetSampleTime(0) to get the effective delay.
28
29
  * @param unit Unit of measure to represent the delay in.
29
30
  * @return The delay setting at the time the data was recorded.
30
31
  */
@@ -69,7 +69,8 @@ class OscilloscopeData {
69
69
  return response.getValue();
70
70
  }
71
71
  /**
72
- * Get the sample interval that this data was recorded with.
72
+ * Get the user-specified time period between receipt of the start command and the first data point.
73
+ * Under some circumstances, the actual delay may be different - call GetSampleTime(0) to get the effective delay.
73
74
  * @param unit Unit of measure to represent the delay in.
74
75
  * @return The delay setting at the time the data was recorded.
75
76
  */
@@ -1 +1 @@
1
- {"version":3,"file":"oscilloscope_data.js","sourceRoot":"","sources":["../../../src/ascii/oscilloscope_data.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oCAA+C;AAC/C,oDAAsC;AACtC,4CAAuD;AAEvD,uFAAkF;AAElF;;GAEG;AACH,MAAa,gBAAgB;IAuB3B,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAA,mCAAuB,EAAC,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAC3E,CAAC;IAzBD;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;OAEG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC,OAAO,CAAC;IAC5C,CAAC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==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Native, Time, Units } from '../units';\nimport * as gateway from '../gateway';\nimport { registerForFinalization } from '../finalizer';\n\nimport { OscilloscopeCaptureProperties } from './oscilloscope_capture_properties';\n\n/**\n * Contains a block of contiguous recorded data for one channel of the device's oscilloscope.\n */\nexport class OscilloscopeData {\n /**\n * Unique ID for this block of recorded data.\n */\n public get dataId(): number {\n return this._dataId;\n }\n private _dataId: number;\n\n /**\n * The name of the recorded setting.\n */\n public get setting(): string {\n return this._retrieveProperties().setting;\n }\n\n /**\n * The number of the axis the data was recorded from, or 0 for the controller.\n */\n public get axisNumber(): number {\n return this._retrieveProperties().axisNumber;\n }\n\n constructor(dataId: number) {\n this._dataId = dataId;\n registerForFinalization(this, OscilloscopeData._free.bind(null, dataId));\n }\n\n /**\n * Get the sample interval that this data was recorded with.\n * @param unit Unit of measure to represent the timebase in.\n * @return The timebase setting at the time the data was recorded.\n */\n public getTimebase(\n unit: Time | Native = Units.NATIVE\n ): number {\n const request = new gateway.OscilloscopeDataGetRequest();\n request.setDataId(this.dataId);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'oscilloscopedata/get_timebase',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Get the sample interval that this data was recorded with.\n * @param unit Unit of measure to represent the delay in.\n * @return The delay setting at the time the data was recorded.\n */\n public getDelay(\n unit: Time | Native = Units.NATIVE\n ): number {\n const request = new gateway.OscilloscopeDataGetRequest();\n request.setDataId(this.dataId);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'oscilloscopedata/get_delay',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Calculate the time a sample was recorded, relative to when the recording was triggered.\n * @param index 0-based index of the sample to calculate the time of.\n * @param unit Unit of measure to represent the calculated time in.\n * @return The calculated time offset of the data sample at the given index.\n */\n public getSampleTime(\n index: number,\n unit: Time | Native = Units.NATIVE\n ): number {\n const request = new gateway.OscilloscopeDataGetSampleTimeRequest();\n request.setDataId(this.dataId);\n request.setIndex(index);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'oscilloscopedata/get_sample_time',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Get the recorded data as an array of doubles.\n * @param unit Unit of measure to convert the data to.\n * @return The recorded data for one oscilloscope channel, converted to the units specified.\n */\n public getData(\n unit: Units = Units.NATIVE\n ): number[] {\n const request = new gateway.OscilloscopeDataGetRequest();\n request.setDataId(this.dataId);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.OscilloscopeDataGetSamplesResponse>(\n 'oscilloscopedata/get_samples',\n request,\n gateway.OscilloscopeDataGetSamplesResponse);\n return response.getDataList();\n }\n\n /**\n * Releases native resources of an oscilloscope data buffer.\n * @param dataId The ID of the data buffer to delete.\n */\n private static _free(\n dataId: number\n ): void {\n const request = new gateway.OscilloscopeDataIdentifier();\n request.setDataId(dataId);\n\n gateway.callSync('oscilloscopedata/free', request);\n }\n\n /**\n * Returns recording properties.\n * @return Capture properties.\n */\n private _retrieveProperties(): OscilloscopeCaptureProperties {\n const request = new gateway.OscilloscopeDataIdentifier();\n request.setDataId(this.dataId);\n\n const response = gateway.callSync<gateway.OscilloscopeCaptureProperties>(\n 'oscilloscopedata/get_properties',\n request,\n gateway.OscilloscopeCaptureProperties);\n return OscilloscopeCaptureProperties.fromProtobuf(response.toObject());\n }\n\n /**\n * Releases the native resources of the oscilloscope data.\n * Should only be called if your environment does not support FinalizationRegistry.\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n */\n public free(): void {\n OscilloscopeData._free(this.dataId);\n }\n}\n"]}
1
+ {"version":3,"file":"oscilloscope_data.js","sourceRoot":"","sources":["../../../src/ascii/oscilloscope_data.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAA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AC;IACrD,CAAC;IAED;;;OAGG;IACK,mBAAmB;QACzB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,0BAA0B,EAAE,CAAC;QACzD,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAE/B,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,iCAAiC,EACjC,OAAO,EACP,OAAO,CAAC,6BAA6B,CAAC,CAAC;QACzC,OAAO,+DAA6B,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;OAIG;IACI,IAAI;QACT,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;CACF;AAhJD,4CAgJC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Native, Time, Units } from '../units';\nimport * as gateway from '../gateway';\nimport { registerForFinalization } from '../finalizer';\n\nimport { OscilloscopeCaptureProperties } from './oscilloscope_capture_properties';\n\n/**\n * Contains a block of contiguous recorded data for one channel of the device's oscilloscope.\n */\nexport class OscilloscopeData {\n /**\n * Unique ID for this block of recorded data.\n */\n public get dataId(): number {\n return this._dataId;\n }\n private _dataId: number;\n\n /**\n * The name of the recorded setting.\n */\n public get setting(): string {\n return this._retrieveProperties().setting;\n }\n\n /**\n * The number of the axis the data was recorded from, or 0 for the controller.\n */\n public get axisNumber(): number {\n return this._retrieveProperties().axisNumber;\n }\n\n constructor(dataId: number) {\n this._dataId = dataId;\n registerForFinalization(this, OscilloscopeData._free.bind(null, dataId));\n }\n\n /**\n * Get the sample interval that this data was recorded with.\n * @param unit Unit of measure to represent the timebase in.\n * @return The timebase setting at the time the data was recorded.\n */\n public getTimebase(\n unit: Time | Native = Units.NATIVE\n ): number {\n const request = new gateway.OscilloscopeDataGetRequest();\n request.setDataId(this.dataId);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'oscilloscopedata/get_timebase',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Get the user-specified time period between receipt of the start command and the first data point.\n * Under some circumstances, the actual delay may be different - call GetSampleTime(0) to get the effective delay.\n * @param unit Unit of measure to represent the delay in.\n * @return The delay setting at the time the data was recorded.\n */\n public getDelay(\n unit: Time | Native = Units.NATIVE\n ): number {\n const request = new gateway.OscilloscopeDataGetRequest();\n request.setDataId(this.dataId);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'oscilloscopedata/get_delay',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Calculate the time a sample was recorded, relative to when the recording was triggered.\n * @param index 0-based index of the sample to calculate the time of.\n * @param unit Unit of measure to represent the calculated time in.\n * @return The calculated time offset of the data sample at the given index.\n */\n public getSampleTime(\n index: number,\n unit: Time | Native = Units.NATIVE\n ): number {\n const request = new gateway.OscilloscopeDataGetSampleTimeRequest();\n request.setDataId(this.dataId);\n request.setIndex(index);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'oscilloscopedata/get_sample_time',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Get the recorded data as an array of doubles.\n * @param unit Unit of measure to convert the data to.\n * @return The recorded data for one oscilloscope channel, converted to the units specified.\n */\n public getData(\n unit: Units = Units.NATIVE\n ): number[] {\n const request = new gateway.OscilloscopeDataGetRequest();\n request.setDataId(this.dataId);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.OscilloscopeDataGetSamplesResponse>(\n 'oscilloscopedata/get_samples',\n request,\n gateway.OscilloscopeDataGetSamplesResponse);\n return response.getDataList();\n }\n\n /**\n * Releases native resources of an oscilloscope data buffer.\n * @param dataId The ID of the data buffer to delete.\n */\n private static _free(\n dataId: number\n ): void {\n const request = new gateway.OscilloscopeDataIdentifier();\n request.setDataId(dataId);\n\n gateway.callSync('oscilloscopedata/free', request);\n }\n\n /**\n * Returns recording properties.\n * @return Capture properties.\n */\n private _retrieveProperties(): OscilloscopeCaptureProperties {\n const request = new gateway.OscilloscopeDataIdentifier();\n request.setDataId(this.dataId);\n\n const response = gateway.callSync<gateway.OscilloscopeCaptureProperties>(\n 'oscilloscopedata/get_properties',\n request,\n gateway.OscilloscopeCaptureProperties);\n return OscilloscopeCaptureProperties.fromProtobuf(response.toObject());\n }\n\n /**\n * Releases the native resources of the oscilloscope data.\n * Should only be called if your environment does not support FinalizationRegistry.\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n */\n public free(): void {\n OscilloscopeData._free(this.dataId);\n }\n}\n"]}
@@ -27,4 +27,9 @@ export declare class Library {
27
27
  * Disables Device DB store.
28
28
  */
29
29
  static disableDeviceDbStore(): void;
30
+ /**
31
+ * Disables certain customer checks (like FF flag).
32
+ * @param mode Whether to turn internal mode on or off.
33
+ */
34
+ static setInternalMode(mode: boolean): void;
30
35
  }
@@ -72,6 +72,15 @@ class Library {
72
72
  const request = new gateway.ToggleDeviceDbStoreRequest();
73
73
  gateway.callSync('device_db/toggle_store', request);
74
74
  }
75
+ /**
76
+ * Disables certain customer checks (like FF flag).
77
+ * @param mode Whether to turn internal mode on or off.
78
+ */
79
+ static setInternalMode(mode) {
80
+ const request = new gateway.SetInternalModeRequest();
81
+ request.setMode(mode);
82
+ gateway.callSync('library/set_internal_mode', request);
83
+ }
75
84
  }
76
85
  exports.Library = Library;
77
86
  //# sourceMappingURL=library.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"library.js","sourceRoot":"","sources":["../../src/library.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,mDAAqC;AAIrC,MAAa,OAAO;IAElB;;;;OAIG;IACI,MAAM,CAAC,YAAY,CACxB,IAAmB,EACnB,WAAmB,EAAE;QAErB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;QAClD,OAAO,CAAC,OAAO,CAAC,IAAW,CAAC,CAAC;QAC7B,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAE9B,OAAO,CAAC,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,iBAAiB,CAC7B,UAA8B,EAC9B,gBAAwB,EAAE;QAE1B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,wBAAwB,EAAE,CAAC;QACvD,OAAO,CAAC,aAAa,CAAC,UAAiB,CAAC,CAAC;QACzC,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAExC,OAAO,CAAC,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,mBAAmB,CAC/B,gBAAwB,EAAE;QAE1B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,0BAA0B,EAAE,CAAC;QACzD,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC1B,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAExC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,oBAAoB;QAChC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,0BAA0B,EAAE,CAAC;QAEzD,OAAO,CAAC,QAAQ,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;CACF;AA7DD,0BA6DC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from './gateway';\nimport { LogOutputMode } from './log_output_mode';\nimport { DeviceDbSourceType } from './device_db_source_type';\n\nexport class Library {\n\n /**\n * Sets library logging output.\n * @param mode Logging output mode.\n * @param filePath Path of the file to open.\n */\n public static setLogOutput(\n mode: LogOutputMode,\n filePath: string = ''\n ): void {\n const request = new gateway.SetLogOutputRequest();\n request.setMode(mode as any);\n request.setFilePath(filePath);\n\n gateway.callSync('logging/set_output', request);\n }\n\n /**\n * Sets source of Device DB data. Allows selection of a web service or a local file.\n * @param sourceType Source type.\n * @param urlOrFilePath URL of the web service or path to the local file.\n * Leave empty for the default URL of Zaber web service.\n */\n public static setDeviceDbSource(\n sourceType: DeviceDbSourceType,\n urlOrFilePath: string = ''\n ): void {\n const request = new gateway.SetDeviceDbSourceRequest();\n request.setSourceType(sourceType as any);\n request.setUrlOrFilePath(urlOrFilePath);\n\n gateway.callSync('device_db/set_source', request);\n }\n\n /**\n * Enables Device DB store.\n * The store uses filesystem to save information obtained from the Device DB.\n * The stored data are later used instead of the Device DB.\n * @param storeLocation Specifies relative or absolute path of the folder used by the store.\n * If left empty defaults to a folder in user home directory.\n * Must be accessible by the process.\n */\n public static enableDeviceDbStore(\n storeLocation: string = ''\n ): void {\n const request = new gateway.ToggleDeviceDbStoreRequest();\n request.setToggleOn(true);\n request.setStoreLocation(storeLocation);\n\n gateway.callSync('device_db/toggle_store', request);\n }\n\n /**\n * Disables Device DB store.\n */\n public static disableDeviceDbStore(): void {\n const request = new gateway.ToggleDeviceDbStoreRequest();\n\n gateway.callSync('device_db/toggle_store', request);\n }\n}\n"]}
1
+ {"version":3,"file":"library.js","sourceRoot":"","sources":["../../src/library.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,mDAAqC;AAIrC,MAAa,OAAO;IAElB;;;;OAIG;IACI,MAAM,CAAC,YAAY,CACxB,IAAmB,EACnB,WAAmB,EAAE;QAErB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;QAClD,OAAO,CAAC,OAAO,CAAC,IAAW,CAAC,CAAC;QAC7B,OAAO,CAAC,WAAW,CAAC,Q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\nimport * as gateway from './gateway';\nimport { LogOutputMode } from './log_output_mode';\nimport { DeviceDbSourceType } from './device_db_source_type';\n\nexport class Library {\n\n /**\n * Sets library logging output.\n * @param mode Logging output mode.\n * @param filePath Path of the file to open.\n */\n public static setLogOutput(\n mode: LogOutputMode,\n filePath: string = ''\n ): void {\n const request = new gateway.SetLogOutputRequest();\n request.setMode(mode as any);\n request.setFilePath(filePath);\n\n gateway.callSync('logging/set_output', request);\n }\n\n /**\n * Sets source of Device DB data. Allows selection of a web service or a local file.\n * @param sourceType Source type.\n * @param urlOrFilePath URL of the web service or path to the local file.\n * Leave empty for the default URL of Zaber web service.\n */\n public static setDeviceDbSource(\n sourceType: DeviceDbSourceType,\n urlOrFilePath: string = ''\n ): void {\n const request = new gateway.SetDeviceDbSourceRequest();\n request.setSourceType(sourceType as any);\n request.setUrlOrFilePath(urlOrFilePath);\n\n gateway.callSync('device_db/set_source', request);\n }\n\n /**\n * Enables Device DB store.\n * The store uses filesystem to save information obtained from the Device DB.\n * The stored data are later used instead of the Device DB.\n * @param storeLocation Specifies relative or absolute path of the folder used by the store.\n * If left empty defaults to a folder in user home directory.\n * Must be accessible by the process.\n */\n public static enableDeviceDbStore(\n storeLocation: string = ''\n ): void {\n const request = new gateway.ToggleDeviceDbStoreRequest();\n request.setToggleOn(true);\n request.setStoreLocation(storeLocation);\n\n gateway.callSync('device_db/toggle_store', request);\n }\n\n /**\n * Disables Device DB store.\n */\n public static disableDeviceDbStore(): void {\n const request = new gateway.ToggleDeviceDbStoreRequest();\n\n gateway.callSync('device_db/toggle_store', request);\n }\n\n /**\n * Disables certain customer checks (like FF flag).\n * @param mode Whether to turn internal mode on or off.\n */\n public static setInternalMode(\n mode: boolean\n ): void {\n const request = new gateway.SetInternalModeRequest();\n request.setMode(mode);\n\n gateway.callSync('library/set_internal_mode', request);\n }\n}\n"]}
@@ -848,6 +848,26 @@ export namespace ToolsListSerialPortsResponse {
848
848
  }
849
849
  }
850
850
 
851
+ export class SetInternalModeRequest extends jspb.Message {
852
+ getMode(): boolean;
853
+ setMode(value: boolean): void;
854
+
855
+ serializeBinary(): Uint8Array;
856
+ toObject(includeInstance?: boolean): SetInternalModeRequest.AsObject;
857
+ static toObject(includeInstance: boolean, msg: SetInternalModeRequest): SetInternalModeRequest.AsObject;
858
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
859
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
860
+ static serializeBinaryToWriter(message: SetInternalModeRequest, writer: jspb.BinaryWriter): void;
861
+ static deserializeBinary(bytes: Uint8Array): SetInternalModeRequest;
862
+ static deserializeBinaryFromReader(message: SetInternalModeRequest, reader: jspb.BinaryReader): SetInternalModeRequest;
863
+ }
864
+
865
+ export namespace SetInternalModeRequest {
866
+ export type AsObject = {
867
+ mode: boolean,
868
+ }
869
+ }
870
+
851
871
  export class SetDeviceDbSourceRequest extends jspb.Message {
852
872
  getSourceType(): number;
853
873
  setSourceType(value: number): void;
@@ -142,6 +142,7 @@ goog.exportSymbol('zaber.motion.protobufs.SetDeviceDbSourceRequest', null, proto
142
142
  goog.exportSymbol('zaber.motion.protobufs.SetDeviceStateExceptionData', null, proto);
143
143
  goog.exportSymbol('zaber.motion.protobufs.SetInterfaceChecksumEnabledRequest', null, proto);
144
144
  goog.exportSymbol('zaber.motion.protobufs.SetInterfaceTimeoutRequest', null, proto);
145
+ goog.exportSymbol('zaber.motion.protobufs.SetInternalModeRequest', null, proto);
145
146
  goog.exportSymbol('zaber.motion.protobufs.SetLogOutputRequest', null, proto);
146
147
  goog.exportSymbol('zaber.motion.protobufs.SetPeripheralStateExceptionData', null, proto);
147
148
  goog.exportSymbol('zaber.motion.protobufs.SetServoTuningPIDRequest', null, proto);
@@ -888,6 +889,27 @@ if (goog.DEBUG && !COMPILED) {
888
889
  */
889
890
  proto.zaber.motion.protobufs.ToolsListSerialPortsResponse.displayName = 'proto.zaber.motion.protobufs.ToolsListSerialPortsResponse';
890
891
  }
892
+ /**
893
+ * Generated by JsPbCodeGenerator.
894
+ * @param {Array=} opt_data Optional initial data array, typically from a
895
+ * server response, or constructed directly in Javascript. The array is used
896
+ * in place and becomes part of the constructed object. It is not cloned.
897
+ * If no data is provided, the constructed object will be empty, but still
898
+ * valid.
899
+ * @extends {jspb.Message}
900
+ * @constructor
901
+ */
902
+ proto.zaber.motion.protobufs.SetInternalModeRequest = function(opt_data) {
903
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
904
+ };
905
+ goog.inherits(proto.zaber.motion.protobufs.SetInternalModeRequest, jspb.Message);
906
+ if (goog.DEBUG && !COMPILED) {
907
+ /**
908
+ * @public
909
+ * @override
910
+ */
911
+ proto.zaber.motion.protobufs.SetInternalModeRequest.displayName = 'proto.zaber.motion.protobufs.SetInternalModeRequest';
912
+ }
891
913
  /**
892
914
  * Generated by JsPbCodeGenerator.
893
915
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -9952,6 +9974,136 @@ proto.zaber.motion.protobufs.ToolsListSerialPortsResponse.prototype.clearPortsLi
9952
9974
 
9953
9975
 
9954
9976
 
9977
+ if (jspb.Message.GENERATE_TO_OBJECT) {
9978
+ /**
9979
+ * Creates an object representation of this proto.
9980
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
9981
+ * Optional fields that are not set will be set to undefined.
9982
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
9983
+ * For the list of reserved names please see:
9984
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
9985
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
9986
+ * JSPB instance for transitional soy proto support:
9987
+ * http://goto/soy-param-migration
9988
+ * @return {!Object}
9989
+ */
9990
+ proto.zaber.motion.protobufs.SetInternalModeRequest.prototype.toObject = function(opt_includeInstance) {
9991
+ return proto.zaber.motion.protobufs.SetInternalModeRequest.toObject(opt_includeInstance, this);
9992
+ };
9993
+
9994
+
9995
+ /**
9996
+ * Static version of the {@see toObject} method.
9997
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
9998
+ * the JSPB instance for transitional soy proto support:
9999
+ * http://goto/soy-param-migration
10000
+ * @param {!proto.zaber.motion.protobufs.SetInternalModeRequest} msg The msg instance to transform.
10001
+ * @return {!Object}
10002
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10003
+ */
10004
+ proto.zaber.motion.protobufs.SetInternalModeRequest.toObject = function(includeInstance, msg) {
10005
+ var f, obj = {
10006
+ mode: jspb.Message.getBooleanFieldWithDefault(msg, 1, false)
10007
+ };
10008
+
10009
+ if (includeInstance) {
10010
+ obj.$jspbMessageInstance = msg;
10011
+ }
10012
+ return obj;
10013
+ };
10014
+ }
10015
+
10016
+
10017
+ /**
10018
+ * Deserializes binary data (in protobuf wire format).
10019
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
10020
+ * @return {!proto.zaber.motion.protobufs.SetInternalModeRequest}
10021
+ */
10022
+ proto.zaber.motion.protobufs.SetInternalModeRequest.deserializeBinary = function(bytes) {
10023
+ var reader = new jspb.BinaryReader(bytes);
10024
+ var msg = new proto.zaber.motion.protobufs.SetInternalModeRequest;
10025
+ return proto.zaber.motion.protobufs.SetInternalModeRequest.deserializeBinaryFromReader(msg, reader);
10026
+ };
10027
+
10028
+
10029
+ /**
10030
+ * Deserializes binary data (in protobuf wire format) from the
10031
+ * given reader into the given message object.
10032
+ * @param {!proto.zaber.motion.protobufs.SetInternalModeRequest} msg The message object to deserialize into.
10033
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
10034
+ * @return {!proto.zaber.motion.protobufs.SetInternalModeRequest}
10035
+ */
10036
+ proto.zaber.motion.protobufs.SetInternalModeRequest.deserializeBinaryFromReader = function(msg, reader) {
10037
+ while (reader.nextField()) {
10038
+ if (reader.isEndGroup()) {
10039
+ break;
10040
+ }
10041
+ var field = reader.getFieldNumber();
10042
+ switch (field) {
10043
+ case 1:
10044
+ var value = /** @type {boolean} */ (reader.readBool());
10045
+ msg.setMode(value);
10046
+ break;
10047
+ default:
10048
+ reader.skipField();
10049
+ break;
10050
+ }
10051
+ }
10052
+ return msg;
10053
+ };
10054
+
10055
+
10056
+ /**
10057
+ * Serializes the message to binary data (in protobuf wire format).
10058
+ * @return {!Uint8Array}
10059
+ */
10060
+ proto.zaber.motion.protobufs.SetInternalModeRequest.prototype.serializeBinary = function() {
10061
+ var writer = new jspb.BinaryWriter();
10062
+ proto.zaber.motion.protobufs.SetInternalModeRequest.serializeBinaryToWriter(this, writer);
10063
+ return writer.getResultBuffer();
10064
+ };
10065
+
10066
+
10067
+ /**
10068
+ * Serializes the given message to binary data (in protobuf wire
10069
+ * format), writing to the given BinaryWriter.
10070
+ * @param {!proto.zaber.motion.protobufs.SetInternalModeRequest} message
10071
+ * @param {!jspb.BinaryWriter} writer
10072
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10073
+ */
10074
+ proto.zaber.motion.protobufs.SetInternalModeRequest.serializeBinaryToWriter = function(message, writer) {
10075
+ var f = undefined;
10076
+ f = message.getMode();
10077
+ if (f) {
10078
+ writer.writeBool(
10079
+ 1,
10080
+ f
10081
+ );
10082
+ }
10083
+ };
10084
+
10085
+
10086
+ /**
10087
+ * optional bool mode = 1;
10088
+ * @return {boolean}
10089
+ */
10090
+ proto.zaber.motion.protobufs.SetInternalModeRequest.prototype.getMode = function() {
10091
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
10092
+ };
10093
+
10094
+
10095
+ /**
10096
+ * @param {boolean} value
10097
+ * @return {!proto.zaber.motion.protobufs.SetInternalModeRequest} returns this
10098
+ */
10099
+ proto.zaber.motion.protobufs.SetInternalModeRequest.prototype.setMode = function(value) {
10100
+ return jspb.Message.setProto3BooleanField(this, 1, value);
10101
+ };
10102
+
10103
+
10104
+
10105
+
10106
+
9955
10107
  if (jspb.Message.GENERATE_TO_OBJECT) {
9956
10108
  /**
9957
10109
  * Creates an object representation of this proto.