@zaber/motion 9.2.1 → 9.3.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.
Files changed (111) hide show
  1. package/LICENSE +6 -6
  2. package/dist/binding/wasm/zaber-motion-core.wasm +0 -0
  3. package/dist/lib/ascii/accel_type.d.ts +17 -0
  4. package/dist/lib/ascii/accel_type.d.ts.map +1 -0
  5. package/dist/lib/ascii/accel_type.js +26 -0
  6. package/dist/lib/ascii/accel_type.js.map +1 -0
  7. package/dist/lib/ascii/axis.d.ts +8 -0
  8. package/dist/lib/ascii/axis.d.ts.map +1 -1
  9. package/dist/lib/ascii/axis.js +22 -0
  10. package/dist/lib/ascii/axis.js.map +1 -1
  11. package/dist/lib/ascii/axis_settings.d.ts +6 -0
  12. package/dist/lib/ascii/axis_settings.d.ts.map +1 -1
  13. package/dist/lib/ascii/axis_settings.js +19 -0
  14. package/dist/lib/ascii/axis_settings.js.map +1 -1
  15. package/dist/lib/ascii/device.d.ts +8 -0
  16. package/dist/lib/ascii/device.d.ts.map +1 -1
  17. package/dist/lib/ascii/device.js +21 -0
  18. package/dist/lib/ascii/device.js.map +1 -1
  19. package/dist/lib/ascii/device_settings.d.ts +6 -0
  20. package/dist/lib/ascii/device_settings.d.ts.map +1 -1
  21. package/dist/lib/ascii/device_settings.js +18 -0
  22. package/dist/lib/ascii/device_settings.js.map +1 -1
  23. package/dist/lib/ascii/index.d.ts +1 -0
  24. package/dist/lib/ascii/index.d.ts.map +1 -1
  25. package/dist/lib/ascii/index.js +1 -0
  26. package/dist/lib/ascii/index.js.map +1 -1
  27. package/dist/lib/ascii/lockstep.js +2 -2
  28. package/dist/lib/ascii/lockstep.js.map +1 -1
  29. package/dist/lib/gateway/constants.js +1 -1
  30. package/dist/lib/gateway/constants.js.map +1 -1
  31. package/dist/lib/index.d.ts +2 -0
  32. package/dist/lib/index.d.ts.map +1 -1
  33. package/dist/lib/index.js +3 -1
  34. package/dist/lib/index.js.map +1 -1
  35. package/dist/lib/measurement_or_value.d.ts +21 -0
  36. package/dist/lib/measurement_or_value.d.ts.map +1 -0
  37. package/dist/lib/measurement_or_value.js +67 -0
  38. package/dist/lib/measurement_or_value.js.map +1 -0
  39. package/dist/lib/movement/default_motion_units.d.ts +32 -0
  40. package/dist/lib/movement/default_motion_units.d.ts.map +1 -0
  41. package/dist/lib/movement/default_motion_units.js +47 -0
  42. package/dist/lib/movement/default_motion_units.js.map +1 -0
  43. package/dist/lib/movement/index.d.ts +3 -0
  44. package/dist/lib/movement/index.d.ts.map +1 -0
  45. package/dist/lib/movement/index.js +21 -0
  46. package/dist/lib/movement/index.js.map +1 -0
  47. package/dist/lib/movement/moveable.d.ts +418 -0
  48. package/dist/lib/movement/moveable.d.ts.map +1 -0
  49. package/dist/lib/movement/moveable.js +639 -0
  50. package/dist/lib/movement/moveable.js.map +1 -0
  51. package/dist/lib/requests/device_has_command_request.d.ts +17 -0
  52. package/dist/lib/requests/device_has_command_request.d.ts.map +1 -0
  53. package/dist/lib/requests/device_has_command_request.js +51 -0
  54. package/dist/lib/requests/device_has_command_request.js.map +1 -0
  55. package/dist/lib/requests/index.d.ts +12 -1
  56. package/dist/lib/requests/index.d.ts.map +1 -1
  57. package/dist/lib/requests/index.js +12 -1
  58. package/dist/lib/requests/index.js.map +1 -1
  59. package/dist/lib/requests/lockstep_move_request.d.ts +4 -0
  60. package/dist/lib/requests/lockstep_move_request.d.ts.map +1 -1
  61. package/dist/lib/requests/lockstep_move_request.js +14 -1
  62. package/dist/lib/requests/lockstep_move_request.js.map +1 -1
  63. package/dist/lib/requests/moveable_driver_enable_request.d.ts +14 -0
  64. package/dist/lib/requests/moveable_driver_enable_request.d.ts.map +1 -0
  65. package/dist/lib/requests/moveable_driver_enable_request.js +39 -0
  66. package/dist/lib/requests/moveable_driver_enable_request.js.map +1 -0
  67. package/dist/lib/requests/moveable_get_acceleration_request.d.ts +17 -0
  68. package/dist/lib/requests/moveable_get_acceleration_request.d.ts.map +1 -0
  69. package/dist/lib/requests/moveable_get_acceleration_request.js +44 -0
  70. package/dist/lib/requests/moveable_get_acceleration_request.js.map +1 -0
  71. package/dist/lib/requests/moveable_get_setting_request.d.ts +15 -0
  72. package/dist/lib/requests/moveable_get_setting_request.d.ts.map +1 -0
  73. package/dist/lib/requests/moveable_get_setting_request.js +39 -0
  74. package/dist/lib/requests/moveable_get_setting_request.js.map +1 -0
  75. package/dist/lib/requests/moveable_id_request.d.ts +13 -0
  76. package/dist/lib/requests/moveable_id_request.d.ts.map +1 -0
  77. package/dist/lib/requests/moveable_id_request.js +35 -0
  78. package/dist/lib/requests/moveable_id_request.js.map +1 -0
  79. package/dist/lib/requests/moveable_move_request.d.ts +21 -0
  80. package/dist/lib/requests/moveable_move_request.d.ts.map +1 -0
  81. package/dist/lib/requests/moveable_move_request.js +72 -0
  82. package/dist/lib/requests/moveable_move_request.js.map +1 -0
  83. package/dist/lib/requests/moveable_move_sin_request.d.ts +18 -0
  84. package/dist/lib/requests/moveable_move_sin_request.d.ts.map +1 -0
  85. package/dist/lib/requests/moveable_move_sin_request.js +61 -0
  86. package/dist/lib/requests/moveable_move_sin_request.js.map +1 -0
  87. package/dist/lib/requests/moveable_set_acceleration_request.d.ts +17 -0
  88. package/dist/lib/requests/moveable_set_acceleration_request.d.ts.map +1 -0
  89. package/dist/lib/requests/moveable_set_acceleration_request.js +52 -0
  90. package/dist/lib/requests/moveable_set_acceleration_request.js.map +1 -0
  91. package/dist/lib/requests/moveable_set_setting_request.d.ts +15 -0
  92. package/dist/lib/requests/moveable_set_setting_request.d.ts.map +1 -0
  93. package/dist/lib/requests/moveable_set_setting_request.js +46 -0
  94. package/dist/lib/requests/moveable_set_setting_request.js.map +1 -0
  95. package/dist/lib/requests/moveable_setup_request.d.ts +19 -0
  96. package/dist/lib/requests/moveable_setup_request.d.ts.map +1 -0
  97. package/dist/lib/requests/moveable_setup_request.js +53 -0
  98. package/dist/lib/requests/moveable_setup_request.js.map +1 -0
  99. package/dist/lib/requests/moveable_type.d.ts +14 -0
  100. package/dist/lib/requests/moveable_type.d.ts.map +1 -0
  101. package/dist/lib/requests/moveable_type.js +23 -0
  102. package/dist/lib/requests/moveable_type.js.map +1 -0
  103. package/dist/lib/requests/moveable_wait_until_idle_request.d.ts +14 -0
  104. package/dist/lib/requests/moveable_wait_until_idle_request.d.ts.map +1 -0
  105. package/dist/lib/requests/moveable_wait_until_idle_request.js +39 -0
  106. package/dist/lib/requests/moveable_wait_until_idle_request.js.map +1 -0
  107. package/package.json +6 -2
  108. package/dist/lib/requests/lockstep_disable_request.d.ts +0 -16
  109. package/dist/lib/requests/lockstep_disable_request.d.ts.map +0 -1
  110. package/dist/lib/requests/lockstep_disable_request.js +0 -47
  111. package/dist/lib/requests/lockstep_disable_request.js.map +0 -1
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MeasurementOrValue = void 0;
4
+ const sanitizer_1 = require("./gateway/sanitizer");
5
+ const measurement_1 = require("./measurement");
6
+ exports.MeasurementOrValue = {
7
+ sanitize: (value) => {
8
+ const typeName = exports.MeasurementOrValue.typeName(value);
9
+ switch (typeName) {
10
+ case 'double':
11
+ value = sanitizer_1.sanitizer.sanitizeNumber(value, 'items of variant MeasurementOrValue member type number');
12
+ break;
13
+ case 'Measurement':
14
+ value = measurement_1.Measurement.sanitize(value);
15
+ break;
16
+ default:
17
+ break;
18
+ }
19
+ return value;
20
+ },
21
+ convert: (value) => {
22
+ switch (value.variantValueType) {
23
+ case 'double':
24
+ return value.doubleValue;
25
+ case 'Measurement':
26
+ return value.measurementValue;
27
+ default:
28
+ throw new TypeError(`Variant type tag '${value.variantValueType}' is not valid for variant type MeasurementOrValue.`);
29
+ }
30
+ },
31
+ convertBack: (value) => {
32
+ const typeName = exports.MeasurementOrValue.typeName(value);
33
+ return {
34
+ variantValueType: typeName,
35
+ doubleValue: typeName === 'double' ? value : undefined,
36
+ measurementValue: typeName === 'Measurement' ? value : undefined,
37
+ };
38
+ },
39
+ /**
40
+ * Attempts to determine which member type is present in a variable.
41
+ */
42
+ typeName: (value) => {
43
+ if (typeof value === 'number') {
44
+ return 'double';
45
+ }
46
+ else if (measurement_1.Measurement.isA(value)) {
47
+ return 'Measurement';
48
+ }
49
+ else if (value == null) {
50
+ throw new RangeError('Null or undefined values are not valid values for type MeasurementOrValue');
51
+ }
52
+ throw new TypeError(`Unrecognized type for MeasurementOrValue: ${typeof value} (JSON.stringify(value, NULL, 2))`);
53
+ },
54
+ isA: (value) => {
55
+ try {
56
+ exports.MeasurementOrValue.typeName(value); // Throws if the type is not recognized.
57
+ return true;
58
+ }
59
+ catch (err) {
60
+ if (err instanceof TypeError) {
61
+ return false;
62
+ }
63
+ throw err;
64
+ }
65
+ }
66
+ };
67
+ //# sourceMappingURL=measurement_or_value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measurement_or_value.js","sourceRoot":"","sources":["../../src/measurement_or_value.ts"],"names":[],"mappings":";;;AAGA,mDAAgD;AAChD,+CAA4C;AAa/B,QAAA,kBAAkB,GAAG;IAChC,QAAQ,EAAE,CAAC,KAAyB,EAAsB,EAAE;QAC1D,MAAM,QAAQ,GAAG,0BAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACpD,QAAQ,QAAQ,EAAE,CAAC;YACjB,KAAK,QAAQ;gBACX,KAAK,GAAG,qBAAS,CAAC,cAAc,CAAC,KAAe,EAAE,wDAAwD,CAAC,CAAC;gBAC5G,MAAM;YAER,KAAK,aAAa;gBAChB,KAAK,GAAG,yBAAW,CAAC,QAAQ,CAAC,KAAoB,CAAC,CAAC;gBACnD,MAAM;YAER;gBACE,MAAM;QACV,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,EAAE,CAAC,KAAoB,EAAsB,EAAE;QACpD,QAAQ,KAAK,CAAC,gBAA8C,EAAE,CAAC;YAC7D,KAAK,QAAQ;gBACX,OAAO,KAAK,CAAC,WAAqB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,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC;CACF,CAAC","sourcesContent":["// ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //\n// ============== DO NOT EDIT DIRECTLY ============== //\nimport { BSON } from 'bson';\nimport { sanitizer } from './gateway/sanitizer';\nimport { Measurement } from './measurement';\n\n/**\n * A numerical value, or a Measurement.\n */\nexport type MeasurementOrValue =\n number | Measurement;\n\n/**\n * Constants for the possible return values of MeasurementOrValue.typeName().\n */\nexport type MeasurementOrValueTypeTags = 'double' | 'Measurement';\n\nexport const MeasurementOrValue = {\n sanitize: (value: MeasurementOrValue): MeasurementOrValue => {\n const typeName = MeasurementOrValue.typeName(value);\n switch (typeName) {\n case 'double':\n value = sanitizer.sanitizeNumber(value as number, 'items of variant MeasurementOrValue member type number');\n break;\n\n case 'Measurement':\n value = Measurement.sanitize(value as Measurement);\n break;\n\n default:\n break;\n }\n\n return value;\n },\n\n convert: (value: BSON.Document): MeasurementOrValue => {\n switch (value.variantValueType as MeasurementOrValueTypeTags) {\n case 'double':\n return value.doubleValue as number;\n\n case 'Measurement':\n return value.measurementValue as Measurement;\n\n default:\n throw new TypeError(`Variant type tag '${value.variantValueType}' is not valid for variant type MeasurementOrValue.`);\n }\n },\n\n convertBack: (value: MeasurementOrValue): BSON.Document => {\n const typeName = MeasurementOrValue.typeName(value);\n return {\n variantValueType: typeName,\n doubleValue: typeName === 'double' ? value as number : undefined,\n measurementValue: typeName === 'Measurement' ? value as Measurement : undefined,\n };\n },\n\n /**\n * Attempts to determine which member type is present in a variable.\n */\n typeName: (value: MeasurementOrValue): MeasurementOrValueTypeTags => {\n if (typeof value === 'number') {\n return 'double';\n } else if (Measurement.isA(value)) {\n return 'Measurement';\n } else if (value == null) {\n throw new RangeError('Null or undefined values are not valid values for type MeasurementOrValue');\n }\n\n throw new TypeError(`Unrecognized type for MeasurementOrValue: ${typeof value} (JSON.stringify(value, NULL, 2))`);\n },\n\n isA: (value: any): value is MeasurementOrValue => {\n try {\n MeasurementOrValue.typeName(value as MeasurementOrValue); // Throws if the type is not recognized.\n return true;\n } catch (err) {\n if (err instanceof TypeError) {\n return false;\n }\n\n throw err;\n }\n }\n};\n"]}
@@ -0,0 +1,32 @@
1
+ import { BSON } from 'bson';
2
+ import { Units } from '../units';
3
+ /**
4
+ * Default units of measurement for movement operations.
5
+ */
6
+ export interface DefaultMotionUnits {
7
+ /**
8
+ * Default unit for position.
9
+ */
10
+ position?: (Units | null);
11
+ /**
12
+ * Default unit for velocity.
13
+ */
14
+ speed?: (Units | null);
15
+ /**
16
+ * Default unit for acceleration.
17
+ */
18
+ acceleration?: (Units | null);
19
+ /**
20
+ * Default unit for time.
21
+ */
22
+ time?: (Units | null);
23
+ }
24
+ export declare const DefaultMotionUnits: {
25
+ fromBinary: (buffer: Uint8Array) => DefaultMotionUnits;
26
+ toBinary: (value: DefaultMotionUnits) => Uint8Array;
27
+ DEFAULT: Readonly<DefaultMotionUnits>;
28
+ sanitize: (value: DefaultMotionUnits) => DefaultMotionUnits;
29
+ convert: (value: BSON.Document) => DefaultMotionUnits;
30
+ isA: (value: any) => value is DefaultMotionUnits;
31
+ };
32
+ //# sourceMappingURL=default_motion_units.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default_motion_units.d.ts","sourceRoot":"","sources":["../../../src/movement/default_motion_units.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IAE1B;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IAEvB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IAE9B;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;CAEvB;AAED,eAAO,MAAM,kBAAkB;yBACR,UAAU,KAAG,kBAAkB;sBAElC,kBAAkB,KAAG,UAAU;;sBAS/B,kBAAkB,KAAG,kBAAkB;qBAWxC,KAAK,QAAQ,KAAG,kBAAkB;iBAOtC,GAAG;CAWjB,CAAC"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DefaultMotionUnits = void 0;
4
+ // ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //
5
+ // ============== DO NOT EDIT DIRECTLY ============== //
6
+ const bson_1 = require("bson");
7
+ const sanitizer_1 = require("../gateway/sanitizer");
8
+ exports.DefaultMotionUnits = {
9
+ fromBinary: (buffer) => exports.DefaultMotionUnits.convert(bson_1.BSON.deserialize(buffer, { useBigInt64: true })),
10
+ toBinary: (value) => bson_1.BSON.serialize(exports.DefaultMotionUnits.sanitize(value)),
11
+ DEFAULT: Object.freeze({
12
+ position: null,
13
+ speed: null,
14
+ acceleration: null,
15
+ time: null,
16
+ }),
17
+ sanitize: (value) => {
18
+ if (value == null) {
19
+ throw new TypeError('Expected DefaultMotionUnits object but got null or undefined.');
20
+ }
21
+ if (typeof value !== 'object') {
22
+ throw new TypeError(`Expected DefaultMotionUnits object but got ${typeof value}.`);
23
+ }
24
+ return {
25
+ position: value.position != null ? sanitizer_1.sanitizer.sanitizeUnits(value.position, 'position') : null,
26
+ speed: value.speed != null ? sanitizer_1.sanitizer.sanitizeUnits(value.speed, 'speed') : null,
27
+ acceleration: value.acceleration != null ? sanitizer_1.sanitizer.sanitizeUnits(value.acceleration, 'acceleration') : null,
28
+ time: value.time != null ? sanitizer_1.sanitizer.sanitizeUnits(value.time, 'time') : null,
29
+ };
30
+ },
31
+ convert: (value) => ({
32
+ position: value.position,
33
+ speed: value.speed,
34
+ acceleration: value.acceleration,
35
+ time: value.time,
36
+ }),
37
+ isA: (value) => {
38
+ const castValue = value;
39
+ return (value != null &&
40
+ typeof value === 'object' &&
41
+ (castValue.position == null || sanitizer_1.sanitizer.isUnits(castValue.position)) &&
42
+ (castValue.speed == null || sanitizer_1.sanitizer.isUnits(castValue.speed)) &&
43
+ (castValue.acceleration == null || sanitizer_1.sanitizer.isUnits(castValue.acceleration)) &&
44
+ (castValue.time == null || sanitizer_1.sanitizer.isUnits(castValue.time)));
45
+ },
46
+ };
47
+ //# sourceMappingURL=default_motion_units.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default_motion_units.js","sourceRoot":"","sources":["../../../src/movement/default_motion_units.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,wDAAwD;AACxD,+BAA4B;AAC5B,oDAAiD;AA6BpC,QAAA,kBAAkB,GAAG;IAChC,UAAU,EAAE,CAAC,MAAkB,EAAsB,EAAE,CAAC,0BAAkB,CAAC,OAAO,CAAC,WAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IAEnI,QAAQ,EAAE,CAAC,KAAyB,EAAc,EAAE,CAAC,WAAI,CAAC,SAAS,CAAC,0BAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEvG,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;QACX,YAAY,EAAE,IAAI;QAClB,IAAI,EAAE,IAAI;KACX,CAAiC;IAElC,QAAQ,EAAE,CAAC,KAAyB,EAAsB,EAAE;QAC1D,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,+DAA+D,CAAC,CAAA;QAAC,CAAC;QAC3G,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,8CAA8C,OAAO,KAAK,GAAG,CAAC,CAAA;QAAC,CAAC;QACrH,OAAO;YACL,QAAQ,EAAE,KA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AAI,qBAAS,CAAC,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;YAC7E,CAAC,SAAS,CAAC,IAAI,IAAI,IAAI,IAAI,qBAAS,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAC9D,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["// ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //\n// ============== DO NOT EDIT DIRECTLY ============== //\nimport { BSON } from 'bson';\nimport { sanitizer } from '../gateway/sanitizer';\nimport { Units } from '../units';\n\n/**\n * Default units of measurement for movement operations.\n */\nexport interface DefaultMotionUnits {\n /**\n * Default unit for position.\n */\n position?: (Units | null);\n\n /**\n * Default unit for velocity.\n */\n speed?: (Units | null);\n\n /**\n * Default unit for acceleration.\n */\n acceleration?: (Units | null);\n\n /**\n * Default unit for time.\n */\n time?: (Units | null);\n\n}\n\nexport const DefaultMotionUnits = {\n fromBinary: (buffer: Uint8Array): DefaultMotionUnits => DefaultMotionUnits.convert(BSON.deserialize(buffer, { useBigInt64: true })),\n\n toBinary: (value: DefaultMotionUnits): Uint8Array => BSON.serialize(DefaultMotionUnits.sanitize(value)),\n\n DEFAULT: Object.freeze({\n position: null,\n speed: null,\n acceleration: null,\n time: null,\n }) as Readonly<DefaultMotionUnits>,\n\n sanitize: (value: DefaultMotionUnits): DefaultMotionUnits => {\n if (value == null) { throw new TypeError('Expected DefaultMotionUnits object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected DefaultMotionUnits object but got ${typeof value}.`) }\n return {\n position: value.position != null ? sanitizer.sanitizeUnits(value.position, 'position') : null,\n speed: value.speed != null ? sanitizer.sanitizeUnits(value.speed, 'speed') : null,\n acceleration: value.acceleration != null ? sanitizer.sanitizeUnits(value.acceleration, 'acceleration') : null,\n time: value.time != null ? sanitizer.sanitizeUnits(value.time, 'time') : null,\n };\n },\n\n convert: (value: BSON.Document): DefaultMotionUnits => ({\n position: value.position,\n speed: value.speed,\n acceleration: value.acceleration,\n time: value.time,\n }),\n\n isA: (value: any): value is DefaultMotionUnits => {\n const castValue = value as DefaultMotionUnits;\n return (\n value != null &&\n typeof value === 'object' &&\n (castValue.position == null || sanitizer.isUnits(castValue.position)) &&\n (castValue.speed == null || sanitizer.isUnits(castValue.speed)) &&\n (castValue.acceleration == null || sanitizer.isUnits(castValue.acceleration)) &&\n (castValue.time == null || sanitizer.isUnits(castValue.time))\n );\n },\n};\n"]}
@@ -0,0 +1,3 @@
1
+ export * from './default_motion_units';
2
+ export * from './moveable';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/movement/index.ts"],"names":[],"mappings":"AAEA,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //
18
+ // ============== DO NOT EDIT DIRECTLY ============== //
19
+ __exportStar(require("./default_motion_units"), exports);
20
+ __exportStar(require("./moveable"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/movement/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAwD;AACxD,wDAAwD;AACxD,yDAAuC;AACvC,6CAA2B","sourcesContent":["// ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //\n// ============== DO NOT EDIT DIRECTLY ============== //\nexport * from './default_motion_units';\nexport * from './moveable';\n"]}
@@ -0,0 +1,418 @@
1
+ import { Axis } from '../ascii/axis';
2
+ import { Device } from '../ascii/device';
3
+ import { Lockstep } from '../ascii/lockstep';
4
+ import { MeasurementOrValue } from '../measurement_or_value';
5
+ import { DefaultMotionUnits } from './default_motion_units';
6
+ import { Angle, Length, Native, Velocity, AngularVelocity, Acceleration, AngularAcceleration } from '../units';
7
+ import { AccelType } from '../ascii/accel_type';
8
+ import { CyclicDirection } from '../cyclic_direction';
9
+ /**
10
+ * Represents something that moves: either an axis of a device, or a lockstep group.
11
+ */
12
+ export declare class Moveable {
13
+ /**
14
+ * The identifier for the moveable instance.
15
+ */
16
+ get moveableId(): number;
17
+ private _moveableId;
18
+ /**
19
+ * The device this moveable is on.
20
+ */
21
+ get device(): Device;
22
+ private _device;
23
+ constructor(moveableId: number, device: Device);
24
+ /**
25
+ * Creates a Moveable instance for a given axis.
26
+ * @param axis Axis to create a Moveable for.
27
+ * @param options.units Default units of measurement used for movement operations.
28
+ * @returns A Moveable instance for the specified axis.
29
+ */
30
+ static fromAxis(axis: Axis, options?: Moveable.FromAxisOptions): Promise<Moveable>;
31
+ /**
32
+ * Creates a Moveable instance for a given lockstep group.
33
+ * @param lockstep Lockstep group to create a Moveable for.
34
+ * @param options.units Default units of measurement used for movement operations.
35
+ * @returns A Moveable instance for the specified lockstep group.
36
+ */
37
+ static fromLockstep(lockstep: Lockstep, options?: Moveable.FromLockstepOptions): Promise<Moveable>;
38
+ /**
39
+ * Creates a Moveable instance for a single-axis device.
40
+ * @param device Device to create a Moveable for.
41
+ * @param options.units Default units of measurement used for movement operations.
42
+ * @returns A Moveable instance for the specified device.
43
+ */
44
+ static fromDevice(device: Device, options?: Moveable.FromDeviceOptions): Promise<Moveable>;
45
+ /**
46
+ * Moves to an absolute position.
47
+ * @param position Absolute position to move to.
48
+ * @param options.velocity Movement velocity. If not specified, the maximum velocity setting is used.
49
+ * @param options.acceleration Movement acceleration. If not specified, the default acceleration setting is used.
50
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
51
+ * @param options.cyclicDirection Which direction a cyclic device should take to get to the target position.
52
+ * @param options.extraCycles Number of extra cycles to complete before stopping at the target.
53
+ */
54
+ moveAbsolute(position: MeasurementOrValue, options?: Moveable.MoveAbsoluteOptions): Promise<void>;
55
+ /**
56
+ * Moves by a relative amount from the current position.
57
+ * @param position Relative displacement to move by.
58
+ * @param options.velocity Movement velocity. If not specified, the maximum velocity setting is used.
59
+ * @param options.acceleration Movement acceleration. If not specified, the default acceleration setting is used.
60
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
61
+ */
62
+ moveRelative(position: MeasurementOrValue, options?: Moveable.MoveRelativeOptions): Promise<void>;
63
+ /**
64
+ * Begins moving at a specified velocity.
65
+ * @param velocity Velocity to move at.
66
+ * @param options.acceleration Movement acceleration. If not specified, the default acceleration setting is used.
67
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
68
+ */
69
+ moveVelocity(velocity: MeasurementOrValue, options?: Moveable.MoveVelocityOptions): Promise<void>;
70
+ /**
71
+ * Moves to the end of travel.
72
+ * @param options.velocity Movement velocity. If not specified, the maximum velocity setting is used.
73
+ * @param options.acceleration Movement acceleration. If not specified, the default acceleration setting is used.
74
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
75
+ */
76
+ moveMax(options?: Moveable.MoveMaxOptions): Promise<void>;
77
+ /**
78
+ * Moves to the beginning of travel.
79
+ * @param options.velocity Movement velocity. If not specified, the maximum velocity setting is used.
80
+ * @param options.acceleration Movement acceleration. If not specified, the default acceleration setting is used.
81
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
82
+ */
83
+ moveMin(options?: Moveable.MoveMinOptions): Promise<void>;
84
+ /**
85
+ * Returns the current position of the moveable.
86
+ * @param options.unit Units of position. If not specified, the default position unit is used.
87
+ * @returns Current position.
88
+ */
89
+ getPosition(options?: Moveable.GetPositionOptions): Promise<number>;
90
+ /**
91
+ * Returns the current encoder position of the moveable.
92
+ * @param options.unit Units of position. If not specified, the default position unit is used.
93
+ * @returns Current encoder position.
94
+ */
95
+ getEncoderPosition(options?: Moveable.GetEncoderPositionOptions): Promise<number>;
96
+ /**
97
+ * Moves the moveable to the home position.
98
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
99
+ */
100
+ home(options?: Moveable.HomeOptions): Promise<void>;
101
+ /**
102
+ * Returns bool indicating whether the moveable has position reference and was homed.
103
+ * @returns True if the moveable has position reference and was homed.
104
+ */
105
+ isHomed(): Promise<boolean>;
106
+ /**
107
+ * Returns bool indicating whether the moveable is executing a motion command.
108
+ * @returns True if the moveable is currently executing a motion command.
109
+ */
110
+ isBusy(): Promise<boolean>;
111
+ /**
112
+ * Returns bool indicating whether the moveable is parked.
113
+ * @returns True if the moveable is parked.
114
+ */
115
+ isParked(): Promise<boolean>;
116
+ /**
117
+ * Stops ongoing movement of the moveable.
118
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
119
+ */
120
+ stop(options?: Moveable.StopOptions): Promise<void>;
121
+ /**
122
+ * Moves the moveable in a sinusoidal trajectory.
123
+ * @param amplitude Amplitude of the sinusoidal motion (half of the motion's peak-to-peak range).
124
+ * @param period Period of the sinusoidal motion.
125
+ * @param [options.count=0] Number of sinusoidal cycles to complete.
126
+ * Must be a multiple of 0.5.
127
+ * If count is not specified or set to 0, the moveable will move indefinitely.
128
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished or just started.
129
+ */
130
+ moveSin(amplitude: MeasurementOrValue, period: MeasurementOrValue, options?: Moveable.MoveSinOptions): Promise<void>;
131
+ /**
132
+ * Stops the moveable at the end of the sinusoidal trajectory.
133
+ * If the sinusoidal motion was started with an integer-plus-half cycle count,
134
+ * the motion ends at the half-way point of the sinusoidal trajectory.
135
+ * @param [options.waitUntilIdle=true] Determines whether function should return after the movement is finished.
136
+ */
137
+ moveSinStop(options?: Moveable.MoveSinStopOptions): Promise<void>;
138
+ /**
139
+ * Parks the moveable.
140
+ */
141
+ park(): Promise<void>;
142
+ /**
143
+ * Unparks the moveable.
144
+ */
145
+ unpark(): Promise<void>;
146
+ /**
147
+ * Returns the current velocity of the moveable.
148
+ * @param options.unit Units of velocity. If not specified, the default velocity unit is used.
149
+ * @returns Current velocity.
150
+ */
151
+ getVelocity(options?: Moveable.GetVelocityOptions): Promise<number>;
152
+ /**
153
+ * Returns the maximum speed that this moveable will execute moves at by default.
154
+ * If a different velocity is specified on a move command, that will override
155
+ * this value for that command only.
156
+ * @param options.unit Units of velocity. If not specified, the default velocity unit is used.
157
+ * @returns Maximum speed.
158
+ */
159
+ getMaxSpeed(options?: Moveable.GetMaxSpeedOptions): Promise<number>;
160
+ /**
161
+ * Sets the maximum speed of the moveable. For a lockstep group, sets the value on all axes.
162
+ * @param speed Maximum speed to set.
163
+ */
164
+ setMaxSpeed(speed: MeasurementOrValue): Promise<void>;
165
+ /**
166
+ * Returns the maximum acceleration of the moveable. For a lockstep group, returns the lowest value across all axes.
167
+ * @param options.accelType Which acceleration ramp to return. Defaults to AccelDecel.
168
+ * @param options.unit Units of acceleration. If not specified, the default acceleration unit is used.
169
+ * @returns Maximum acceleration.
170
+ */
171
+ getMaxAcceleration(options?: Moveable.GetMaxAccelerationOptions): Promise<number>;
172
+ /**
173
+ * Sets the maximum acceleration of the moveable. For a lockstep group, sets the value on all axes.
174
+ * @param accel Maximum acceleration to set.
175
+ * @param options.accelType Which acceleration ramp to set. Defaults to AccelDecel.
176
+ */
177
+ setMaxAcceleration(accel: MeasurementOrValue, options?: Moveable.SetMaxAccelerationOptions): Promise<void>;
178
+ /**
179
+ * Returns the minimum limit of the moveable.
180
+ * @param options.unit Units of position. If not specified, the default position unit is used.
181
+ * @returns Minimum limit.
182
+ */
183
+ getLimitMin(options?: Moveable.GetLimitMinOptions): Promise<number>;
184
+ /**
185
+ * Returns the maximum limit of the moveable.
186
+ * @param options.unit Units of position. If not specified, the default position unit is used.
187
+ * @returns Maximum limit.
188
+ */
189
+ getLimitMax(options?: Moveable.GetLimitMaxOptions): Promise<number>;
190
+ /**
191
+ * Returns the lockstep group this moveable represents, or null if it is not a lockstep moveable.
192
+ * @returns Lockstep instance, or null if this is not a lockstep moveable.
193
+ */
194
+ getLockstep(): Promise<Lockstep | null>;
195
+ /**
196
+ * Returns the axis this moveable represents.
197
+ * For a lockstep moveable, returns the primary axis of the lockstep group.
198
+ * @returns Axis this moveable is based on.
199
+ */
200
+ getAxis(): Promise<Axis>;
201
+ /**
202
+ * Disables the driver, which prevents current from being sent to the motor or load.
203
+ * If the driver is already disabled, the driver remains disabled.
204
+ */
205
+ driverDisable(): Promise<void>;
206
+ /**
207
+ * Attempts to enable the driver repeatedly for the specified timeout.
208
+ * If the driver is already enabled, the driver remains enabled.
209
+ * @param [options.timeout=10] Timeout in seconds. Specify 0 to attempt to enable the driver once.
210
+ */
211
+ driverEnable(options?: Moveable.DriverEnableOptions): Promise<void>;
212
+ /**
213
+ * Waits until the moveable stops moving.
214
+ * @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.
215
+ */
216
+ waitUntilIdle(options?: Moveable.WaitUntilIdleOptions): Promise<void>;
217
+ /**
218
+ * Frees the moveable instance.
219
+ * @param moveableId The ID of the moveable to free.
220
+ */
221
+ private static _free;
222
+ /**
223
+ * Releases the native resources of the moveable.
224
+ * Should only be called if your environment does not support FinalizationRegistry.
225
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry
226
+ */
227
+ free(): void;
228
+ }
229
+ declare namespace Moveable {
230
+ interface FromAxisOptions {
231
+ /**
232
+ * Default units of measurement used for movement operations.
233
+ */
234
+ units?: DefaultMotionUnits;
235
+ }
236
+ interface FromLockstepOptions {
237
+ /**
238
+ * Default units of measurement used for movement operations.
239
+ */
240
+ units?: DefaultMotionUnits;
241
+ }
242
+ interface FromDeviceOptions {
243
+ /**
244
+ * Default units of measurement used for movement operations.
245
+ */
246
+ units?: DefaultMotionUnits;
247
+ }
248
+ interface MoveAbsoluteOptions {
249
+ /**
250
+ * Movement velocity. If not specified, the maximum velocity setting is used.
251
+ */
252
+ velocity?: MeasurementOrValue;
253
+ /**
254
+ * Movement acceleration. If not specified, the default acceleration setting is used.
255
+ */
256
+ acceleration?: MeasurementOrValue;
257
+ /**
258
+ * Determines whether function should return after the movement is finished or just started.
259
+ */
260
+ waitUntilIdle?: boolean;
261
+ /**
262
+ * Which direction a cyclic device should take to get to the target position.
263
+ */
264
+ cyclicDirection?: CyclicDirection;
265
+ /**
266
+ * Number of extra cycles to complete before stopping at the target.
267
+ */
268
+ extraCycles?: number;
269
+ }
270
+ interface MoveRelativeOptions {
271
+ /**
272
+ * Movement velocity. If not specified, the maximum velocity setting is used.
273
+ */
274
+ velocity?: MeasurementOrValue;
275
+ /**
276
+ * Movement acceleration. If not specified, the default acceleration setting is used.
277
+ */
278
+ acceleration?: MeasurementOrValue;
279
+ /**
280
+ * Determines whether function should return after the movement is finished or just started.
281
+ */
282
+ waitUntilIdle?: boolean;
283
+ }
284
+ interface MoveVelocityOptions {
285
+ /**
286
+ * Movement acceleration. If not specified, the default acceleration setting is used.
287
+ */
288
+ acceleration?: MeasurementOrValue;
289
+ /**
290
+ * Determines whether function should return after the movement is finished or just started.
291
+ */
292
+ waitUntilIdle?: boolean;
293
+ }
294
+ interface MoveMaxOptions {
295
+ /**
296
+ * Movement velocity. If not specified, the maximum velocity setting is used.
297
+ */
298
+ velocity?: MeasurementOrValue;
299
+ /**
300
+ * Movement acceleration. If not specified, the default acceleration setting is used.
301
+ */
302
+ acceleration?: MeasurementOrValue;
303
+ /**
304
+ * Determines whether function should return after the movement is finished or just started.
305
+ */
306
+ waitUntilIdle?: boolean;
307
+ }
308
+ interface MoveMinOptions {
309
+ /**
310
+ * Movement velocity. If not specified, the maximum velocity setting is used.
311
+ */
312
+ velocity?: MeasurementOrValue;
313
+ /**
314
+ * Movement acceleration. If not specified, the default acceleration setting is used.
315
+ */
316
+ acceleration?: MeasurementOrValue;
317
+ /**
318
+ * Determines whether function should return after the movement is finished or just started.
319
+ */
320
+ waitUntilIdle?: boolean;
321
+ }
322
+ interface GetPositionOptions {
323
+ /**
324
+ * Units of position. If not specified, the default position unit is used.
325
+ */
326
+ unit?: Length | Angle | Native;
327
+ }
328
+ interface GetEncoderPositionOptions {
329
+ /**
330
+ * Units of position. If not specified, the default position unit is used.
331
+ */
332
+ unit?: Length | Angle | Native;
333
+ }
334
+ interface HomeOptions {
335
+ /**
336
+ * Determines whether function should return after the movement is finished or just started.
337
+ */
338
+ waitUntilIdle?: boolean;
339
+ }
340
+ interface StopOptions {
341
+ /**
342
+ * Determines whether function should return after the movement is finished or just started.
343
+ */
344
+ waitUntilIdle?: boolean;
345
+ }
346
+ interface MoveSinOptions {
347
+ /**
348
+ * Number of sinusoidal cycles to complete.
349
+ * Must be a multiple of 0.5.
350
+ * If count is not specified or set to 0, the moveable will move indefinitely.
351
+ */
352
+ count?: number;
353
+ /**
354
+ * Determines whether function should return after the movement is finished or just started.
355
+ */
356
+ waitUntilIdle?: boolean;
357
+ }
358
+ interface MoveSinStopOptions {
359
+ /**
360
+ * Determines whether function should return after the movement is finished.
361
+ */
362
+ waitUntilIdle?: boolean;
363
+ }
364
+ interface GetVelocityOptions {
365
+ /**
366
+ * Units of velocity. If not specified, the default velocity unit is used.
367
+ */
368
+ unit?: Velocity | AngularVelocity | Native;
369
+ }
370
+ interface GetMaxSpeedOptions {
371
+ /**
372
+ * Units of velocity. If not specified, the default velocity unit is used.
373
+ */
374
+ unit?: Velocity | AngularVelocity | Native;
375
+ }
376
+ interface GetMaxAccelerationOptions {
377
+ /**
378
+ * Which acceleration ramp to return. Defaults to AccelDecel.
379
+ */
380
+ accelType?: AccelType;
381
+ /**
382
+ * Units of acceleration. If not specified, the default acceleration unit is used.
383
+ */
384
+ unit?: Acceleration | AngularAcceleration | Native;
385
+ }
386
+ interface SetMaxAccelerationOptions {
387
+ /**
388
+ * Which acceleration ramp to set. Defaults to AccelDecel.
389
+ */
390
+ accelType?: AccelType;
391
+ }
392
+ interface GetLimitMinOptions {
393
+ /**
394
+ * Units of position. If not specified, the default position unit is used.
395
+ */
396
+ unit?: Length | Angle | Native;
397
+ }
398
+ interface GetLimitMaxOptions {
399
+ /**
400
+ * Units of position. If not specified, the default position unit is used.
401
+ */
402
+ unit?: Length | Angle | Native;
403
+ }
404
+ interface DriverEnableOptions {
405
+ /**
406
+ * Timeout in seconds. Specify 0 to attempt to enable the driver once.
407
+ */
408
+ timeout?: number;
409
+ }
410
+ interface WaitUntilIdleOptions {
411
+ /**
412
+ * Determines whether to throw error when fault is observed.
413
+ */
414
+ throwErrorOnFault?: boolean;
415
+ }
416
+ }
417
+ export {};
418
+ //# sourceMappingURL=moveable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"moveable.d.ts","sourceRoot":"","sources":["../../../src/movement/moveable.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/G,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;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