@zaber/motion 9.1.0 → 9.2.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/LICENSE +87 -8
- package/dist/binding/wasm/zaber-motion-core.wasm +0 -0
- package/dist/lib/ascii/axis_settings.d.ts +22 -1
- package/dist/lib/ascii/axis_settings.d.ts.map +1 -1
- package/dist/lib/ascii/axis_settings.js +48 -1
- package/dist/lib/ascii/axis_settings.js.map +1 -1
- package/dist/lib/ascii/device_settings.d.ts +55 -1
- package/dist/lib/ascii/device_settings.d.ts.map +1 -1
- package/dist/lib/ascii/device_settings.js +74 -1
- package/dist/lib/ascii/device_settings.js.map +1 -1
- package/dist/lib/ascii/get_axis_setting_typed_result.d.ts +29 -0
- package/dist/lib/ascii/get_axis_setting_typed_result.d.ts.map +1 -0
- package/dist/lib/ascii/get_axis_setting_typed_result.js +52 -0
- package/dist/lib/ascii/get_axis_setting_typed_result.js.map +1 -0
- package/dist/lib/ascii/get_setting_bool_result.d.ts +23 -0
- package/dist/lib/ascii/get_setting_bool_result.d.ts.map +1 -0
- package/dist/lib/ascii/get_setting_bool_result.js +39 -0
- package/dist/lib/ascii/get_setting_bool_result.js.map +1 -0
- package/dist/lib/ascii/get_setting_int_result.d.ts +23 -0
- package/dist/lib/ascii/get_setting_int_result.d.ts.map +1 -0
- package/dist/lib/ascii/get_setting_int_result.js +39 -0
- package/dist/lib/ascii/get_setting_int_result.js.map +1 -0
- package/dist/lib/ascii/get_setting_string_result.d.ts +23 -0
- package/dist/lib/ascii/get_setting_string_result.d.ts.map +1 -0
- package/dist/lib/ascii/get_setting_string_result.js +39 -0
- package/dist/lib/ascii/get_setting_string_result.js.map +1 -0
- package/dist/lib/ascii/get_setting_typed_result.d.ts +29 -0
- package/dist/lib/ascii/get_setting_typed_result.d.ts.map +1 -0
- package/dist/lib/ascii/get_setting_typed_result.js +52 -0
- package/dist/lib/ascii/get_setting_typed_result.js.map +1 -0
- package/dist/lib/ascii/get_settings_by_type_result.d.ts +35 -0
- package/dist/lib/ascii/get_settings_by_type_result.d.ts.map +1 -0
- package/dist/lib/ascii/get_settings_by_type_result.js +50 -0
- package/dist/lib/ascii/get_settings_by_type_result.js.map +1 -0
- package/dist/lib/ascii/index.d.ts +8 -0
- package/dist/lib/ascii/index.d.ts.map +1 -1
- package/dist/lib/ascii/index.js +8 -0
- package/dist/lib/ascii/index.js.map +1 -1
- package/dist/lib/ascii/pvt_buffer.d.ts +22 -1
- package/dist/lib/ascii/pvt_buffer.d.ts.map +1 -1
- package/dist/lib/ascii/pvt_buffer.js +9 -1
- package/dist/lib/ascii/pvt_buffer.js.map +1 -1
- package/dist/lib/ascii/pvt_buffer_axis_units.d.ts +29 -0
- package/dist/lib/ascii/pvt_buffer_axis_units.d.ts.map +1 -0
- package/dist/lib/ascii/pvt_buffer_axis_units.js +44 -0
- package/dist/lib/ascii/pvt_buffer_axis_units.js.map +1 -0
- package/dist/lib/ascii/pvt_csv_data.js.map +1 -1
- package/dist/lib/ascii/pvt_partial_csv_data.js.map +1 -1
- package/dist/lib/ascii/typed_setting.d.ts +20 -0
- package/dist/lib/ascii/typed_setting.d.ts.map +1 -0
- package/dist/lib/ascii/typed_setting.js +84 -0
- package/dist/lib/ascii/typed_setting.js.map +1 -0
- package/dist/lib/gateway/constants.js +1 -1
- package/dist/lib/gateway/constants.js.map +1 -1
- package/dist/lib/product/ge_1_x_gripper.d.ts +3 -1
- package/dist/lib/product/ge_1_x_gripper.d.ts.map +1 -1
- package/dist/lib/product/ge_1_x_gripper.js +3 -1
- package/dist/lib/product/ge_1_x_gripper.js.map +1 -1
- package/dist/lib/requests/device_convert_setting_request.d.ts +1 -0
- package/dist/lib/requests/device_convert_setting_request.d.ts.map +1 -1
- package/dist/lib/requests/device_convert_setting_request.js +5 -1
- package/dist/lib/requests/device_convert_setting_request.js.map +1 -1
- package/dist/lib/requests/device_get_many_by_type_request.d.ts +19 -0
- package/dist/lib/requests/device_get_many_by_type_request.d.ts.map +1 -0
- package/dist/lib/requests/device_get_many_by_type_request.js +56 -0
- package/dist/lib/requests/device_get_many_by_type_request.js.map +1 -0
- package/dist/lib/requests/get_axis_settings_typed_response.d.ts +14 -0
- package/dist/lib/requests/get_axis_settings_typed_response.d.ts.map +1 -0
- package/dist/lib/requests/get_axis_settings_typed_response.js +35 -0
- package/dist/lib/requests/get_axis_settings_typed_response.js.map +1 -0
- package/dist/lib/requests/get_settings_typed_response.d.ts +14 -0
- package/dist/lib/requests/get_settings_typed_response.d.ts.map +1 -0
- package/dist/lib/requests/get_settings_typed_response.js +35 -0
- package/dist/lib/requests/get_settings_typed_response.js.map +1 -0
- package/dist/lib/requests/index.d.ts +4 -0
- package/dist/lib/requests/index.d.ts.map +1 -1
- package/dist/lib/requests/index.js +4 -0
- package/dist/lib/requests/index.js.map +1 -1
- package/dist/lib/requests/pvt_buffer_get_sequence_data_request.d.ts +4 -0
- package/dist/lib/requests/pvt_buffer_get_sequence_data_request.d.ts.map +1 -1
- package/dist/lib/requests/pvt_buffer_get_sequence_data_request.js +11 -1
- package/dist/lib/requests/pvt_buffer_get_sequence_data_request.js.map +1 -1
- package/dist/lib/requests/pvt_buffer_get_sequence_data_response.js.map +1 -1
- package/dist/lib/requests/pvt_convert_time_request.js.map +1 -1
- package/dist/lib/requests/pvt_convert_time_response.js.map +1 -1
- package/dist/lib/requests/pvt_generate_positions_request.js.map +1 -1
- package/dist/lib/requests/pvt_generate_sequence_response.js.map +1 -1
- package/dist/lib/requests/pvt_generate_velocities_and_times_request.js.map +1 -1
- package/dist/lib/requests/pvt_generate_velocities_request.js.map +1 -1
- package/dist/lib/requests/pvt_items_request.js.map +1 -1
- package/dist/lib/requests/pvt_partial_convert_time_request.js.map +1 -1
- package/dist/lib/requests/pvt_partial_convert_time_response.js.map +1 -1
- package/dist/lib/requests/pvt_save_csv_request.js.map +1 -1
- package/dist/lib/requests/pvt_submit_sequence_data_request.js.map +1 -1
- package/dist/lib/requests/test_dto_with_variants.js.map +1 -1
- package/dist/lib/requests/typed_setting_response.d.ts +14 -0
- package/dist/lib/requests/typed_setting_response.d.ts.map +1 -0
- package/dist/lib/requests/typed_setting_response.js +40 -0
- package/dist/lib/requests/typed_setting_response.js.map +1 -0
- package/dist/lib/requests/unit_convert_native_request.d.ts +1 -0
- package/dist/lib/requests/unit_convert_native_request.d.ts.map +1 -1
- package/dist/lib/requests/unit_convert_native_request.js +5 -1
- package/dist/lib/requests/unit_convert_native_request.js.map +1 -1
- package/dist/lib/unit_conversion_descriptor.d.ts +4 -0
- package/dist/lib/unit_conversion_descriptor.d.ts.map +1 -1
- package/dist/lib/unit_conversion_descriptor.js +5 -1
- package/dist/lib/unit_conversion_descriptor.js.map +1 -1
- package/dist/lib/unit_table.d.ts +4 -2
- package/dist/lib/unit_table.d.ts.map +1 -1
- package/dist/lib/unit_table.js +6 -2
- package/dist/lib/unit_table.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetSettingTypedResult = 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
|
+
const typed_setting_1 = require("../ascii/typed_setting");
|
|
9
|
+
const units_1 = require("../units");
|
|
10
|
+
exports.GetSettingTypedResult = {
|
|
11
|
+
fromBinary: (buffer) => exports.GetSettingTypedResult.convert(bson_1.BSON.deserialize(buffer, { useBigInt64: true })),
|
|
12
|
+
toBinary: (value) => {
|
|
13
|
+
const sanitized = exports.GetSettingTypedResult.sanitize(value);
|
|
14
|
+
return bson_1.BSON.serialize({
|
|
15
|
+
setting: sanitized.setting,
|
|
16
|
+
values: sanitized.values.map(item => typed_setting_1.TypedSetting.convertBack(item)),
|
|
17
|
+
unit: sanitized.unit,
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
DEFAULT: Object.freeze({
|
|
21
|
+
setting: '',
|
|
22
|
+
values: [],
|
|
23
|
+
unit: units_1.Units.NATIVE,
|
|
24
|
+
}),
|
|
25
|
+
sanitize: (value) => {
|
|
26
|
+
if (value == null) {
|
|
27
|
+
throw new TypeError('Expected GetSettingTypedResult object but got null or undefined.');
|
|
28
|
+
}
|
|
29
|
+
if (typeof value !== 'object') {
|
|
30
|
+
throw new TypeError(`Expected GetSettingTypedResult object but got ${typeof value}.`);
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
setting: sanitizer_1.sanitizer.sanitizeString(value.setting, 'setting'),
|
|
34
|
+
values: Array.from(value.values ?? [], item => typed_setting_1.TypedSetting.sanitize(item)),
|
|
35
|
+
unit: sanitizer_1.sanitizer.sanitizeUnits(value.unit, 'unit'),
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
convert: (value) => ({
|
|
39
|
+
setting: value.setting,
|
|
40
|
+
values: value.values.map(item => typed_setting_1.TypedSetting.convert(item)),
|
|
41
|
+
unit: value.unit,
|
|
42
|
+
}),
|
|
43
|
+
isA: (value) => {
|
|
44
|
+
const castValue = value;
|
|
45
|
+
return (value != null &&
|
|
46
|
+
typeof value === 'object' &&
|
|
47
|
+
sanitizer_1.sanitizer.isString(castValue.setting) &&
|
|
48
|
+
!!castValue.values?.every(item => typed_setting_1.TypedSetting.isA(item)) &&
|
|
49
|
+
sanitizer_1.sanitizer.isUnits(castValue.unit));
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=get_setting_typed_result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_setting_typed_result.js","sourceRoot":"","sources":["../../../src/ascii/get_setting_typed_result.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,wDAAwD;AACxD,+BAA4B;AAC5B,oDAAiD;AACjD,0DAAsD;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C3E,IAAI,EAAE,qBAAS,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC;SAClD,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,CAAC,KAAoB,EAAyB,EAAE,CAAC,CAAC;QACzD,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,MAAM,EAAG,KAAK,CAAC,MAA0B,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,4BAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACjF,IAAI,EAAE,KAAK,CAAC,IAAI;KACjB,CAAC;IAEF,GAAG,EAAE,CAAC,KAAU,EAAkC,EAAE;QAClD,MAAM,SAAS,GAAG,KAA8B,CAAC;QACjD,OAAO,CACL,KAAK,IAAI,IAAI;YACb,OAAO,KAAK,KAAK,QAAQ;YACzB,qBAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC;YACrC,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,4BAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACzD,qBAAS,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAClC,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 { TypedSetting } from '../ascii/typed_setting';\nimport { Units } from '../units';\n\n/**\n * The response from a multi-get command with typed values.\n */\nexport interface GetSettingTypedResult {\n /**\n * The setting read.\n */\n setting: string;\n\n /**\n * The list of values returned.\n */\n values: TypedSetting[];\n\n /**\n * The unit of the values.\n */\n unit: Units;\n\n}\n\nexport const GetSettingTypedResult = {\n fromBinary: (buffer: Uint8Array): GetSettingTypedResult => GetSettingTypedResult.convert(BSON.deserialize(buffer, { useBigInt64: true })),\n\n toBinary: (value: GetSettingTypedResult): Uint8Array => {\n const sanitized = GetSettingTypedResult.sanitize(value);\n return BSON.serialize({\n setting: sanitized.setting,\n values: sanitized.values.map(item => TypedSetting.convertBack(item)),\n unit: sanitized.unit,\n });\n },\n\n DEFAULT: Object.freeze({\n setting: '',\n values: [],\n unit: Units.NATIVE,\n }) as Readonly<GetSettingTypedResult>,\n\n sanitize: (value: GetSettingTypedResult): GetSettingTypedResult => {\n if (value == null) { throw new TypeError('Expected GetSettingTypedResult object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected GetSettingTypedResult object but got ${typeof value}.`) }\n return {\n setting: sanitizer.sanitizeString(value.setting, 'setting'),\n values: Array.from(value.values ?? [], item => TypedSetting.sanitize(item)),\n unit: sanitizer.sanitizeUnits(value.unit, 'unit'),\n };\n },\n\n convert: (value: BSON.Document): GetSettingTypedResult => ({\n setting: value.setting,\n values: (value.values as BSON.Document[]).map(item => TypedSetting.convert(item)),\n unit: value.unit,\n }),\n\n isA: (value: any): value is GetSettingTypedResult => {\n const castValue = value as GetSettingTypedResult;\n return (\n value != null &&\n typeof value === 'object' &&\n sanitizer.isString(castValue.setting) &&\n !!castValue.values?.every(item => TypedSetting.isA(item)) &&\n sanitizer.isUnits(castValue.unit)\n );\n },\n};\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BSON } from 'bson';
|
|
2
|
+
import { GetSettingResult } from '../ascii/get_setting_result';
|
|
3
|
+
import { GetSettingIntResult } from '../ascii/get_setting_int_result';
|
|
4
|
+
import { GetSettingBoolResult } from '../ascii/get_setting_bool_result';
|
|
5
|
+
import { GetSettingStringResult } from '../ascii/get_setting_string_result';
|
|
6
|
+
/**
|
|
7
|
+
* The response from a multi-get command with values grouped by type.
|
|
8
|
+
*/
|
|
9
|
+
export interface GetSettingsByTypeResult {
|
|
10
|
+
/**
|
|
11
|
+
* Float setting results.
|
|
12
|
+
*/
|
|
13
|
+
floatSettings: GetSettingResult[];
|
|
14
|
+
/**
|
|
15
|
+
* Integer setting results.
|
|
16
|
+
*/
|
|
17
|
+
intSettings: GetSettingIntResult[];
|
|
18
|
+
/**
|
|
19
|
+
* Boolean setting results.
|
|
20
|
+
*/
|
|
21
|
+
boolSettings: GetSettingBoolResult[];
|
|
22
|
+
/**
|
|
23
|
+
* String setting results.
|
|
24
|
+
*/
|
|
25
|
+
stringSettings: GetSettingStringResult[];
|
|
26
|
+
}
|
|
27
|
+
export declare const GetSettingsByTypeResult: {
|
|
28
|
+
fromBinary: (buffer: Uint8Array) => GetSettingsByTypeResult;
|
|
29
|
+
toBinary: (value: GetSettingsByTypeResult) => Uint8Array;
|
|
30
|
+
DEFAULT: Readonly<GetSettingsByTypeResult>;
|
|
31
|
+
sanitize: (value: GetSettingsByTypeResult) => GetSettingsByTypeResult;
|
|
32
|
+
convert: (value: BSON.Document) => GetSettingsByTypeResult;
|
|
33
|
+
isA: (value: any) => value is GetSettingsByTypeResult;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=get_settings_by_type_result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_settings_by_type_result.d.ts","sourceRoot":"","sources":["../../../src/ascii/get_settings_by_type_result.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAElC;;OAEG;IACH,WAAW,EAAE,mBAAmB,EAAE,CAAC;IAEnC;;OAEG;IACH,YAAY,EAAE,oBAAoB,EAAE,CAAC;IAErC;;OAEG;IACH,cAAc,EAAE,sBAAsB,EAAE,CAAC;CAE1C;AAED,eAAO,MAAM,uBAAuB;yBACb,UAAU,KAAG,uBAAuB;sBAEvC,uBAAuB,KAAG,UAAU;;sBASpC,uBAAuB,KAAG,uBAAuB;qBAWlD,KAAK,QAAQ,KAAG,uBAAuB;iBAO3C,GAAG;CAWjB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetSettingsByTypeResult = void 0;
|
|
4
|
+
// ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //
|
|
5
|
+
// ============== DO NOT EDIT DIRECTLY ============== //
|
|
6
|
+
const bson_1 = require("bson");
|
|
7
|
+
const get_setting_result_1 = require("../ascii/get_setting_result");
|
|
8
|
+
const get_setting_int_result_1 = require("../ascii/get_setting_int_result");
|
|
9
|
+
const get_setting_bool_result_1 = require("../ascii/get_setting_bool_result");
|
|
10
|
+
const get_setting_string_result_1 = require("../ascii/get_setting_string_result");
|
|
11
|
+
exports.GetSettingsByTypeResult = {
|
|
12
|
+
fromBinary: (buffer) => exports.GetSettingsByTypeResult.convert(bson_1.BSON.deserialize(buffer, { useBigInt64: true })),
|
|
13
|
+
toBinary: (value) => bson_1.BSON.serialize(exports.GetSettingsByTypeResult.sanitize(value)),
|
|
14
|
+
DEFAULT: Object.freeze({
|
|
15
|
+
floatSettings: [],
|
|
16
|
+
intSettings: [],
|
|
17
|
+
boolSettings: [],
|
|
18
|
+
stringSettings: [],
|
|
19
|
+
}),
|
|
20
|
+
sanitize: (value) => {
|
|
21
|
+
if (value == null) {
|
|
22
|
+
throw new TypeError('Expected GetSettingsByTypeResult object but got null or undefined.');
|
|
23
|
+
}
|
|
24
|
+
if (typeof value !== 'object') {
|
|
25
|
+
throw new TypeError(`Expected GetSettingsByTypeResult object but got ${typeof value}.`);
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
floatSettings: Array.from(value.floatSettings ?? [], item => get_setting_result_1.GetSettingResult.sanitize(item)),
|
|
29
|
+
intSettings: Array.from(value.intSettings ?? [], item => get_setting_int_result_1.GetSettingIntResult.sanitize(item)),
|
|
30
|
+
boolSettings: Array.from(value.boolSettings ?? [], item => get_setting_bool_result_1.GetSettingBoolResult.sanitize(item)),
|
|
31
|
+
stringSettings: Array.from(value.stringSettings ?? [], item => get_setting_string_result_1.GetSettingStringResult.sanitize(item)),
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
convert: (value) => ({
|
|
35
|
+
floatSettings: value.floatSettings,
|
|
36
|
+
intSettings: value.intSettings,
|
|
37
|
+
boolSettings: value.boolSettings,
|
|
38
|
+
stringSettings: value.stringSettings,
|
|
39
|
+
}),
|
|
40
|
+
isA: (value) => {
|
|
41
|
+
const castValue = value;
|
|
42
|
+
return (value != null &&
|
|
43
|
+
typeof value === 'object' &&
|
|
44
|
+
!!castValue.floatSettings?.every(item => get_setting_result_1.GetSettingResult.isA(item)) &&
|
|
45
|
+
!!castValue.intSettings?.every(item => get_setting_int_result_1.GetSettingIntResult.isA(item)) &&
|
|
46
|
+
!!castValue.boolSettings?.every(item => get_setting_bool_result_1.GetSettingBoolResult.isA(item)) &&
|
|
47
|
+
!!castValue.stringSettings?.every(item => get_setting_string_result_1.GetSettingStringResult.isA(item)));
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=get_settings_by_type_result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_settings_by_type_result.js","sourceRoot":"","sources":["../../../src/ascii/get_settings_by_type_result.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,wDAAwD;AACxD,+BAA4B;AAC5B,oEAA+D;AAC/D,4EAAsE;AACtE,8EAAwE;AACxE,kFAA4E;AA4B/D,QAAA,uBAAuB,GAAG;IACrC,UAAU,EAAE,CAAC,MAAkB,EAA2B,EAAE,CAAC,+BAAuB,CAAC,OAA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AAI,CAAC,CAAC;SACtG,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,CAAC,KAAoB,EAA2B,EAAE,CAAC,CAAC;QAC3D,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,cAAc,EAAE,KAAK,CAAC,cAAc;KACrC,CAAC;IAEF,GAAG,EAAE,CAAC,KAAU,EAAoC,EAAE;QACpD,MAAM,SAAS,GAAG,KAAgC,CAAC;QACnD,OAAO,CACL,KAAK,IAAI,IAAI;YACb,OAAO,KAAK,KAAK,QAAQ;YACzB,CAAC,CAAC,SAAS,CAAC,aAAa,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,qCAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACpE,CAAC,CAAC,SAAS,CAAC,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,4CAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACrE,CAAC,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,8CAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACvE,CAAC,CAAC,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,kDAAsB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAC5E,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["// ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //\n// ============== DO NOT EDIT DIRECTLY ============== //\nimport { BSON } from 'bson';\nimport { GetSettingResult } from '../ascii/get_setting_result';\nimport { GetSettingIntResult } from '../ascii/get_setting_int_result';\nimport { GetSettingBoolResult } from '../ascii/get_setting_bool_result';\nimport { GetSettingStringResult } from '../ascii/get_setting_string_result';\n\n/**\n * The response from a multi-get command with values grouped by type.\n */\nexport interface GetSettingsByTypeResult {\n /**\n * Float setting results.\n */\n floatSettings: GetSettingResult[];\n\n /**\n * Integer setting results.\n */\n intSettings: GetSettingIntResult[];\n\n /**\n * Boolean setting results.\n */\n boolSettings: GetSettingBoolResult[];\n\n /**\n * String setting results.\n */\n stringSettings: GetSettingStringResult[];\n\n}\n\nexport const GetSettingsByTypeResult = {\n fromBinary: (buffer: Uint8Array): GetSettingsByTypeResult => GetSettingsByTypeResult.convert(BSON.deserialize(buffer, { useBigInt64: true })),\n\n toBinary: (value: GetSettingsByTypeResult): Uint8Array => BSON.serialize(GetSettingsByTypeResult.sanitize(value)),\n\n DEFAULT: Object.freeze({\n floatSettings: [],\n intSettings: [],\n boolSettings: [],\n stringSettings: [],\n }) as Readonly<GetSettingsByTypeResult>,\n\n sanitize: (value: GetSettingsByTypeResult): GetSettingsByTypeResult => {\n if (value == null) { throw new TypeError('Expected GetSettingsByTypeResult object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected GetSettingsByTypeResult object but got ${typeof value}.`) }\n return {\n floatSettings: Array.from(value.floatSettings ?? [], item => GetSettingResult.sanitize(item)),\n intSettings: Array.from(value.intSettings ?? [], item => GetSettingIntResult.sanitize(item)),\n boolSettings: Array.from(value.boolSettings ?? [], item => GetSettingBoolResult.sanitize(item)),\n stringSettings: Array.from(value.stringSettings ?? [], item => GetSettingStringResult.sanitize(item)),\n };\n },\n\n convert: (value: BSON.Document): GetSettingsByTypeResult => ({\n floatSettings: value.floatSettings,\n intSettings: value.intSettings,\n boolSettings: value.boolSettings,\n stringSettings: value.stringSettings,\n }),\n\n isA: (value: any): value is GetSettingsByTypeResult => {\n const castValue = value as GetSettingsByTypeResult;\n return (\n value != null &&\n typeof value === 'object' &&\n !!castValue.floatSettings?.every(item => GetSettingResult.isA(item)) &&\n !!castValue.intSettings?.every(item => GetSettingIntResult.isA(item)) &&\n !!castValue.boolSettings?.every(item => GetSettingBoolResult.isA(item)) &&\n !!castValue.stringSettings?.every(item => GetSettingStringResult.isA(item))\n );\n },\n};\n"]}
|
|
@@ -19,8 +19,14 @@ export * from './device_storage';
|
|
|
19
19
|
export * from './digital_output_action';
|
|
20
20
|
export * from './get_axis_setting';
|
|
21
21
|
export * from './get_axis_setting_result';
|
|
22
|
+
export * from './get_axis_setting_typed_result';
|
|
22
23
|
export * from './get_setting';
|
|
24
|
+
export * from './get_setting_bool_result';
|
|
25
|
+
export * from './get_setting_int_result';
|
|
23
26
|
export * from './get_setting_result';
|
|
27
|
+
export * from './get_setting_string_result';
|
|
28
|
+
export * from './get_setting_typed_result';
|
|
29
|
+
export * from './get_settings_by_type_result';
|
|
24
30
|
export * from './io_port_label';
|
|
25
31
|
export * from './io_port_type';
|
|
26
32
|
export * from './lockstep';
|
|
@@ -38,6 +44,7 @@ export * from './pvt';
|
|
|
38
44
|
export * from './pvt_axis_definition';
|
|
39
45
|
export * from './pvt_axis_type';
|
|
40
46
|
export * from './pvt_buffer';
|
|
47
|
+
export * from './pvt_buffer_axis_units';
|
|
41
48
|
export * from './pvt_call_action';
|
|
42
49
|
export * from './pvt_cancel_all_outputs_schedule_action';
|
|
43
50
|
export * from './pvt_cancel_output_schedule_action';
|
|
@@ -78,6 +85,7 @@ export * from './trigger_enabled_state';
|
|
|
78
85
|
export * from './trigger_operation';
|
|
79
86
|
export * from './trigger_state';
|
|
80
87
|
export * from './triggers';
|
|
88
|
+
export * from './typed_setting';
|
|
81
89
|
export * from './unknown_response_event';
|
|
82
90
|
export * from './warning_flags';
|
|
83
91
|
export * from './warnings';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ascii/index.ts"],"names":[],"mappings":"AAEA,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,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,cAAc,iCAAiC,CAAC;AAChD,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kCAAkC,CAAC;AACjD,cAAc,UAAU,CAAC;AACzB,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
|
package/dist/lib/ascii/index.js
CHANGED
|
@@ -37,8 +37,14 @@ __exportStar(require("./device_storage"), exports);
|
|
|
37
37
|
__exportStar(require("./digital_output_action"), exports);
|
|
38
38
|
__exportStar(require("./get_axis_setting"), exports);
|
|
39
39
|
__exportStar(require("./get_axis_setting_result"), exports);
|
|
40
|
+
__exportStar(require("./get_axis_setting_typed_result"), exports);
|
|
40
41
|
__exportStar(require("./get_setting"), exports);
|
|
42
|
+
__exportStar(require("./get_setting_bool_result"), exports);
|
|
43
|
+
__exportStar(require("./get_setting_int_result"), exports);
|
|
41
44
|
__exportStar(require("./get_setting_result"), exports);
|
|
45
|
+
__exportStar(require("./get_setting_string_result"), exports);
|
|
46
|
+
__exportStar(require("./get_setting_typed_result"), exports);
|
|
47
|
+
__exportStar(require("./get_settings_by_type_result"), exports);
|
|
42
48
|
__exportStar(require("./io_port_label"), exports);
|
|
43
49
|
__exportStar(require("./io_port_type"), exports);
|
|
44
50
|
__exportStar(require("./lockstep"), exports);
|
|
@@ -56,6 +62,7 @@ __exportStar(require("./pvt"), exports);
|
|
|
56
62
|
__exportStar(require("./pvt_axis_definition"), exports);
|
|
57
63
|
__exportStar(require("./pvt_axis_type"), exports);
|
|
58
64
|
__exportStar(require("./pvt_buffer"), exports);
|
|
65
|
+
__exportStar(require("./pvt_buffer_axis_units"), exports);
|
|
59
66
|
__exportStar(require("./pvt_call_action"), exports);
|
|
60
67
|
__exportStar(require("./pvt_cancel_all_outputs_schedule_action"), exports);
|
|
61
68
|
__exportStar(require("./pvt_cancel_output_schedule_action"), exports);
|
|
@@ -96,6 +103,7 @@ __exportStar(require("./trigger_enabled_state"), exports);
|
|
|
96
103
|
__exportStar(require("./trigger_operation"), exports);
|
|
97
104
|
__exportStar(require("./trigger_state"), exports);
|
|
98
105
|
__exportStar(require("./triggers"), exports);
|
|
106
|
+
__exportStar(require("./typed_setting"), exports);
|
|
99
107
|
__exportStar(require("./unknown_response_event"), exports);
|
|
100
108
|
__exportStar(require("./warning_flags"), exports);
|
|
101
109
|
__exportStar(require("./warnings"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ascii/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAwD;AACxD,wDAAwD;AACxD,gDAA8B;AAC9B,6CAA2B;AAC3B,yCAAuB;AACvB,+CAA6B;AAC7B,kDAAgC;AAChC,kDAAgC;AAChC,iDAA+B;AAC/B,8CAA4B;AAC5B,gEAA8C;AAC9C,kEAAgD;AAChD,+CAA6B;AAC7B,sDAAoC;AACpC,2CAAyB;AACzB,oDAAkC;AAClC,8CAA4B;AAC5B,mDAAiC;AACjC,oDAAkC;AAClC,mDAAiC;AACjC,0DAAwC;AACxC,qDAAmC;AACnC,4DAA0C;AAC1C,gDAA8B;AAC9B,uDAAqC;AACrC,kDAAgC;AAChC,iDAA+B;AAC/B,6CAA2B;AAC3B,yDAAuC;AACvC,iDAA+B;AAC/B,gDAA8B;AAC9B,oDAAkC;AAClC,iDAA+B;AAC/B,oEAAkD;AAClD,sDAAoC;AACpC,6DAA2C;AAC3C,kDAAgC;AAChC,+CAA6B;AAC7B,wCAAsB;AACtB,wDAAsC;AACtC,kDAAgC;AAChC,+CAA6B;AAC7B,oDAAkC;AAClC,2EAAyD;AACzD,sEAAoD;AACpD,iDAA+B;AAC/B,2CAAyB;AACzB,6CAA2B;AAC3B,yDAAuC;AACvC,sDAAoC;AACpC,8DAA4C;AAC5C,8CAA4B;AAC5B,iDAA+B;AAC/B,sDAAoC;AACpC,sEAAoD;AACpD,uEAAqD;AACrD,iEAA+C;AAC/C,kEAAgD;AAChD,6CAA2B;AAC3B,gDAA8B;AAC9B,uDAAqC;AACrC,0DAAwC;AACxC,4DAA0C;AAC1C,8DAA4C;AAC5C,sDAAoC;AACpC,kDAAgC;AAChC,mEAAiD;AACjD,2CAAyB;AACzB,2DAAyC;AACzC,qDAAmC;AACnC,kDAAgC;AAChC,8CAA4B;AAC5B,gDAA8B;AAC9B,4CAA0B;AAC1B,8CAA4B;AAC5B,4CAA0B;AAC1B,mDAAiC;AACjC,sDAAoC;AACpC,0DAAwC;AACxC,sDAAoC;AACpC,kDAAgC;AAChC,6CAA2B;AAC3B,2DAAyC;AACzC,kDAAgC;AAChC,6CAA2B","sourcesContent":["// ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //\n// ============== DO NOT EDIT DIRECTLY ============== //\nexport * from './alert_event';\nexport * from './all_axes';\nexport * from './axis';\nexport * from './axis_group';\nexport * from './axis_identity';\nexport * from './axis_settings';\nexport * from './axis_storage';\nexport * from './axis_type';\nexport * from './can_set_state_axis_response';\nexport * from './can_set_state_device_response';\nexport * from './connection';\nexport * from './conversion_factor';\nexport * from './device';\nexport * from './device_identity';\nexport * from './device_io';\nexport * from './device_io_info';\nexport * from './device_settings';\nexport * from './device_storage';\nexport * from './digital_output_action';\nexport * from './get_axis_setting';\nexport * from './get_axis_setting_result';\nexport * from './get_setting';\nexport * from './get_setting_result';\nexport * from './io_port_label';\nexport * from './io_port_type';\nexport * from './lockstep';\nexport * from './measurement_sequence';\nexport * from './message_type';\nexport * from './mock_device';\nexport * from './mock_peripheral';\nexport * from './oscilloscope';\nexport * from './oscilloscope_capture_properties';\nexport * from './oscilloscope_data';\nexport * from './oscilloscope_data_source';\nexport * from './paramset_info';\nexport * from './pid_tuning';\nexport * from './pvt';\nexport * from './pvt_axis_definition';\nexport * from './pvt_axis_type';\nexport * from './pvt_buffer';\nexport * from './pvt_call_action';\nexport * from './pvt_cancel_all_outputs_schedule_action';\nexport * from './pvt_cancel_output_schedule_action';\nexport * from './pvt_csv_data';\nexport * from './pvt_io';\nexport * from './pvt_mode';\nexport * from './pvt_partial_csv_data';\nexport * from './pvt_partial_point';\nexport * from './pvt_partial_sequence_item';\nexport * from './pvt_point';\nexport * from './pvt_sequence';\nexport * from './pvt_sequence_item';\nexport * from './pvt_set_all_analog_outputs_action';\nexport * from './pvt_set_all_digital_outputs_action';\nexport * from './pvt_set_analog_output_action';\nexport * from './pvt_set_digital_output_action';\nexport * from './response';\nexport * from './servo_tuner';\nexport * from './servo_tuning_param';\nexport * from './servo_tuning_paramset';\nexport * from './set_state_axis_response';\nexport * from './set_state_device_response';\nexport * from './setting_constants';\nexport * from './simple_tuning';\nexport * from './simple_tuning_param_definition';\nexport * from './stream';\nexport * from './stream_axis_definition';\nexport * from './stream_axis_type';\nexport * from './stream_buffer';\nexport * from './stream_io';\nexport * from './stream_mode';\nexport * from './streams';\nexport * from './transport';\nexport * from './trigger';\nexport * from './trigger_action';\nexport * from './trigger_condition';\nexport * from './trigger_enabled_state';\nexport * from './trigger_operation';\nexport * from './trigger_state';\nexport * from './triggers';\nexport * from './unknown_response_event';\nexport * from './warning_flags';\nexport * from './warnings';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ascii/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAwD;AACxD,wDAAwD;AACxD,gDAA8B;AAC9B,6CAA2B;AAC3B,yCAAuB;AACvB,+CAA6B;AAC7B,kDAAgC;AAChC,kDAAgC;AAChC,iDAA+B;AAC/B,8CAA4B;AAC5B,gEAA8C;AAC9C,kEAAgD;AAChD,+CAA6B;AAC7B,sDAAoC;AACpC,2CAAyB;AACzB,oDAAkC;AAClC,8CAA4B;AAC5B,mDAAiC;AACjC,oDAAkC;AAClC,mDAAiC;AACjC,0DAAwC;AACxC,qDAAmC;AACnC,4DAA0C;AAC1C,kEAAgD;AAChD,gDAA8B;AAC9B,4DAA0C;AAC1C,2DAAyC;AACzC,uDAAqC;AACrC,8DAA4C;AAC5C,6DAA2C;AAC3C,gEAA8C;AAC9C,kDAAgC;AAChC,iDAA+B;AAC/B,6CAA2B;AAC3B,yDAAuC;AACvC,iDAA+B;AAC/B,gDAA8B;AAC9B,oDAAkC;AAClC,iDAA+B;AAC/B,oEAAkD;AAClD,sDAAoC;AACpC,6DAA2C;AAC3C,kDAAgC;AAChC,+CAA6B;AAC7B,wCAAsB;AACtB,wDAAsC;AACtC,kDAAgC;AAChC,+CAA6B;AAC7B,0DAAwC;AACxC,oDAAkC;AAClC,2EAAyD;AACzD,sEAAoD;AACpD,iDAA+B;AAC/B,2CAAyB;AACzB,6CAA2B;AAC3B,yDAAuC;AACvC,sDAAoC;AACpC,8DAA4C;AAC5C,8CAA4B;AAC5B,iDAA+B;AAC/B,sDAAoC;AACpC,sEAAoD;AACpD,uEAAqD;AACrD,iEAA+C;AAC/C,kEAAgD;AAChD,6CAA2B;AAC3B,gDAA8B;AAC9B,uDAAqC;AACrC,0DAAwC;AACxC,4DAA0C;AAC1C,8DAA4C;AAC5C,sDAAoC;AACpC,kDAAgC;AAChC,mEAAiD;AACjD,2CAAyB;AACzB,2DAAyC;AACzC,qDAAmC;AACnC,kDAAgC;AAChC,8CAA4B;AAC5B,gDAA8B;AAC9B,4CAA0B;AAC1B,8CAA4B;AAC5B,4CAA0B;AAC1B,mDAAiC;AACjC,sDAAoC;AACpC,0DAAwC;AACxC,sDAAoC;AACpC,kDAAgC;AAChC,6CAA2B;AAC3B,kDAAgC;AAChC,2DAAyC;AACzC,kDAAgC;AAChC,6CAA2B","sourcesContent":["// ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //\n// ============== DO NOT EDIT DIRECTLY ============== //\nexport * from './alert_event';\nexport * from './all_axes';\nexport * from './axis';\nexport * from './axis_group';\nexport * from './axis_identity';\nexport * from './axis_settings';\nexport * from './axis_storage';\nexport * from './axis_type';\nexport * from './can_set_state_axis_response';\nexport * from './can_set_state_device_response';\nexport * from './connection';\nexport * from './conversion_factor';\nexport * from './device';\nexport * from './device_identity';\nexport * from './device_io';\nexport * from './device_io_info';\nexport * from './device_settings';\nexport * from './device_storage';\nexport * from './digital_output_action';\nexport * from './get_axis_setting';\nexport * from './get_axis_setting_result';\nexport * from './get_axis_setting_typed_result';\nexport * from './get_setting';\nexport * from './get_setting_bool_result';\nexport * from './get_setting_int_result';\nexport * from './get_setting_result';\nexport * from './get_setting_string_result';\nexport * from './get_setting_typed_result';\nexport * from './get_settings_by_type_result';\nexport * from './io_port_label';\nexport * from './io_port_type';\nexport * from './lockstep';\nexport * from './measurement_sequence';\nexport * from './message_type';\nexport * from './mock_device';\nexport * from './mock_peripheral';\nexport * from './oscilloscope';\nexport * from './oscilloscope_capture_properties';\nexport * from './oscilloscope_data';\nexport * from './oscilloscope_data_source';\nexport * from './paramset_info';\nexport * from './pid_tuning';\nexport * from './pvt';\nexport * from './pvt_axis_definition';\nexport * from './pvt_axis_type';\nexport * from './pvt_buffer';\nexport * from './pvt_buffer_axis_units';\nexport * from './pvt_call_action';\nexport * from './pvt_cancel_all_outputs_schedule_action';\nexport * from './pvt_cancel_output_schedule_action';\nexport * from './pvt_csv_data';\nexport * from './pvt_io';\nexport * from './pvt_mode';\nexport * from './pvt_partial_csv_data';\nexport * from './pvt_partial_point';\nexport * from './pvt_partial_sequence_item';\nexport * from './pvt_point';\nexport * from './pvt_sequence';\nexport * from './pvt_sequence_item';\nexport * from './pvt_set_all_analog_outputs_action';\nexport * from './pvt_set_all_digital_outputs_action';\nexport * from './pvt_set_analog_output_action';\nexport * from './pvt_set_digital_output_action';\nexport * from './response';\nexport * from './servo_tuner';\nexport * from './servo_tuning_param';\nexport * from './servo_tuning_paramset';\nexport * from './set_state_axis_response';\nexport * from './set_state_device_response';\nexport * from './setting_constants';\nexport * from './simple_tuning';\nexport * from './simple_tuning_param_definition';\nexport * from './stream';\nexport * from './stream_axis_definition';\nexport * from './stream_axis_type';\nexport * from './stream_buffer';\nexport * from './stream_io';\nexport * from './stream_mode';\nexport * from './streams';\nexport * from './transport';\nexport * from './trigger';\nexport * from './trigger_action';\nexport * from './trigger_condition';\nexport * from './trigger_enabled_state';\nexport * from './trigger_operation';\nexport * from './trigger_state';\nexport * from './triggers';\nexport * from './typed_setting';\nexport * from './unknown_response_event';\nexport * from './warning_flags';\nexport * from './warnings';\n"]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { Units } from '../units';
|
|
1
2
|
import { Device } from './device';
|
|
3
|
+
import { PvtBufferAxisUnits } from './pvt_buffer_axis_units';
|
|
2
4
|
import { PvtSequenceItem } from './pvt_sequence_item';
|
|
3
5
|
/**
|
|
4
6
|
* Represents a PVT buffer with this number on a device.
|
|
@@ -23,13 +25,32 @@ export declare class PvtBuffer {
|
|
|
23
25
|
getContent(): Promise<string[]>;
|
|
24
26
|
/**
|
|
25
27
|
* Gets the buffer contents as an array of PvtSequenceItem objects.
|
|
28
|
+
* @param options.axes Per-axis unit conversion specification.
|
|
29
|
+
* The length must match the number of axes in the buffer.
|
|
30
|
+
* When omitted, position and velocity values are returned in native units.
|
|
31
|
+
* @param [options.timeUnits=Units.NATIVE] Units to convert time values to. Defaults to native.
|
|
26
32
|
* @returns The PVT data loaded from the buffer.
|
|
27
33
|
*/
|
|
28
|
-
retrieveSequenceData(): Promise<PvtSequenceItem[]>;
|
|
34
|
+
retrieveSequenceData(options?: PvtBuffer.RetrieveSequenceDataOptions): Promise<PvtSequenceItem[]>;
|
|
29
35
|
/**
|
|
30
36
|
* Erases the contents of the buffer.
|
|
31
37
|
* This method fails if there is a PVT sequence writing to the buffer.
|
|
32
38
|
*/
|
|
33
39
|
erase(): Promise<void>;
|
|
34
40
|
}
|
|
41
|
+
declare namespace PvtBuffer {
|
|
42
|
+
interface RetrieveSequenceDataOptions {
|
|
43
|
+
/**
|
|
44
|
+
* Per-axis unit conversion specification.
|
|
45
|
+
* The length must match the number of axes in the buffer.
|
|
46
|
+
* When omitted, position and velocity values are returned in native units.
|
|
47
|
+
*/
|
|
48
|
+
axes?: PvtBufferAxisUnits[];
|
|
49
|
+
/**
|
|
50
|
+
* Units to convert time values to. Defaults to native.
|
|
51
|
+
*/
|
|
52
|
+
timeUnits?: Units;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
35
56
|
//# sourceMappingURL=pvt_buffer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pvt_buffer.d.ts","sourceRoot":"","sources":["../../../src/ascii/pvt_buffer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;GAGG;AACH,qBAAa,SAAS;IACpB;;OAEG;IACH,IAAW,MAAM,IAAI,MAAM,CAE1B;IACD,OAAO,CAAC,OAAO,CAAS;IAExB;;OAEG;IACH,IAAW,YAAY,IAAI,MAAM,CAEhC;IACD,OAAO,CAAC,aAAa,CAAS;gBAElB,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;IAKhD;;;OAGG;IACU,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAmB5C
|
|
1
|
+
{"version":3,"file":"pvt_buffer.d.ts","sourceRoot":"","sources":["../../../src/ascii/pvt_buffer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;GAGG;AACH,qBAAa,SAAS;IACpB;;OAEG;IACH,IAAW,MAAM,IAAI,MAAM,CAE1B;IACD,OAAO,CAAC,OAAO,CAAS;IAExB;;OAEG;IACH,IAAW,YAAY,IAAI,MAAM,CAEhC;IACD,OAAO,CAAC,aAAa,CAAS;gBAElB,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;IAKhD;;;OAGG;IACU,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAmB5C;;;;;;;OAOG;IACU,oBAAoB,CAC/B,OAAO,GAAE,SAAS,CAAC,2BAAgC,GAClD,OAAO,CAAC,eAAe,EAAE,CAAC;IAwB7B;;;OAGG;IACU,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAcpC;AAED,kBAAU,SAAS,CAAC;IAClB,UAAiB,2BAA2B;QACxC;;;;WAIG;QACH,IAAI,CAAC,EAAE,kBAAkB,EAAE,CAAC;QAC5B;;WAEG;QACH,SAAS,CAAC,EAAE,KAAK,CAAC;KACrB;CACF"}
|
|
@@ -28,6 +28,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
28
28
|
exports.PvtBuffer = void 0;
|
|
29
29
|
const gateway = __importStar(require("../gateway"));
|
|
30
30
|
const requests = __importStar(require("../requests"));
|
|
31
|
+
const units_1 = require("../units");
|
|
31
32
|
/**
|
|
32
33
|
* Represents a PVT buffer with this number on a device.
|
|
33
34
|
* A PVT buffer is a place to store a queue of PVT actions.
|
|
@@ -69,14 +70,21 @@ class PvtBuffer {
|
|
|
69
70
|
}
|
|
70
71
|
/**
|
|
71
72
|
* Gets the buffer contents as an array of PvtSequenceItem objects.
|
|
73
|
+
* @param options.axes Per-axis unit conversion specification.
|
|
74
|
+
* The length must match the number of axes in the buffer.
|
|
75
|
+
* When omitted, position and velocity values are returned in native units.
|
|
76
|
+
* @param [options.timeUnits=Units.NATIVE] Units to convert time values to. Defaults to native.
|
|
72
77
|
* @returns The PVT data loaded from the buffer.
|
|
73
78
|
*/
|
|
74
|
-
async retrieveSequenceData() {
|
|
79
|
+
async retrieveSequenceData(options = {}) {
|
|
80
|
+
const { axes, timeUnits = units_1.Units.NATIVE, } = options;
|
|
75
81
|
const request = {
|
|
76
82
|
...requests.PvtBufferGetSequenceDataRequest.DEFAULT,
|
|
77
83
|
interfaceId: this.device.connection.interfaceId,
|
|
78
84
|
device: this.device.deviceAddress,
|
|
79
85
|
bufferNumber: this.bufferNumber,
|
|
86
|
+
axes: axes,
|
|
87
|
+
timeUnits: timeUnits,
|
|
80
88
|
toBinary() {
|
|
81
89
|
return requests.PvtBufferGetSequenceDataRequest.toBinary(this);
|
|
82
90
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pvt_buffer.js","sourceRoot":"","sources":["../../../src/ascii/pvt_buffer.ts"],"names":[],"mappings":";AAAA,wDAAwD;AACxD,wDAAwD;;;;;;;;;;;;;;;;;;;;;;;;;;AAExD,oDAAsC;AACtC,sDAAwC;
|
|
1
|
+
{"version":3,"file":"pvt_buffer.js","sourceRoot":"","sources":["../../../src/ascii/pvt_buffer.ts"],"names":[],"mappings":";AAAA,wDAAwD;AACxD,wDAAwD;;;;;;;;;;;;;;;;;;;;;;;;;;AAExD,oDAAsC;AACtC,sDAAwC;AACxC,oCAAiC;AAKjC;;;GAGG;AACH,MAAa,SAAS;IACpB;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,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Q,CAAC,+BAA+B,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACjE,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,4BAA4B,EAC5B,OAAO,EACP,QAAQ,CAAC,gCAAgC,CAAC,UAAU,CAAC,CAAC;QACxD,OAAO,QAAQ,CAAC,YAAY,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,KAAK;QAChB,MAAM,OAAO,GAAwD;YACnE,GAAG,QAAQ,CAAC,wBAAwB,CAAC,OAAO;YAC5C,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW;YAC/C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa;YACjC,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,GAAG,EAAE,IAAI;YACT,QAAQ;gBACN,OAAO,QAAQ,CAAC,wBAAwB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1D,CAAC;SACF,CAAC;QAEF,MAAM,OAAO,CAAC,SAAS,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF;AAjGD,8BAiGC","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 { Units } from '../units';\nimport { Device } from './device';\nimport { PvtBufferAxisUnits } from './pvt_buffer_axis_units';\nimport { PvtSequenceItem } from './pvt_sequence_item';\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 bufferNumber(): number {\n return this._bufferNumber;\n }\n private _bufferNumber: number;\n\n constructor(device: Device, bufferNumber: number) {\n this._device = device;\n this._bufferNumber = bufferNumber;\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: requests.StreamBufferGetContentRequest & gateway.Message = {\n ...requests.StreamBufferGetContentRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n bufferNumber: this.bufferNumber,\n pvt: true,\n toBinary() {\n return requests.StreamBufferGetContentRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.StreamBufferGetContentResponse>(\n 'device/stream_buffer_get_content',\n request,\n requests.StreamBufferGetContentResponse.fromBinary);\n return response.bufferLines;\n }\n\n /**\n * Gets the buffer contents as an array of PvtSequenceItem objects.\n * @param options.axes Per-axis unit conversion specification.\n * The length must match the number of axes in the buffer.\n * When omitted, position and velocity values are returned in native units.\n * @param [options.timeUnits=Units.NATIVE] Units to convert time values to. Defaults to native.\n * @returns The PVT data loaded from the buffer.\n */\n public async retrieveSequenceData(\n options: PvtBuffer.RetrieveSequenceDataOptions = {}\n ): Promise<PvtSequenceItem[]> {\n const {\n axes,\n timeUnits = Units.NATIVE,\n } = options;\n const request: requests.PvtBufferGetSequenceDataRequest & gateway.Message = {\n ...requests.PvtBufferGetSequenceDataRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n bufferNumber: this.bufferNumber,\n axes: axes,\n timeUnits: timeUnits,\n toBinary() {\n return requests.PvtBufferGetSequenceDataRequest.toBinary(this);\n },\n };\n\n const response = await gateway.callAsync<requests.PvtBufferGetSequenceDataResponse>(\n 'device/pvt_buffer_get_data',\n request,\n requests.PvtBufferGetSequenceDataResponse.fromBinary);\n return response.sequenceData;\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: requests.StreamBufferEraseRequest & gateway.Message = {\n ...requests.StreamBufferEraseRequest.DEFAULT,\n interfaceId: this.device.connection.interfaceId,\n device: this.device.deviceAddress,\n bufferNumber: this.bufferNumber,\n pvt: true,\n toBinary() {\n return requests.StreamBufferEraseRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device/stream_buffer_erase', request);\n }\n}\n\nnamespace PvtBuffer {\n export interface RetrieveSequenceDataOptions {\n /**\n * Per-axis unit conversion specification.\n * The length must match the number of axes in the buffer.\n * When omitted, position and velocity values are returned in native units.\n */\n axes?: PvtBufferAxisUnits[];\n /**\n * Units to convert time values to. Defaults to native.\n */\n timeUnits?: Units;\n }\n}\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BSON } from 'bson';
|
|
2
|
+
import { Units } from '../units';
|
|
3
|
+
/**
|
|
4
|
+
* Specifies the units to use for a buffer axis when reading back a PVT buffer.
|
|
5
|
+
* The axis number is used to determine a physical axis on the device for units conversion.
|
|
6
|
+
*/
|
|
7
|
+
export interface PvtBufferAxisUnits {
|
|
8
|
+
/**
|
|
9
|
+
* Number of the physical axis on the device used for units conversion.
|
|
10
|
+
*/
|
|
11
|
+
axisNumber: number;
|
|
12
|
+
/**
|
|
13
|
+
* Units to convert position values to.
|
|
14
|
+
*/
|
|
15
|
+
positionUnits: Units;
|
|
16
|
+
/**
|
|
17
|
+
* Units to convert velocity values to.
|
|
18
|
+
*/
|
|
19
|
+
velocityUnits: Units;
|
|
20
|
+
}
|
|
21
|
+
export declare const PvtBufferAxisUnits: {
|
|
22
|
+
fromBinary: (buffer: Uint8Array) => PvtBufferAxisUnits;
|
|
23
|
+
toBinary: (value: PvtBufferAxisUnits) => Uint8Array;
|
|
24
|
+
DEFAULT: Readonly<PvtBufferAxisUnits>;
|
|
25
|
+
sanitize: (value: PvtBufferAxisUnits) => PvtBufferAxisUnits;
|
|
26
|
+
convert: (value: BSON.Document) => PvtBufferAxisUnits;
|
|
27
|
+
isA: (value: any) => value is PvtBufferAxisUnits;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=pvt_buffer_axis_units.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pvt_buffer_axis_units.d.ts","sourceRoot":"","sources":["../../../src/ascii/pvt_buffer_axis_units.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,aAAa,EAAE,KAAK,CAAC;IAErB;;OAEG;IACH,aAAa,EAAE,KAAK,CAAC;CAEtB;AAED,eAAO,MAAM,kBAAkB;yBACR,UAAU,KAAG,kBAAkB;sBAElC,kBAAkB,KAAG,UAAU;;sBAQ/B,kBAAkB,KAAG,kBAAkB;qBAUxC,KAAK,QAAQ,KAAG,kBAAkB;iBAMtC,GAAG;CAUjB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PvtBufferAxisUnits = 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
|
+
const units_1 = require("../units");
|
|
9
|
+
exports.PvtBufferAxisUnits = {
|
|
10
|
+
fromBinary: (buffer) => exports.PvtBufferAxisUnits.convert(bson_1.BSON.deserialize(buffer, { useBigInt64: true })),
|
|
11
|
+
toBinary: (value) => bson_1.BSON.serialize(exports.PvtBufferAxisUnits.sanitize(value)),
|
|
12
|
+
DEFAULT: Object.freeze({
|
|
13
|
+
axisNumber: 0,
|
|
14
|
+
positionUnits: units_1.Units.NATIVE,
|
|
15
|
+
velocityUnits: units_1.Units.NATIVE,
|
|
16
|
+
}),
|
|
17
|
+
sanitize: (value) => {
|
|
18
|
+
if (value == null) {
|
|
19
|
+
throw new TypeError('Expected PvtBufferAxisUnits object but got null or undefined.');
|
|
20
|
+
}
|
|
21
|
+
if (typeof value !== 'object') {
|
|
22
|
+
throw new TypeError(`Expected PvtBufferAxisUnits object but got ${typeof value}.`);
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
axisNumber: sanitizer_1.sanitizer.sanitizeInt(value.axisNumber, 'axisNumber'),
|
|
26
|
+
positionUnits: sanitizer_1.sanitizer.sanitizeUnits(value.positionUnits, 'positionUnits'),
|
|
27
|
+
velocityUnits: sanitizer_1.sanitizer.sanitizeUnits(value.velocityUnits, 'velocityUnits'),
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
convert: (value) => ({
|
|
31
|
+
axisNumber: value.axisNumber,
|
|
32
|
+
positionUnits: value.positionUnits,
|
|
33
|
+
velocityUnits: value.velocityUnits,
|
|
34
|
+
}),
|
|
35
|
+
isA: (value) => {
|
|
36
|
+
const castValue = value;
|
|
37
|
+
return (value != null &&
|
|
38
|
+
typeof value === 'object' &&
|
|
39
|
+
sanitizer_1.sanitizer.isInt(castValue.axisNumber) &&
|
|
40
|
+
sanitizer_1.sanitizer.isUnits(castValue.positionUnits) &&
|
|
41
|
+
sanitizer_1.sanitizer.isUnits(castValue.velocityUnits));
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=pvt_buffer_axis_units.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pvt_buffer_axis_units.js","sourceRoot":"","sources":["../../../src/ascii/pvt_buffer_axis_units.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,wDAAwD;AACxD,+BAA4B;AAC5B,oDAAiD;AACjD,oCAAiC;AAwBpB,QAAA,kBAAkB,GAAG;IAChC,UAAU,EAAE,CAAC,MAAkB,EAAsB,EAAE,CAAC,0BAAkB,CAAC,OAAO,CAAC,WAAI,CAAC,WA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AS,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC;YACrC,qBAAS,CAAC,OAAO,CAAC,SAAS,CAAC,aAAa,CAAC;YAC1C,qBAAS,CAAC,OAAO,CAAC,SAAS,CAAC,aAAa,CAAC,CAC3C,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 * Specifies the units to use for a buffer axis when reading back a PVT buffer.\n * The axis number is used to determine a physical axis on the device for units conversion.\n */\nexport interface PvtBufferAxisUnits {\n /**\n * Number of the physical axis on the device used for units conversion.\n */\n axisNumber: number;\n\n /**\n * Units to convert position values to.\n */\n positionUnits: Units;\n\n /**\n * Units to convert velocity values to.\n */\n velocityUnits: Units;\n\n}\n\nexport const PvtBufferAxisUnits = {\n fromBinary: (buffer: Uint8Array): PvtBufferAxisUnits => PvtBufferAxisUnits.convert(BSON.deserialize(buffer, { useBigInt64: true })),\n\n toBinary: (value: PvtBufferAxisUnits): Uint8Array => BSON.serialize(PvtBufferAxisUnits.sanitize(value)),\n\n DEFAULT: Object.freeze({\n axisNumber: 0,\n positionUnits: Units.NATIVE,\n velocityUnits: Units.NATIVE,\n }) as Readonly<PvtBufferAxisUnits>,\n\n sanitize: (value: PvtBufferAxisUnits): PvtBufferAxisUnits => {\n if (value == null) { throw new TypeError('Expected PvtBufferAxisUnits object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected PvtBufferAxisUnits object but got ${typeof value}.`) }\n return {\n axisNumber: sanitizer.sanitizeInt(value.axisNumber, 'axisNumber'),\n positionUnits: sanitizer.sanitizeUnits(value.positionUnits, 'positionUnits'),\n velocityUnits: sanitizer.sanitizeUnits(value.velocityUnits, 'velocityUnits'),\n };\n },\n\n convert: (value: BSON.Document): PvtBufferAxisUnits => ({\n axisNumber: value.axisNumber,\n positionUnits: value.positionUnits,\n velocityUnits: value.velocityUnits,\n }),\n\n isA: (value: any): value is PvtBufferAxisUnits => {\n const castValue = value as PvtBufferAxisUnits;\n return (\n value != null &&\n typeof value === 'object' &&\n sanitizer.isInt(castValue.axisNumber) &&\n sanitizer.isUnits(castValue.positionUnits) &&\n sanitizer.isUnits(castValue.velocityUnits)\n );\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pvt_csv_data.js","sourceRoot":"","sources":["../../../src/ascii/pvt_csv_data.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,wDAAwD;AACxD,+BAA4B;AAC5B,oDAAiD;AACjD,kEAA6D;AAmBhD,QAAA,UAAU,GAAG;IACxB,UAAU,EAAE,CAAC,MAAkB,EAAc,EAAE,CAAC,kBAAU,CAAC,OAAO,CAAC,WAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IAEnH,QAAQ,EAAE,CAAC,KAAiB,EAAc,EAAE;QAC1C,MAAM,SAAS,GAAG,kBAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,WAAI,CAAC,SAAS,CAAC;YACpB,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,mCAAe,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACnF,WAAW,EAAE,SAAS,CAAC,WAAW;SACnC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,EAAE;KAChB,CAAyB;IAE1B,QAAQ,EAAE,CAAC,KAAiB,EAAc,EAAE;QAC1C,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,uDAAuD,CAAC,CAAA;QAAC,CAAC;QACnG,IAAI,OAAO,KA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AC,SAAS,CAAC,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,qBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CACjE,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 { PvtSequenceItem } from '../ascii/pvt_sequence_item';\n\n/**\n * Data representing content loaded from PVT CSV file, with sequence data and sequence names.\n */\nexport interface PvtCsvData {\n /**\n * The points and actions of the PVT sequence.\n */\n sequenceData: PvtSequenceItem[];\n\n /**\n * The names of the columns in the CSV header.\n * If the header columns do not contain names, these will default to `Series 1`, `Series 2`, etc..\n */\n seriesNames: string[];\n\n}\n\nexport const PvtCsvData = {\n fromBinary: (buffer: Uint8Array): PvtCsvData => PvtCsvData.convert(BSON.deserialize(buffer, { useBigInt64: true })),\n\n toBinary: (value: PvtCsvData): Uint8Array => {\n const sanitized = PvtCsvData.sanitize(value);\n return BSON.serialize({\n sequenceData: sanitized.sequenceData.map(item => PvtSequenceItem.convertBack(item)),\n seriesNames: sanitized.seriesNames,\n });\n },\n\n DEFAULT: Object.freeze({\n sequenceData: [],\n seriesNames: [],\n }) as Readonly<PvtCsvData>,\n\n sanitize: (value: PvtCsvData): PvtCsvData => {\n if (value == null) { throw new TypeError('Expected PvtCsvData object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected PvtCsvData object but got ${typeof value}.`) }\n return {\n sequenceData: Array.from(value.sequenceData ?? [], item => PvtSequenceItem.sanitize(item)),\n seriesNames: Array.from(value.seriesNames ?? [], item => sanitizer.sanitizeString(item, 'items of seriesNames')),\n };\n },\n\n convert: (value: BSON.Document): PvtCsvData => ({\n sequenceData: (value.sequenceData as BSON.Document[]).map(item => PvtSequenceItem.convert(item)),\n seriesNames: value.seriesNames,\n }),\n\n isA: (value: any): value is PvtCsvData => {\n const castValue = value as PvtCsvData;\n return (\n value != null &&\n typeof value === 'object' &&\n !!castValue.sequenceData?.every(item => PvtSequenceItem.isA(item)) &&\n !!castValue.seriesNames?.every(item => sanitizer.isString(item))\n );\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pvt_partial_csv_data.js","sourceRoot":"","sources":["../../../src/ascii/pvt_partial_csv_data.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,wDAAwD;AACxD,+BAA4B;AAC5B,oDAAiD;AACjD,kFAA4E;AAmB/D,QAAA,iBAAiB,GAAG;IAC/B,UAAU,EAAE,CAAC,MAAkB,EAAqB,EAAE,CAAC,yBAAiB,CAAC,OAAO,CAAC,WAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IAEjI,QAAQ,EAAE,CAAC,KAAwB,EAAc,EAAE;QACjD,MAAM,SAAS,GAAG,yBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACpD,OAAO,WAAI,CAAC,SAAS,CAAC;YACpB,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,kDAAsB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAC1F,WAAW,EAAE,SAAS,CAAC,WAAW;SACnC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,EAAE;KAChB,CAAgC;IAEjC,QAAQ,EAAE,CAAC,KAAwB,EAAqB,EAAE;QACxD,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,8DAA8D,CAAC,CAAA;QAAC,CAAC;QAC1G,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,6CAA6C,OAAO,KA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CAAC,qBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CACjE,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 { PvtPartialSequenceItem } from '../ascii/pvt_partial_sequence_item';\n\n/**\n * Data representing content loaded from PVT CSV file, with partial sequence data and sequence names.\n */\nexport interface PvtPartialCsvData {\n /**\n * The points and actions of the PVT sequence.\n */\n sequenceData: PvtPartialSequenceItem[];\n\n /**\n * The names of the columns in the CSV header.\n * If the header columns do not contain names, these will default to `Series 1`, `Series 2`, etc..\n */\n seriesNames: string[];\n\n}\n\nexport const PvtPartialCsvData = {\n fromBinary: (buffer: Uint8Array): PvtPartialCsvData => PvtPartialCsvData.convert(BSON.deserialize(buffer, { useBigInt64: true })),\n\n toBinary: (value: PvtPartialCsvData): Uint8Array => {\n const sanitized = PvtPartialCsvData.sanitize(value);\n return BSON.serialize({\n sequenceData: sanitized.sequenceData.map(item => PvtPartialSequenceItem.convertBack(item)),\n seriesNames: sanitized.seriesNames,\n });\n },\n\n DEFAULT: Object.freeze({\n sequenceData: [],\n seriesNames: [],\n }) as Readonly<PvtPartialCsvData>,\n\n sanitize: (value: PvtPartialCsvData): PvtPartialCsvData => {\n if (value == null) { throw new TypeError('Expected PvtPartialCsvData object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected PvtPartialCsvData object but got ${typeof value}.`) }\n return {\n sequenceData: Array.from(value.sequenceData ?? [], item => PvtPartialSequenceItem.sanitize(item)),\n seriesNames: Array.from(value.seriesNames ?? [], item => sanitizer.sanitizeString(item, 'items of seriesNames')),\n };\n },\n\n convert: (value: BSON.Document): PvtPartialCsvData => ({\n sequenceData: (value.sequenceData as BSON.Document[]).map(item => PvtPartialSequenceItem.convert(item)),\n seriesNames: value.seriesNames,\n }),\n\n isA: (value: any): value is PvtPartialCsvData => {\n const castValue = value as PvtPartialCsvData;\n return (\n value != null &&\n typeof value === 'object' &&\n !!castValue.sequenceData?.every(item => PvtPartialSequenceItem.isA(item)) &&\n !!castValue.seriesNames?.every(item => sanitizer.isString(item))\n );\n },\n};\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BSON } from 'bson';
|
|
2
|
+
/**
|
|
3
|
+
* The value of a setting, which can be of various types.
|
|
4
|
+
*/
|
|
5
|
+
export type TypedSetting = number | bigint | boolean | string;
|
|
6
|
+
/**
|
|
7
|
+
* Constants for the possible return values of TypedSetting.typeName().
|
|
8
|
+
*/
|
|
9
|
+
export type TypedSettingTypeTags = 'double' | 'int64' | 'bool' | 'string';
|
|
10
|
+
export declare const TypedSetting: {
|
|
11
|
+
sanitize: (value: TypedSetting) => TypedSetting;
|
|
12
|
+
convert: (value: BSON.Document) => TypedSetting;
|
|
13
|
+
convertBack: (value: TypedSetting) => BSON.Document;
|
|
14
|
+
/**
|
|
15
|
+
* Attempts to determine which member type is present in a variable.
|
|
16
|
+
*/
|
|
17
|
+
typeName: (value: TypedSetting) => TypedSettingTypeTags;
|
|
18
|
+
isA: (value: any) => value is TypedSetting;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=typed_setting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typed_setting.d.ts","sourceRoot":"","sources":["../../../src/ascii/typed_setting.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B;;GAEG;AACH,MAAM,MAAM,YAAY,GACtB,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE1E,eAAO,MAAM,YAAY;sBACL,YAAY,KAAG,YAAY;qBA0B5B,KAAK,QAAQ,KAAG,YAAY;yBAmBxB,YAAY,KAAG,KAAK,QAAQ;IAWjD;;OAEG;sBACe,YAAY,KAAG,oBAAoB;iBAgBxC,GAAG;CAYjB,CAAC"}
|