@zaber/motion 3.4.2 → 4.0.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 (31) hide show
  1. package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
  2. package/dist/lib/ascii/index.d.ts +3 -1
  3. package/dist/lib/ascii/index.js +7 -3
  4. package/dist/lib/ascii/index.js.map +1 -1
  5. package/dist/lib/ascii/io_port_type.d.ts +10 -0
  6. package/dist/lib/ascii/io_port_type.js +17 -0
  7. package/dist/lib/ascii/io_port_type.js.map +1 -0
  8. package/dist/lib/ascii/oscilloscope.d.ts +7 -0
  9. package/dist/lib/ascii/oscilloscope.js +15 -2
  10. package/dist/lib/ascii/oscilloscope.js.map +1 -1
  11. package/dist/lib/ascii/oscilloscope_capture_properties.d.ts +14 -0
  12. package/dist/lib/ascii/oscilloscope_capture_properties.js +3 -0
  13. package/dist/lib/ascii/oscilloscope_capture_properties.js.map +1 -1
  14. package/dist/lib/ascii/oscilloscope_data.d.ts +14 -0
  15. package/dist/lib/ascii/oscilloscope_data.js +18 -0
  16. package/dist/lib/ascii/oscilloscope_data.js.map +1 -1
  17. package/dist/lib/ascii/oscilloscope_data_source.d.ts +7 -0
  18. package/dist/lib/ascii/oscilloscope_data_source.js +14 -0
  19. package/dist/lib/ascii/oscilloscope_data_source.js.map +1 -0
  20. package/dist/lib/ascii/pvt_sequence.d.ts +10 -2
  21. package/dist/lib/ascii/pvt_sequence.js +8 -0
  22. package/dist/lib/ascii/pvt_sequence.js.map +1 -1
  23. package/dist/lib/ascii_ns.d.ts +4 -0
  24. package/dist/lib/ascii_ns.js +2 -0
  25. package/dist/lib/ascii_ns.js.map +1 -1
  26. package/dist/lib/measurement.js +1 -0
  27. package/dist/lib/measurement.js.map +1 -1
  28. package/dist/lib/protobufs/main_pb.d.ts +55 -7
  29. package/dist/lib/protobufs/main_pb.js +410 -48
  30. package/dist/lib/protobufs/main_pb.js.map +1 -1
  31. package/package.json +1 -1
@@ -10,6 +10,7 @@ export { DeviceSettings } from './device_settings';
10
10
  export { Device } from './device';
11
11
  export { DeviceIO } from './device_io';
12
12
  export { DeviceIOInfo } from './device_io_info';
13
+ export { IoPortType } from './io_port_type';
13
14
  export { MessageType } from './message_type';
14
15
  export { Response } from './response';
15
16
  export { SettingConstants } from './setting_constants';
@@ -19,8 +20,9 @@ export { Warnings } from './warnings';
19
20
  export { Lockstep } from './lockstep';
20
21
  export { LockstepAxes } from './lockstep_axes';
21
22
  export { Oscilloscope } from './oscilloscope';
22
- export { OscilloscopeData } from './oscilloscope_data';
23
23
  export { OscilloscopeCaptureProperties } from './oscilloscope_capture_properties';
24
+ export { OscilloscopeData } from './oscilloscope_data';
25
+ export { OscilloscopeDataSource } from './oscilloscope_data_source';
24
26
  export { Stream } from './stream';
25
27
  export { StreamBuffer } from './stream_buffer';
26
28
  export { StreamMode } from './stream_mode';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PvtAxisType = exports.PvtAxisDefinition = exports.CanSetStateDeviceResponse = exports.CanSetStateAxisResponse = exports.ConversionFactor = exports.DeviceStorage = exports.AxisStorage = exports.SimpleTuningParamDefinition = exports.ServoTuningParam = exports.PidTuning = exports.ParamsetInfo = exports.ServoTuningParamset = exports.ServoTuner = exports.Transport = exports.PvtMode = exports.PvtBuffer = exports.PvtSequence = exports.StreamAxisDefinition = exports.StreamAxisType = exports.StreamMode = exports.StreamBuffer = exports.Stream = exports.OscilloscopeCaptureProperties = exports.OscilloscopeData = exports.Oscilloscope = exports.LockstepAxes = exports.Lockstep = exports.Warnings = exports.WarningFlags = exports.UnknownResponseEvent = exports.SettingConstants = exports.Response = exports.MessageType = exports.DeviceIOInfo = exports.DeviceIO = exports.Device = exports.DeviceSettings = exports.DeviceIdentity = exports.Connection = exports.Axis = exports.AxisType = exports.AxisSettings = exports.AxisIdentity = exports.AllAxes = exports.AlertEvent = void 0;
3
+ exports.PvtAxisType = exports.PvtAxisDefinition = exports.CanSetStateDeviceResponse = exports.CanSetStateAxisResponse = exports.ConversionFactor = exports.DeviceStorage = exports.AxisStorage = exports.SimpleTuningParamDefinition = exports.ServoTuningParam = exports.PidTuning = exports.ParamsetInfo = exports.ServoTuningParamset = exports.ServoTuner = exports.Transport = exports.PvtMode = exports.PvtBuffer = exports.PvtSequence = exports.StreamAxisDefinition = exports.StreamAxisType = exports.StreamMode = exports.StreamBuffer = exports.Stream = exports.OscilloscopeDataSource = exports.OscilloscopeData = exports.OscilloscopeCaptureProperties = exports.Oscilloscope = exports.LockstepAxes = exports.Lockstep = exports.Warnings = exports.WarningFlags = exports.UnknownResponseEvent = exports.SettingConstants = exports.Response = exports.MessageType = exports.IoPortType = exports.DeviceIOInfo = exports.DeviceIO = exports.Device = exports.DeviceSettings = exports.DeviceIdentity = exports.Connection = exports.Axis = exports.AxisType = exports.AxisSettings = exports.AxisIdentity = exports.AllAxes = exports.AlertEvent = void 0;
4
4
  var alert_event_1 = require("./alert_event");
5
5
  Object.defineProperty(exports, "AlertEvent", { enumerable: true, get: function () { return alert_event_1.AlertEvent; } });
6
6
  var all_axes_1 = require("./all_axes");
@@ -25,6 +25,8 @@ var device_io_1 = require("./device_io");
25
25
  Object.defineProperty(exports, "DeviceIO", { enumerable: true, get: function () { return device_io_1.DeviceIO; } });
26
26
  var device_io_info_1 = require("./device_io_info");
27
27
  Object.defineProperty(exports, "DeviceIOInfo", { enumerable: true, get: function () { return device_io_info_1.DeviceIOInfo; } });
28
+ var io_port_type_1 = require("./io_port_type");
29
+ Object.defineProperty(exports, "IoPortType", { enumerable: true, get: function () { return io_port_type_1.IoPortType; } });
28
30
  var message_type_1 = require("./message_type");
29
31
  Object.defineProperty(exports, "MessageType", { enumerable: true, get: function () { return message_type_1.MessageType; } });
30
32
  var response_1 = require("./response");
