@zaber/motion 7.8.2 → 7.8.3

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.
package/LICENSE CHANGED
@@ -1482,7 +1482,69 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1482
1482
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1483
1483
 
1484
1484
  ------------------
1485
- golang.org/x/net v0.12.0
1485
+ golang.org/x/mod v0.12.0
1486
+ ------------------
1487
+ Copyright (c) 2009 The Go Authors. All rights reserved.
1488
+
1489
+ Redistribution and use in source and binary forms, with or without
1490
+ modification, are permitted provided that the following conditions are
1491
+ met:
1492
+
1493
+ * Redistributions of source code must retain the above copyright
1494
+ notice, this list of conditions and the following disclaimer.
1495
+ * Redistributions in binary form must reproduce the above
1496
+ copyright notice, this list of conditions and the following disclaimer
1497
+ in the documentation and/or other materials provided with the
1498
+ distribution.
1499
+ * Neither the name of Google Inc. nor the names of its
1500
+ contributors may be used to endorse or promote products derived from
1501
+ this software without specific prior written permission.
1502
+
1503
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1504
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1505
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1506
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1507
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1508
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1509
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1510
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1511
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1512
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1513
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1514
+
1515
+ ------------------
1516
+ golang.org/x/net v0.0.0-20190620200207-3b0461eec859
1517
+ ------------------
1518
+ Copyright (c) 2009 The Go Authors. All rights reserved.
1519
+
1520
+ Redistribution and use in source and binary forms, with or without
1521
+ modification, are permitted provided that the following conditions are
1522
+ met:
1523
+
1524
+ * Redistributions of source code must retain the above copyright
1525
+ notice, this list of conditions and the following disclaimer.
1526
+ * Redistributions in binary form must reproduce the above
1527
+ copyright notice, this list of conditions and the following disclaimer
1528
+ in the documentation and/or other materials provided with the
1529
+ distribution.
1530
+ * Neither the name of Google Inc. nor the names of its
1531
+ contributors may be used to endorse or promote products derived from
1532
+ this software without specific prior written permission.
1533
+
1534
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1535
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1536
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1537
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1538
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1539
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1540
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1541
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1542
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1543
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1544
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1545
+
1546
+ ------------------
1547
+ golang.org/x/sync v0.3.0
1486
1548
  ------------------
1487
1549
  Copyright (c) 2009 The Go Authors. All rights reserved.
1488
1550
 
@@ -1543,6 +1605,37 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1543
1605
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1544
1606
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1545
1607
 
1608
+ ------------------
1609
+ golang.org/x/text v0.3.0
1610
+ ------------------
1611
+ Copyright (c) 2009 The Go Authors. All rights reserved.
1612
+
1613
+ Redistribution and use in source and binary forms, with or without
1614
+ modification, are permitted provided that the following conditions are
1615
+ met:
1616
+
1617
+ * Redistributions of source code must retain the above copyright
1618
+ notice, this list of conditions and the following disclaimer.
1619
+ * Redistributions in binary form must reproduce the above
1620
+ copyright notice, this list of conditions and the following disclaimer
1621
+ in the documentation and/or other materials provided with the
1622
+ distribution.
1623
+ * Neither the name of Google Inc. nor the names of its
1624
+ contributors may be used to endorse or promote products derived from
1625
+ this software without specific prior written permission.
1626
+
1627
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1628
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1629
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1630
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1631
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1632
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1633
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1634
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1635
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1636
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1637
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1638
+
1546
1639
  ------------------
1547
1640
  gonum.org/v1/gonum v0.16.0
1548
1641
  ------------------
@@ -12,7 +12,7 @@ export interface CanSetStateDeviceResponse {
12
12
  * A list of axis responses, potentially with messages for errors
13
13
  * which would block setting the state of the device's axes.
14
14
  */
15
- axisErrors: CanSetStateAxisResponse[];
15
+ axisResponses: CanSetStateAxisResponse[];
16
16
  }
