@zaber/motion 4.4.0 → 4.5.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 (49) hide show
  1. package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
  2. package/dist/lib/ascii/axis.d.ts +31 -0
  3. package/dist/lib/ascii/axis.js +52 -0
  4. package/dist/lib/ascii/axis.js.map +1 -1
  5. package/dist/lib/ascii/axis_type.d.ts +3 -1
  6. package/dist/lib/ascii/axis_type.js +2 -0
  7. package/dist/lib/ascii/axis_type.js.map +1 -1
  8. package/dist/lib/ascii/index.d.ts +0 -5
  9. package/dist/lib/ascii/index.js +1 -12
  10. package/dist/lib/ascii/index.js.map +1 -1
  11. package/dist/lib/ascii_ns.d.ts +0 -5
  12. package/dist/lib/ascii_ns.js +0 -5
  13. package/dist/lib/ascii_ns.js.map +1 -1
  14. package/dist/lib/index.d.ts +2 -0
  15. package/dist/lib/index.js +4 -1
  16. package/dist/lib/index.js.map +1 -1
  17. package/dist/lib/product/index.d.ts +5 -0
  18. package/dist/lib/product/index.js +14 -0
  19. package/dist/lib/product/index.js.map +1 -0
  20. package/dist/lib/{ascii → product}/process.d.ts +4 -4
  21. package/dist/lib/{ascii → product}/process.js +5 -5
  22. package/dist/lib/product/process.js.map +1 -0
  23. package/dist/lib/{ascii → product}/process_controller.d.ts +2 -2
  24. package/dist/lib/product/process_controller.js.map +1 -0
  25. package/dist/lib/product/process_controller_mode.js.map +1 -0
  26. package/dist/lib/product/process_controller_source.js.map +1 -0
  27. package/dist/lib/product/process_controller_source_sensor.js.map +1 -0
  28. package/dist/lib/product_ns.d.ts +13 -0
  29. package/dist/lib/product_ns.js +36 -0
  30. package/dist/lib/product_ns.js.map +1 -0
  31. package/dist/lib/protobufs/main_pb.d.ts +87 -0
  32. package/dist/lib/protobufs/main_pb.js +643 -2
  33. package/dist/lib/protobufs/main_pb.js.map +1 -1
  34. package/dist/lib/unit_table.d.ts +16 -0
  35. package/dist/lib/unit_table.js +56 -0
  36. package/dist/lib/unit_table.js.map +1 -0
  37. package/package.json +11 -1
  38. package/dist/lib/ascii/process.js.map +0 -1
  39. package/dist/lib/ascii/process_controller.js.map +0 -1
  40. package/dist/lib/ascii/process_controller_mode.js.map +0 -1
  41. package/dist/lib/ascii/process_controller_source.js.map +0 -1
  42. package/dist/lib/ascii/process_controller_source_sensor.js.map +0 -1
  43. /package/dist/lib/{ascii → product}/process_controller.js +0 -0
  44. /package/dist/lib/{ascii → product}/process_controller_mode.d.ts +0 -0
  45. /package/dist/lib/{ascii → product}/process_controller_mode.js +0 -0
  46. /package/dist/lib/{ascii → product}/process_controller_source.d.ts +0 -0
  47. /package/dist/lib/{ascii → product}/process_controller_source.js +0 -0
  48. /package/dist/lib/{ascii → product}/process_controller_source_sensor.d.ts +0 -0
  49. /package/dist/lib/{ascii → product}/process_controller_source_sensor.js +0 -0
