@zaber/motion 7.1.0 → 7.1.2
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/dist/lib/custom_bindings.d.ts +3 -0
- package/dist/lib/custom_bindings.d.ts.map +1 -0
- package/dist/lib/custom_bindings.js +10 -0
- package/dist/lib/custom_bindings.js.map +1 -0
- package/dist/lib/gateway/bindings.d.ts +4 -2
- package/dist/lib/gateway/bindings.d.ts.map +1 -1
- package/dist/lib/gateway/bindings.exec.d.ts +2 -0
- package/dist/lib/gateway/bindings.exec.d.ts.map +1 -0
- package/dist/lib/gateway/bindings.exec.js +16 -0
- package/dist/lib/gateway/bindings.exec.js.map +1 -0
- package/dist/lib/gateway/bindings.js +11 -4
- package/dist/lib/gateway/bindings.js.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +1 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/library.js +1 -1
- package/dist/lib/library.js.map +1 -1
- package/package.json +9 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom_bindings.d.ts","sourceRoot":"","sources":["../../src/custom_bindings.ts"],"names":[],"mappings":"AAEA,8GAA8G;AAC9G,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEvD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCustomBindings = void 0;
|
|
4
|
+
const bindings_1 = require("./gateway/bindings");
|
|
5
|
+
/** Sets a custom directory to read the executable binding from if not running in a normal node environment */
|
|
6
|
+
function useCustomBindings(libPath) {
|
|
7
|
+
(0, bindings_1.setEnv)('exec', libPath);
|
|
8
|
+
}
|
|
9
|
+
exports.useCustomBindings = useCustomBindings;
|
|
10
|
+
//# sourceMappingURL=custom_bindings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom_bindings.js","sourceRoot":"","sources":["../../src/custom_bindings.ts"],"names":[],"mappings":";;;AAAA,iDAA4C;AAE5C,8GAA8G;AAC9G,SAAgB,iBAAiB,CAAC,OAAe;IAC/C,IAAA,iBAAM,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC1B,CAAC;AAFD,8CAEC","sourcesContent":["import { setEnv } from './gateway/bindings';\n\n/** Sets a custom directory to read the executable binding from if not running in a normal node environment */\nexport function useCustomBindings(libPath: string): void {\n setEnv('exec', libPath);\n}\n"]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
type Env = 'node' | 'wasm';
|
|
2
|
-
export declare
|
|
1
|
+
type Env = 'node' | 'wasm' | 'exec';
|
|
2
|
+
export declare let bindingLibPath: string;
|
|
3
|
+
export declare function setEnv(env: Exclude<Env, 'exec'>): void;
|
|
4
|
+
export declare function setEnv(env: 'exec', libPath: string): void;
|
|
3
5
|
export declare const getBinding: () => any;
|
|
4
6
|
export declare const addInitCallback: (cb: () => void) => void;
|
|
5
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../../src/gateway/bindings.ts"],"names":[],"mappings":"AACA,KAAK,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../../src/gateway/bindings.ts"],"names":[],"mappings":"AACA,KAAK,GAAG,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAGpC,eAAO,IAAI,cAAc,QAAK,CAAC;AAK/B,wBAAgB,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;AACxD,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;AAW3D,eAAO,MAAM,UAAU,QAAO,GAiB7B,CAAC;AAEF,eAAO,MAAM,eAAe,OAAQ,MAAM,IAAI,SAK7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bindings.exec.d.ts","sourceRoot":"","sources":["../../../src/gateway/bindings.exec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const path_1 = __importDefault(require("path"));
|
|
7
|
+
const bindings_1 = require("./bindings");
|
|
8
|
+
const execLibPath = bindings_1.bindingLibPath.at(-1) !== path_1.default.sep ? `${bindings_1.bindingLibPath}${path_1.default.sep}` : bindings_1.bindingLibPath;
|
|
9
|
+
try {
|
|
10
|
+
process.dlopen(module, path_1.default.join(execLibPath, 'zaber-motion.node'));
|
|
11
|
+
module.exports.loadDll(execLibPath);
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
throw new Error(`Failed to load bindings at "${execLibPath}" (${error})`);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=bindings.exec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bindings.exec.js","sourceRoot":"","sources":["../../../src/gateway/bindings.exec.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AACxB,yCAA4C;AAE5C,MAAM,WAAW,GAAG,yBAAc,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,cAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,yBAAc,GAAG,cAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,yBAAc,CAAC;AACzG,IAAI,CAAC;IACH,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC;IACpE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;AACtC,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,MAAM,IAAI,KAAK,CAAC,+BAA+B,WAAW,MAAM,KAAK,GAAG,CAAC,CAAC;AAC5E,CAAC","sourcesContent":["import path from 'path';\nimport { bindingLibPath } from './bindings';\n\nconst execLibPath = bindingLibPath.at(-1) !== path.sep ? `${bindingLibPath}${path.sep}` : bindingLibPath;\ntry {\n process.dlopen(module, path.join(execLibPath, 'zaber-motion.node'));\n module.exports.loadDll(execLibPath);\n} catch (error) {\n throw new Error(`Failed to load bindings at \"${execLibPath}\" (${error})`);\n}\n"]}
|
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addInitCallback = exports.getBinding = exports.setEnv = void 0;
|
|
3
|
+
exports.addInitCallback = exports.getBinding = exports.setEnv = exports.bindingLibPath = void 0;
|
|
4
4
|
let execEnv = 'node';
|
|
5
|
+
exports.bindingLibPath = '';
|
|
5
6
|
let locked = false;
|
|
6
7
|
let bindings;
|
|
7
8
|
let initCallbacks = [];
|
|
8
|
-
|
|
9
|
+
function setEnv(env, libPath) {
|
|
9
10
|
if (locked) {
|
|
10
11
|
throw new Error('Library was already loaded.');
|
|
11
12
|
}
|
|
12
13
|
execEnv = env;
|
|
13
|
-
|
|
14
|
+
if (libPath != null) {
|
|
15
|
+
exports.bindingLibPath = libPath;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
14
18
|
exports.setEnv = setEnv;
|
|
15
19
|
const getBinding = () => {
|
|
16
20
|
if (bindings != null) {
|
|
17
21
|
return bindings;
|
|
18
22
|
}
|
|
19
23
|
locked = true;
|
|
20
|
-
if (execEnv === '
|
|
24
|
+
if (execEnv === 'exec') {
|
|
25
|
+
bindings = require('./bindings.exec');
|
|
26
|
+
}
|
|
27
|
+
else if (execEnv === 'node') {
|
|
21
28
|
bindings = require('./bindings.node').binding;
|
|
22
29
|
}
|
|
23
30
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../../../src/gateway/bindings.ts"],"names":[],"mappings":";;;AAGA,IAAI,OAAO,GAAQ,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../../../src/gateway/bindings.ts"],"names":[],"mappings":";;;AAGA,IAAI,OAAO,GAAQ,MAAM,CAAC;AACf,QAAA,cAAc,GAAG,EAAE,CAAC;AAC/B,IAAI,MAAM,GAAG,KAAK,CAAC;AACnB,IAAI,QAAa,CAAC;AAClB,IAAI,aAAa,GAA0B,EAAE,CAAC;AAI9C,SAAgB,MAAM,CAAC,GAAQ,EAAE,OAAgB;IAC/C,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,GAAG,GAAG,CAAC;IACd,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;QACpB,sBAAc,GAAG,OAAO,CAAC;IAC3B,CAAC;AACH,CAAC;AARD,wBAQC;AAEM,MAAM,UAAU,GAAG,GAAQ,EAAE;IAClC,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;QACrB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,MAAM,GAAG,IAAI,CAAC;IACd,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC;QACvB,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACxC,CAAC;SAAM,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC;QAC9B,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC;IAChD,CAAC;SAAM,CAAC;QACN,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC;IAChD,CAAC;IAED,aAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC/C,aAAa,GAAG,IAAI,CAAC;IAErB,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAjBW,QAAA,UAAU,cAiBrB;AAEK,MAAM,eAAe,GAAG,CAAC,EAAc,EAAE,EAAE;IAChD,IAAI,aAAa,IAAI,IAAI,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IACD,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzB,CAAC,CAAC;AALW,QAAA,eAAe,mBAK1B","sourcesContent":["/* eslint-disable @typescript-eslint/no-var-requires */\ntype Env = 'node' | 'wasm' | 'exec';\n\nlet execEnv: Env = 'node';\nexport let bindingLibPath = '';\nlet locked = false;\nlet bindings: any;\nlet initCallbacks: (() => void)[] | null = [];\n\nexport function setEnv(env: Exclude<Env, 'exec'>): void;\nexport function setEnv(env: 'exec', libPath: string): void;\nexport function setEnv(env: Env, libPath?: string): void {\n if (locked) {\n throw new Error('Library was already loaded.');\n }\n execEnv = env;\n if (libPath != null) {\n bindingLibPath = libPath;\n }\n}\n\nexport const getBinding = (): any => {\n if (bindings != null) {\n return bindings;\n }\n locked = true;\n if (execEnv === 'exec') {\n bindings = require('./bindings.exec');\n } else if (execEnv === 'node') {\n bindings = require('./bindings.node').binding;\n } else {\n bindings = require('./bindings.wasm').binding;\n }\n\n initCallbacks!.forEach(callback => callback());\n initCallbacks = null;\n\n return bindings;\n};\n\nexport const addInitCallback = (cb: () => void) => {\n if (initCallbacks == null) {\n throw new Error('Library was already loaded.');\n }\n initCallbacks.push(cb);\n};\n"]}
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * as gcode from './gcode';
|
|
|
4
4
|
export * as microscopy from './microscopy';
|
|
5
5
|
export * as product from './product';
|
|
6
6
|
export * from './axis_address';
|
|
7
|
+
export * from './custom_bindings';
|
|
7
8
|
export * from './device_db_source_type';
|
|
8
9
|
export * from './exceptions';
|
|
9
10
|
export * from './firmware_version';
|
package/dist/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
package/dist/lib/index.js
CHANGED
|
@@ -34,6 +34,7 @@ exports.gcode = __importStar(require("./gcode"));
|
|
|
34
34
|
exports.microscopy = __importStar(require("./microscopy"));
|
|
35
35
|
exports.product = __importStar(require("./product"));
|
|
36
36
|
__exportStar(require("./axis_address"), exports);
|
|
37
|
+
__exportStar(require("./custom_bindings"), exports);
|
|
37
38
|
__exportStar(require("./device_db_source_type"), exports);
|
|
38
39
|
__exportStar(require("./exceptions"), exports);
|
|
39
40
|
__exportStar(require("./firmware_version"), exports);
|
package/dist/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAoD;AACpD,iDAAiC;AACjC,mDAAmC;AACnC,iDAAiC;AACjC,2DAA2C;AAC3C,qDAAqC;AACrC,iDAA+B;AAC/B,0DAAwC;AACxC,+CAA6B;AAC7B,qDAAmC;AACnC,4CAA0B;AAC1B,oDAAkC;AAClC,gDAA8B;AAC9B,oDAAkC;AAClC,uDAAqC;AACrC,0CAAwB;AACxB,+CAA6B;AAC7B,0CAAwB","sourcesContent":["/* This file is generated. Do not modify by hand. */\nexport * as ascii from './ascii';\nexport * as binary from './binary';\nexport * as gcode from './gcode';\nexport * as microscopy from './microscopy';\nexport * as product from './product';\nexport * from './axis_address';\nexport * from './device_db_source_type';\nexport * from './exceptions';\nexport * from './firmware_version';\nexport * from './library';\nexport * from './log_output_mode';\nexport * from './measurement';\nexport * from './named_parameter';\nexport * from './rotation_direction';\nexport * from './tools';\nexport * from './unit_table';\nexport * from './units';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAoD;AACpD,iDAAiC;AACjC,mDAAmC;AACnC,iDAAiC;AACjC,2DAA2C;AAC3C,qDAAqC;AACrC,iDAA+B;AAC/B,oDAAkC;AAClC,0DAAwC;AACxC,+CAA6B;AAC7B,qDAAmC;AACnC,4CAA0B;AAC1B,oDAAkC;AAClC,gDAA8B;AAC9B,oDAAkC;AAClC,uDAAqC;AACrC,0CAAwB;AACxB,+CAA6B;AAC7B,0CAAwB","sourcesContent":["/* This file is generated. Do not modify by hand. */\nexport * as ascii from './ascii';\nexport * as binary from './binary';\nexport * as gcode from './gcode';\nexport * as microscopy from './microscopy';\nexport * as product from './product';\nexport * from './axis_address';\nexport * from './custom_bindings';\nexport * from './device_db_source_type';\nexport * from './exceptions';\nexport * from './firmware_version';\nexport * from './library';\nexport * from './log_output_mode';\nexport * from './measurement';\nexport * from './named_parameter';\nexport * from './rotation_direction';\nexport * from './tools';\nexport * from './unit_table';\nexport * from './units';\n"]}
|
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;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;IAClD,CAAC;IAED;;;;;OA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,IAAI,CAAC,CAAC;YACxD,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,oBAAoB,CAChC,MAAc;QAEd,MAAM,OAAO,GAA0C;YACrD,GAAG,QAAQ,CAAC,UAAU,CAAC,OAAO;YAC9B,KAAK,EAAE,MAAM;YACb,QAAQ;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,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;AAtID,0BAsIC;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 * 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.
|
|
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;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,wBAAw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U,CAAC,OAAO;YAC9B,KAAK,EAAE,MAAM;YACb,QAAQ;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,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;AAtID,0BAsIC;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 * 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.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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zaber/motion",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.2",
|
|
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",
|
|
@@ -52,6 +52,11 @@
|
|
|
52
52
|
"types": "./dist/lib/wasm.d.ts",
|
|
53
53
|
"require": "./dist/lib/wasm.js",
|
|
54
54
|
"import": "./dist/lib/wasm.js"
|
|
55
|
+
},
|
|
56
|
+
"./custom_bindings": {
|
|
57
|
+
"types": "./dist/lib/custom_bindings.d.ts",
|
|
58
|
+
"require": "./dist/lib/custom_bindings.js",
|
|
59
|
+
"import": "./dist/lib/custom_bindings.js"
|
|
55
60
|
}
|
|
56
61
|
},
|
|
57
62
|
"files": [
|
|
@@ -135,12 +140,13 @@
|
|
|
135
140
|
"@types/chai": "^4.2.21",
|
|
136
141
|
"@types/chai-as-promised": "^7.1.4",
|
|
137
142
|
"@types/chai-string": "^1.4.2",
|
|
143
|
+
"@types/glob": "^7.1.1",
|
|
138
144
|
"@types/got": "9.6.12",
|
|
139
145
|
"@types/jasmine": "^3.8.1",
|
|
140
146
|
"@types/jest": "^29.5.12",
|
|
141
147
|
"@types/lodash": "^4.14.171",
|
|
142
148
|
"@types/mqtt": "2.5.0",
|
|
143
|
-
"@types/node": "
|
|
149
|
+
"@types/node": "~22.5.5",
|
|
144
150
|
"@types/pkg-up": "^3.1.0",
|
|
145
151
|
"@types/split2": "^3.2.1",
|
|
146
152
|
"@types/uuid": "^8.3.1",
|
|
@@ -155,6 +161,7 @@
|
|
|
155
161
|
"copyfiles": "^2.4.1",
|
|
156
162
|
"coveralls": "^3.1.1",
|
|
157
163
|
"eslint": "^8.57.0",
|
|
164
|
+
"glob": "^10.3.14",
|
|
158
165
|
"got": "11.8.2",
|
|
159
166
|
"jasmine": "^3.8.0",
|
|
160
167
|
"jest": "^29.7.0",
|