@@ -43,10 +45,12 @@ var lockstep_axes_1 = require("./lockstep_axes");
43
45
  Object.defineProperty(exports, "LockstepAxes", { enumerable: true, get: function () { return lockstep_axes_1.LockstepAxes; } });
44
46
  var oscilloscope_1 = require("./oscilloscope");
45
47
  Object.defineProperty(exports, "Oscilloscope", { enumerable: true, get: function () { return oscilloscope_1.Oscilloscope; } });
46
- var oscilloscope_data_1 = require("./oscilloscope_data");
47
- Object.defineProperty(exports, "OscilloscopeData", { enumerable: true, get: function () { return oscilloscope_data_1.OscilloscopeData; } });
48
48
  var oscilloscope_capture_properties_1 = require("./oscilloscope_capture_properties");
49
49
  Object.defineProperty(exports, "OscilloscopeCaptureProperties", { enumerable: true, get: function () { return oscilloscope_capture_properties_1.OscilloscopeCaptureProperties; } });
50
+ var oscilloscope_data_1 = require("./oscilloscope_data");
51
+ Object.defineProperty(exports, "OscilloscopeData", { enumerable: true, get: function () { return oscilloscope_data_1.OscilloscopeData; } });
52
+ var oscilloscope_data_source_1 = require("./oscilloscope_data_source");
53
+ Object.defineProperty(exports, "OscilloscopeDataSource", { enumerable: true, get: function () { return oscilloscope_data_source_1.OscilloscopeDataSource; } });
50
54
  var stream_1 = require("./stream");
51
55
  Object.defineProperty(exports, "Stream", { enumerable: true, get: function () { return stream_1.Stream; } });
52
56
  var stream_buffer_1 = require("./stream_buffer");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ascii/index.ts"],"names":[],"mappings":";;;AAAA,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,uCAAqC;AAA5B,mGAAA,OAAO,OAAA;AAChB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA;AACjB,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,mCAAkC;AAAzB,gGAAA,MAAM,OA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AA;AACnC,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,6EAAwE;AAA/D,sIAAA,uBAAuB,OAAA;AAChC,iFAA4E;AAAnE,0IAAA,yBAAyB,OAAA;AAClC,6DAA0D;AAAjD,wHAAA,iBAAiB,OAAA;AAC1B,iDAA8C;AAArC,4GAAA,WAAW,OAAA","sourcesContent":["export { AlertEvent } from './alert_event';\nexport { AllAxes } from './all_axes';\nexport { AxisIdentity } from './axis_identity';\nexport { AxisSettings } from './axis_settings';\nexport { AxisType } from './axis_type';\nexport { Axis } from './axis';\nexport { Connection } from './connection';\nexport { DeviceIdentity } from './device_identity';\nexport { DeviceSettings } from './device_settings';\nexport { Device } from './device';\nexport { DeviceIO } from './device_io';\nexport { DeviceIOInfo } from './device_io_info';\nexport { MessageType } from './message_type';\nexport { Response } from './response';\nexport { SettingConstants } from './setting_constants';\nexport { UnknownResponseEvent } from './unknown_response_event';\nexport { WarningFlags } from './warning_flags';\nexport { Warnings } from './warnings';\nexport { Lockstep } from './lockstep';\nexport { LockstepAxes } from './lockstep_axes';\nexport { Oscilloscope } from './oscilloscope';\nexport { OscilloscopeData } from './oscilloscope_data';\nexport { OscilloscopeCaptureProperties } from './oscilloscope_capture_properties';\nexport { Stream } from './stream';\nexport { StreamBuffer } from './stream_buffer';\nexport { StreamMode } from './stream_mode';\nexport { StreamAxisType } from './stream_axis_type';\nexport { StreamAxisDefinition } from './stream_axis_definition';\nexport { PvtSequence } from './pvt_sequence';\nexport { PvtBuffer } from './pvt_buffer';\nexport { PvtMode } from './pvt_mode';\nexport { Transport } from './transport';\nexport { ServoTuner } from './servo_tuner';\nexport { ServoTuningParamset } from './servo_tuning_paramset';\nexport { ParamsetInfo } from './paramset_info';\nexport { PidTuning } from './pid_tuning';\nexport { ServoTuningParam } from './servo_tuning_param';\nexport { SimpleTuningParamDefinition } from './simple_tuning_param_definition';\nexport { AxisStorage, DeviceStorage } from './storage';\nexport { ConversionFactor } from './conversion_factor';\nexport { CanSetStateAxisResponse } from './can_set_state_axis_response';\nexport { CanSetStateDeviceResponse } from './can_set_state_device_response';\nexport { PvtAxisDefinition } from './pvt_axis_definition';\nexport { PvtAxisType } from './pvt_axis_type';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ascii/index.ts"],"names":[],"mappings":";;;AAAA,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,uCAAqC;AAA5B,mGAAA,OAAO,OAAA;AAChB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA;AACjB,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA;AACjB,mDAAgD;AAAvC,8GAAA,YAAY,OAAA;AACrB,+CAA4C;AAAnC,0GAAA,UAAU,OAAA;AACnB,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,mEAAgE;AAAvD,8HAAA,oBAAoB,OAAA;AAC7B,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,qFAAkF;AAAzE,gJAAA,6BAA6B,OAAA;AACtC,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,uEAAoE;AAA3D,kIAAA,sBAAsB,OAAA;AAC/B,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,uDAAoD;AAA3C,kHAAA,cAAc,OAAA;AACvB,mEAAgE;AAAvD,8HAAA,oBAAoB,OAAA;AAC7B,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,uCAAqC;AAA5B,mGAAA,OAAO,OAAA;AAChB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA;AAC5B,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,2DAAwD;AAA/C,sHAAA,gBAAgB,OAAA;AACzB,mFAA+E;AAAtE,6IAAA,2BAA2B,OAAA;AACpC,qCAAuD;AAA9C,sGAAA,WAAW,OAAA;AAAE,wGAAA,aAAa,OAAA;AACnC,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,6EAAwE;AAA/D,sIAAA,uBAAuB,OAAA;AAChC,iFAA4E;AAAnE,0IAAA,yBAAyB,OAAA;AAClC,6DAA0D;AAAjD,wHAAA,iBAAiB,OAAA;AAC1B,iDAA8C;AAArC,4GAAA,WAAW,OAAA","sourcesContent":["export { AlertEvent } from './alert_event';\nexport { AllAxes } from './all_axes';\nexport { AxisIdentity } from './axis_identity';\nexport { AxisSettings } from './axis_settings';\nexport { AxisType } from './axis_type';\nexport { Axis } from './axis';\nexport { Connection } from './connection';\nexport { DeviceIdentity } from './device_identity';\nexport { DeviceSettings } from './device_settings';\nexport { Device } from './device';\nexport { DeviceIO } from './device_io';\nexport { DeviceIOInfo } from './device_io_info';\nexport { IoPortType } from './io_port_type';\nexport { MessageType } from './message_type';\nexport { Response } from './response';\nexport { SettingConstants } from './setting_constants';\nexport { UnknownResponseEvent } from './unknown_response_event';\nexport { WarningFlags } from './warning_flags';\nexport { Warnings } from './warnings';\nexport { Lockstep } from './lockstep';\nexport { LockstepAxes } from './lockstep_axes';\nexport { Oscilloscope } from './oscilloscope';\nexport { OscilloscopeCaptureProperties } from './oscilloscope_capture_properties';\nexport { OscilloscopeData } from './oscilloscope_data';\nexport { OscilloscopeDataSource } from './oscilloscope_data_source';\nexport { Stream } from './stream';\nexport { StreamBuffer } from './stream_buffer';\nexport { StreamMode } from './stream_mode';\nexport { StreamAxisType } from './stream_axis_type';\nexport { StreamAxisDefinition } from './stream_axis_definition';\nexport { PvtSequence } from './pvt_sequence';\nexport { PvtBuffer } from './pvt_buffer';\nexport { PvtMode } from './pvt_mode';\nexport { Transport } from './transport';\nexport { ServoTuner } from './servo_tuner';\nexport { ServoTuningParamset } from './servo_tuning_paramset';\nexport { ParamsetInfo } from './paramset_info';\nexport { PidTuning } from './pid_tuning';\nexport { ServoTuningParam } from './servo_tuning_param';\nexport { SimpleTuningParamDefinition } from './simple_tuning_param_definition';\nexport { AxisStorage, DeviceStorage } from './storage';\nexport { ConversionFactor } from './conversion_factor';\nexport { CanSetStateAxisResponse } from './can_set_state_axis_response';\nexport { CanSetStateDeviceResponse } from './can_set_state_device_response';\nexport { PvtAxisDefinition } from './pvt_axis_definition';\nexport { PvtAxisType } from './pvt_axis_type';\n"]}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Kind of I/O pin to use.
