@zaber/motion 3.2.1 → 3.4.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.
- package/README.md +1 -1
- package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
- package/dist/lib/ascii/device.d.ts +28 -1
- package/dist/lib/ascii/device.js +45 -2
- package/dist/lib/ascii/device.js.map +1 -1
- package/dist/lib/ascii/index.d.ts +5 -0
- package/dist/lib/ascii/index.js +11 -1
- package/dist/lib/ascii/index.js.map +1 -1
- package/dist/lib/ascii/lockstep.d.ts +22 -0
- package/dist/lib/ascii/lockstep.js +43 -6
- package/dist/lib/ascii/lockstep.js.map +1 -1
- package/dist/lib/ascii/pvt_axis_definition.d.ts +17 -0
- package/dist/lib/ascii/pvt_axis_definition.js +53 -0
- package/dist/lib/ascii/pvt_axis_definition.js.map +1 -0
- package/dist/lib/ascii/pvt_axis_type.d.ts +7 -0
- package/dist/lib/ascii/pvt_axis_type.js +14 -0
- package/dist/lib/ascii/pvt_axis_type.js.map +1 -0
- package/dist/lib/ascii/pvt_buffer.d.ts +28 -0
- package/dist/lib/ascii/pvt_buffer.js +78 -0
- package/dist/lib/ascii/pvt_buffer.js.map +1 -0
- package/dist/lib/ascii/pvt_mode.d.ts +8 -0
- package/dist/lib/ascii/pvt_mode.js +15 -0
- package/dist/lib/ascii/pvt_mode.js.map +1 -0
- package/dist/lib/ascii/pvt_sequence.d.ts +178 -0
- package/dist/lib/ascii/pvt_sequence.js +407 -0
- package/dist/lib/ascii/pvt_sequence.js.map +1 -0
- package/dist/lib/ascii/stream.d.ts +13 -5
- package/dist/lib/ascii/stream.js +25 -5
- package/dist/lib/ascii/stream.js.map +1 -1
- package/dist/lib/ascii/stream_buffer.d.ts +1 -1
- package/dist/lib/ascii/stream_buffer.js +1 -1
- package/dist/lib/ascii/stream_buffer.js.map +1 -1
- package/dist/lib/ascii/warnings.d.ts +9 -0
- package/dist/lib/ascii/warnings.js +17 -0
- package/dist/lib/ascii/warnings.js.map +1 -1
- package/dist/lib/ascii_ns.d.ts +10 -0
- package/dist/lib/ascii_ns.js +5 -0
- package/dist/lib/ascii_ns.js.map +1 -1
- package/dist/lib/exceptions/index.d.ts +12 -0
- package/dist/lib/exceptions/index.js +26 -2
- package/dist/lib/exceptions/index.js.map +1 -1
- package/dist/lib/exceptions/invalid_pvt_point.d.ts +16 -0
- package/dist/lib/exceptions/invalid_pvt_point.js +18 -0
- package/dist/lib/exceptions/invalid_pvt_point.js.map +1 -0
- package/dist/lib/exceptions/pvt_discontinuity_exception.d.ts +7 -0
- package/dist/lib/exceptions/pvt_discontinuity_exception.js +17 -0
- package/dist/lib/exceptions/pvt_discontinuity_exception.js.map +1 -0
- package/dist/lib/exceptions/pvt_execution_exception.d.ts +14 -0
- package/dist/lib/exceptions/pvt_execution_exception.js +32 -0
- package/dist/lib/exceptions/pvt_execution_exception.js.map +1 -0
- package/dist/lib/exceptions/pvt_execution_exception_data.d.ts +21 -0
- package/dist/lib/exceptions/pvt_execution_exception_data.js +20 -0
- package/dist/lib/exceptions/pvt_execution_exception_data.js.map +1 -0
- package/dist/lib/exceptions/pvt_mode_exception.d.ts +7 -0
- package/dist/lib/exceptions/pvt_mode_exception.js +17 -0
- package/dist/lib/exceptions/pvt_mode_exception.js.map +1 -0
- package/dist/lib/exceptions/pvt_movement_failed_exception.d.ts +14 -0
- package/dist/lib/exceptions/pvt_movement_failed_exception.js +32 -0
- package/dist/lib/exceptions/pvt_movement_failed_exception.js.map +1 -0
- package/dist/lib/exceptions/pvt_movement_failed_exception_data.d.ts +16 -0
- package/dist/lib/exceptions/pvt_movement_failed_exception_data.js +18 -0
- package/dist/lib/exceptions/pvt_movement_failed_exception_data.js.map +1 -0
- package/dist/lib/exceptions/pvt_movement_interrupted_exception.d.ts +14 -0
- package/dist/lib/exceptions/pvt_movement_interrupted_exception.js +32 -0
- package/dist/lib/exceptions/pvt_movement_interrupted_exception.js.map +1 -0
- package/dist/lib/exceptions/pvt_movement_interrupted_exception_data.d.ts +16 -0
- package/dist/lib/exceptions/pvt_movement_interrupted_exception_data.js +18 -0
- package/dist/lib/exceptions/pvt_movement_interrupted_exception_data.js.map +1 -0
- package/dist/lib/exceptions/pvt_setup_failed_exception.d.ts +7 -0
- package/dist/lib/exceptions/pvt_setup_failed_exception.js +17 -0
- package/dist/lib/exceptions/pvt_setup_failed_exception.js.map +1 -0
- package/dist/lib/exceptions/stream_discontinuity_exception.d.ts +7 -0
- package/dist/lib/exceptions/stream_discontinuity_exception.js +17 -0
- package/dist/lib/exceptions/stream_discontinuity_exception.js.map +1 -0
- package/dist/lib/exceptions/timeout_exception.d.ts +7 -0
- package/dist/lib/exceptions/timeout_exception.js +17 -0
- package/dist/lib/exceptions/timeout_exception.js.map +1 -0
- package/dist/lib/firmware_version.js +36 -0
- package/dist/lib/firmware_version.js.map +1 -1
- package/dist/lib/gateway/convert_exceptions.js +8 -0
- package/dist/lib/gateway/convert_exceptions.js.map +1 -1
- package/dist/lib/gcode/offline_translator.d.ts +2 -2
- package/dist/lib/gcode/offline_translator.js +2 -2
- package/dist/lib/gcode/offline_translator.js.map +1 -1
- package/dist/lib/gcode/translator.d.ts +1 -1
- package/dist/lib/gcode/translator.js +1 -1
- package/dist/lib/gcode/translator.js.map +1 -1
- package/dist/lib/protobufs/main_pb.d.ts +445 -58
- package/dist/lib/protobufs/main_pb.js +4369 -1463
- package/dist/lib/protobufs/main_pb.js.map +1 -1
- package/package.json +33 -3
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PvtAxisType } from './pvt_axis_type';
|
|
2
|
+
/**
|
|
3
|
+
* Defines an axis of the PVT sequence.
|
|
4
|
+
*/
|
|
5
|
+
export interface PvtAxisDefinition {
|
|
6
|
+
/**
|
|
7
|
+
* Number of a physical axis or a lockstep group.
|
|
8
|
+
*/
|
|
9
|
+
axisNumber: number;
|
|
10
|
+
/**
|
|
11
|
+
* Defines the type of the axis.
|
|
12
|
+
*/
|
|
13
|
+
axisType?: PvtAxisType;
|
|
14
|
+
}
|
|
15
|
+
export declare namespace PvtAxisDefinition {
|
|
16
|
+
const __type = "PvtAxisDefinition";
|
|
17
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
|
|
3
|
+
// ============= DO NOT EDIT DIRECTLY ============= //
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.PvtAxisDefinition = void 0;
|
|
29
|
+
const gateway = __importStar(require("../gateway"));
|
|
30
|
+
var PvtAxisDefinition;
|
|
31
|
+
(function (PvtAxisDefinition) {
|
|
32
|
+
PvtAxisDefinition.__type = 'PvtAxisDefinition';
|
|
33
|
+
/** @internal */
|
|
34
|
+
function fromProtobuf(pbData) {
|
|
35
|
+
return {
|
|
36
|
+
axisNumber: pbData.axisNumber,
|
|
37
|
+
axisType: pbData.axisType,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
PvtAxisDefinition.fromProtobuf = fromProtobuf;
|
|
41
|
+
/** @internal */
|
|
42
|
+
function toProtobuf(source) {
|
|
43
|
+
const pbData = new gateway.StreamAxisDefinition();
|
|
44
|
+
if (source == null) {
|
|
45
|
+
return pbData;
|
|
46
|
+
}
|
|
47
|
+
pbData.setAxisNumber(source.axisNumber);
|
|
48
|
+
pbData.setAxisType(source.axisType);
|
|
49
|
+
return pbData;
|
|
50
|
+
}
|
|
51
|
+
PvtAxisDefinition.toProtobuf = toProtobuf;
|
|
52
|
+
})(PvtAxisDefinition = exports.PvtAxisDefinition || (exports.PvtAxisDefinition = {}));
|
|
53
|
+
//# sourceMappingURL=pvt_axis_definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pvt_axis_definition.js","sourceRoot":"","sources":["../../../src/ascii/pvt_axis_definition.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AAmBtC,IAAiB,iBAAiB,CAqBjC;AArBD,WAAiB,iBAAiB;IACnB,wBAAM,GAAG,mBAAmB,CAAC;IAE1C,gBAAgB;IAChB,SAAgB,YAAY,CAAC,MAA6C;QACxE,OAAO;YACL,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,QAAQ,EAAE,MAAM,CAAC,QAAe;SACjC,CAAC;IACJ,CAAC;IALe,8BAAY,eAK3B,CAAA;IACD,gBAAgB;IAChB,SAAgB,UAAU,CAAC,MAA4C;QACrE,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;QAClD,IAAI,MAAM,IAAI,IAAI,EAAE;YAClB,OAAO,MAAM,CAAC;SACf;QAED,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACxC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,QAAS,CAAC,CAAC;QACrC,OAAO,MAAM,CAAC;IAChB,CAAC;IATe,4BAAU,aASzB,CAAA;AACH,CAAC,EArBgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAqBjC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { PvtAxisType } from './pvt_axis_type';\n\n/**\n * Defines an axis of the PVT sequence.\n */\nexport interface PvtAxisDefinition {\n /**\n * Number of a physical axis or a lockstep group.\n */\n axisNumber: number;\n\n /**\n * Defines the type of the axis.\n */\n axisType?: PvtAxisType;\n\n}\n\nexport namespace PvtAxisDefinition {\n export const __type = 'PvtAxisDefinition';\n\n /** @internal */\n export function fromProtobuf(pbData: gateway.StreamAxisDefinition.AsObject): PvtAxisDefinition {\n return {\n axisNumber: pbData.axisNumber,\n axisType: pbData.axisType as any,\n };\n }\n /** @internal */\n export function toProtobuf(source: PvtAxisDefinition | null | undefined): gateway.StreamAxisDefinition {\n const pbData = new gateway.StreamAxisDefinition();\n if (source == null) {\n return pbData;\n }\n\n pbData.setAxisNumber(source.axisNumber);\n pbData.setAxisType(source.axisType!);\n return pbData;\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
|
|
3
|
+
// ============= DO NOT EDIT DIRECTLY ============= //
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.PvtAxisType = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Denotes type of the PVT sequence axis.
|
|
8
|
+
*/
|
|
9
|
+
var PvtAxisType;
|
|
10
|
+
(function (PvtAxisType) {
|
|
11
|
+
PvtAxisType[PvtAxisType["PHYSICAL"] = 0] = "PHYSICAL";
|
|
12
|
+
PvtAxisType[PvtAxisType["LOCKSTEP"] = 1] = "LOCKSTEP";
|
|
13
|
+
})(PvtAxisType = exports.PvtAxisType || (exports.PvtAxisType = {}));
|
|
14
|
+
//# sourceMappingURL=pvt_axis_type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pvt_axis_type.js","sourceRoot":"","sources":["../../../src/ascii/pvt_axis_type.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAEtD;;GAEG;AACH,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,qDAAY,CAAA;IACZ,qDAAY,CAAA;AACd,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\n/**\n * Denotes type of the PVT sequence axis.\n */\nexport enum PvtAxisType {\n PHYSICAL = 0,\n LOCKSTEP = 1,\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Device } from './device';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a PVT buffer with this number on a device.
|
|
4
|
+
* A PVT buffer is a place to store a queue of PVT actions.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PvtBuffer {
|
|
7
|
+
/**
|
|
8
|
+
* The Device this buffer exists on.
|
|
9
|
+
*/
|
|
10
|
+
get device(): Device;
|
|
11
|
+
private _device;
|
|
12
|
+
/**
|
|
13
|
+
* The number identifying the buffer on the device.
|
|
14
|
+
*/
|
|
15
|
+
get bufferId(): number;
|
|
16
|
+
private _bufferId;
|
|
17
|
+
constructor(device: Device, bufferId: number);
|
|
18
|
+
/**
|
|
19
|
+
* Gets the buffer contents as an array of strings.
|
|
20
|
+
* @returns A string array containing all the PVT commands stored in the buffer.
|
|
21
|
+
*/
|
|
22
|
+
getContent(): Promise<string[]>;
|
|
23
|
+
/**
|
|
24
|
+
* Erases the contents of the buffer.
|
|
25
|
+
* This method fails if there is a PVT sequence writing to the buffer.
|
|
26
|
+
*/
|
|
27
|
+
erase(): Promise<void>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
|
|
3
|
+
// ============= DO NOT EDIT DIRECTLY ============= //
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.PvtBuffer = void 0;
|
|
29
|
+
const gateway = __importStar(require("../gateway"));
|
|
30
|
+
/**
|
|
31
|
+
* Represents a PVT buffer with this number on a device.
|
|
32
|
+
* A PVT buffer is a place to store a queue of PVT actions.
|
|
33
|
+
*/
|
|
34
|
+
class PvtBuffer {
|
|
35
|
+
/**
|
|
36
|
+
* The Device this buffer exists on.
|
|
37
|
+
*/
|
|
38
|
+
get device() {
|
|
39
|
+
return this._device;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The number identifying the buffer on the device.
|
|
43
|
+
*/
|
|
44
|
+
get bufferId() {
|
|
45
|
+
return this._bufferId;
|
|
46
|
+
}
|
|
47
|
+
constructor(device, bufferId) {
|
|
48
|
+
this._device = device;
|
|
49
|
+
this._bufferId = bufferId;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Gets the buffer contents as an array of strings.
|
|
53
|
+
* @returns A string array containing all the PVT commands stored in the buffer.
|
|
54
|
+
*/
|
|
55
|
+
async getContent() {
|
|
56
|
+
const request = new gateway.StreamBufferGetContentRequest();
|
|
57
|
+
request.setInterfaceId(this.device.connection.interfaceId);
|
|
58
|
+
request.setDevice(this.device.deviceAddress);
|
|
59
|
+
request.setBufferId(this.bufferId);
|
|
60
|
+
request.setPvt(true);
|
|
61
|
+
const response = await gateway.callAsync('device/stream_buffer_get_content', request, gateway.StreamBufferGetContentResponse);
|
|
62
|
+
return response.getBufferLinesList();
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Erases the contents of the buffer.
|
|
66
|
+
* This method fails if there is a PVT sequence writing to the buffer.
|
|
67
|
+
*/
|
|
68
|
+
async erase() {
|
|
69
|
+
const request = new gateway.StreamBufferEraseRequest();
|
|
70
|
+
request.setInterfaceId(this.device.connection.interfaceId);
|
|
71
|
+
request.setDevice(this.device.deviceAddress);
|
|
72
|
+
request.setBufferId(this.bufferId);
|
|
73
|
+
request.setPvt(true);
|
|
74
|
+
await gateway.callAsync('device/stream_buffer_erase', request);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.PvtBuffer = PvtBuffer;
|
|
78
|
+
//# sourceMappingURL=pvt_buffer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pvt_buffer.js","sourceRoot":"","sources":["../../../src/ascii/pvt_buffer.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oDAAsC;AAEtC;;;GAGG;AACH,MAAa,SAAS;IACpB;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAGD,YAAY,MAAc,EAAE,QAAgB;QAC1C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,UAAU;QACrB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,6BAA6B,EAAE,CAAC;QAC5D,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAErB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,kCAAkC,EAClC,OAAO,EACP,OAAO,CAAC,8BAA8B,CAAC,CAAC;QAC1C,OAAO,QAAQ,CAAC,kBAAkB,EAAE,CAAC;IACvC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,KAAK;QAChB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,wBAAwB,EAAE,CAAC;QACvD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAErB,MAAM,OAAO,CAAC,SAAS,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF;AArDD,8BAqDC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport * as gateway from '../gateway';\n\n/**\n * Represents a PVT buffer with this number on a device.\n * A PVT buffer is a place to store a queue of PVT actions.\n */\nexport class PvtBuffer {\n /**\n * The Device this buffer exists on.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * The number identifying the buffer on the device.\n */\n public get bufferId(): number {\n return this._bufferId;\n }\n private _bufferId: number;\n\n constructor(device: Device, bufferId: number) {\n this._device = device;\n this._bufferId = bufferId;\n }\n\n /**\n * Gets the buffer contents as an array of strings.\n * @returns A string array containing all the PVT commands stored in the buffer.\n */\n public async getContent(): Promise<string[]> {\n const request = new gateway.StreamBufferGetContentRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setBufferId(this.bufferId);\n request.setPvt(true);\n\n const response = await gateway.callAsync<gateway.StreamBufferGetContentResponse>(\n 'device/stream_buffer_get_content',\n request,\n gateway.StreamBufferGetContentResponse);\n return response.getBufferLinesList();\n }\n\n /**\n * Erases the contents of the buffer.\n * This method fails if there is a PVT sequence writing to the buffer.\n */\n public async erase(): Promise<void> {\n const request = new gateway.StreamBufferEraseRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setBufferId(this.bufferId);\n request.setPvt(true);\n\n await gateway.callAsync('device/stream_buffer_erase', request);\n }\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
|
|
3
|
+
// ============= DO NOT EDIT DIRECTLY ============= //
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.PvtMode = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Mode of a PVT sequence.
|
|
8
|
+
*/
|
|
9
|
+
var PvtMode;
|
|
10
|
+
(function (PvtMode) {
|
|
11
|
+
PvtMode[PvtMode["DISABLED"] = 0] = "DISABLED";
|
|
12
|
+
PvtMode[PvtMode["STORE"] = 1] = "STORE";
|
|
13
|
+
PvtMode[PvtMode["LIVE"] = 2] = "LIVE";
|
|
14
|
+
})(PvtMode = exports.PvtMode || (exports.PvtMode = {}));
|
|
15
|
+
//# sourceMappingURL=pvt_mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pvt_mode.js","sourceRoot":"","sources":["../../../src/ascii/pvt_mode.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAEtD;;GAEG;AACH,IAAY,OAIX;AAJD,WAAY,OAAO;IACjB,6CAAY,CAAA;IACZ,uCAAS,CAAA;IACT,qCAAQ,CAAA;AACV,CAAC,EAJW,OAAO,GAAP,eAAO,KAAP,eAAO,QAIlB","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\n/**\n * Mode of a PVT sequence.\n */\nexport enum PvtMode {\n DISABLED = 0,\n STORE = 1,\n LIVE = 2,\n}\n"]}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { Device } from './device';
|
|
2
|
+
import { Measurement } from '../measurement';
|
|
3
|
+
import { PvtBuffer } from './pvt_buffer';
|
|
4
|
+
import { PvtMode } from './pvt_mode';
|
|
5
|
+
import { PvtAxisDefinition } from './pvt_axis_definition';
|
|
6
|
+
/**
|
|
7
|
+
* A handle for a PVT sequence with this number on the device.
|
|
8
|
+
* PVT sequences provide a way execute or store trajectory
|
|
9
|
+
* consisting of points with defined position, velocity, and time.
|
|
10
|
+
* PVT sequence methods append actions to a queue which executes
|
|
11
|
+
* or stores actions in a first in, first out order.
|
|
12
|
+
*/
|
|
13
|
+
export declare class PvtSequence {
|
|
14
|
+
/**
|
|
15
|
+
* Device that controls this PVT sequence.
|
|
16
|
+
*/
|
|
17
|
+
get device(): Device;
|
|
18
|
+
private _device;
|
|
19
|
+
/**
|
|
20
|
+
* The number that identifies the PVT sequence on the device.
|
|
21
|
+
*/
|
|
22
|
+
get pvtId(): number;
|
|
23
|
+
private _pvtId;
|
|
24
|
+
/**
|
|
25
|
+
* Current mode of the PVT sequence.
|
|
26
|
+
*/
|
|
27
|
+
get mode(): PvtMode;
|
|
28
|
+
/**
|
|
29
|
+
* An array of axes definitions the PVT sequence is set up to control.
|
|
30
|
+
*/
|
|
31
|
+
get axes(): PvtAxisDefinition[];
|
|
32
|
+
constructor(device: Device, pvtId: number);
|
|
33
|
+
/**
|
|
34
|
+
* Setup the PVT sequence to control the specified axes and to queue actions on the device.
|
|
35
|
+
* Allows use of lockstep axes in a PVT sequence.
|
|
36
|
+
* @param axes Definition of the PVT sequence axes.
|
|
37
|
+
*/
|
|
38
|
+
setupLiveComposite(...axes: PvtAxisDefinition[]): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Setup the PVT sequence to control the specified axes and to queue actions on the device.
|
|
41
|
+
* @param axes Numbers of physical axes to setup the PVT sequence on.
|
|
42
|
+
*/
|
|
43
|
+
setupLive(...axes: number[]): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Setup the PVT sequence to use the specified axes and queue actions into a PVT buffer.
|
|
46
|
+
* Allows use of lockstep axes in a PVT sequence.
|
|
47
|
+
* @param pvtBuffer The PVT buffer to queue actions in.
|
|
48
|
+
* @param axes Definition of the PVT sequence axes.
|
|
49
|
+
*/
|
|
50
|
+
setupStoreComposite(pvtBuffer: PvtBuffer, ...axes: PvtAxisDefinition[]): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Setup the PVT sequence to use the specified axes and queue actions into a PVT buffer.
|
|
53
|
+
* @param pvtBuffer The PVT buffer to queue actions in.
|
|
54
|
+
* @param axes Numbers of physical axes to setup the PVT sequence on.
|
|
55
|
+
*/
|
|
56
|
+
setupStore(pvtBuffer: PvtBuffer, ...axes: number[]): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Append the actions in a PVT buffer to the sequence's queue.
|
|
59
|
+
* @param pvtBuffer The PVT buffer to call.
|
|
60
|
+
*/
|
|
61
|
+
call(pvtBuffer: PvtBuffer): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Queues a point with absolute coordinates in the PVT sequence.
|
|
64
|
+
* @param positions Positions for the axes to move through, relative to their home positions.
|
|
65
|
+
* @param velocities The axes velocities at the given point.
|
|
66
|
+
* @param time The duration between the previous point in the sequence and this one.
|
|
67
|
+
*/
|
|
68
|
+
point(positions: Measurement[], velocities: Measurement[], time: Measurement): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Queues a point with coordinates relative to the previous point in the PVT sequence.
|
|
71
|
+
* @param positions Positions for the axes to move through, relative to the previous point.
|
|
72
|
+
* @param velocities The axes velocities at the given point.
|
|
73
|
+
* @param time The duration between the previous point in the sequence and this one.
|
|
74
|
+
*/
|
|
75
|
+
pointRelative(positions: Measurement[], velocities: Measurement[], time: Measurement): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Set the value of a digital output channel.
|
|
78
|
+
* @param channelNumber The number of the digital output channel.
|
|
79
|
+
* Channel numbers are numbered from one.
|
|
80
|
+
* @param value The value to set the channel to.
|
|
81
|
+
*/
|
|
82
|
+
setDigitalOutput(channelNumber: number, value: boolean): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Set the value of an analog output channel.
|
|
85
|
+
* @param channelNumber The number of the analog output channel.
|
|
86
|
+
* Channel numbers are numbered from one.
|
|
87
|
+
* @param value The value to set the channel to, in Volts.
|
|
88
|
+
*/
|
|
89
|
+
setAnalogOutput(channelNumber: number, value: number): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* Sets values for all digital output channels.
|
|
92
|
+
* @param values True to set the output channel to conducting and false to turn it off.
|
|
93
|
+
*/
|
|
94
|
+
setAllDigitalOutputs(values: boolean[]): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* Sets values for all analog output channels.
|
|
97
|
+
* @param values The values to set the output channels to, in Volts.
|
|
98
|
+
*/
|
|
99
|
+
setAllAnalogOutputs(values: number[]): Promise<void>;
|
|
100
|
+
/**
|
|
101
|
+
* Waits until the live PVT sequence executes all queued actions.
|
|
102
|
+
* @param [options.throwErrorOnFault=true] Determines whether to throw error when fault is observed.
|
|
103
|
+
*/
|
|
104
|
+
waitUntilIdle(options?: PvtSequence.WaitUntilIdleOptions): Promise<void>;
|
|
105
|
+
/**
|
|
106
|
+
* Cork the front of the PVT sequences's action queue, blocking execution.
|
|
107
|
+
* Execution resumes upon uncorking the queue, or when the number of queued actions reaches its limit.
|
|
108
|
+
* Corking eliminates discontinuities in motion due to subsequent PVT commands reaching the device late.
|
|
109
|
+
* You can only cork an idle live PVT sequence.
|
|
110
|
+
*/
|
|
111
|
+
cork(): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Uncork the front of the queue, unblocking command execution.
|
|
114
|
+
* You can only uncork an idle live PVT sequence that is corked.
|
|
115
|
+
*/
|
|
116
|
+
uncork(): Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* Returns a boolean value indicating whether the live PVT sequence is executing a queued action.
|
|
119
|
+
* @returns True if the PVT sequence is executing a queued action.
|
|
120
|
+
*/
|
|
121
|
+
isBusy(): Promise<boolean>;
|
|
122
|
+
/**
|
|
123
|
+
* Returns a string which represents the PVT sequence.
|
|
124
|
+
* @returns String which represents the PVT sequence.
|
|
125
|
+
*/
|
|
126
|
+
toString(): string;
|
|
127
|
+
/**
|
|
128
|
+
* Disables the PVT sequence.
|
|
129
|
+
* If the PVT sequence is not setup, this command does nothing.
|
|
130
|
+
* Once disabled, the PVT sequence will no longer accept PVT commands.
|
|
131
|
+
* The PVT sequence will process the rest of the commands in the queue until it is empty.
|
|
132
|
+
*/
|
|
133
|
+
disable(): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* Sends a generic ASCII command to the PVT sequence.
|
|
136
|
+
* Keeps resending the command while the device rejects with AGAIN reason.
|
|
137
|
+
* @param command Command and its parameters.
|
|
138
|
+
*/
|
|
139
|
+
genericCommand(command: string): Promise<void>;
|
|
140
|
+
/**
|
|
141
|
+
* Sends a batch of generic ASCII commands to the PVT sequence.
|
|
142
|
+
* Keeps resending command while the device rejects with AGAIN reason.
|
|
143
|
+
* The batch is atomic in terms of thread safety.
|
|
144
|
+
* @param batch Array of commands.
|
|
145
|
+
*/
|
|
146
|
+
genericCommandBatch(batch: string[]): Promise<void>;
|
|
147
|
+
/**
|
|
148
|
+
* Queries the PVT sequence status from the device
|
|
149
|
+
* and returns boolean indicating whether the PVT sequence is disabled.
|
|
150
|
+
* Useful to determine if execution was interrupted by other movements.
|
|
151
|
+
* @returns True if the PVT sequence is disabled.
|
|
152
|
+
*/
|
|
153
|
+
checkDisabled(): Promise<boolean>;
|
|
154
|
+
/**
|
|
155
|
+
* Makes the PVT sequence throw PvtDiscontinuityException when it encounters discontinuities (ND warning flag).
|
|
156
|
+
*/
|
|
157
|
+
treatDiscontinuitiesAsError(): void;
|
|
158
|
+
/**
|
|
159
|
+
* Prevents PvtDiscontinuityException as a result of expected discontinuity when resuming the sequence.
|
|
160
|
+
*/
|
|
161
|
+
ignoreCurrentDiscontinuity(): void;
|
|
162
|
+
/**
|
|
163
|
+
* Gets the axes of the PVT sequence.
|
|
164
|
+
* @returns An array of axis numbers of the axes the PVT sequence is set up to control.
|
|
165
|
+
*/
|
|
166
|
+
private _retrieveAxes;
|
|
167
|
+
/**
|
|
168
|
+
* Get the mode of the PVT sequence.
|
|
169
|
+
* @returns Mode of the PVT sequence.
|
|
170
|
+
*/
|
|
171
|
+
private _retrieveMode;
|
|
172
|
+
}
|
|
173
|
+
declare namespace PvtSequence {
|
|
174
|
+
interface WaitUntilIdleOptions {
|
|
175
|
+
throwErrorOnFault?: boolean;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
export {};
|