@@ -0,0 +1,16 @@
1
+ import { Units } from './units';
2
+ export declare class UnitTable {
3
+ /**
4
+ * Gets the standard symbol associated with a given unit.
5
+ * @param unit Unit of measure.
6
+ * @returns Symbols corresponding to the given unit. Throws NoValueForKey if no symbol is defined.
7
+ */
8
+ static getSymbol(unit: Units): string;
9
+ /**
10
+ * Gets the unit enum value associated with a standard symbol.
11
+ * Note not all units can be retrieved this way.
12
+ * @param symbol Symbol to look up.
13
+ * @returns The unit enum value with the given symbols. Throws NoValueForKey if the symbol is not supported for lookup.
14
+ */
15
+ static getUnit(symbol: string): Units;
16
+ }
@@ -0,0 +1,56 @@
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.UnitTable = void 0;
29
+ const gateway = __importStar(require("./gateway"));
30
+ class UnitTable {
31
+ /**
32
+ * Gets the standard symbol associated with a given unit.
33
+ * @param unit Unit of measure.
34
+ * @returns Symbols corresponding to the given unit. Throws NoValueForKey if no symbol is defined.
35
+ */
36
+ static getSymbol(unit) {
37
+ const request = new gateway.UnitGetSymbolRequest();
38
+ request.setUnit(unit);
39
+ const response = gateway.callSync('units/get_symbol', request, gateway.UnitGetSymbolResponse);
40
+ return response.getSymbol();
41
+ }
42
+ /**
43
+ * Gets the unit enum value associated with a standard symbol.
44
+ * Note not all units can be retrieved this way.
45
+ * @param symbol Symbol to look up.
46
+ * @returns The unit enum value with the given symbols. Throws NoValueForKey if the symbol is not supported for lookup.
47
+ */
48
+ static getUnit(symbol) {
49
+ const request = new gateway.UnitGetEnumRequest();
50
+ request.setSymbol(symbol);
51
+ const response = gateway.callSync('units/get_enum', request, gateway.UnitGetEnumResponse);
52
+ return response.getUnit();
53
+ }
54
+ }
55
+ exports.UnitTable = UnitTable;
56
+ //# sourceMappingURL=unit_table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unit_table.js","sourceRoot":"","sources":["../../src/unit_table.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,mDAAqC;AAGrC,MAAa,SAAS;IACpB;;;;OAIG;IACI,MAAM,CAAC,SAAS,CACrB,IAAW;QAEX,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;QACnD,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEtB,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,kBAAkB,EAClB,OAAO,EACP,OAAO,CAAC,qBAAqB,CAAC,CAAC;QACjC,OAAO,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,OAAO,CACnB,MAAc;QAEd,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;QACjD,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAE1B,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,gBAAgB,EAChB,OAAO,EACP,OAAO,CAAC,mBAAmB,CAAC,CAAC;QAC/B,OAAO,QAAQ,CAAC,OAAO,EAAW,CAAC;IACrC,CAAC;CACF;AArCD,8BAqCC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from './gateway';\nimport { Units } from './units';\n\nexport class UnitTable {\n /**\n * Gets the standard symbol associated with a given unit.\n * @param unit Unit of measure.\n * @returns Symbols corresponding to the given unit. Throws NoValueForKey if no symbol is defined.\n */\n public static getSymbol(\n unit: Units\n ): string {\n const request = new gateway.UnitGetSymbolRequest();\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.UnitGetSymbolResponse>(\n 'units/get_symbol',\n request,\n gateway.UnitGetSymbolResponse);\n return response.getSymbol();\n }\n\n /**\n * Gets the unit enum value associated with a standard symbol.\n * Note not all units can be retrieved this way.\n * @param symbol Symbol to look up.\n * @returns The unit enum value with the given symbols. Throws NoValueForKey if the symbol is not supported for lookup.\n */\n public static getUnit(\n symbol: string\n ): Units {\n const request = new gateway.UnitGetEnumRequest();\n request.setSymbol(symbol);\n\n const response = gateway.callSync<gateway.UnitGetEnumResponse>(\n 'units/get_enum',\n request,\n gateway.UnitGetEnumResponse);\n return response.getUnit() as Units;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zaber/motion",
3
- "version": "4.4.0",
3
+ "version": "4.5.0",
4
4
  "description": "Zaber Motion Library is a multi-platform library used to operate Zaber devices.",
5
5
  "keywords": [],
6
6
  "main": "dist/lib/index.js",
@@ -32,6 +32,11 @@
32
32
  "require": "./dist/lib/microscopy/index.js",
33
33
  "import": "./dist/lib/microscopy/index.js"
34
34
  },
35
+ "./product": {
36
+ "types": "./dist/lib/product/index.d.ts",
37
+ "require": "./dist/lib/product/index.js",
38
+ "import": "./dist/lib/product/index.js"
39
+ },
35
40
  "./exceptions": {
36
41
  "types": "./dist/lib/exceptions/index.d.ts",
37
42
  "require": "./dist/lib/exceptions/index.js",
@@ -62,6 +67,11 @@
62
67
  "require": "./dist/lib/microscopy/index.js",
63
68
  "import": "./dist/lib/microscopy/index.js"
64
69
  },