3
+ */
4
+ export declare enum IoPortType {
5
+ NONE = 0,
6
+ ANALOG_INPUT = 1,
7
+ ANALOG_OUTPUT = 2,
8
+ DIGITAL_INPUT = 3,
9
+ DIGITAL_OUTPUT = 4
10
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
3
+ // ============= DO NOT EDIT DIRECTLY ============= //
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.IoPortType = void 0;
6
+ /**
7
+ * Kind of I/O pin to use.
8
+ */
9
+ var IoPortType;
10
+ (function (IoPortType) {
11
+ IoPortType[IoPortType["NONE"] = 0] = "NONE";
12
+ IoPortType[IoPortType["ANALOG_INPUT"] = 1] = "ANALOG_INPUT";
13
+ IoPortType[IoPortType["ANALOG_OUTPUT"] = 2] = "ANALOG_OUTPUT";
14
+ IoPortType[IoPortType["DIGITAL_INPUT"] = 3] = "DIGITAL_INPUT";
15
+ IoPortType[IoPortType["DIGITAL_OUTPUT"] = 4] = "DIGITAL_OUTPUT";
16
+ })(IoPortType = exports.IoPortType || (exports.IoPortType = {}));
17
+ //# sourceMappingURL=io_port_type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"io_port_type.js","sourceRoot":"","sources":["../../../src/ascii/io_port_type.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAEtD;;GAEG;AACH,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,2CAAQ,CAAA;IACR,2DAAgB,CAAA;IAChB,6DAAiB,CAAA;IACjB,6DAAiB,CAAA;IACjB,+DAAkB,CAAA;AACpB,CAAC,EANW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAMrB","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\n/**\n * Kind of I/O pin to use.\n */\nexport enum IoPortType {\n NONE = 0,\n ANALOG_INPUT = 1,\n ANALOG_OUTPUT = 2,\n DIGITAL_INPUT = 3,\n DIGITAL_OUTPUT = 4,\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { Device } from './device';
2
+ import { IoPortType } from './io_port_type';
2
3
  import { OscilloscopeData } from './oscilloscope_data';
3
4
  import { Native, Time } from '../units';
4
5
  /**
@@ -19,6 +20,12 @@ export declare class Oscilloscope {
19
20
  * @param setting The name of a setting to record.
20
21
  */
21
22
  addChannel(axis: number, setting: string): Promise<void>;
23
+ /**
24
+ * Select an I/O pin to be recorded.
25
+ * @param ioType The I/O port type to read data from.
26
+ * @param ioChannel The 1-based index of the I/O pin to read from.
27
+ */
28
+ addIoChannel(ioType: IoPortType, ioChannel: number): Promise<void>;
22
29
  /**
23
30
  * Clear the list of channels to record.
24
31
  */
@@ -50,12 +50,25 @@ class Oscilloscope {
50
50
  * @param setting The name of a setting to record.
51
51
  */
52
52
  async addChannel(axis, setting) {
53
- const request = new gateway.OscilloscopeAddChannelRequest();
53
+ const request = new gateway.OscilloscopeAddSettingChannelRequest();
54
54
  request.setInterfaceId(this.device.connection.interfaceId);
55
55
  request.setDevice(this.device.deviceAddress);
56
56
  request.setAxis(axis);
57
57
  request.setSetting(setting);
58
- await gateway.callAsync('oscilloscope/add_channel', request);
58
+ await gateway.callAsync('oscilloscope/add_setting_channel', request);
59
+ }
60
+ /**
61
+ * Select an I/O pin to be recorded.
62
+ * @param ioType The I/O port type to read data from.
63
+ * @param ioChannel The 1-based index of the I/O pin to read from.
64
+ */
65
+ async addIoChannel(ioType, ioChannel) {
66
+ const request = new gateway.OscilloscopeAddIoChannelRequest();
67
+ request.setInterfaceId(this.device.connection.interfaceId);
68
+ request.setDevice(this.device.deviceAddress);
69
+ request.setIoType(ioType);
70
+ request.setIoChannel(ioChannel);
71
+ await gateway.callAsync('oscilloscope/add_io_channel', request);
59
72
  }
60
73
  /**
61
74
  * Clear the list of channels to record.
@@ -1 +1 @@
1
- {"version":3,"file":"oscilloscope.js","sourceRoot":"","sources":["../../../src/ascii/oscilloscope.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtD,2DAAuD;AACvD,oCAA+C;AAC/C,oDAAsC;AAEtC;;;;GAIG;AACH,MAAa,YAAY;IACvB;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM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AK,CAAC,IAAI;QACf,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,4BAA4B,EAAE,CAAC;QAC3D,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAC7C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAExB,MAAM,OAAO,CAAC,SAAS,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,IAAI;QACf,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,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,SAAS,CACtC,mBAAmB,EACnB,OAAO,EACP,OAAO,CAAC,wBAAwB,CAAC,CAAC;QACpC,OAAO,QAAQ,CAAC,cAAc,EAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,oCAAgB,CAAC,EAAE,CAAC,CAAC,CAAC;IACxE,CAAC;CACF;AA1ND,oCA0NC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { OscilloscopeData } from './oscilloscope_data';\nimport { Native, Time, Units } from '../units';\nimport * as gateway from '../gateway';\n\n/**\n * Provides a convenient way to control the oscilloscope data recording feature of some devices.\n * The oscilloscope can record the values of some settings over time at high resolution.\n * Requires at least Firmware 7.00.\n */\nexport class Oscilloscope {\n /**\n * Device that this Oscilloscope measures.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n constructor(device: Device) {\n this._device = device;\n }\n\n /**\n * Select a setting to be recorded.\n * @param axis The 1-based index of the axis to record the value from.\n * @param setting The name of a setting to record.\n */\n public async addChannel(\n axis: number,\n setting: string\n ): Promise<void> {\n const request = new gateway.OscilloscopeAddChannelRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(axis);\n request.setSetting(setting);\n\n await gateway.callAsync('oscilloscope/add_channel', request);\n }\n\n /**\n * Clear the list of channels to record.\n */\n public async clear(): Promise<void> {\n const request = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n\n await gateway.callAsync('oscilloscope/clear_channels', request);\n }\n\n /**\n * Get the current sampling interval.\n * @param [unit=Units.NATIVE] Unit of measure to represent the timebase in.\n * @returns The current sampling interval in the selected time units.\n */\n public async getTimebase(\n unit: Time | Native = Units.NATIVE\n ): Promise<number> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setSetting('scope.timebase');\n request.setUnit(unit);\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 * Set the sampling interval.\n * @param interval Sample interval for the next oscilloscope recording. Minimum value is 100µs.\n * @param [unit=Units.NATIVE] Unit of measure the timebase is represented in.\n */\n public async setTimebase(\n interval: number,\n unit: Time | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.DeviceSetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setSetting('scope.timebase');\n request.setValue(interval);\n request.setUnit(unit);\n\n await gateway.callAsync('device/set_setting', request);\n }\n\n /**\n * Get the delay before oscilloscope recording starts.\n * @param [unit=Units.NATIVE] Unit of measure to represent the delay in.\n * @returns The current start delay in the selected time units.\n */\n public async getDelay(\n unit: Time | Native = Units.NATIVE\n ): Promise<number> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setSetting('scope.delay');\n request.setUnit(unit);\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 * Set the sampling start delay.\n * @param interval Delay time between triggering a recording and the first data point being recorded.\n * @param [unit=Units.NATIVE] Unit of measure the delay is represented in.\n */\n public async setDelay(\n interval: number,\n unit: Time | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.DeviceSetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setSetting('scope.delay');\n request.setValue(interval);\n request.setUnit(unit);\n\n await gateway.callAsync('device/set_setting', request);\n }\n\n /**\n * Get the maximum number of channels that can be recorded.\n * @returns The maximum number of channels that can be added to an Oscilloscope recording.\n */\n public async getMaxChannels(): Promise<number> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setSetting('scope.numchannels');\n\n const response = await gateway.callAsync<gateway.IntResponse>(\n 'oscilloscope/get_setting',\n request,\n gateway.IntResponse);\n return response.getValue();\n }\n\n /**\n * Get the maximum number of samples that can be recorded per Oscilloscope channel.\n * @returns The maximum number of samples that can be recorded per Oscilloscope channel.\n */\n public async getMaxBufferSize(): Promise<number> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setSetting('scope.channel.size.max');\n\n const response = await gateway.callAsync<gateway.IntResponse>(\n 'oscilloscope/get_setting',\n request,\n gateway.IntResponse);\n return response.getValue();\n }\n\n /**\n * Get the number of samples that can be recorded per channel given the current number of channels added.\n * @returns Number of samples that will be recorded per channel with the current channels. Zero if none have been added.\n */\n public async getBufferSize(): Promise<number> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setSetting('scope.channel.size');\n\n const response = await gateway.callAsync<gateway.IntResponse>(\n 'oscilloscope/get_setting',\n request,\n gateway.IntResponse);\n return response.getValue();\n }\n\n /**\n * Trigger data recording.\n * @param [captureLength=0] Optional number of samples to record per channel.\n * If left empty, the device records samples until the buffer fills.\n * Requires at least Firmware 7.29.\n */\n public async start(\n captureLength: number = 0\n ): Promise<void> {\n const request = new gateway.OscilloscopeStartStopRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStart(true);\n request.setCaptureLength(captureLength);\n\n await gateway.callAsync('oscilloscope/start_or_stop', request);\n }\n\n /**\n * End data recording if currently in progress.\n */\n public async stop(): Promise<void> {\n const request = new gateway.OscilloscopeStartStopRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStart(false);\n\n await gateway.callAsync('oscilloscope/start_or_stop', request);\n }\n\n /**\n * Reads the last-recorded data from the oscilloscope. Will block until any in-progress recording completes.\n * @returns Array of recorded channel data arrays, in the order added.\n */\n public async read(): Promise<OscilloscopeData[]> {\n const request = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n\n const response = await gateway.callAsync<gateway.OscilloscopeReadResponse>(\n 'oscilloscope/read',\n request,\n gateway.OscilloscopeReadResponse);\n return response.getDataIdsList()!.map(id => new OscilloscopeData(id));\n }\n}\n"]}
1
+ {"version":3,"file":"oscilloscope.js","sourceRoot":"","sources":["../../../src/ascii/oscilloscope.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAItD,2DAAuD;AACvD,oCAA+C;AAC/C,oDAAsC;AAEtC;;;;GAIG;AACH,MAAa,YAAY;IACvB;;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G,MAAM,OAAO,CAAC,SAAS,CACtC,mBAAmB,EACnB,OAAO,EACP,OAAO,CAAC,wBAAwB,CAAC,CAAC;QACpC,OAAO,QAAQ,CAAC,cAAc,EAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,oCAAgB,CAAC,EAAE,CAAC,CAAC,CAAC;IACxE,CAAC;CACF;AA5OD,oCA4OC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Device } from './device';\nimport { IoPortType } from './io_port_type';\nimport { OscilloscopeData } from './oscilloscope_data';\nimport { Native, Time, Units } from '../units';\nimport * as gateway from '../gateway';\n\n/**\n * Provides a convenient way to control the oscilloscope data recording feature of some devices.\n * The oscilloscope can record the values of some settings over time at high resolution.\n * Requires at least Firmware 7.00.\n */\nexport class Oscilloscope {\n /**\n * Device that this Oscilloscope measures.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n constructor(device: Device) {\n this._device = device;\n }\n\n /**\n * Select a setting to be recorded.\n * @param axis The 1-based index of the axis to record the value from.\n * @param setting The name of a setting to record.\n */\n public async addChannel(\n axis: number,\n setting: string\n ): Promise<void> {\n const request = new gateway.OscilloscopeAddSettingChannelRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(axis);\n request.setSetting(setting);\n\n await gateway.callAsync('oscilloscope/add_setting_channel', request);\n }\n\n /**\n * Select an I/O pin to be recorded.\n * @param ioType The I/O port type to read data from.\n * @param ioChannel The 1-based index of the I/O pin to read from.\n */\n public async addIoChannel(\n ioType: IoPortType,\n ioChannel: number\n ): Promise<void> {\n const request = new gateway.OscilloscopeAddIoChannelRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setIoType(ioType as any);\n request.setIoChannel(ioChannel);\n\n await gateway.callAsync('oscilloscope/add_io_channel', request);\n }\n\n /**\n * Clear the list of channels to record.\n */\n public async clear(): Promise<void> {\n const request = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n\n await gateway.callAsync('oscilloscope/clear_channels', request);\n }\n\n /**\n * Get the current sampling interval.\n * @param [unit=Units.NATIVE] Unit of measure to represent the timebase in.\n * @returns The current sampling interval in the selected time units.\n */\n public async getTimebase(\n unit: Time | Native = Units.NATIVE\n ): Promise<number> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setSetting('scope.timebase');\n request.setUnit(unit);\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 * Set the sampling interval.\n * @param interval Sample interval for the next oscilloscope recording. Minimum value is 100µs.\n * @param [unit=Units.NATIVE] Unit of measure the timebase is represented in.\n */\n public async setTimebase(\n interval: number,\n unit: Time | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.DeviceSetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setSetting('scope.timebase');\n request.setValue(interval);\n request.setUnit(unit);\n\n await gateway.callAsync('device/set_setting', request);\n }\n\n /**\n * Get the delay before oscilloscope recording starts.\n * @param [unit=Units.NATIVE] Unit of measure to represent the delay in.\n * @returns The current start delay in the selected time units.\n */\n public async getDelay(\n unit: Time | Native = Units.NATIVE\n ): Promise<number> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setSetting('scope.delay');\n request.setUnit(unit);\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 * Set the sampling start delay.\n * @param interval Delay time between triggering a recording and the first data point being recorded.\n * @param [unit=Units.NATIVE] Unit of measure the delay is represented in.\n */\n public async setDelay(\n interval: number,\n unit: Time | Native = Units.NATIVE\n ): Promise<void> {\n const request = new gateway.DeviceSetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setSetting('scope.delay');\n request.setValue(interval);\n request.setUnit(unit);\n\n await gateway.callAsync('device/set_setting', request);\n }\n\n /**\n * Get the maximum number of channels that can be recorded.\n * @returns The maximum number of channels that can be added to an Oscilloscope recording.\n */\n public async getMaxChannels(): Promise<number> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setSetting('scope.numchannels');\n\n const response = await gateway.callAsync<gateway.IntResponse>(\n 'oscilloscope/get_setting',\n request,\n gateway.IntResponse);\n return response.getValue();\n }\n\n /**\n * Get the maximum number of samples that can be recorded per Oscilloscope channel.\n * @returns The maximum number of samples that can be recorded per Oscilloscope channel.\n */\n public async getMaxBufferSize(): Promise<number> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setSetting('scope.channel.size.max');\n\n const response = await gateway.callAsync<gateway.IntResponse>(\n 'oscilloscope/get_setting',\n request,\n gateway.IntResponse);\n return response.getValue();\n }\n\n /**\n * Get the number of samples that can be recorded per channel given the current number of channels added.\n * @returns Number of samples that will be recorded per channel with the current channels. Zero if none have been added.\n */\n public async getBufferSize(): Promise<number> {\n const request = new gateway.DeviceGetSettingRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setSetting('scope.channel.size');\n\n const response = await gateway.callAsync<gateway.IntResponse>(\n 'oscilloscope/get_setting',\n request,\n gateway.IntResponse);\n return response.getValue();\n }\n\n /**\n * Trigger data recording.\n * @param [captureLength=0] Optional number of samples to record per channel.\n * If left empty, the device records samples until the buffer fills.\n * Requires at least Firmware 7.29.\n */\n public async start(\n captureLength: number = 0\n ): Promise<void> {\n const request = new gateway.OscilloscopeStartStopRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStart(true);\n request.setCaptureLength(captureLength);\n\n await gateway.callAsync('oscilloscope/start_or_stop', request);\n }\n\n /**\n * End data recording if currently in progress.\n */\n public async stop(): Promise<void> {\n const request = new gateway.OscilloscopeStartStopRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setStart(false);\n\n await gateway.callAsync('oscilloscope/start_or_stop', request);\n }\n\n /**\n * Reads the last-recorded data from the oscilloscope. Will block until any in-progress recording completes.\n * @returns Array of recorded channel data arrays, in the order added.\n */\n public async read(): Promise<OscilloscopeData[]> {\n const request = new gateway.DeviceEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n\n const response = await gateway.callAsync<gateway.OscilloscopeReadResponse>(\n 'oscilloscope/read',\n request,\n gateway.OscilloscopeReadResponse);\n return response.getDataIdsList()!.map(id => new OscilloscopeData(id));\n }\n}\n"]}
@@ -1,7 +1,13 @@
1
+ import { OscilloscopeDataSource } from './oscilloscope_data_source';
2
+ import { IoPortType } from './io_port_type';
1
3
  /**
2
4
  * The public properties of one channel of recorded oscilloscope data.
3
5
  */
