motion-master-client 0.0.77 → 0.0.86

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 (85) hide show
  1. package/README.md +227 -138
  2. package/package.json +1 -1
  3. package/src/cli.d.ts +1 -1
  4. package/src/cli.js +160 -160
  5. package/src/index.d.ts +30 -28
  6. package/src/index.js +33 -31
  7. package/src/index.js.map +1 -1
  8. package/src/lib/cia402.d.ts +184 -182
  9. package/src/lib/cia402.js +393 -391
  10. package/src/lib/cia402.js.map +1 -1
  11. package/src/lib/config-file.d.ts +13 -13
  12. package/src/lib/config-file.js +49 -49
  13. package/src/lib/data-monitoring.d.ts +12 -12
  14. package/src/lib/data-monitoring.js +33 -33
  15. package/src/lib/device-log-line.d.ts +5 -5
  16. package/src/lib/device-log-line.js +2 -2
  17. package/src/lib/device-parameter.d.ts +56 -56
  18. package/src/lib/device-parameter.js +38 -38
  19. package/src/lib/device.d.ts +46 -9
  20. package/src/lib/device.js +166 -2
  21. package/src/lib/device.js.map +1 -1
  22. package/src/lib/encoder-register.d.ts +16 -16
  23. package/src/lib/encoder-register.js +116 -116
  24. package/src/lib/hardware-description.d.ts +46 -46
  25. package/src/lib/hardware-description.js +109 -109
  26. package/src/lib/integro-encoder-calibration.d.ts +31 -0
  27. package/src/lib/integro-encoder-calibration.js +196 -0
  28. package/src/lib/integro-encoder-calibration.js.map +1 -0
  29. package/src/lib/logger.d.ts +1 -1
  30. package/src/lib/logger.js +7 -7
  31. package/src/lib/monitoring-config.d.ts +31 -31
  32. package/src/lib/monitoring-config.js +2 -2
  33. package/src/lib/monitoring-entry.d.ts +9 -9
  34. package/src/lib/monitoring-entry.js +2 -2
  35. package/src/lib/motion-master-client.d.ts +77 -77
  36. package/src/lib/motion-master-client.js +196 -196
  37. package/src/lib/motion-master-pub-sub-client.d.ts +17 -17
  38. package/src/lib/motion-master-pub-sub-client.js +72 -72
  39. package/src/lib/motion-master-pub-sub-client.js.map +1 -1
  40. package/src/lib/motion-master-pub-sub-socket.d.ts +42 -42
  41. package/src/lib/motion-master-pub-sub-socket.js +2 -2
  42. package/src/lib/motion-master-pub-sub-web-socket.d.ts +18 -18
  43. package/src/lib/motion-master-pub-sub-web-socket.js +65 -65
  44. package/src/lib/motion-master-pub-sub-worker-socket.d.ts +18 -18
  45. package/src/lib/motion-master-pub-sub-worker-socket.js +47 -47
  46. package/src/lib/motion-master-req-res-client.d.ts +1104 -1062
  47. package/src/lib/motion-master-req-res-client.js +2137 -1997
  48. package/src/lib/motion-master-req-res-client.js.map +1 -1
  49. package/src/lib/motion-master-req-res-socket.d.ts +60 -60
  50. package/src/lib/motion-master-req-res-socket.js +2 -2
  51. package/src/lib/motion-master-req-res-web-socket.d.ts +28 -28
  52. package/src/lib/motion-master-req-res-web-socket.js +97 -97
  53. package/src/lib/motion-master-req-res-worker-socket.d.ts +24 -24
  54. package/src/lib/motion-master-req-res-worker-socket.js +71 -71
  55. package/src/lib/motion-master.proto.d.ts +5183 -5183
  56. package/src/lib/motion-master.proto.js +53218 -53218
  57. package/src/lib/operators.d.ts +20 -20
  58. package/src/lib/operators.js +82 -83
  59. package/src/lib/operators.js.map +1 -1
  60. package/src/lib/options.d.ts +10 -10
  61. package/src/lib/options.js +13 -13
  62. package/src/lib/os-command.d.ts +387 -173
  63. package/src/lib/os-command.js +555 -269
  64. package/src/lib/os-command.js.map +1 -1
  65. package/src/lib/parameter.d.ts +156 -138
  66. package/src/lib/parameter.js +377 -152
  67. package/src/lib/parameter.js.map +1 -1
  68. package/src/lib/product-id-range.d.ts +7 -7
  69. package/src/lib/product-id-range.js +11 -11
  70. package/src/lib/request-status-resolver.d.ts +4 -4
  71. package/src/lib/request-status-resolver.js +344 -344
  72. package/src/lib/somanet-product.d.ts +37 -0
  73. package/src/lib/somanet-product.js +126 -0
  74. package/src/lib/somanet-product.js.map +1 -0
  75. package/src/lib/system-log-line.d.ts +9 -9
  76. package/src/lib/system-log-line.js +2 -2
  77. package/src/lib/types.d.ts +141 -141
  78. package/src/lib/types.js +28 -28
  79. package/src/lib/urls.d.ts +3 -3
  80. package/src/lib/urls.js +9 -9
  81. package/src/lib/util.d.ts +21 -45
  82. package/src/lib/util.js +113 -379
  83. package/src/lib/util.js.map +1 -1
  84. package/src/lib/web-socket-connection-close-codes.d.ts +8 -8
  85. package/src/lib/web-socket-connection-close-codes.js +88 -88