70
+ "./dist/lib/product": {
71
+ "types": "./dist/lib/product/index.d.ts",
72
+ "require": "./dist/lib/product/index.js",
73
+ "import": "./dist/lib/product/index.js"
74
+ },
65
75
  "./dist/lib/exceptions": {
66
76
  "types": "./dist/lib/exceptions/index.d.ts",
67
77
  "require": "./dist/lib/exceptions/index.js",
@@ -1 +0,0 @@
1
- {"version":3,"file":"process.js","sourceRoot":"","sources":["../../../src/ascii/process.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,oDAAsC;AACtC,iCAA8B;AAC9B,yCAAsC;AACtC,mDAA+C;AAC/C,uCAAwC;AACxC,yCAAsC;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AE,CAAC;QACjD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACtE,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QACxD,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAExB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,2BAA2B,EAC3B,OAAO,EACP,OAAO,CAAC,uBAAuB,CAAC,CAAC;QACnC,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AA5WD,0BA4WC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { ProcessController } from './process_controller';\nimport * as gateway from '../gateway';\nimport { Axis } from './axis';\nimport { Response } from './response';\nimport { AxisSettings } from './axis_settings';\nimport { AxisStorage } from './storage';\nimport { Warnings } from './warnings';\nimport { ProcessControllerMode } from './process_controller_mode';\nimport { ProcessControllerSource } from './process_controller_source';\nimport { Measurement } from '../measurement';\n\n/**\n * Use to drive voltage for a process such as a heater, valve, Peltier device, etc.\n * WARNING: DO NOT USE. This API is for an as-yet unreleased product and firmware version.\n * It is subject to breaking changes without warning until further notice.\n * Requires at least Firmware 7.34.\n */\nexport class Process {\n /**\n * Controller for this process.\n */\n public get controller(): ProcessController {\n return this._controller;\n }\n private _controller: ProcessController;\n\n /**\n * The process number identifies the process on the controller.\n */\n public get processNumber(): number {\n return this._processNumber;\n }\n private _processNumber: number;\n\n private _axis: Axis;\n\n /**\n * Settings and properties of this process.\n */\n public get settings(): AxisSettings {\n return this._settings;\n }\n private _settings: AxisSettings;\n\n /**\n * Key-value storage of this process.\n */\n public get storage(): AxisStorage {\n return this._storage;\n }\n private _storage: AxisStorage;\n\n /**\n * Warnings and faults of this process.\n */\n public get warnings(): Warnings {\n return this._warnings;\n }\n private _warnings: Warnings;\n\n constructor(controller: ProcessController, processNumber: number) {\n this._controller = controller;\n this._processNumber = processNumber;\n this._axis = new Axis(controller.device, processNumber);\n this._settings = new AxisSettings(this._axis);\n this._storage = new AxisStorage(this._axis);\n this._warnings = new Warnings(controller.device, processNumber);\n }\n\n /**\n * Sets the enabled state of the driver.\n * @param [enabled=true] If true (default) enables drive. If false disables.\n */\n public async enable(\n enabled: boolean = true\n ): Promise<void> {\n const request = new gateway.ProcessOn();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n request.setOn(enabled);\n\n await gateway.callAsync('process-controller/enable', request);\n }\n\n /**\n * Turns this process on. In manual mode, this supplies voltage; in controlled mode, it starts the control loop.\n * @param [duration=0] How long to leave the process on in milliseconds.\n */\n public async on(\n duration: number = 0\n ): Promise<void> {\n const request = new gateway.ProcessOn();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n request.setOn(true);\n request.setDuration(duration);\n\n await gateway.callAsync('process-controller/on', request);\n }\n\n /**\n * Turns this process off.\n */\n public async off(): Promise<void> {\n const request = new gateway.ProcessOn();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n request.setOn(false);\n\n await gateway.callAsync('process-controller/on', request);\n }\n\n /**\n * Sets the control mode of this process.\n * @param mode Mode to set this process to.\n */\n public async setMode(\n mode: ProcessControllerMode\n ): Promise<void> {\n const request = new gateway.DeviceSetSettingRequest();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n request.setSetting('process.control.mode');\n request.setValue(mode);\n\n await gateway.callAsync('device/set_setting', request);\n }\n\n /**\n * Gets the control mode of this process.\n * @returns Control mode.\n */\n public async getMode(): Promise<ProcessControllerMode> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n request.setSetting('process.control.mode');\n\n const response = await gateway.callAsync<gateway.DoubleResponse>(\n 'device/get_setting',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Gets the source used to control this process.\n * @returns The source providing feedback for this process.\n */\n public async getSource(): Promise<ProcessControllerSource> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n\n const response = await gateway.callAsync<gateway.ProcessControllerSource>(\n 'process_controller/get_source',\n request,\n gateway.ProcessControllerSource);\n return ProcessControllerSource.fromProtobuf(response.toObject());\n }\n\n /**\n * Sets the source used to control this process.\n * @param source Sets the source that should provide feedback for this process.\n */\n public async setSource(\n source: ProcessControllerSource\n ): Promise<void> {\n const request = new gateway.SetProcessControllerSource();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n request.setSource(ProcessControllerSource.toProtobuf(source));\n\n await gateway.callAsync('process_controller/set_source', request);\n }\n\n /**\n * Gets the current value of the source used to control this process.\n * @returns The current value of this process's controlling source.\n */\n public async getInput(): Promise<Measurement> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n\n const response = await gateway.callAsync<gateway.Measurement>(\n 'process_controller/get_input',\n request,\n gateway.Measurement);\n return Measurement.fromProtobuf(response.toObject());\n }\n\n /**\n * Creates an H-bridge between this process and its neighbor. This method is only callable on axis 1 and 3.\n */\n public async bridge(): Promise<void> {\n const request = new gateway.ProcessOn();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n request.setOn(true);\n\n await gateway.callAsync('process_controller/bridge', request);\n }\n\n /**\n * Breaks the H-bridge between this process and its neighbor, allowing them to be independently controlled.\n * This method is only callable on axis 1 and 3.\n */\n public async unbridge(): Promise<void> {\n const request = new gateway.ProcessOn();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n request.setOn(false);\n\n await gateway.callAsync('process_controller/bridge', request);\n }\n\n /**\n * Detects if the given process is in bridging mode.\n * @returns Whether this process is bridged with its neighbor.\n */\n public async isBridge(): Promise<boolean> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n\n const response = await gateway.callAsync<gateway.BoolResponse>(\n 'process_controller/is_bridge',\n request,\n gateway.BoolResponse);\n return response.getValue();\n }\n\n /**\n * Sends a generic ASCII command to this process' underlying axis.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when the device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns A response to the command.\n */\n public async genericCommand(\n command: string,\n options: Process.GenericCommandOptions = {}\n ): Promise<Response> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n request.setCommand(command);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponse>(\n 'interface/generic_command',\n request,\n gateway.GenericCommandResponse);\n return Response.fromProtobuf(response.toObject());\n }\n\n /**\n * Sends a generic ASCII command to this process and expect multiple responses.\n * Responses are returned in order of arrival.\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n * @param [options.checkErrors=true] Controls whether to throw an exception when a device rejects the command.\n * @param [options.timeout=0] The timeout, in milliseconds, for a device to respond to the command.\n * Overrides the connection default request timeout.\n * @returns All responses to the command.\n */\n public async genericCommandMultiResponse(\n command: string,\n options: Process.GenericCommandMultiResponseOptions = {}\n ): Promise<Response[]> {\n const {\n checkErrors = true,\n timeout = 0,\n } = options;\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n request.setCommand(command);\n request.setCheckErrors(checkErrors);\n request.setTimeout(timeout);\n\n const response = await gateway.callAsync<gateway.GenericCommandResponseCollection>(\n 'interface/generic_command_multi_response',\n request,\n gateway.GenericCommandResponseCollection);\n return response.getResponsesList().map(a => Response.fromProtobuf(a.toObject()));\n }\n\n /**\n * Sends a generic ASCII command to this process without expecting a response and without adding a message ID\n * For more information refer to: [ASCII Protocol Manual](https://www.zaber.com/protocol-manual#topic_commands).\n * @param command Command and its parameters.\n */\n public async genericCommandNoResponse(\n command: string\n ): Promise<void> {\n const request = new gateway.GenericCommandRequest();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n request.setCommand(command);\n\n await gateway.callAsync('interface/generic_command_no_response', request);\n }\n\n /**\n * Returns a serialization of the current process state that can be saved and reapplied.\n * @returns A serialization of the current state of the process.\n */\n public async getState(): Promise<string> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n\n const response = await gateway.callAsync<gateway.StringResponse>(\n 'device/get_state',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n\n /**\n * Applies a saved state to this process.\n * @param state The state object to apply to this process.\n */\n public async setState(\n state: string\n ): Promise<void> {\n const request = new gateway.SetStateRequest();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n request.setState(state);\n\n await gateway.callAsync('device/set_state', request);\n }\n\n /**\n * Checks if a state can be applied to this process.\n * This only covers exceptions that can be determined statically such as mismatches of ID or version,\n * the process of applying the state can still fail when running.\n * @param state The state object to check against.\n * @returns An explanation of why this state cannot be set to this process.\n */\n public async canSetState(\n state: string\n ): Promise<string> {\n const request = new gateway.CanSetStateRequest();\n request.setInterfaceId(this.controller.device.connection.interfaceId);\n request.setDevice(this.controller.device.deviceAddress);\n request.setAxis(this.processNumber);\n request.setState(state);\n\n const response = await gateway.callAsync<gateway.CanSetStateAxisResponse>(\n 'device/can_set_axis_state',\n request,\n gateway.CanSetStateAxisResponse);\n return response.getError();\n }\n}\n\nnamespace Process {\n export interface GenericCommandOptions {\n checkErrors?: boolean;\n timeout?: number;\n }\n export interface GenericCommandMultiResponseOptions {\n checkErrors?: boolean;\n timeout?: number;\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"process_controller.js","sourceRoot":"","sources":["../../../src/ascii/process_controller.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAItD,oDAAsC;AACtC,uCAAoC;AAEpC;;;;;GAKG;AACH,MAAa,iBAAiB;IAC5B;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;;OAGG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,0BAA0B,EAAE,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,MAAM,CACxB,UAAsB,EACtB,WAAoB,IAAI;QAExB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;QAClD,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;QAC3E,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC/C,OAAO,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QAErC,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,eAAe,EACf,OAAO,EACP,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAChC,OAAO,QAAQ,CAAC,cAAc,EAAE,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC,IAAI,iBAAiB,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IACpH,CAAC;IAED;;;;;OAKG;IACI,UAAU,CACf,aAAqB;QAErB,IAAI,aAAa,IAAI,CAAC,EAAE;YACtB,MAAM,IAAI,SAAS,CAAC,+CAA+C,CAAC,CAAC;SACtE;QACD,OAAO,IAAI,iBAAO,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IAC1C,CAAC;IAED;;OAEG;IACK,0BAA0B;QAChC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;QACjD,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;QAE7C,OAAO,CAAC,QAAQ,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF;AAjED,8CAiEC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Connection } from './connection';\nimport { Device } from './device';\nimport * as gateway from '../gateway';\nimport { Process } from './process';\n\n/**\n * Use to manage a process controller.\n * WARNING: DO NOT USE. This API is for an as-yet unreleased product and firmware version.\n * It is subject to breaking changes without warning until further notice.\n * Requires at least Firmware 7.34.\n */\nexport class ProcessController {\n /**\n * The base device of this process controller.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * Creates instance of `ProcessController` of the given device.\n * If the device is identified, this constructor will ensure it is a process controller.\n */\n constructor(device: Device) {\n this._device = device;\n this._verifyIsProcessController();\n }\n\n /**\n * Detects the process controllers on the connection.\n * @param connection The connection to detect process controllers on.\n * @param [identify=true] If the Process Controllers should be identified upon detection.\n * @returns A list of all `ProcessController`s on the connection.\n */\n public static async detect(\n connection: Connection,\n identify: boolean = true\n ): Promise<ProcessController[]> {\n const request = new gateway.DeviceDetectRequest();\n request.setType(gateway.DeviceDetectRequest.DeviceType.PROCESS_CONTROLLER);\n request.setInterfaceId(connection.interfaceId);\n request.setIdentifyDevices(identify);\n\n const response = await gateway.callAsync<gateway.DeviceDetectResponse>(\n 'device/detect',\n request,\n gateway.DeviceDetectResponse);\n return response.getDevicesList().map(deviceAddress => new ProcessController(connection.getDevice(deviceAddress)));\n }\n\n /**\n * Gets an Process class instance which allows you to control a particular voltage source.\n * Axes are numbered from 1.\n * @param processNumber Number of process to control.\n * @returns Process instance.\n */\n public getProcess(\n processNumber: number\n ): Process {\n if (processNumber <= 0) {\n throw new TypeError('Invalid value; processes are numbered from 1.');\n }\n return new Process(this, processNumber);\n }\n\n /**\n * Checks if this is a process controller or some other type of device and throws a detect error if it is not.\n */\n private _verifyIsProcessController(): void {\n const request = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n\n gateway.callSync('process_controller/verify', request);\n }\n}\n\nnamespace ProcessController {\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"process_controller_mode.js","sourceRoot":"","sources":["../../../src/ascii/process_controller_mode.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAEtD;;GAEG;AACH,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,qEAAU,CAAA;IACV,+DAAO,CAAA;IACP,6EAAc,CAAA;IACd,qEAAU,CAAA;AACZ,CAAC,EALW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAKhC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\n/**\n * Servo Tuning Parameter Set to target.\n */\nexport enum ProcessControllerMode {\n MANUAL = 0,\n PID = 1,\n PID_HEATER = 2,\n ON_OFF = 3,\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"process_controller_source.js","sourceRoot":"","sources":["../../../src/ascii/process_controller_source.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AAmBtC,IAAiB,uBAAuB,CAqBvC;AArBD,WAAiB,uBAAuB;IACzB,8BAAM,GAAG,yBAAyB,CAAC;IAEhD,gBAAgB;IAChB,SAAgB,YAAY,CAAC,MAAgD;QAC3E,OAAO;YACL,MAAM,EAAE,MAAM,CAAC,MAAa;YAC5B,IAAI,EAAE,MAAM,CAAC,IAAI;SAClB,CAAC;IACJ,CAAC;IALe,oCAAY,eAK3B,CAAA;IACD,gBAAgB;IAChB,SAAgB,UAAU,CAAC,MAAkD;QAC3E,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;QACrD,IAAI,MAAM,IAAI,IAAI,EAAE;YAClB,OAAO,MAAM,CAAC;SACf;QAED,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAChC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC5B,OAAO,MAAM,CAAC;IAChB,CAAC;IATe,kCAAU,aASzB,CAAA;AACH,CAAC,EArBgB,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAqBvC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { ProcessControllerSourceSensor } from './process_controller_source_sensor';\n\n/**\n * The source used by a process in a closed-loop mode.\n */\nexport interface ProcessControllerSource {\n /**\n * The type of input sensor.\n */\n sensor: ProcessControllerSourceSensor;\n\n /**\n * The specific input to use.\n */\n port: number;\n\n}\n\nexport namespace ProcessControllerSource {\n export const __type = 'ProcessControllerSource';\n\n /** @internal */\n export function fromProtobuf(pbData: gateway.ProcessControllerSource.AsObject): ProcessControllerSource {\n return {\n sensor: pbData.sensor as any,\n port: pbData.port,\n };\n }\n /** @internal */\n export function toProtobuf(source: ProcessControllerSource | null | undefined): gateway.ProcessControllerSource {\n const pbData = new gateway.ProcessControllerSource();\n if (source == null) {\n return pbData;\n }\n\n pbData.setSensor(source.sensor);\n pbData.setPort(source.port);\n return pbData;\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"process_controller_source_sensor.js","sourceRoot":"","sources":["../../../src/ascii/process_controller_source_sensor.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAEtD;;GAEG;AACH,IAAY,6BAGX;AAHD,WAAY,6BAA6B;IACvC,8FAAe,CAAA;IACf,kGAAiB,CAAA;AACnB,CAAC,EAHW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAGxC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\n/**\n * Servo Tuning Parameter Set to target.\n */\nexport enum ProcessControllerSourceSensor {\n THERMISTOR = 10,\n ANALOG_INPUT = 20,\n}\n"]}