4
6
  export interface OscilloscopeCaptureProperties {
7
+ /**
8
+ * Indicates whether the data came from a setting or an I/O pin.
9
+ */
10
+ dataSource: OscilloscopeDataSource;
5
11
  /**
6
12
  * The name of the recorded setting.
7
13
  */
@@ -10,6 +16,14 @@ export interface OscilloscopeCaptureProperties {
10
16
  * The number of the axis the data was recorded from, or 0 for the controller.
11
17
  */
12
18
  axisNumber: number;
19
+ /**
20
+ * Which kind of I/O port data was recorded from.
21
+ */
22
+ ioType: IoPortType;
23
+ /**
24
+ * Which I/O pin within the port was recorded.
25
+ */
26
+ ioChannel: number;
13
27
  }
14
28
  export declare namespace OscilloscopeCaptureProperties {
15
29
  const __type = "OscilloscopeCaptureProperties";
@@ -9,8 +9,11 @@ var OscilloscopeCaptureProperties;
9
9
  /** @internal */
10
10
  function fromProtobuf(pbData) {
11
11
  return {
12
+ dataSource: pbData.dataSource,
12
13
  setting: pbData.setting,
13
14
  axisNumber: pbData.axisNumber,
15
+ ioType: pbData.ioType,
16
+ ioChannel: pbData.ioChannel,
14
17
  };
15
18
  }
16
19
  OscilloscopeCaptureProperties.fromProtobuf = fromProtobuf;
@@ -1 +1 @@
1
- {"version":3,"file":"oscilloscope_capture_properties.js","sourceRoot":"","sources":["../../../src/ascii/oscilloscope_capture_properties.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAoBtD,IAAiB,6BAA6B,CAU7C;AAVD,WAAiB,6BAA6B;IAC/B,oCAAM,GAAG,+BAA+B,CAAC;IAEtD,gBAAgB;IAChB,SAAgB,YAAY,CAAC,MAAsD;QACjF,OAAO;YACL,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,UAAU,EAAE,MAAM,CAAC,UAAU;SAC9B,CAAC;IACJ,CAAC;IALe,0CAAY,eAK3B,CAAA;AACH,CAAC,EAVgB,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAU7C","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\n\n/**\n * The public properties of one channel of recorded oscilloscope data.\n */\nexport interface OscilloscopeCaptureProperties {\n /**\n * The name of the recorded setting.\n */\n setting: string;\n\n /**\n * The number of the axis the data was recorded from, or 0 for the controller.\n */\n axisNumber: number;\n\n}\n\nexport namespace OscilloscopeCaptureProperties {\n export const __type = 'OscilloscopeCaptureProperties';\n\n /** @internal */\n export function fromProtobuf(pbData: gateway.OscilloscopeCaptureProperties.AsObject): OscilloscopeCaptureProperties {\n return {\n setting: pbData.setting,\n axisNumber: pbData.axisNumber,\n };\n }\n}\n"]}
1
+ {"version":3,"file":"oscilloscope_capture_properties.js","sourceRoot":"","sources":["../../../src/ascii/oscilloscope_capture_properties.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAqCtD,IAAiB,6BAA6B,CAa7C;AAbD,WAAiB,6BAA6B;IAC/B,oCAAM,GAAG,+BAA+B,CAAC;IAEtD,gBAAgB;IAChB,SAAgB,YAAY,CAAC,MAAsD;QACjF,OAAO;YACL,UAAU,EAAE,MAAM,CAAC,UAAiB;YACpC,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,MAAM,EAAE,MAAM,CAAC,MAAa;YAC5B,SAAS,EAAE,MAAM,CAAC,SAAS;SAC5B,CAAC;IACJ,CAAC;IARe,0CAAY,eAQ3B,CAAA;AACH,CAAC,EAbgB,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAa7C","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { OscilloscopeDataSource } from './oscilloscope_data_source';\nimport { IoPortType } from './io_port_type';\n\n/**\n * The public properties of one channel of recorded oscilloscope data.\n */\nexport interface OscilloscopeCaptureProperties {\n /**\n * Indicates whether the data came from a setting or an I/O pin.\n */\n dataSource: OscilloscopeDataSource;\n\n /**\n * The name of the recorded setting.\n */\n setting: string;\n\n /**\n * The number of the axis the data was recorded from, or 0 for the controller.\n */\n axisNumber: number;\n\n /**\n * Which kind of I/O port data was recorded from.\n */\n ioType: IoPortType;\n\n /**\n * Which I/O pin within the port was recorded.\n */\n ioChannel: number;\n\n}\n\nexport namespace OscilloscopeCaptureProperties {\n export const __type = 'OscilloscopeCaptureProperties';\n\n /** @internal */\n export function fromProtobuf(pbData: gateway.OscilloscopeCaptureProperties.AsObject): OscilloscopeCaptureProperties {\n return {\n dataSource: pbData.dataSource as any,\n setting: pbData.setting,\n axisNumber: pbData.axisNumber,\n ioType: pbData.ioType as any,\n ioChannel: pbData.ioChannel,\n };\n }\n}\n"]}
@@ -1,4 +1,6 @@
1
1
  import { Native, Time, Units } from '../units';
2
+ import { IoPortType } from './io_port_type';
3
+ import { OscilloscopeDataSource } from './oscilloscope_data_source';
2
4
  /**
3
5
  * Contains a block of contiguous recorded data for one channel of the device's oscilloscope.
4
6
  */
@@ -8,6 +10,10 @@ export declare class OscilloscopeData {
8
10
  */
9
11
  get dataId(): number;
10
12
  private _dataId;
13
+ /**
14
+ * Indicates whether the data came from a setting or an I/O pin.
15
+ */
16
+ get dataSource(): OscilloscopeDataSource;
11
17
  /**
12
18
  * The name of the recorded setting.
13
19
  */
@@ -16,6 +22,14 @@ export declare class OscilloscopeData {
16
22
  * The number of the axis the data was recorded from, or 0 for the controller.
17
23
  */
18
24
  get axisNumber(): number;
25
+ /**
26
+ * Which kind of I/O port data was recorded from.
27
+ */
28
+ get ioType(): IoPortType;
29
+ /**
30
+ * Which I/O pin within the port was recorded.
31
+ */
32
+ get ioChannel(): number;
19
33
  constructor(dataId: number);
20
34
  /**
21
35
  * Get the sample interval that this data was recorded with.
@@ -40,6 +40,12 @@ class OscilloscopeData {
40
40
  get dataId() {
41
41
  return this._dataId;
42
42
  }
43
+ /**
44
+ * Indicates whether the data came from a setting or an I/O pin.
45
+ */
46
+ get dataSource() {
47
+ return this._retrieveProperties().dataSource;
48
+ }
43
49
  /**
44
50
  * The name of the recorded setting.
45
51
  */
@@ -52,6 +58,18 @@ class OscilloscopeData {
52
58
  get axisNumber() {
53
59
  return this._retrieveProperties().axisNumber;
54
60
  }
61
+ /**
62
+ * Which kind of I/O port data was recorded from.
63
+ */
64
+ get ioType() {
65
+ return this._retrieveProperties().ioType;
66
+ }
67
+ /**
68
+ * Which I/O pin within the port was recorded.
69
+ */
70
+ get ioChannel() {
71
+ return this._retrieveProperties().ioChannel;
72
+ }
55
73
  constructor(dataId) {
56
74
  this._dataId = dataId;
57
75
  (0, finalizer_1.registerForFinalization)(this, OscilloscopeData._free.bind(null, dataId));
@@ -1 +1 @@
1
- {"version":3,"file":"oscilloscope_data.js","sourceRoot":"","sources":["../../../src/ascii/oscilloscope_data.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oCAA+C;AAC/C,oDAAsC;AACtC,4CAAuD;AAEvD,uFAAkF;AAElF;;GAEG;AACH,MAAa,gBAAgB;IAC3B;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;OAEG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC,OAAO,CAAC;IAC5C,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC,UAAU,CAAC;IAC/C,CAAC;IAED,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAA,mCAAuB,EAAC,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAC3E,CAAC;IAED;;;;OAIG;IACI,WAAW,CAChB,OAAsB,aAAK,CAAC,MAAM;QAElC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,0BAA0B,EAAE,CAAC;QACzD,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/B,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEtB,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,+BAA+B,EAC/B,OAAO,EACP,OAAO,CAAC,cAAc,CAAC,CAAC;QAC1B,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;IACI,QAAQ,CACb,OAAsB,aAAK,CAAC,MAAM;QAElC,MAAM,OAAO,GAAG,IAAI,OAAO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IAAI,OAAO,CAAC,0BAA0B,EAAE,CAAC;QACzD,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAE1B,OAAO,CAAC,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;IAED;;;OAGG;IACK,mBAAmB;QACzB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,0BAA0B,EAAE,CAAC;QACzD,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAE/B,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,iCAAiC,EACjC,OAAO,EACP,OAAO,CAAC,6BAA6B,CAAC,CAAC;QACzC,OAAO,+DAA6B,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;OAIG;IACI,IAAI;QACT,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;CACF;AAhJD,4CAgJC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Native, Time, Units } from '../units';\nimport * as gateway from '../gateway';\nimport { registerForFinalization } from '../finalizer';\n\nimport { OscilloscopeCaptureProperties } from './oscilloscope_capture_properties';\n\n/**\n * Contains a block of contiguous recorded data for one channel of the device's oscilloscope.\n */\nexport class OscilloscopeData {\n /**\n * Unique ID for this block of recorded data.\n */\n public get dataId(): number {\n return this._dataId;\n }\n private _dataId: number;\n\n /**\n * The name of the recorded setting.\n */\n public get setting(): string {\n return this._retrieveProperties().setting;\n }\n\n /**\n * The number of the axis the data was recorded from, or 0 for the controller.\n */\n public get axisNumber(): number {\n return this._retrieveProperties().axisNumber;\n }\n\n constructor(dataId: number) {\n this._dataId = dataId;\n registerForFinalization(this, OscilloscopeData._free.bind(null, dataId));\n }\n\n /**\n * Get the sample interval that this data was recorded with.\n * @param [unit=Units.NATIVE] Unit of measure to represent the timebase in.\n * @returns The timebase setting at the time the data was recorded.\n */\n public getTimebase(\n unit: Time | Native = Units.NATIVE\n ): number {\n const request = new gateway.OscilloscopeDataGetRequest();\n request.setDataId(this.dataId);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'oscilloscopedata/get_timebase',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Get the user-specified time period between receipt of the start command and the first data point.\n * Under some circumstances, the actual delay may be different - call GetSampleTime(0) to get the effective delay.\n * @param [unit=Units.NATIVE] Unit of measure to represent the delay in.\n * @returns The delay setting at the time the data was recorded.\n */\n public getDelay(\n unit: Time | Native = Units.NATIVE\n ): number {\n const request = new gateway.OscilloscopeDataGetRequest();\n request.setDataId(this.dataId);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'oscilloscopedata/get_delay',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Calculate the time a sample was recorded, relative to when the recording was triggered.\n * @param index 0-based index of the sample to calculate the time of.\n * @param [unit=Units.NATIVE] Unit of measure to represent the calculated time in.\n * @returns The calculated time offset of the data sample at the given index.\n */\n public getSampleTime(\n index: number,\n unit: Time | Native = Units.NATIVE\n ): number {\n const request = new gateway.OscilloscopeDataGetSampleTimeRequest();\n request.setDataId(this.dataId);\n request.setIndex(index);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'oscilloscopedata/get_sample_time',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Get the recorded data as an array of doubles.\n * @param [unit=Units.NATIVE] Unit of measure to convert the data to.\n * @returns The recorded data for one oscilloscope channel, converted to the units specified.\n */\n public getData(\n unit: Units = Units.NATIVE\n ): number[] {\n const request = new gateway.OscilloscopeDataGetRequest();\n request.setDataId(this.dataId);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.OscilloscopeDataGetSamplesResponse>(\n 'oscilloscopedata/get_samples',\n request,\n gateway.OscilloscopeDataGetSamplesResponse);\n return response.getDataList();\n }\n\n /**\n * Releases native resources of an oscilloscope data buffer.\n * @param dataId The ID of the data buffer to delete.\n */\n private static _free(\n dataId: number\n ): void {\n const request = new gateway.OscilloscopeDataIdentifier();\n request.setDataId(dataId);\n\n gateway.callSync('oscilloscopedata/free', request);\n }\n\n /**\n * Returns recording properties.\n * @returns Capture properties.\n */\n private _retrieveProperties(): OscilloscopeCaptureProperties {\n const request = new gateway.OscilloscopeDataIdentifier();\n request.setDataId(this.dataId);\n\n const response = gateway.callSync<gateway.OscilloscopeCaptureProperties>(\n 'oscilloscopedata/get_properties',\n request,\n gateway.OscilloscopeCaptureProperties);\n return OscilloscopeCaptureProperties.fromProtobuf(response.toObject());\n }\n\n /**\n * Releases the native resources of the oscilloscope data.\n * Should only be called if your environment does not support FinalizationRegistry.\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n */\n public free(): void {\n OscilloscopeData._free(this.dataId);\n }\n}\n"]}
1
+ {"version":3,"file":"oscilloscope_data.js","sourceRoot":"","sources":["../../../src/ascii/oscilloscope_data.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oCAA+C;AAC/C,oDAAsC;AACtC,4CAAuD;AAIvD,uFAAkF;AAElF;;GAEG;AACH,MAAa,gBAAgB;IAC3B;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;OAEG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC,UAAU,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC,OAAO,CAAC;IAC5C,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAA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GAAG,OAAO,CAAC,QAAQ,CAC/B,iCAAiC,EACjC,OAAO,EACP,OAAO,CAAC,6BAA6B,CAAC,CAAC;QACzC,OAAO,+DAA6B,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;OAIG;IACI,IAAI;QACT,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;CACF;AArKD,4CAqKC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Native, Time, Units } from '../units';\nimport * as gateway from '../gateway';\nimport { registerForFinalization } from '../finalizer';\n\nimport { IoPortType } from './io_port_type';\nimport { OscilloscopeDataSource } from './oscilloscope_data_source';\nimport { OscilloscopeCaptureProperties } from './oscilloscope_capture_properties';\n\n/**\n * Contains a block of contiguous recorded data for one channel of the device's oscilloscope.\n */\nexport class OscilloscopeData {\n /**\n * Unique ID for this block of recorded data.\n */\n public get dataId(): number {\n return this._dataId;\n }\n private _dataId: number;\n\n /**\n * Indicates whether the data came from a setting or an I/O pin.\n */\n public get dataSource(): OscilloscopeDataSource {\n return this._retrieveProperties().dataSource;\n }\n\n /**\n * The name of the recorded setting.\n */\n public get setting(): string {\n return this._retrieveProperties().setting;\n }\n\n /**\n * The number of the axis the data was recorded from, or 0 for the controller.\n */\n public get axisNumber(): number {\n return this._retrieveProperties().axisNumber;\n }\n\n /**\n * Which kind of I/O port data was recorded from.\n */\n public get ioType(): IoPortType {\n return this._retrieveProperties().ioType;\n }\n\n /**\n * Which I/O pin within the port was recorded.\n */\n public get ioChannel(): number {\n return this._retrieveProperties().ioChannel;\n }\n\n constructor(dataId: number) {\n this._dataId = dataId;\n registerForFinalization(this, OscilloscopeData._free.bind(null, dataId));\n }\n\n /**\n * Get the sample interval that this data was recorded with.\n * @param [unit=Units.NATIVE] Unit of measure to represent the timebase in.\n * @returns The timebase setting at the time the data was recorded.\n */\n public getTimebase(\n unit: Time | Native = Units.NATIVE\n ): number {\n const request = new gateway.OscilloscopeDataGetRequest();\n request.setDataId(this.dataId);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'oscilloscopedata/get_timebase',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Get the user-specified time period between receipt of the start command and the first data point.\n * Under some circumstances, the actual delay may be different - call GetSampleTime(0) to get the effective delay.\n * @param [unit=Units.NATIVE] Unit of measure to represent the delay in.\n * @returns The delay setting at the time the data was recorded.\n */\n public getDelay(\n unit: Time | Native = Units.NATIVE\n ): number {\n const request = new gateway.OscilloscopeDataGetRequest();\n request.setDataId(this.dataId);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'oscilloscopedata/get_delay',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Calculate the time a sample was recorded, relative to when the recording was triggered.\n * @param index 0-based index of the sample to calculate the time of.\n * @param [unit=Units.NATIVE] Unit of measure to represent the calculated time in.\n * @returns The calculated time offset of the data sample at the given index.\n */\n public getSampleTime(\n index: number,\n unit: Time | Native = Units.NATIVE\n ): number {\n const request = new gateway.OscilloscopeDataGetSampleTimeRequest();\n request.setDataId(this.dataId);\n request.setIndex(index);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.DoubleResponse>(\n 'oscilloscopedata/get_sample_time',\n request,\n gateway.DoubleResponse);\n return response.getValue();\n }\n\n /**\n * Get the recorded data as an array of doubles.\n * @param [unit=Units.NATIVE] Unit of measure to convert the data to.\n * @returns The recorded data for one oscilloscope channel, converted to the units specified.\n */\n public getData(\n unit: Units = Units.NATIVE\n ): number[] {\n const request = new gateway.OscilloscopeDataGetRequest();\n request.setDataId(this.dataId);\n request.setUnit(unit);\n\n const response = gateway.callSync<gateway.OscilloscopeDataGetSamplesResponse>(\n 'oscilloscopedata/get_samples',\n request,\n gateway.OscilloscopeDataGetSamplesResponse);\n return response.getDataList();\n }\n\n /**\n * Releases native resources of an oscilloscope data buffer.\n * @param dataId The ID of the data buffer to delete.\n */\n private static _free(\n dataId: number\n ): void {\n const request = new gateway.OscilloscopeDataIdentifier();\n request.setDataId(dataId);\n\n gateway.callSync('oscilloscopedata/free', request);\n }\n\n /**\n * Returns recording properties.\n * @returns Capture properties.\n */\n private _retrieveProperties(): OscilloscopeCaptureProperties {\n const request = new gateway.OscilloscopeDataIdentifier();\n request.setDataId(this.dataId);\n\n const response = gateway.callSync<gateway.OscilloscopeCaptureProperties>(\n 'oscilloscopedata/get_properties',\n request,\n gateway.OscilloscopeCaptureProperties);\n return OscilloscopeCaptureProperties.fromProtobuf(response.toObject());\n }\n\n /**\n * Releases the native resources of the oscilloscope data.\n * Should only be called if your environment does not support FinalizationRegistry.\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n */\n public free(): void {\n OscilloscopeData._free(this.dataId);\n }\n}\n"]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Kind of channel to record in the Oscilloscope.
3
+ */
4
+ export declare enum OscilloscopeDataSource {
5
+ SETTING = 0,
6
+ IO = 1
7
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ // ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
3
+ // ============= DO NOT EDIT DIRECTLY ============= //
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.OscilloscopeDataSource = void 0;
6
+ /**
7
+ * Kind of channel to record in the Oscilloscope.
8
+ */
9
+ var OscilloscopeDataSource;
10
+ (function (OscilloscopeDataSource) {
11
+ OscilloscopeDataSource[OscilloscopeDataSource["SETTING"] = 0] = "SETTING";
12
+ OscilloscopeDataSource[OscilloscopeDataSource["IO"] = 1] = "IO";
13
+ })(OscilloscopeDataSource = exports.OscilloscopeDataSource || (exports.OscilloscopeDataSource = {}));
14
+ //# sourceMappingURL=oscilloscope_data_source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oscilloscope_data_source.js","sourceRoot":"","sources":["../../../src/ascii/oscilloscope_data_source.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAEtD;;GAEG;AACH,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,yEAAW,CAAA;IACX,+DAAM,CAAA;AACR,CAAC,EAHW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAGjC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\n/**\n * Kind of channel to record in the Oscilloscope.\n */\nexport enum OscilloscopeDataSource {\n SETTING = 0,\n IO = 1,\n}\n"]}
@@ -61,18 +61,26 @@ export declare class PvtSequence {
61
61
  call(pvtBuffer: PvtBuffer): Promise<void>;
62
62
  /**
63
63
  * Queues a point with absolute coordinates in the PVT sequence.
64
+ * If some or all velocities are not provided, the sequence calculates the velocities
65
+ * from surrounding points using finite difference.
66
+ * The last point of the sequence must have defined velocity (likely zero).
64
67
  * @param positions Positions for the axes to move through, relative to their home positions.
65
68
  * @param velocities The axes velocities at the given point.
69
+ * Specify an empty array or null for specific axes to make the sequence calculate the velocity.
66
70
  * @param time The duration between the previous point in the sequence and this one.
67
71
  */
68
- point(positions: Measurement[], velocities: Measurement[], time: Measurement): Promise<void>;
72
+ point(positions: Measurement[], velocities: (Measurement | null)[], time: Measurement): Promise<void>;
69
73
  /**
70
74
  * Queues a point with coordinates relative to the previous point in the PVT sequence.
75
+ * If some or all velocities are not provided, the sequence calculates the velocities
76
+ * from surrounding points using finite difference.
77
+ * The last point of the sequence must have defined velocity (likely zero).
71
78
  * @param positions Positions for the axes to move through, relative to the previous point.
72
79
  * @param velocities The axes velocities at the given point.
80
+ * Specify an empty array or null for specific axes to make the sequence calculate the velocity.
73
81
  * @param time The duration between the previous point in the sequence and this one.
74
82
  */
75
- pointRelative(positions: Measurement[], velocities: Measurement[], time: Measurement): Promise<void>;
83
+ pointRelative(positions: Measurement[], velocities: (Measurement | null)[], time: Measurement): Promise<void>;
76
84
  /**
77
85
  * Set the value of a digital output channel.
78
86
  * @param channelNumber The number of the digital output channel.
@@ -138,8 +138,12 @@ class PvtSequence {
138
138
  }
139
139
  /**
140
140
  * Queues a point with absolute coordinates in the PVT sequence.
141
+ * If some or all velocities are not provided, the sequence calculates the velocities
142
+ * from surrounding points using finite difference.
143
+ * The last point of the sequence must have defined velocity (likely zero).
141
144
  * @param positions Positions for the axes to move through, relative to their home positions.
142
145
  * @param velocities The axes velocities at the given point.
146
+ * Specify an empty array or null for specific axes to make the sequence calculate the velocity.
143
147
  * @param time The duration between the previous point in the sequence and this one.
144
148
  */
145
149
  async point(positions, velocities, time) {
@@ -156,8 +160,12 @@ class PvtSequence {
156
160
  }
157
161
  /**
158
162
  * Queues a point with coordinates relative to the previous point in the PVT sequence.
163
+ * If some or all velocities are not provided, the sequence calculates the velocities
164
+ * from surrounding points using finite difference.
165
+ * The last point of the sequence must have defined velocity (likely zero).
159
166
  * @param positions Positions for the axes to move through, relative to the previous point.
160
167
  * @param velocities The axes velocities at the given point.
168
+ * Specify an empty array or null for specific axes to make the sequence calculate the velocity.
161
169
  * @param time The duration between the previous point in the sequence and this one.
162
170
  */
163
171
  async pointRelative(positions, velocities, time) {