@zaber/motion 7.15.0-beta.1 → 7.15.0
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.
|
Binary file
|
package/dist/lib/library.js
CHANGED
package/dist/lib/library.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.js","sourceRoot":"","sources":["../../src/library.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,mDAAqC;AACrC,qDAAuC;AAKvC,MAAa,OAAO;IAClB;;;;OAIG;IACI,MAAM,CAAC,YAAY,CACxB,IAAmB,EACnB,QAAiB;QAEjB,MAAM,OAAO,GAAmD;YAC9D,GAAG,QAAQ,CAAC,mBAAmB,CAAC,OAAO;YACvC,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ;YAClB,QAAQ;gBACN,OAAO,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,iBAAiB,CAC7B,UAA8B,EAC9B,aAAsB;QAEtB,MAAM,OAAO,GAAwD;YACnE,GAAG,QAAQ,CAAC,wBAAwB,CAAC,OAAO;YAC5C,UAAU,EAAE,UAAU;YACtB,aAAa,EAAE,aAAa;YAC5B,QAAQ;gBACN,OAAO,QAAQ,CAAC,wBAAwB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1D,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,kBAAkB,CAC9B,GAAG,OAAyB;QAE5B,MAAM,OAAO,GAAgE;YAC3E,GAAG,QAAQ,CAAC,gC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AC;YACrD,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;CACF;AA3LD,0BA2LC;AAED,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from './gateway';\nimport * as requests from './requests';\nimport { LogOutputMode } from './log_output_mode';\nimport { DeviceDbSourceType } from './device_db_source_type';\nimport { DeviceDbSource } from './device_db_source';\n\nexport class Library {\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: requests.SetLogOutputRequest & gateway.Message = {\n ...requests.SetLogOutputRequest.DEFAULT,\n mode: mode,\n filePath: filePath,\n toBinary() {\n return requests.SetLogOutputRequest.toBinary(this);\n },\n };\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: requests.SetDeviceDbSourceRequest & gateway.Message = {\n ...requests.SetDeviceDbSourceRequest.DEFAULT,\n sourceType: sourceType,\n urlOrFilePath: urlOrFilePath,\n toBinary() {\n return requests.SetDeviceDbSourceRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/set_source', request);\n }\n\n /**\n * Sets a sequence of sources. When the library needs device information,\n * it will try each source in the order they are provided.\n * @param sources The list of sources the library will access data from.\n */\n public static setDeviceDbSources(\n ...sources: DeviceDbSource[]\n ): void {\n const request: requests.SetDeviceDbLayeredSourcesRequest & gateway.Message = {\n ...requests.SetDeviceDbLayeredSourcesRequest.DEFAULT,\n sources: sources,\n toBinary() {\n return requests.SetDeviceDbLayeredSourcesRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/set_sources', 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: requests.ToggleDeviceDbStoreRequest & gateway.Message = {\n ...requests.ToggleDeviceDbStoreRequest.DEFAULT,\n toggleOn: true,\n storeLocation: storeLocation,\n toBinary() {\n return requests.ToggleDeviceDbStoreRequest.toBinary(this);\n },\n };\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: requests.ToggleDeviceDbStoreRequest & gateway.Message = {\n ...requests.ToggleDeviceDbStoreRequest.DEFAULT,\n toBinary() {\n return requests.ToggleDeviceDbStoreRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/toggle_store', request);\n }\n\n /**\n * Checks if the Device DB store is currently enabled.\n * @returns True if the Device DB store is enabled.\n */\n public static isDeviceDbStoreEnabled(): boolean {\n const request: requests.EmptyRequest & gateway.Message = {\n ...requests.EmptyRequest.DEFAULT,\n toBinary() {\n return requests.EmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.BoolResponse>(\n 'device_db/check_store',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Clears the Device DB store on the local filesystem.\n * Note: If the device DB was enabled with a custom store location, store files will be removed in that location.\n */\n public static async clearDeviceDbStore(): Promise<void> {\n const request: requests.EmptyRequest & gateway.Message = {\n ...requests.EmptyRequest.DEFAULT,\n toBinary() {\n return requests.EmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device_db/clear_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: requests.SetInternalModeRequest & gateway.Message = {\n ...requests.SetInternalModeRequest.DEFAULT,\n mode: mode,\n toBinary() {\n return requests.SetInternalModeRequest.toBinary(this);\n },\n };\n\n gateway.callSync('library/set_internal_mode', request);\n }\n\n /**\n * Sets the period between polling for IDLE during movements.\n * Caution: Setting the period too low may cause performance issues.\n * @param period Period in milliseconds.\n * Negative value restores the default period.\n */\n public static setIdlePollingPeriod(\n period: number\n ): void {\n const request: requests.IntRequest & gateway.Message = {\n ...requests.IntRequest.DEFAULT,\n value: period,\n toBinary() {\n return requests.IntRequest.toBinary(this);\n },\n };\n\n gateway.callSync('library/set_idle_polling_period', request);\n }\n\n /**\n * Throws an error if the version of the loaded shared library does not match the caller's version.\n */\n public static checkVersion(): void {\n const request: requests.CheckVersionRequest & gateway.Message = {\n ...requests.CheckVersionRequest.DEFAULT,\n host: 'js',\n version: '7.
|
|
1
|
+
{"version":3,"file":"library.js","sourceRoot":"","sources":["../../src/library.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,mDAAqC;AACrC,qDAAuC;AAKvC,MAAa,OAAO;IAClB;;;;OAIG;IACI,MAAM,CAAC,YAAY,CACxB,IAAmB,EACnB,QAAiB;QAEjB,MAAM,OAAO,GAAmD;YAC9D,GAAG,QAAQ,CAAC,mBAAmB,CAAC,OAAO;YACvC,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ;YAClB,QAAQ;gBACN,OAAO,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,iBAAiB,CAC7B,UAA8B,EAC9B,aAAsB;QAEtB,MAAM,OA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;gBACN,OAAO,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC5C,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,iCAAiC,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,YAAY;QACxB,MAAM,OAAO,GAAmD;YAC9D,GAAG,QAAQ,CAAC,mBAAmB,CAAC,OAAO;YACvC,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,QAAQ;YACjB,QAAQ;gBACN,OAAO,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;CACF;AA3LD,0BA2LC;AAED,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from './gateway';\nimport * as requests from './requests';\nimport { LogOutputMode } from './log_output_mode';\nimport { DeviceDbSourceType } from './device_db_source_type';\nimport { DeviceDbSource } from './device_db_source';\n\nexport class Library {\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: requests.SetLogOutputRequest & gateway.Message = {\n ...requests.SetLogOutputRequest.DEFAULT,\n mode: mode,\n filePath: filePath,\n toBinary() {\n return requests.SetLogOutputRequest.toBinary(this);\n },\n };\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: requests.SetDeviceDbSourceRequest & gateway.Message = {\n ...requests.SetDeviceDbSourceRequest.DEFAULT,\n sourceType: sourceType,\n urlOrFilePath: urlOrFilePath,\n toBinary() {\n return requests.SetDeviceDbSourceRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/set_source', request);\n }\n\n /**\n * Sets a sequence of sources. When the library needs device information,\n * it will try each source in the order they are provided.\n * @param sources The list of sources the library will access data from.\n */\n public static setDeviceDbSources(\n ...sources: DeviceDbSource[]\n ): void {\n const request: requests.SetDeviceDbLayeredSourcesRequest & gateway.Message = {\n ...requests.SetDeviceDbLayeredSourcesRequest.DEFAULT,\n sources: sources,\n toBinary() {\n return requests.SetDeviceDbLayeredSourcesRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/set_sources', 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: requests.ToggleDeviceDbStoreRequest & gateway.Message = {\n ...requests.ToggleDeviceDbStoreRequest.DEFAULT,\n toggleOn: true,\n storeLocation: storeLocation,\n toBinary() {\n return requests.ToggleDeviceDbStoreRequest.toBinary(this);\n },\n };\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: requests.ToggleDeviceDbStoreRequest & gateway.Message = {\n ...requests.ToggleDeviceDbStoreRequest.DEFAULT,\n toBinary() {\n return requests.ToggleDeviceDbStoreRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/toggle_store', request);\n }\n\n /**\n * Checks if the Device DB store is currently enabled.\n * @returns True if the Device DB store is enabled.\n */\n public static isDeviceDbStoreEnabled(): boolean {\n const request: requests.EmptyRequest & gateway.Message = {\n ...requests.EmptyRequest.DEFAULT,\n toBinary() {\n return requests.EmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.BoolResponse>(\n 'device_db/check_store',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Clears the Device DB store on the local filesystem.\n * Note: If the device DB was enabled with a custom store location, store files will be removed in that location.\n */\n public static async clearDeviceDbStore(): Promise<void> {\n const request: requests.EmptyRequest & gateway.Message = {\n ...requests.EmptyRequest.DEFAULT,\n toBinary() {\n return requests.EmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device_db/clear_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: requests.SetInternalModeRequest & gateway.Message = {\n ...requests.SetInternalModeRequest.DEFAULT,\n mode: mode,\n toBinary() {\n return requests.SetInternalModeRequest.toBinary(this);\n },\n };\n\n gateway.callSync('library/set_internal_mode', request);\n }\n\n /**\n * Sets the period between polling for IDLE during movements.\n * Caution: Setting the period too low may cause performance issues.\n * @param period Period in milliseconds.\n * Negative value restores the default period.\n */\n public static setIdlePollingPeriod(\n period: number\n ): void {\n const request: requests.IntRequest & gateway.Message = {\n ...requests.IntRequest.DEFAULT,\n value: period,\n toBinary() {\n return requests.IntRequest.toBinary(this);\n },\n };\n\n gateway.callSync('library/set_idle_polling_period', request);\n }\n\n /**\n * Throws an error if the version of the loaded shared library does not match the caller's version.\n */\n public static checkVersion(): void {\n const request: requests.CheckVersionRequest & gateway.Message = {\n ...requests.CheckVersionRequest.DEFAULT,\n host: 'js',\n version: '7.15.0',\n toBinary() {\n return requests.CheckVersionRequest.toBinary(this);\n },\n };\n\n gateway.callSync('library/check_version', request);\n }\n}\n\ngateway.addInitCallback(Library.checkVersion);\n"]}
|