@@ -0,0 +1,37 @@
1
+ export type SomanetProductName = 'Circulo' | 'Circulo Safe Motion' | 'Integro' | 'Node' | 'Node Safety' | 'Internal';
2
+ export type SomanetProductNameAll = SomanetProductName | 'Circulo All' | 'Node All';
3
+ export interface SomanetProduct {
4
+ name: SomanetProductName;
5
+ idRange: [number, number];
6
+ }
7
+ export declare const somanetProducts: SomanetProduct[];
8
+ export declare function findSomanetProductById(productId?: string | number | null): SomanetProduct | undefined;
9
+ export declare function isProductIdOfType(productId?: string | number | null, name?: SomanetProductNameAll): boolean;
10
+ export type SomanetCirculoVariantName = 'ECDN_E1' | 'ECAN' | 'ECBN' | 'ECNN' | 'ECDL' | 'ECDB_E1';
11
+ export interface SomanetCirculoVariant {
12
+ name: SomanetCirculoVariantName;
13
+ ids: number[];
14
+ }
15
+ export declare const ECDN_E1_IDS: number[];
16
+ export declare const ECAN_IDS: number[];
17
+ export declare const ECBN_IDS: number[];
18
+ export declare const ECNN_IDS: number[];
19
+ export declare const ECDL_IDS: number[];
20
+ export declare const ECDB_E1_IDS: number[];
21
+ export declare const usableCirculoEncoderPortProductIds: number[][];
22
+ export declare const somanetCirculoVariants: SomanetCirculoVariant[];
23
+ /**
24
+ * Whether the encoder port is internal or not depends on the port position and product ID.
25
+ *
26
+ * Circulo has internal encoders, specifically at port positions 1 and 2.
27
+ * Integro will have an internal encoder only at port position 1.
28
+ */
29
+ export declare function isEncoderPortInternal(port: number, productId?: string | number | null): boolean;
30
+ /**
31
+ * Whether the encoder port is usable or not depends on the port position and product ID.
32
+ *
33
+ * Circulo has many variants, such as having an internal encoder on both ports 1 and 2, or only on port 1, or only on port 2,
34
+ * or having no internal encoders at all. If internal encoder port 1 is used, then external encoder port 1 cannot be used, and so on.
35
+ */
36
+ export declare function isEncoderPortUsable(port: number, productId?: string | number | null): boolean;
37
+ export declare function getCirculoEncoderPortName(port: number): string;
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCirculoEncoderPortName = exports.isEncoderPortUsable = exports.isEncoderPortInternal = exports.somanetCirculoVariants = exports.usableCirculoEncoderPortProductIds = exports.ECDB_E1_IDS = exports.ECDL_IDS = exports.ECNN_IDS = exports.ECBN_IDS = exports.ECAN_IDS = exports.ECDN_E1_IDS = exports.isProductIdOfType = exports.findSomanetProductById = exports.somanetProducts = void 0;
4
+ ;
5
+ exports.somanetProducts = [
6
+ { name: 'Circulo', idRange: [8500, 8599] },
7
+ { name: 'Circulo Safe Motion', idRange: [8600, 8699] },
8
+ { name: 'Integro', idRange: [9000, 9499] },
9
+ { name: 'Node', idRange: [9500, 9599] },
10
+ { name: 'Node Safety', idRange: [9600, 9998] },
11
+ { name: 'Internal', idRange: [9999, 9999] },
12
+ ];
13
+ function findSomanetProductById(productId) {
14
+ const id = resolveProductId(productId);
15
+ if (!id) {
16
+ return;
17
+ }
18
+ return exports.somanetProducts.find((product) => id >= product.idRange[0] && id <= product.idRange[1]);
19
+ }
20
+ exports.findSomanetProductById = findSomanetProductById;
21
+ function isProductIdOfType(productId, name) {
22
+ const product = findSomanetProductById(productId);
23
+ if (!product) {
24
+ return false;
25
+ }
26
+ if (name === 'Circulo All') {
27
+ return product.name === 'Circulo' || product.name === 'Circulo Safe Motion';
28
+ }
29
+ else if (name === 'Node All') {
30
+ return product.name === 'Node' || product.name === 'Node Safety';
31
+ }
32
+ else {
33
+ return product.name === name;
34
+ }
35
+ }
36
+ exports.isProductIdOfType = isProductIdOfType;
37
+ exports.ECDN_E1_IDS = [8502, 8503, 8602, 8603];
38
+ exports.ECAN_IDS = [8504, 8505, 8604, 8605];
39
+ exports.ECBN_IDS = [8506, 8507, 8606, 8607];
40
+ exports.ECNN_IDS = [8500, 8501, 8600, 8601];
41
+ exports.ECDL_IDS = [8512, 8513, 8612, 8613];
42
+ exports.ECDB_E1_IDS = [8508, 8509, 8608, 8609];
43
+ exports.usableCirculoEncoderPortProductIds = [
44
+ [...exports.ECDN_E1_IDS, ...exports.ECAN_IDS, ...exports.ECDL_IDS, ...exports.ECDB_E1_IDS],
45
+ [...exports.ECDN_E1_IDS, ...exports.ECBN_IDS, ...exports.ECDL_IDS, ...exports.ECDB_E1_IDS],
46
+ [...exports.ECDN_E1_IDS, ...exports.ECBN_IDS, ...exports.ECNN_IDS, ...exports.ECDB_E1_IDS],
47
+ [...exports.ECDN_E1_IDS, ...exports.ECAN_IDS, ...exports.ECNN_IDS, ...exports.ECDB_E1_IDS], // External 2
48
+ ];
49
+ exports.somanetCirculoVariants = [
50
+ { name: 'ECDN_E1', ids: exports.ECDN_E1_IDS },
51
+ { name: 'ECAN', ids: exports.ECAN_IDS },
52
+ { name: 'ECBN', ids: exports.ECBN_IDS },
53
+ { name: 'ECNN', ids: exports.ECNN_IDS },
54
+ { name: 'ECDL', ids: exports.ECDL_IDS },
55
+ { name: 'ECDB_E1', ids: exports.ECDB_E1_IDS },
56
+ ];
57
+ /**
58
+ * Whether the encoder port is internal or not depends on the port position and product ID.
59
+ *
60
+ * Circulo has internal encoders, specifically at port positions 1 and 2.
61
+ * Integro will have an internal encoder only at port position 1.
62
+ */
63
+ function isEncoderPortInternal(port, productId) {
64
+ const id = resolveProductId(productId);
65
+ if (id) {
66
+ if (port === 1 && exports.ECAN_IDS.includes(id)) {
67
+ return true;
68
+ }
69
+ if (port === 2 && exports.ECBN_IDS.includes(id)) {
70
+ return true;
71
+ }
72
+ if (0 < port && port < 3 && [...exports.ECDN_E1_IDS, ...exports.ECDB_E1_IDS, ...exports.ECDL_IDS, 8510, 8511, 8610, 8611].includes(id)) {
73
+ return true;
74
+ }
75
+ }
76
+ return false;
77
+ }
78
+ exports.isEncoderPortInternal = isEncoderPortInternal;
79
+ /**
80
+ * Whether the encoder port is usable or not depends on the port position and product ID.
81
+ *
82
+ * Circulo has many variants, such as having an internal encoder on both ports 1 and 2, or only on port 1, or only on port 2,
83
+ * or having no internal encoders at all. If internal encoder port 1 is used, then external encoder port 1 cannot be used, and so on.
84
+ */
85
+ function isEncoderPortUsable(port, productId) {
86
+ const id = resolveProductId(productId);
87
+ if (!id) {
88
+ return true;
89
+ }
90
+ if (isProductIdOfType(id, 'Circulo All')) {
91
+ if (port === 5) { // Digital I/O
92
+ return true;
93
+ }
94
+ else if (0 < port && port < 5) {
95
+ return exports.usableCirculoEncoderPortProductIds[port - 1].includes(id);
96
+ }
97
+ }
98
+ return true;
99
+ }
100
+ exports.isEncoderPortUsable = isEncoderPortUsable;
101
+ function getCirculoEncoderPortName(port) {
102
+ if (port === 1 || port === 2) {
103
+ return `Internal encoder ${port}`;
104
+ }
105
+ else if (port === 3 || port === 4) {
106
+ return `External encoder ${port - 2}`;
107
+ }
108
+ else if (port === 5) {
109
+ return 'Digital I/O';
110
+ }
111
+ else {
112
+ return `Port ${port}`;
113
+ }
114
+ }
115
+ exports.getCirculoEncoderPortName = getCirculoEncoderPortName;
116
+ function resolveProductId(productId) {
117
+ if (productId === undefined || productId === null) {
118
+ return;
119
+ }
120
+ const id = typeof productId === 'number' ? productId : Number(productId.slice(0, 4));
121
+ if (isNaN(id)) {
122
+ return;
123
+ }
124
+ return id;
125
+ }
126
+ //# sourceMappingURL=somanet-product.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"somanet-product.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/somanet-product.ts"],"names":[],"mappings":";;;AAMC,CAAC;AAEW,QAAA,eAAe,GAAqB;IAC/C,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE;IAC1C,EAAE,IAAI,EAAE,qBAAqB,EA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AC,EAAE,CAAC,CAAC;SAClE;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAhBD,kDAgBC;AAED,SAAgB,yBAAyB,CAAC,IAAY;IACpD,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,EAAE;QAC5B,OAAO,oBAAoB,IAAI,EAAE,CAAC;KACnC;SAAM,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,EAAE;QACnC,OAAO,oBAAoB,IAAI,GAAG,CAAC,EAAE,CAAC;KACvC;SAAM,IAAI,IAAI,KAAK,CAAC,EAAE;QACrB,OAAO,aAAa,CAAC;KACtB;SAAM;QACL,OAAO,QAAQ,IAAI,EAAE,CAAC;KACvB;AACH,CAAC;AAVD,8DAUC;AAED,SAAS,gBAAgB,CAAC,SAAkC;IAC1D,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,IAAI,EAAE;QACjD,OAAO;KACR;IAED,MAAM,EAAE,GAAG,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAErF,IAAI,KAAK,CAAC,EAAE,CAAC,EAAE;QACb,OAAO;KACR;IAED,OAAO,EAAE,CAAC;AACZ,CAAC"}
@@ -1,9 +1,9 @@
1
- export interface SystemLogLine {
2
- line: string;
3
- date: Date;
4
- uptime: string;
5
- id: string;
6
- file: string;
7
- level: string;
8
- message: string;
9
- }
1
+ export interface SystemLogLine {
2
+ line: string;
3
+ date: Date;
4
+ uptime: string;
5
+ id: string;
6
+ file: string;
7
+ level: string;
8
+ message: string;
9
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=system-log-line.js.map
@@ -1,141 +1,141 @@
1
- import { motionmaster } from "./motion-master.proto";
2
- export import MotionMasterMessage = motionmaster.MotionMasterMessage;
3
- export import IMotionMasterMessage = motionmaster.IMotionMasterMessage;
4
- export type StatusKey = keyof MotionMasterMessage.IStatus;
5
- /**
6
- * Request can be:
7
- * - started on the client side,
8
- * - running where Motion Master reports that the procedure is in progress,
9
- * - succeeded if the request was completed successfully or the progress has reached 100%,
10
- * - failed if anything goes wrong.
11
- */
12
- export type RequestStatus = 'started' | 'running' | 'succeeded' | 'failed';
13
- export type StatusMessageExtension = {
14
- request: RequestStatus;
15
- messageId?: string;
16
- /**
17
- * @deprecated used in OBLAC Drives with the old client library to signify that a request has started
18
- */
19
- begin?: {
20
- code?: (number | null);
21
- message?: (string | null);
22
- };
23
- /**
24
- * @deprecated used in OBLAC Drives with the old client library to signify that a request has timed out
25
- */
26
- timeout?: {
27
- code?: (number | null);
28
- message?: (string | null);
29
- };
30
- };
31
- export declare class RequestError extends Error {
32
- }
33
- export type ParameterAddress = [number, number];
34
- export type ParameterTypeValue = Omit<MotionMasterMessage.Request.SetDeviceParameterValues.IParameterValue, 'index' | 'subindex'>;
35
- export type ParameterTypeValueKey = keyof ParameterTypeValue;
36
- export type ParameterValueType = string | number | Uint8Array | Array<number>;
37
- export type ParameterAddressValue = [number, number, ParameterValueType, ParameterTypeValueKey?];
38
- export type DeviceParameterAddressValue = [DeviceRef, number, number, ParameterValueType, ParameterTypeValueKey?];
39
- export type DeviceParameterIds = string[] | [DeviceRef, number, number][];
40
- export interface DeviceParameterInfo extends MotionMasterMessage.Status.DeviceParameterInfo.IParameter {
41
- id: string;
42
- index: number;
43
- subindex: number;
44
- name: string;
45
- typeValueKey: ParameterTypeValueKey;
46
- }
47
- export type DeviceRefObj = {
48
- deviceAddress?: (number | null);
49
- deviceSerialNumber?: (string | null);
50
- devicePosition?: (number | null);
51
- };
52
- export type DeviceRef = number | string;
53
- export type ParameterInfoAndValue = MotionMasterMessage.Status.DeviceParameterInfo.IParameter & MotionMasterMessage.Status.DeviceParameterValues.IParameterValue;
54
- export import EthercatNetworkState = MotionMasterMessage.Request.SetEthercatNetworkState.State;
55
- export import ControllerType = MotionMasterMessage.Request.EnableMotionController.ControllerType;
56
- export type GetDeviceParameterInfoRequest = MotionMasterMessage.Request.IGetDeviceParameterInfo & DeviceRefObj;
57
- export type GetDeviceParameterValuesRequest = MotionMasterMessage.Request.IGetDeviceParameterValues & DeviceRefObj;
58
- export type GetMultiDeviceParameterValuesRequest = MotionMasterMessage.Request.IGetMultiDeviceParameterValues;
59
- export type SetDeviceParameterValuesRequest = MotionMasterMessage.Request.ISetDeviceParameterValues & DeviceRefObj;
60
- export type SetMultiDeviceParameterValuesRequest = MotionMasterMessage.Request.ISetMultiDeviceParameterValues;
61
- export type GetDeviceFileListRequest = MotionMasterMessage.Request.IGetDeviceFileList & DeviceRefObj;
62
- export type GetDeviceFileRequest = MotionMasterMessage.Request.IGetDeviceFile & DeviceRefObj;
63
- export type SetDeviceFileRequest = MotionMasterMessage.Request.ISetDeviceFile & DeviceRefObj;
64
- export type DeleteDeviceFileRequest = MotionMasterMessage.Request.IDeleteDeviceFile & DeviceRefObj;
65
- export type ResetDeviceFaultRequest = MotionMasterMessage.Request.IResetDeviceFault & DeviceRefObj;
66
- export type StopDeviceRequest = MotionMasterMessage.Request.IStopDevice & DeviceRefObj;
67
- export type StartDeviceFirmwareInstallationRequest = MotionMasterMessage.Request.IStartDeviceFirmwareInstallation & DeviceRefObj;
68
- export type GetDeviceLogRequest = MotionMasterMessage.Request.IGetDeviceLog & DeviceRefObj;
69
- export type StartCoggingTorqueRecordingRequest = MotionMasterMessage.Request.IStartCoggingTorqueRecording & DeviceRefObj;
70
- export type GetCoggingTorqueDataRequest = MotionMasterMessage.Request.IGetCoggingTorqueData & DeviceRefObj;
71
- export type StartOffsetDetectionRequest = MotionMasterMessage.Request.IStartOffsetDetection & DeviceRefObj;
72
- export type StartPlantModelIdentificationRequest = MotionMasterMessage.Request.IStartPlantIdentification;
73
- export type ComputeAutoTuningGainsRequest = MotionMasterMessage.Request.IComputeAutoTuningGains & DeviceRefObj;
74
- export type SetMotionControllerParametersRequest = MotionMasterMessage.Request.ISetMotionControllerParameters & DeviceRefObj;
75
- export type EnableMotionControllerRequest = MotionMasterMessage.Request.IEnableMotionController & DeviceRefObj;
76
- export type DisableMotionControllerRequest = MotionMasterMessage.Request.IDisableMotionController & DeviceRefObj;
77
- export type SetSignalGeneratorParametersRequest = MotionMasterMessage.Request.ISetSignalGeneratorParameters & DeviceRefObj;
78
- export type StartSignalGeneratorRequest = MotionMasterMessage.Request.IStartSignalGenerator & DeviceRefObj;
79
- export type StopSignalGeneratorRequest = MotionMasterMessage.Request.IStopSignalGenerator & DeviceRefObj;
80
- export type StartMonitoringDeviceParameterValuesRequest = MotionMasterMessage.Request.IStartMonitoringDeviceParameterValues;
81
- export type StopMonitoringDeviceParameterValuesRequest = MotionMasterMessage.Request.IStopMonitoringDeviceParameterValues;
82
- export type GetEthercatNetworkStateRequest = MotionMasterMessage.Request.IGetEthercatNetworkState & DeviceRefObj;
83
- export type SetEthercatNetworkStateRequest = MotionMasterMessage.Request.ISetEthercatNetworkState & DeviceRefObj;
84
- export type StartNarrowAngleCalibrationRequest = MotionMasterMessage.Request.IStartNarrowAngleCalibration & DeviceRefObj;
85
- export type SetSystemClientTimeoutRequest = MotionMasterMessage.Request.ISetSystemClientTimeout;
86
- export type StartSystemIdentificationRequest = MotionMasterMessage.Request.IStartSystemIdentification & DeviceRefObj;
87
- export type GetCirculoEncoderMagnetDistanceRequest = MotionMasterMessage.Request.IGetCirculoEncoderMagnetDistance & DeviceRefObj;
88
- export type StartCirculoEncoderNarrowAngleCalibrationProcedureRequest = MotionMasterMessage.Request.IStartCirculoEncoderNarrowAngleCalibrationProcedure & DeviceRefObj;
89
- export type GetDeviceCiA402StateRequest = MotionMasterMessage.Request.IGetDeviceCiA402State & DeviceRefObj;
90
- export type SetDeviceCiA402StateRequest = MotionMasterMessage.Request.ISetDeviceCiA402State & DeviceRefObj;
91
- export type StartDeviceSiiRestoreRequest = MotionMasterMessage.Request.IStartDeviceSiiRestore;
92
- export type StartOpenLoopFieldControlRequest = MotionMasterMessage.Request.IStartOpenLoopFieldControl & DeviceRefObj;
93
- export type ComputeFullAutoTuningGainsRequest = MotionMasterMessage.Request.IComputeFullAutoTuningGains & DeviceRefObj;
94
- export type StartFullAutoTuningRequest = MotionMasterMessage.Request.IStartFullAutoTuning & DeviceRefObj;
95
- export type StopFullAutoTuningRequest = MotionMasterMessage.Request.IStopFullAutoTuning & DeviceRefObj;
96
- export type StartCirculoEncoderConfigurationRequest = MotionMasterMessage.Request.IStartCirculoEncoderConfiguration & DeviceRefObj;
97
- export type StopCirculoEncoderNarrowAngleCalibrationProcedureRequest = MotionMasterMessage.Request.IStopCirculoEncoderNarrowAngleCalibrationProcedure & DeviceRefObj;
98
- export type StartOsCommandRequest = MotionMasterMessage.Request.IStartOsCommand & DeviceRefObj;
99
- export type SystemVersionStatus = MotionMasterMessage.Status.ISystemVersion & StatusMessageExtension;
100
- export type DeviceInfoStatus = MotionMasterMessage.Status.IDeviceInfo & StatusMessageExtension;
101
- export type DeviceParameterInfoStatus = MotionMasterMessage.Status.IDeviceParameterInfo & StatusMessageExtension;
102
- export type DeviceParameterValuesStatus = MotionMasterMessage.Status.IDeviceParameterValues & StatusMessageExtension;
103
- export type MultiDeviceParameterValuesStatus = MotionMasterMessage.Status.IMultiDeviceParameterValues & StatusMessageExtension;
104
- export type DeviceFileListStatus = MotionMasterMessage.Status.IDeviceFileList & StatusMessageExtension;
105
- export type DeviceFileStatus = MotionMasterMessage.Status.IDeviceFile & StatusMessageExtension;
106
- export type DeviceFaultResetStatus = MotionMasterMessage.Status.IDeviceFaultReset & StatusMessageExtension;
107
- export type DeviceStopStatus = MotionMasterMessage.Status.IDeviceStop & StatusMessageExtension;
108
- export type DeviceFirmwareInstallationStatus = MotionMasterMessage.Status.IDeviceFirmwareInstallation & StatusMessageExtension;
109
- export type DeviceLogStatus = MotionMasterMessage.Status.IDeviceLog & StatusMessageExtension;
110
- export type CoggingTorqueRecordingStatus = MotionMasterMessage.Status.ICoggingTorqueRecording & StatusMessageExtension;
111
- export type CoggingTorqueDataStatus = MotionMasterMessage.Status.ICoggingTorqueData & StatusMessageExtension;
112
- export type OffsetDetectionStatus = MotionMasterMessage.Status.IOffsetDetection & StatusMessageExtension;
113
- export type PlantIdentificationStatus = MotionMasterMessage.Status.IPlantIdentification & StatusMessageExtension;
114
- export type AutoTuningStatus = MotionMasterMessage.Status.IAutoTuning & StatusMessageExtension;
115
- export type MotionControllerStatus = MotionMasterMessage.Status.IMotionController & StatusMessageExtension;
116
- export type SignalGeneratorStatus = MotionMasterMessage.Status.ISignalGenerator & StatusMessageExtension;
117
- export type MonitoringParameterValuesStatus = MotionMasterMessage.Status.IMonitoringParameterValues & StatusMessageExtension;
118
- export type EthercatNetworkStateStatus = MotionMasterMessage.Status.IEthercatNetworkState & StatusMessageExtension;
119
- export type NarrowAngleCalibrationStatus = MotionMasterMessage.Status.INarrowAngleCalibration & StatusMessageExtension;
120
- export type SystemIdentificationStatus = MotionMasterMessage.Status.ISystemIdentification & StatusMessageExtension;
121
- export type CirculoEncoderMagnetDistanceStatus = MotionMasterMessage.Status.ICirculoEncoderMagnetDistance & StatusMessageExtension;
122
- export type CirculoEncoderNarrowAngleCalibrationProcedureStatus = MotionMasterMessage.Status.ICirculoEncoderNarrowAngleCalibrationProcedure & StatusMessageExtension;
123
- export type DeviceCiA402StateStatus = MotionMasterMessage.Status.IDeviceCiA402State & StatusMessageExtension;
124
- export type SystemLogStatus = MotionMasterMessage.Status.ISystemLog & StatusMessageExtension;
125
- export type DeviceSiiRestoreStatus = MotionMasterMessage.Status.IDeviceSiiRestore & StatusMessageExtension;
126
- export type OpenLoopFieldControlStatus = MotionMasterMessage.Status.IOpenLoopFieldControl & StatusMessageExtension;
127
- export type FullAutoTuningStatus = MotionMasterMessage.Status.IFullAutoTuning & StatusMessageExtension;
128
- export type CirculoEncoderConfigurationStatus = MotionMasterMessage.Status.ICirculoEncoderConfiguration & StatusMessageExtension;
129
- export type OsCommandStatus = MotionMasterMessage.Status.IOsCommand & StatusMessageExtension;
130
- export import ValueType = MotionMasterMessage.Status.DeviceParameterInfo.Parameter.ValueType;
131
- export declare function isArrayOfDeviceSerialNumbers(ids: DeviceParameterIds): ids is string[];
132
- export declare function isObjectOfDeviceSerialNumberToValues(ids: {
133
- [deviceParameterId: string]: ParameterValueType;
134
- } | DeviceParameterAddressValue[]): ids is {
135
- [deviceParameterId: string]: ParameterValueType;
136
- };
137
- export declare enum RestoreDefaultParametersType {
138
- RESTORE_ALL_DEFAULT_PARAMETERS = 1,
139
- RESTORE_MANUFACTURER_DEFAULT_PARAMETERS = 4
140
- }
141
- export type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
1
+ import { motionmaster } from "./motion-master.proto";
2
+ export import MotionMasterMessage = motionmaster.MotionMasterMessage;
3
+ export import IMotionMasterMessage = motionmaster.IMotionMasterMessage;
4
+ export type StatusKey = keyof MotionMasterMessage.IStatus;
5
+ /**
6
+ * Request can be:
7
+ * - started on the client side,
8
+ * - running where Motion Master reports that the procedure is in progress,
9
+ * - succeeded if the request was completed successfully or the progress has reached 100%,
10
+ * - failed if anything goes wrong.
11
+ */
12
+ export type RequestStatus = 'started' | 'running' | 'succeeded' | 'failed';
13
+ export type StatusMessageExtension = {
14
+ request: RequestStatus;
15
+ messageId?: string;
16
+ /**
17
+ * @deprecated used in OBLAC Drives with the old client library to signify that a request has started
18
+ */
19
+ begin?: {
20
+ code?: (number | null);
21
+ message?: (string | null);
22
+ };
23
+ /**
24
+ * @deprecated used in OBLAC Drives with the old client library to signify that a request has timed out
25
+ */
26
+ timeout?: {
27
+ code?: (number | null);
28
+ message?: (string | null);
29
+ };
30
+ };
31
+ export declare class RequestError extends Error {
32
+ }
33
+ export type ParameterAddress = [number, number];
34
+ export type ParameterTypeValue = Omit<MotionMasterMessage.Request.SetDeviceParameterValues.IParameterValue, 'index' | 'subindex'>;
35
+ export type ParameterTypeValueKey = keyof ParameterTypeValue;
36
+ export type ParameterValueType = string | number | Uint8Array | Array<number>;
37
+ export type ParameterAddressValue = [number, number, ParameterValueType, ParameterTypeValueKey?];
38
+ export type DeviceParameterAddressValue = [DeviceRef, number, number, ParameterValueType, ParameterTypeValueKey?];
39
+ export type DeviceParameterIds = string[] | [DeviceRef, number, number][];
40
+ export interface DeviceParameterInfo extends MotionMasterMessage.Status.DeviceParameterInfo.IParameter {
41
+ id: string;
42
+ index: number;
43
+ subindex: number;
44
+ name: string;
45
+ typeValueKey: ParameterTypeValueKey;
46
+ }
47
+ export type DeviceRefObj = {
48
+ deviceAddress?: (number | null);
49
+ deviceSerialNumber?: (string | null);
50
+ devicePosition?: (number | null);
51
+ };
52
+ export type DeviceRef = number | string;
53
+ export type ParameterInfoAndValue = MotionMasterMessage.Status.DeviceParameterInfo.IParameter & MotionMasterMessage.Status.DeviceParameterValues.IParameterValue;
54
+ export import EthercatNetworkState = MotionMasterMessage.Request.SetEthercatNetworkState.State;
55
+ export import ControllerType = MotionMasterMessage.Request.EnableMotionController.ControllerType;
56
+ export type GetDeviceParameterInfoRequest = MotionMasterMessage.Request.IGetDeviceParameterInfo & DeviceRefObj;
57
+ export type GetDeviceParameterValuesRequest = MotionMasterMessage.Request.IGetDeviceParameterValues & DeviceRefObj;
58
+ export type GetMultiDeviceParameterValuesRequest = MotionMasterMessage.Request.IGetMultiDeviceParameterValues;
59
+ export type SetDeviceParameterValuesRequest = MotionMasterMessage.Request.ISetDeviceParameterValues & DeviceRefObj;
60
+ export type SetMultiDeviceParameterValuesRequest = MotionMasterMessage.Request.ISetMultiDeviceParameterValues;
61
+ export type GetDeviceFileListRequest = MotionMasterMessage.Request.IGetDeviceFileList & DeviceRefObj;
62
+ export type GetDeviceFileRequest = MotionMasterMessage.Request.IGetDeviceFile & DeviceRefObj;
63
+ export type SetDeviceFileRequest = MotionMasterMessage.Request.ISetDeviceFile & DeviceRefObj;
64
+ export type DeleteDeviceFileRequest = MotionMasterMessage.Request.IDeleteDeviceFile & DeviceRefObj;
65
+ export type ResetDeviceFaultRequest = MotionMasterMessage.Request.IResetDeviceFault & DeviceRefObj;
66
+ export type StopDeviceRequest = MotionMasterMessage.Request.IStopDevice & DeviceRefObj;
67
+ export type StartDeviceFirmwareInstallationRequest = MotionMasterMessage.Request.IStartDeviceFirmwareInstallation & DeviceRefObj;
68
+ export type GetDeviceLogRequest = MotionMasterMessage.Request.IGetDeviceLog & DeviceRefObj;
69
+ export type StartCoggingTorqueRecordingRequest = MotionMasterMessage.Request.IStartCoggingTorqueRecording & DeviceRefObj;
70
+ export type GetCoggingTorqueDataRequest = MotionMasterMessage.Request.IGetCoggingTorqueData & DeviceRefObj;
71
+ export type StartOffsetDetectionRequest = MotionMasterMessage.Request.IStartOffsetDetection & DeviceRefObj;
72
+ export type StartPlantModelIdentificationRequest = MotionMasterMessage.Request.IStartPlantIdentification;
73
+ export type ComputeAutoTuningGainsRequest = MotionMasterMessage.Request.IComputeAutoTuningGains & DeviceRefObj;
74
+ export type SetMotionControllerParametersRequest = MotionMasterMessage.Request.ISetMotionControllerParameters & DeviceRefObj;
75
+ export type EnableMotionControllerRequest = MotionMasterMessage.Request.IEnableMotionController & DeviceRefObj;
76
+ export type DisableMotionControllerRequest = MotionMasterMessage.Request.IDisableMotionController & DeviceRefObj;
77
+ export type SetSignalGeneratorParametersRequest = MotionMasterMessage.Request.ISetSignalGeneratorParameters & DeviceRefObj;
78
+ export type StartSignalGeneratorRequest = MotionMasterMessage.Request.IStartSignalGenerator & DeviceRefObj;
79
+ export type StopSignalGeneratorRequest = MotionMasterMessage.Request.IStopSignalGenerator & DeviceRefObj;
80
+ export type StartMonitoringDeviceParameterValuesRequest = MotionMasterMessage.Request.IStartMonitoringDeviceParameterValues;
81
+ export type StopMonitoringDeviceParameterValuesRequest = MotionMasterMessage.Request.IStopMonitoringDeviceParameterValues;
82
+ export type GetEthercatNetworkStateRequest = MotionMasterMessage.Request.IGetEthercatNetworkState & DeviceRefObj;
83
+ export type SetEthercatNetworkStateRequest = MotionMasterMessage.Request.ISetEthercatNetworkState & DeviceRefObj;
84
+ export type StartNarrowAngleCalibrationRequest = MotionMasterMessage.Request.IStartNarrowAngleCalibration & DeviceRefObj;
85
+ export type SetSystemClientTimeoutRequest = MotionMasterMessage.Request.ISetSystemClientTimeout;
86
+ export type StartSystemIdentificationRequest = MotionMasterMessage.Request.IStartSystemIdentification & DeviceRefObj;
87
+ export type GetCirculoEncoderMagnetDistanceRequest = MotionMasterMessage.Request.IGetCirculoEncoderMagnetDistance & DeviceRefObj;
88
+ export type StartCirculoEncoderNarrowAngleCalibrationProcedureRequest = MotionMasterMessage.Request.IStartCirculoEncoderNarrowAngleCalibrationProcedure & DeviceRefObj;
89
+ export type GetDeviceCiA402StateRequest = MotionMasterMessage.Request.IGetDeviceCiA402State & DeviceRefObj;
90
+ export type SetDeviceCiA402StateRequest = MotionMasterMessage.Request.ISetDeviceCiA402State & DeviceRefObj;
91
+ export type StartDeviceSiiRestoreRequest = MotionMasterMessage.Request.IStartDeviceSiiRestore;
92
+ export type StartOpenLoopFieldControlRequest = MotionMasterMessage.Request.IStartOpenLoopFieldControl & DeviceRefObj;
93
+ export type ComputeFullAutoTuningGainsRequest = MotionMasterMessage.Request.IComputeFullAutoTuningGains & DeviceRefObj;
94
+ export type StartFullAutoTuningRequest = MotionMasterMessage.Request.IStartFullAutoTuning & DeviceRefObj;
95
+ export type StopFullAutoTuningRequest = MotionMasterMessage.Request.IStopFullAutoTuning & DeviceRefObj;
96
+ export type StartCirculoEncoderConfigurationRequest = MotionMasterMessage.Request.IStartCirculoEncoderConfiguration & DeviceRefObj;
97
+ export type StopCirculoEncoderNarrowAngleCalibrationProcedureRequest = MotionMasterMessage.Request.IStopCirculoEncoderNarrowAngleCalibrationProcedure & DeviceRefObj;
98
+ export type StartOsCommandRequest = MotionMasterMessage.Request.IStartOsCommand & DeviceRefObj;
99
+ export type SystemVersionStatus = MotionMasterMessage.Status.ISystemVersion & StatusMessageExtension;
100
+ export type DeviceInfoStatus = MotionMasterMessage.Status.IDeviceInfo & StatusMessageExtension;
101
+ export type DeviceParameterInfoStatus = MotionMasterMessage.Status.IDeviceParameterInfo & StatusMessageExtension;
102
+ export type DeviceParameterValuesStatus = MotionMasterMessage.Status.IDeviceParameterValues & StatusMessageExtension;
103
+ export type MultiDeviceParameterValuesStatus = MotionMasterMessage.Status.IMultiDeviceParameterValues & StatusMessageExtension;
104
+ export type DeviceFileListStatus = MotionMasterMessage.Status.IDeviceFileList & StatusMessageExtension;
105
+ export type DeviceFileStatus = MotionMasterMessage.Status.IDeviceFile & StatusMessageExtension;
106
+ export type DeviceFaultResetStatus = MotionMasterMessage.Status.IDeviceFaultReset & StatusMessageExtension;
107
+ export type DeviceStopStatus = MotionMasterMessage.Status.IDeviceStop & StatusMessageExtension;
108
+ export type DeviceFirmwareInstallationStatus = MotionMasterMessage.Status.IDeviceFirmwareInstallation & StatusMessageExtension;
109
+ export type DeviceLogStatus = MotionMasterMessage.Status.IDeviceLog & StatusMessageExtension;
110
+ export type CoggingTorqueRecordingStatus = MotionMasterMessage.Status.ICoggingTorqueRecording & StatusMessageExtension;
111
+ export type CoggingTorqueDataStatus = MotionMasterMessage.Status.ICoggingTorqueData & StatusMessageExtension;
112
+ export type OffsetDetectionStatus = MotionMasterMessage.Status.IOffsetDetection & StatusMessageExtension;
113
+ export type PlantIdentificationStatus = MotionMasterMessage.Status.IPlantIdentification & StatusMessageExtension;
114
+ export type AutoTuningStatus = MotionMasterMessage.Status.IAutoTuning & StatusMessageExtension;
115
+ export type MotionControllerStatus = MotionMasterMessage.Status.IMotionController & StatusMessageExtension;
116
+ export type SignalGeneratorStatus = MotionMasterMessage.Status.ISignalGenerator & StatusMessageExtension;
117
+ export type MonitoringParameterValuesStatus = MotionMasterMessage.Status.IMonitoringParameterValues & StatusMessageExtension;
118
+ export type EthercatNetworkStateStatus = MotionMasterMessage.Status.IEthercatNetworkState & StatusMessageExtension;
119
+ export type NarrowAngleCalibrationStatus = MotionMasterMessage.Status.INarrowAngleCalibration & StatusMessageExtension;
120
+ export type SystemIdentificationStatus = MotionMasterMessage.Status.ISystemIdentification & StatusMessageExtension;
121
+ export type CirculoEncoderMagnetDistanceStatus = MotionMasterMessage.Status.ICirculoEncoderMagnetDistance & StatusMessageExtension;
122
+ export type CirculoEncoderNarrowAngleCalibrationProcedureStatus = MotionMasterMessage.Status.ICirculoEncoderNarrowAngleCalibrationProcedure & StatusMessageExtension;
123
+ export type DeviceCiA402StateStatus = MotionMasterMessage.Status.IDeviceCiA402State & StatusMessageExtension;
124
+ export type SystemLogStatus = MotionMasterMessage.Status.ISystemLog & StatusMessageExtension;
125
+ export type DeviceSiiRestoreStatus = MotionMasterMessage.Status.IDeviceSiiRestore & StatusMessageExtension;
126
+ export type OpenLoopFieldControlStatus = MotionMasterMessage.Status.IOpenLoopFieldControl & StatusMessageExtension;
127
+ export type FullAutoTuningStatus = MotionMasterMessage.Status.IFullAutoTuning & StatusMessageExtension;
128
+ export type CirculoEncoderConfigurationStatus = MotionMasterMessage.Status.ICirculoEncoderConfiguration & StatusMessageExtension;
129
+ export type OsCommandStatus = MotionMasterMessage.Status.IOsCommand & StatusMessageExtension;
130
+ export import ValueType = MotionMasterMessage.Status.DeviceParameterInfo.Parameter.ValueType;
131
+ export declare function isArrayOfDeviceSerialNumbers(ids: DeviceParameterIds): ids is string[];
132
+ export declare function isObjectOfDeviceSerialNumberToValues(ids: {
133
+ [deviceParameterId: string]: ParameterValueType;
134
+ } | DeviceParameterAddressValue[]): ids is {
135
+ [deviceParameterId: string]: ParameterValueType;
136
+ };
137
+ export declare enum RestoreDefaultParametersType {
138
+ RESTORE_ALL_DEFAULT_PARAMETERS = 1,
139
+ RESTORE_MANUFACTURER_DEFAULT_PARAMETERS = 4
140
+ }
141
+ export type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
package/src/lib/types.js CHANGED
@@ -1,29 +1,29 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RestoreDefaultParametersType = exports.isObjectOfDeviceSerialNumberToValues = exports.isArrayOfDeviceSerialNumbers = exports.ValueType = exports.ControllerType = exports.EthercatNetworkState = exports.RequestError = exports.MotionMasterMessage = void 0;
4
- const motion_master_proto_1 = require("./motion-master.proto");
5
- exports.MotionMasterMessage = motion_master_proto_1.motionmaster.MotionMasterMessage;
6
- class RequestError extends Error {
7
- }
8
- exports.RequestError = RequestError;
9
- ;
10
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
11
- exports.EthercatNetworkState = exports.MotionMasterMessage.Request.SetEthercatNetworkState.State;
12
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
13
- exports.ControllerType = exports.MotionMasterMessage.Request.EnableMotionController.ControllerType;
14
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
15
- exports.ValueType = exports.MotionMasterMessage.Status.DeviceParameterInfo.Parameter.ValueType;
16
- function isArrayOfDeviceSerialNumbers(ids) {
17
- return ids.length > 0 && typeof ids[0] === 'string';
18
- }
19
- exports.isArrayOfDeviceSerialNumbers = isArrayOfDeviceSerialNumbers;
20
- function isObjectOfDeviceSerialNumberToValues(ids) {
21
- return !Array.isArray(ids);
22
- }
23
- exports.isObjectOfDeviceSerialNumberToValues = isObjectOfDeviceSerialNumberToValues;
24
- var RestoreDefaultParametersType;
25
- (function (RestoreDefaultParametersType) {
26
- RestoreDefaultParametersType[RestoreDefaultParametersType["RESTORE_ALL_DEFAULT_PARAMETERS"] = 1] = "RESTORE_ALL_DEFAULT_PARAMETERS";
27
- RestoreDefaultParametersType[RestoreDefaultParametersType["RESTORE_MANUFACTURER_DEFAULT_PARAMETERS"] = 4] = "RESTORE_MANUFACTURER_DEFAULT_PARAMETERS";
28
- })(RestoreDefaultParametersType = exports.RestoreDefaultParametersType || (exports.RestoreDefaultParametersType = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RestoreDefaultParametersType = exports.isObjectOfDeviceSerialNumberToValues = exports.isArrayOfDeviceSerialNumbers = exports.ValueType = exports.ControllerType = exports.EthercatNetworkState = exports.RequestError = exports.MotionMasterMessage = void 0;
4
+ const motion_master_proto_1 = require("./motion-master.proto");
5
+ exports.MotionMasterMessage = motion_master_proto_1.motionmaster.MotionMasterMessage;
6
+ class RequestError extends Error {
7
+ }
8
+ exports.RequestError = RequestError;
9
+ ;
10
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
11
+ exports.EthercatNetworkState = exports.MotionMasterMessage.Request.SetEthercatNetworkState.State;
12
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
13
+ exports.ControllerType = exports.MotionMasterMessage.Request.EnableMotionController.ControllerType;
14
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
15
+ exports.ValueType = exports.MotionMasterMessage.Status.DeviceParameterInfo.Parameter.ValueType;
16
+ function isArrayOfDeviceSerialNumbers(ids) {
17
+ return ids.length > 0 && typeof ids[0] === 'string';
18
+ }
19
+ exports.isArrayOfDeviceSerialNumbers = isArrayOfDeviceSerialNumbers;
20
+ function isObjectOfDeviceSerialNumberToValues(ids) {
21
+ return !Array.isArray(ids);
22
+ }
23
+ exports.isObjectOfDeviceSerialNumberToValues = isObjectOfDeviceSerialNumberToValues;
24
+ var RestoreDefaultParametersType;
25
+ (function (RestoreDefaultParametersType) {
26
+ RestoreDefaultParametersType[RestoreDefaultParametersType["RESTORE_ALL_DEFAULT_PARAMETERS"] = 1] = "RESTORE_ALL_DEFAULT_PARAMETERS";
27
+ RestoreDefaultParametersType[RestoreDefaultParametersType["RESTORE_MANUFACTURER_DEFAULT_PARAMETERS"] = 4] = "RESTORE_MANUFACTURER_DEFAULT_PARAMETERS";
28
+ })(RestoreDefaultParametersType = exports.RestoreDefaultParametersType || (exports.RestoreDefaultParametersType = {}));
29
29
  //# sourceMappingURL=types.js.map
package/src/lib/urls.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export declare const firmwarePackageBaseUrl = "https://synapticon.s3.amazonaws.com/somanet-software/releases/";
2
- export declare const listFirmwarePackagesUrl = "https://pc27e3jixd.execute-api.us-east-1.amazonaws.com/default/listFirmwarePackages";
3
- export declare function getFirmwarePackageUrl(filename: string): string;
1
+ export declare const firmwarePackageBaseUrl = "https://synapticon.s3.amazonaws.com/somanet-software/releases/";
2
+ export declare const listFirmwarePackagesUrl = "https://pc27e3jixd.execute-api.us-east-1.amazonaws.com/default/listFirmwarePackages";
3
+ export declare function getFirmwarePackageUrl(filename: string): string;
package/src/lib/urls.js CHANGED
@@ -1,10 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFirmwarePackageUrl = exports.listFirmwarePackagesUrl = exports.firmwarePackageBaseUrl = void 0;
4
- exports.firmwarePackageBaseUrl = 'https://synapticon.s3.amazonaws.com/somanet-software/releases/';
5
- exports.listFirmwarePackagesUrl = 'https://pc27e3jixd.execute-api.us-east-1.amazonaws.com/default/listFirmwarePackages';
6
- function getFirmwarePackageUrl(filename) {
7
- return exports.firmwarePackageBaseUrl + filename;
8
- }
9
- exports.getFirmwarePackageUrl = getFirmwarePackageUrl;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFirmwarePackageUrl = exports.listFirmwarePackagesUrl = exports.firmwarePackageBaseUrl = void 0;
4
+ exports.firmwarePackageBaseUrl = 'https://synapticon.s3.amazonaws.com/somanet-software/releases/';
5
+ exports.listFirmwarePackagesUrl = 'https://pc27e3jixd.execute-api.us-east-1.amazonaws.com/default/listFirmwarePackages';
6
+ function getFirmwarePackageUrl(filename) {
7
+ return exports.firmwarePackageBaseUrl + filename;
8
+ }
9
+ exports.getFirmwarePackageUrl = getFirmwarePackageUrl;
10
10
  //# sourceMappingURL=urls.js.map