17
17
  export declare const CanSetStateDeviceResponse: {
18
18
  fromBinary: (buffer: Uint8Array) => CanSetStateDeviceResponse;
@@ -1 +1 @@
1
- {"version":3,"file":"can_set_state_device_response.d.ts","sourceRoot":"","sources":["../../../src/ascii/can_set_state_device_response.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAExB;;;OAGG;IACH,UAAU,EAAE,uBAAuB,EAAE,CAAC;CAEvC;AAED,eAAO,MAAM,yBAAyB;yBACf,UAAU,KAAG,yBAAyB;sBACzC,yBAAyB,KAAG,UAAU;;sBAKtC,yBAAyB,KAAG,yBAAyB;qBAQtD,KAAK,QAAQ,KAAG,yBAAyB;CAI3D,CAAC"}
1
+ {"version":3,"file":"can_set_state_device_response.d.ts","sourceRoot":"","sources":["../../../src/ascii/can_set_state_device_response.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAExB;;;OAGG;IACH,aAAa,EAAE,uBAAuB,EAAE,CAAC;CAE1C;AAED,eAAO,MAAM,yBAAyB;yBACf,UAAU,KAAG,yBAAyB;sBACzC,yBAAyB,KAAG,UAAU;;sBAKtC,yBAAyB,KAAG,yBAAyB;qBAQtD,KAAK,QAAQ,KAAG,yBAAyB;CAI3D,CAAC"}
@@ -10,7 +10,7 @@ exports.CanSetStateDeviceResponse = {
10
10
  toBinary: (value) => bson_1.BSON.serialize(exports.CanSetStateDeviceResponse.sanitize(value)),
11
11
  DEFAULT: Object.freeze({
12
12
  error: null,
13
- axisErrors: [],
13
+ axisResponses: [],
14
14
  }),
15
15
  sanitize: (value) => {
16
16
  if (value == null) {
@@ -21,12 +21,12 @@ exports.CanSetStateDeviceResponse = {
21
21
  }
22
22
  return {
23
23
  error: value.error != null ? sanitizer_1.sanitizer.sanitizeString(value.error, 'error') : null,
24
- axisErrors: Array.from(value.axisErrors ?? [], item => can_set_state_axis_response_1.CanSetStateAxisResponse.sanitize(item)),
24
+ axisResponses: Array.from(value.axisResponses ?? [], item => can_set_state_axis_response_1.CanSetStateAxisResponse.sanitize(item)),
25
25
  };
26
26
  },
27
27
  convert: (value) => ({
28
28
  error: value.error,
29
- axisErrors: value.axisErrors,
29
+ axisResponses: value.axisResponses,
30
30
  })
31
31
  };
32
32
  //# sourceMappingURL=can_set_state_device_response.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"can_set_state_device_response.js","sourceRoot":"","sources":["../../../src/ascii/can_set_state_device_response.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACpD,+BAA4B;AAC5B,oDAAiD;AACjD,sFAA+E;AAmBlE,QAAA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way/sanitizer';\nimport { CanSetStateAxisResponse } from '../ascii/can_set_state_axis_response';\n\n/**\n * An object containing any setup issues that will prevent setting a state to a given device.\n */\nexport interface CanSetStateDeviceResponse {\n /**\n * The error blocking applying this state to the given device, or null if there is no error.\n */\n error?: (string | null);\n\n /**\n * A list of axis responses, potentially with messages for errors\n * which would block setting the state of the device's axes.\n */\n axisErrors: CanSetStateAxisResponse[];\n\n}\n\nexport const CanSetStateDeviceResponse = {\n fromBinary: (buffer: Uint8Array): CanSetStateDeviceResponse => CanSetStateDeviceResponse.convert(BSON.deserialize(buffer, { useBigInt64: true })),\n toBinary: (value: CanSetStateDeviceResponse): Uint8Array => BSON.serialize(CanSetStateDeviceResponse.sanitize(value)),\n DEFAULT: Object.freeze({\n error: null,\n axisErrors: [],\n }) as Readonly<CanSetStateDeviceResponse>,\n sanitize: (value: CanSetStateDeviceResponse): CanSetStateDeviceResponse => {\n if (value == null) { throw new TypeError('Expected CanSetStateDeviceResponse object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected CanSetStateDeviceResponse object but got ${typeof value}.`) }\n return {\n error: value.error != null ? sanitizer.sanitizeString(value.error, 'error') : null,\n axisErrors: Array.from(value.axisErrors ?? [], item => CanSetStateAxisResponse.sanitize(item)),\n };\n },\n convert: (value: BSON.Document): CanSetStateDeviceResponse => ({\n error: value.error,\n axisErrors: value.axisErrors,\n })\n};\n"]}
1
+ {"version":3,"file":"can_set_state_device_response.js","sourceRoot":"","sources":["../../../src/ascii/can_set_state_device_response.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACpD,+BAA4B;AAC5B,oDAAiD;AACjD,sFAA+E;AAmBlE,QAAA,yBAAyB,GAAG;IACvC,UAAU,EAAE,CAAC,MAAkB,EAA6B,EAAE,CAAC,iCAAyB,CAAC,OAAO,CAAC,WAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IACjJ,QAAQ,EAAE,CAAC,KAAgC,EAAc,EAAE,CAAC,WAAI,CAAC,SAAS,CAAC,iCAAyB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACrH,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,KAAK,EAAE,IAAI;QACX,aAAa,EAAE,EAAE;KAClB,CAAwC;IACzC,QAAQ,EAAE,CAAC,KAAgC,EAA6B,EAAE;QACxE,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,sEAAsE,CAAC,CAAA;QAAC,CAAC;QAClH,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,qDAAqD,OAAO,KAAK,GAAG,CAAC,CAAA;QAAC,CAAC;QAC5H,OAAO;YACL,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,qBAAS,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI;YAClF,aAAa,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,qDAAuB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;SACrG,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,CAAC,KAAoB,EAA6B,EAAE,CAAC,CAAC;QAC7D,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,aAAa,EAAE,KAAK,CAAC,aAAa;KACnC,CAAC;CACH,CAAC","sourcesContent":["/* This file is generated. Do not modify by hand. */\nimport { BSON } from 'bson';\nimport { sanitizer } from '../gateway/sanitizer';\nimport { CanSetStateAxisResponse } from '../ascii/can_set_state_axis_response';\n\n/**\n * An object containing any setup issues that will prevent setting a state to a given device.\n */\nexport interface CanSetStateDeviceResponse {\n /**\n * The error blocking applying this state to the given device, or null if there is no error.\n */\n error?: (string | null);\n\n /**\n * A list of axis responses, potentially with messages for errors\n * which would block setting the state of the device's axes.\n */\n axisResponses: CanSetStateAxisResponse[];\n\n}\n\nexport const CanSetStateDeviceResponse = {\n fromBinary: (buffer: Uint8Array): CanSetStateDeviceResponse => CanSetStateDeviceResponse.convert(BSON.deserialize(buffer, { useBigInt64: true })),\n toBinary: (value: CanSetStateDeviceResponse): Uint8Array => BSON.serialize(CanSetStateDeviceResponse.sanitize(value)),\n DEFAULT: Object.freeze({\n error: null,\n axisResponses: [],\n }) as Readonly<CanSetStateDeviceResponse>,\n sanitize: (value: CanSetStateDeviceResponse): CanSetStateDeviceResponse => {\n if (value == null) { throw new TypeError('Expected CanSetStateDeviceResponse object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected CanSetStateDeviceResponse object but got ${typeof value}.`) }\n return {\n error: value.error != null ? sanitizer.sanitizeString(value.error, 'error') : null,\n axisResponses: Array.from(value.axisResponses ?? [], item => CanSetStateAxisResponse.sanitize(item)),\n };\n },\n convert: (value: BSON.Document): CanSetStateDeviceResponse => ({\n error: value.error,\n axisResponses: value.axisResponses,\n })\n};\n"]}
@@ -157,7 +157,7 @@ class Library {
157
157
  const request = {
158
158
  ...requests.CheckVersionRequest.DEFAULT,
159
159
  host: 'js',
160
- version: '7.8.2',
160
+ version: '7.8.3',
161
161
  toBinary() {
162
162
  return requests.CheckVersionRequest.toBinary(this);
163
163
  },
@@ -1 +1 @@
1
- {"version":3,"file":"library.js","sourceRoot":"","sources":["../../src/library.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,mDAAqC;AACrC,qDAAuC;AAIvC,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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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,OAAO;YAChB,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;AAxKD,0BAwKC;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';\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 * 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.8.2',\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"]}
1
+ {"version":3,"file":"library.js","sourceRoot":"","sources":["../../src/library.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,mDAAqC;AACrC,qDAAuC;AAIvC,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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G,QAAQ,CAAC,mBAAmB,CAAC,OAAO;YACvC,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,OAAO;YAChB,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;AAxKD,0BAwKC;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';\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 * 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.8.3',\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"]}
@@ -41,7 +41,7 @@ export declare class WdiAutofocusProvider {
41
41
  genericRead(registerId: number, size: number, options?: WdiAutofocusProvider.GenericReadOptions): Promise<number[]>;
42
42
  /**
43
43
  * Generic write operation.
44
- * @param registerId Register address to read from.
44
+ * @param registerId Register address to write to.
45
45
  * @param [size=0] Data size to write. Valid values are (0,1,2,4). Determines the data type (Nil, Byte, Word, DWord).
46
46
  * @param [data=[]] Array of values to write to the register. Empty array is allowed.
47
47
  * @param [options.offset=0] Offset within the register (defaults to 0).
@@ -117,7 +117,7 @@ class WdiAutofocusProvider {
117
117
  }
118
118
  /**
119
119
  * Generic write operation.
120
- * @param registerId Register address to read from.
120
+ * @param registerId Register address to write to.
121
121
  * @param [size=0] Data size to write. Valid values are (0,1,2,4). Determines the data type (Nil, Byte, Word, DWord).
122
122
  * @param [data=[]] Array of values to write to the register. Empty array is allowed.
123
123
  * @param [options.offset=0] Offset within the register (defaults to 0).
@@ -1 +1 @@
1
- {"version":3,"file":"wdi_autofocus_provider.js","sourceRoot":"","sources":["../../../src/microscopy/wdi_autofocus_provider.ts"],"names":[],"mappings":";AA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O,GAAqD;YAChE,GAAG,QAAQ,CAAC,qBAAqB,CAAC,OAAO;YACzC,WAAW,EAAE,IAAI,CAAC,UAAU;YAC5B,QAAQ;gBACN,OAAO,QAAQ,CAAC,qBAAqB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACvD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,gBAAgB,EAChB,OAAO,EACP,QAAQ,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC,MAAM,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,QAAQ;QACb,MAAM,OAAO,GAAqD;YAChE,GAAG,QAAQ,CAAC,qBAAqB,CAAC,OAAO;YACzC,WAAW,EAAE,IAAI,CAAC,UAAU;YAC5B,QAAQ;gBACN,OAAO,QAAQ,CAAC,qBAAqB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACvD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,eAAe,EACf,OAAO,EACP,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACtC,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;IAED;;;;MAIE;IACK,IAAI;QACT,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC;;AAvOH,oDAwOC;AAvOC;;GAEG;AACoB,qCAAgB,GAAW,EAAE,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 { registerForFinalization } from '../finalizer';\nimport { WdiAutofocusProviderStatus } from './wdi_autofocus_provider_status';\n\n/**\n * Class representing access to WDI Autofocus connection.\n */\nexport class WdiAutofocusProvider {\n /**\n * Default port number for TCP connections to WDI autofocus.\n */\n public static readonly DEFAULT_TCP_PORT: number = 27;\n\n /**\n * The ID identifies the autofocus with the underlying library.\n */\n public get providerId(): number {\n return this._providerId;\n }\n private _providerId: number;\n\n constructor(providerId: number) {\n this._providerId = providerId;\n registerForFinalization(this, WdiAutofocusProvider._free.bind(null, providerId));\n }\n\n /**\n * Opens a TCP connection to WDI autofocus.\n * @param hostName Hostname or IP address.\n * @param [port=WdiAutofocusProvider.DEFAULT_TCP_PORT] Optional port number (defaults to 27).\n * @returns An object representing the autofocus connection.\n */\n public static async openTcp(\n hostName: string,\n port: number = WdiAutofocusProvider.DEFAULT_TCP_PORT\n ): Promise<WdiAutofocusProvider> {\n const request: requests.OpenInterfaceRequest & gateway.Message = {\n ...requests.OpenInterfaceRequest.DEFAULT,\n interfaceType: requests.InterfaceType.TCP,\n hostName: hostName,\n port: port,\n toBinary() {\n return requests.OpenInterfaceRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntResponse>(\n 'wdi/open',\n request,\n requests.IntResponse.fromBinary);\n return new WdiAutofocusProvider(response.value);\n }\n\n /**\n * Close the connection.\n */\n public async close(): Promise<void> {\n const request: requests.InterfaceEmptyRequest & gateway.Message = {\n ...requests.InterfaceEmptyRequest.DEFAULT,\n interfaceId: this.providerId,\n toBinary() {\n return requests.InterfaceEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('wdi/close', request);\n }\n\n /**\n * Frees the connection.\n * @param providerId The ID of the connection to free.\n */\n private static _free(\n providerId: number\n ): void {\n const request: requests.InterfaceEmptyRequest & gateway.Message = {\n ...requests.InterfaceEmptyRequest.DEFAULT,\n interfaceId: providerId,\n toBinary() {\n return requests.InterfaceEmptyRequest.toBinary(this);\n },\n };\n\n gateway.callSync('wdi/free', request);\n }\n\n /**\n * Generic read operation.\n * @param registerId Register address to read from.\n * @param size Data size to read. Valid values are (1,2,4). Determines the data type (Byte, Word, DWord).\n * @param [options.count=1] Number of values to read (defaults to 1).\n * @param [options.offset=0] Offset within the register (defaults to 0).\n * @param [options.registerBank='U'] Register bank letter (defaults to U for user bank).\n * @returns Array of integers read from the device.\n */\n public async genericRead(\n registerId: number,\n size: number,\n options: WdiAutofocusProvider.GenericReadOptions = {}\n ): Promise<number[]> {\n const {\n count = 1,\n offset = 0,\n registerBank = 'U',\n } = options;\n const request: requests.WdiGenericRequest & gateway.Message = {\n ...requests.WdiGenericRequest.DEFAULT,\n interfaceId: this.providerId,\n registerId: registerId,\n size: size,\n count: count,\n offset: offset,\n registerBank: registerBank,\n toBinary() {\n return requests.WdiGenericRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntArrayResponse>(\n 'wdi/read',\n request,\n requests.IntArrayResponse.fromBinary);\n return response.values;\n }\n\n /**\n * Generic write operation.\n * @param registerId Register address to read from.\n * @param [size=0] Data size to write. Valid values are (0,1,2,4). Determines the data type (Nil, Byte, Word, DWord).\n * @param [data=[]] Array of values to write to the register. Empty array is allowed.\n * @param [options.offset=0] Offset within the register (defaults to 0).\n * @param [options.registerBank='U'] Register bank letter (defaults to U for user bank).\n */\n public async genericWrite(\n registerId: number,\n size: number = 0,\n data: number[] = [],\n options: WdiAutofocusProvider.GenericWriteOptions = {}\n ): Promise<void> {\n const {\n offset = 0,\n registerBank = 'U',\n } = options;\n const request: requests.WdiGenericRequest & gateway.Message = {\n ...requests.WdiGenericRequest.DEFAULT,\n interfaceId: this.providerId,\n registerId: registerId,\n size: size,\n data: data,\n offset: offset,\n registerBank: registerBank,\n toBinary() {\n return requests.WdiGenericRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('wdi/write', request);\n }\n\n /**\n * Enables the laser.\n */\n public async enableLaser(): Promise<void> {\n const request: requests.WdiGenericRequest & gateway.Message = {\n ...requests.WdiGenericRequest.DEFAULT,\n interfaceId: this.providerId,\n registerId: 1,\n toBinary() {\n return requests.WdiGenericRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('wdi/write', request);\n }\n\n /**\n * Disables the laser.\n */\n public async disableLaser(): Promise<void> {\n const request: requests.WdiGenericRequest & gateway.Message = {\n ...requests.WdiGenericRequest.DEFAULT,\n interfaceId: this.providerId,\n registerId: 2,\n toBinary() {\n return requests.WdiGenericRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('wdi/write', request);\n }\n\n /**\n * Gets the status of the autofocus.\n * @returns The status of the autofocus.\n */\n public async getStatus(): Promise<WdiAutofocusProviderStatus> {\n const request: requests.InterfaceEmptyRequest & gateway.Message = {\n ...requests.InterfaceEmptyRequest.DEFAULT,\n interfaceId: this.providerId,\n toBinary() {\n return requests.InterfaceEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.WdiGetStatusResponse>(\n 'wdi/get_status',\n request,\n requests.WdiGetStatusResponse.fromBinary);\n return response.status;\n }\n\n /**\n * Returns a string that represents the autofocus connection.\n * @returns A string that represents the connection.\n */\n public toString(): string {\n const request: requests.InterfaceEmptyRequest & gateway.Message = {\n ...requests.InterfaceEmptyRequest.DEFAULT,\n interfaceId: this.providerId,\n toBinary() {\n return requests.InterfaceEmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'wdi/to_string',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Releases the native resources of the connection.\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 WdiAutofocusProvider._free(this.providerId);\n }\n}\n\nnamespace WdiAutofocusProvider {\n export interface GenericReadOptions {\n /**\n * Number of values to read (defaults to 1).\n */\n count?: number;\n /**\n * Offset within the register (defaults to 0).\n */\n offset?: number;\n /**\n * Register bank letter (defaults to U for user bank).\n */\n registerBank?: string;\n }\n export interface GenericWriteOptions {\n /**\n * Offset within the register (defaults to 0).\n */\n offset?: number;\n /**\n * Register bank letter (defaults to U for user bank).\n */\n registerBank?: string;\n }\n}\n"]}
1
+ {"version":3,"file":"wdi_autofocus_provider.js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IAChD,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,SAAS;QACpB,MAAM,OAAO,GAAqD;YAChE,GAAG,QAAQ,CAAC,qBAAqB,CAAC,OAAO;YACzC,WAAW,EAAE,IAAI,CAAC,UAAU;YAC5B,QAAQ;gBACN,OAAO,QAAQ,CAAC,qBAAqB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACvD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,gBAAgB,EAChB,OAAO,EACP,QAAQ,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC,MAAM,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,QAAQ;QACb,MAAM,OAAO,GAAqD;YAChE,GAAG,QAAQ,CAAC,qBAAqB,CAAC,OAAO;YACzC,WAAW,EAAE,IAAI,CAAC,UAAU;YAC5B,QAAQ;gBACN,OAAO,QAAQ,CAAC,qBAAqB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACvD,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,eAAe,EACf,OAAO,EACP,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACtC,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;IAED;;;;MAIE;IACK,IAAI;QACT,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC;;AAvOH,oDAwOC;AAvOC;;GAEG;AACoB,qCAAgB,GAAW,EAAE,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 { registerForFinalization } from '../finalizer';\nimport { WdiAutofocusProviderStatus } from './wdi_autofocus_provider_status';\n\n/**\n * Class representing access to WDI Autofocus connection.\n */\nexport class WdiAutofocusProvider {\n /**\n * Default port number for TCP connections to WDI autofocus.\n */\n public static readonly DEFAULT_TCP_PORT: number = 27;\n\n /**\n * The ID identifies the autofocus with the underlying library.\n */\n public get providerId(): number {\n return this._providerId;\n }\n private _providerId: number;\n\n constructor(providerId: number) {\n this._providerId = providerId;\n registerForFinalization(this, WdiAutofocusProvider._free.bind(null, providerId));\n }\n\n /**\n * Opens a TCP connection to WDI autofocus.\n * @param hostName Hostname or IP address.\n * @param [port=WdiAutofocusProvider.DEFAULT_TCP_PORT] Optional port number (defaults to 27).\n * @returns An object representing the autofocus connection.\n */\n public static async openTcp(\n hostName: string,\n port: number = WdiAutofocusProvider.DEFAULT_TCP_PORT\n ): Promise<WdiAutofocusProvider> {\n const request: requests.OpenInterfaceRequest & gateway.Message = {\n ...requests.OpenInterfaceRequest.DEFAULT,\n interfaceType: requests.InterfaceType.TCP,\n hostName: hostName,\n port: port,\n toBinary() {\n return requests.OpenInterfaceRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntResponse>(\n 'wdi/open',\n request,\n requests.IntResponse.fromBinary);\n return new WdiAutofocusProvider(response.value);\n }\n\n /**\n * Close the connection.\n */\n public async close(): Promise<void> {\n const request: requests.InterfaceEmptyRequest & gateway.Message = {\n ...requests.InterfaceEmptyRequest.DEFAULT,\n interfaceId: this.providerId,\n toBinary() {\n return requests.InterfaceEmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('wdi/close', request);\n }\n\n /**\n * Frees the connection.\n * @param providerId The ID of the connection to free.\n */\n private static _free(\n providerId: number\n ): void {\n const request: requests.InterfaceEmptyRequest & gateway.Message = {\n ...requests.InterfaceEmptyRequest.DEFAULT,\n interfaceId: providerId,\n toBinary() {\n return requests.InterfaceEmptyRequest.toBinary(this);\n },\n };\n\n gateway.callSync('wdi/free', request);\n }\n\n /**\n * Generic read operation.\n * @param registerId Register address to read from.\n * @param size Data size to read. Valid values are (1,2,4). Determines the data type (Byte, Word, DWord).\n * @param [options.count=1] Number of values to read (defaults to 1).\n * @param [options.offset=0] Offset within the register (defaults to 0).\n * @param [options.registerBank='U'] Register bank letter (defaults to U for user bank).\n * @returns Array of integers read from the device.\n */\n public async genericRead(\n registerId: number,\n size: number,\n options: WdiAutofocusProvider.GenericReadOptions = {}\n ): Promise<number[]> {\n const {\n count = 1,\n offset = 0,\n registerBank = 'U',\n } = options;\n const request: requests.WdiGenericRequest & gateway.Message = {\n ...requests.WdiGenericRequest.DEFAULT,\n interfaceId: this.providerId,\n registerId: registerId,\n size: size,\n count: count,\n offset: offset,\n registerBank: registerBank,\n toBinary() {\n return requests.WdiGenericRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.IntArrayResponse>(\n 'wdi/read',\n request,\n requests.IntArrayResponse.fromBinary);\n return response.values;\n }\n\n /**\n * Generic write operation.\n * @param registerId Register address to write to.\n * @param [size=0] Data size to write. Valid values are (0,1,2,4). Determines the data type (Nil, Byte, Word, DWord).\n * @param [data=[]] Array of values to write to the register. Empty array is allowed.\n * @param [options.offset=0] Offset within the register (defaults to 0).\n * @param [options.registerBank='U'] Register bank letter (defaults to U for user bank).\n */\n public async genericWrite(\n registerId: number,\n size: number = 0,\n data: number[] = [],\n options: WdiAutofocusProvider.GenericWriteOptions = {}\n ): Promise<void> {\n const {\n offset = 0,\n registerBank = 'U',\n } = options;\n const request: requests.WdiGenericRequest & gateway.Message = {\n ...requests.WdiGenericRequest.DEFAULT,\n interfaceId: this.providerId,\n registerId: registerId,\n size: size,\n data: data,\n offset: offset,\n registerBank: registerBank,\n toBinary() {\n return requests.WdiGenericRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('wdi/write', request);\n }\n\n /**\n * Enables the laser.\n */\n public async enableLaser(): Promise<void> {\n const request: requests.WdiGenericRequest & gateway.Message = {\n ...requests.WdiGenericRequest.DEFAULT,\n interfaceId: this.providerId,\n registerId: 1,\n toBinary() {\n return requests.WdiGenericRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('wdi/write', request);\n }\n\n /**\n * Disables the laser.\n */\n public async disableLaser(): Promise<void> {\n const request: requests.WdiGenericRequest & gateway.Message = {\n ...requests.WdiGenericRequest.DEFAULT,\n interfaceId: this.providerId,\n registerId: 2,\n toBinary() {\n return requests.WdiGenericRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('wdi/write', request);\n }\n\n /**\n * Gets the status of the autofocus.\n * @returns The status of the autofocus.\n */\n public async getStatus(): Promise<WdiAutofocusProviderStatus> {\n const request: requests.InterfaceEmptyRequest & gateway.Message = {\n ...requests.InterfaceEmptyRequest.DEFAULT,\n interfaceId: this.providerId,\n toBinary() {\n return requests.InterfaceEmptyRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.WdiGetStatusResponse>(\n 'wdi/get_status',\n request,\n requests.WdiGetStatusResponse.fromBinary);\n return response.status;\n }\n\n /**\n * Returns a string that represents the autofocus connection.\n * @returns A string that represents the connection.\n */\n public toString(): string {\n const request: requests.InterfaceEmptyRequest & gateway.Message = {\n ...requests.InterfaceEmptyRequest.DEFAULT,\n interfaceId: this.providerId,\n toBinary() {\n return requests.InterfaceEmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.StringResponse>(\n 'wdi/to_string',\n request,\n requests.StringResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Releases the native resources of the connection.\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 WdiAutofocusProvider._free(this.providerId);\n }\n}\n\nnamespace WdiAutofocusProvider {\n export interface GenericReadOptions {\n /**\n * Number of values to read (defaults to 1).\n */\n count?: number;\n /**\n * Offset within the register (defaults to 0).\n */\n offset?: number;\n /**\n * Register bank letter (defaults to U for user bank).\n */\n registerBank?: string;\n }\n export interface GenericWriteOptions {\n /**\n * Offset within the register (defaults to 0).\n */\n offset?: number;\n /**\n * Register bank letter (defaults to U for user bank).\n */\n registerBank?: string;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zaber/motion",
3
- "version": "7.8.2",
3
+ "version": "7.8.3",
4
4
  "description": "Zaber Motion Library is a multi-platform library used to operate Zaber devices.",
5
5
  "keywords": [],
6
6
  "main": "dist/lib/index.js",