motion-master-client 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +17 -2
- package/src/index.js +27 -0
- package/src/index.js.map +1 -0
- package/src/lib/cia402.d.ts +30 -0
- package/src/lib/cia402.js +112 -0
- package/src/lib/cia402.js.map +1 -0
- package/src/lib/device-log-line.d.ts +5 -0
- package/src/lib/device-log-line.js +3 -0
- package/src/lib/device-log-line.js.map +1 -0
- package/src/lib/device-parameter.d.ts +56 -0
- package/src/lib/device-parameter.js +39 -0
- package/src/lib/device-parameter.js.map +1 -0
- package/src/lib/device.d.ts +9 -0
- package/src/lib/device.js +3 -0
- package/src/lib/device.js.map +1 -0
- package/src/lib/examples/get-firmware-version-for-all-devices.d.ts +1 -0
- package/src/lib/examples/get-firmware-version-for-all-devices.js +15 -0
- package/src/lib/examples/get-firmware-version-for-all-devices.js.map +1 -0
- package/src/lib/hardware-description.d.ts +37 -0
- package/src/lib/hardware-description.js +48 -0
- package/src/lib/hardware-description.js.map +1 -0
- package/src/lib/logger.d.ts +1 -0
- package/src/lib/logger.js +8 -0
- package/src/lib/logger.js.map +1 -0
- package/src/lib/monitoring-config.d.ts +6 -0
- package/src/lib/monitoring-config.js +3 -0
- package/src/lib/monitoring-config.js.map +1 -0
- package/src/lib/{monitoring-entry.ts → monitoring-entry.d.ts} +4 -5
- package/src/lib/monitoring-entry.js +3 -0
- package/src/lib/monitoring-entry.js.map +1 -0
- package/src/lib/motion-master-client.d.ts +30 -0
- package/src/lib/motion-master-client.js +90 -0
- package/src/lib/motion-master-client.js.map +1 -0
- package/src/lib/motion-master-pub-sub-client.d.ts +16 -0
- package/src/lib/motion-master-pub-sub-client.js +68 -0
- package/src/lib/motion-master-pub-sub-client.js.map +1 -0
- package/src/lib/motion-master-pub-sub-socket.d.ts +28 -0
- package/src/lib/motion-master-pub-sub-socket.js +3 -0
- package/src/lib/motion-master-pub-sub-socket.js.map +1 -0
- package/src/lib/motion-master-pub-sub-web-socket.d.ts +13 -0
- package/src/lib/motion-master-pub-sub-web-socket.js +61 -0
- package/src/lib/motion-master-pub-sub-web-socket.js.map +1 -0
- package/src/lib/motion-master-pub-sub-worker-socket.d.ts +13 -0
- package/src/lib/motion-master-pub-sub-worker-socket.js +37 -0
- package/src/lib/motion-master-pub-sub-worker-socket.js.map +1 -0
- package/src/lib/motion-master-req-res-client.d.ts +836 -0
- package/src/lib/motion-master-req-res-client.js +1557 -0
- package/src/lib/motion-master-req-res-client.js.map +1 -0
- package/src/lib/motion-master-req-res-socket.d.ts +46 -0
- package/src/lib/motion-master-req-res-socket.js +3 -0
- package/src/lib/motion-master-req-res-socket.js.map +1 -0
- package/src/lib/motion-master-req-res-web-socket.d.ts +24 -0
- package/src/lib/motion-master-req-res-web-socket.js +108 -0
- package/src/lib/motion-master-req-res-web-socket.js.map +1 -0
- package/src/lib/motion-master-req-res-worker-socket.d.ts +19 -0
- package/src/lib/motion-master-req-res-worker-socket.js +61 -0
- package/src/lib/motion-master-req-res-worker-socket.js.map +1 -0
- package/src/lib/operators.d.ts +21 -0
- package/src/lib/operators.js +71 -0
- package/src/lib/operators.js.map +1 -0
- package/src/lib/options.d.ts +34 -0
- package/src/lib/options.js +38 -0
- package/src/lib/options.js.map +1 -0
- package/src/lib/parameter.d.ts +65 -0
- package/src/lib/parameter.js +70 -0
- package/src/lib/parameter.js.map +1 -0
- package/src/lib/product-id-range.d.ts +7 -0
- package/src/lib/product-id-range.js +12 -0
- package/src/lib/product-id-range.js.map +1 -0
- package/src/lib/request-status-resolver.d.ts +4 -0
- package/src/lib/request-status-resolver.js +345 -0
- package/src/lib/request-status-resolver.js.map +1 -0
- package/src/lib/system-log-line.d.ts +8 -0
- package/src/lib/system-log-line.js +3 -0
- package/src/lib/system-log-line.js.map +1 -0
- package/src/lib/types.d.ts +195 -0
- package/src/lib/types.js +23 -0
- package/src/lib/types.js.map +1 -0
- package/src/lib/urls.d.ts +3 -0
- package/src/lib/urls.js +10 -0
- package/src/lib/urls.js.map +1 -0
- package/src/lib/util.d.ts +30 -0
- package/src/lib/util.js +279 -0
- package/src/lib/util.js.map +1 -0
- package/.babelrc +0 -3
- package/.eslintrc.json +0 -18
- package/jest.config.ts +0 -15
- package/motion-master.proto +0 -1822
- package/project.json +0 -41
- package/src/lib/cia402.ts +0 -112
- package/src/lib/device-log-line.ts +0 -5
- package/src/lib/device-parameter.spec.ts +0 -85
- package/src/lib/device-parameter.ts +0 -79
- package/src/lib/device.ts +0 -10
- package/src/lib/examples/get-firmware-version-for-all-devices.ts +0 -18
- package/src/lib/hardware-description.spec.ts +0 -253
- package/src/lib/hardware-description.ts +0 -84
- package/src/lib/logger.ts +0 -5
- package/src/lib/monitoring-config.ts +0 -6
- package/src/lib/motion-master-client.ts +0 -126
- package/src/lib/motion-master-pub-sub-client.ts +0 -94
- package/src/lib/motion-master-pub-sub-socket.ts +0 -33
- package/src/lib/motion-master-pub-sub-web-socket.ts +0 -71
- package/src/lib/motion-master-pub-sub-worker-socket.ts +0 -46
- package/src/lib/motion-master-req-res-client.spec.ts +0 -740
- package/src/lib/motion-master-req-res-client.ts +0 -1974
- package/src/lib/motion-master-req-res-socket.ts +0 -55
- package/src/lib/motion-master-req-res-web-socket.ts +0 -131
- package/src/lib/motion-master-req-res-worker-socket.ts +0 -75
- package/src/lib/operators.ts +0 -93
- package/src/lib/options.ts +0 -38
- package/src/lib/parameter.spec.ts +0 -81
- package/src/lib/parameter.ts +0 -123
- package/src/lib/product-id-range.ts +0 -8
- package/src/lib/request-status-resolver.ts +0 -403
- package/src/lib/system-log-line.ts +0 -8
- package/src/lib/types.ts +0 -123
- package/src/lib/urls.ts +0 -6
- package/src/lib/util.ts +0 -267
- package/tsconfig.json +0 -23
- package/tsconfig.lib.json +0 -10
- package/tsconfig.spec.json +0 -20
- package/typedoc.json +0 -10
- /package/src/{index.ts → index.d.ts} +0 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { Long } from "protobufjs";
|
|
2
|
+
import { motionmaster } from "./motion-master.proto";
|
|
3
|
+
export import MotionMasterMessage = motionmaster.MotionMasterMessage;
|
|
4
|
+
export declare type StatusKey = keyof MotionMasterMessage.IStatus;
|
|
5
|
+
export declare type RequestStatus = 'succeeded' | 'failed' | 'running';
|
|
6
|
+
export declare class RequestError extends Error {
|
|
7
|
+
}
|
|
8
|
+
export declare type ParameterAddress = [number, number];
|
|
9
|
+
export declare type ParameterTypeValue = Omit<MotionMasterMessage.Request.SetDeviceParameterValues.IParameterValue, 'index' | 'subindex'>;
|
|
10
|
+
export declare type ParameterTypeValueKey = keyof ParameterTypeValue;
|
|
11
|
+
export declare type ParameterValueType = string | number | Long | Uint8Array;
|
|
12
|
+
export declare type ParameterAddressValue = [number, number, ParameterValueType, ParameterTypeValueKey?];
|
|
13
|
+
export declare type DeviceRefObj = {
|
|
14
|
+
deviceAddress?: (number | null);
|
|
15
|
+
deviceSerialNumber?: (string | null);
|
|
16
|
+
devicePosition?: (number | null);
|
|
17
|
+
};
|
|
18
|
+
export declare type DeviceRef = number | string;
|
|
19
|
+
export declare type ParameterInfoAndValue = MotionMasterMessage.Status.DeviceParameterInfo.IParameter & MotionMasterMessage.Status.DeviceParameterValues.IParameterValue;
|
|
20
|
+
export import EthercatNetworkState = MotionMasterMessage.Request.SetEthercatNetworkState.State;
|
|
21
|
+
export import ControllerType = MotionMasterMessage.Request.EnableMotionController.ControllerType;
|
|
22
|
+
export declare type GetDeviceParameterInfoRequest = MotionMasterMessage.Request.IGetDeviceParameterInfo & DeviceRefObj;
|
|
23
|
+
export declare type GetDeviceParameterValuesRequest = MotionMasterMessage.Request.IGetDeviceParameterValues & DeviceRefObj;
|
|
24
|
+
export declare type GetMultiDeviceParameterValuesRequest = MotionMasterMessage.Request.IGetMultiDeviceParameterValues;
|
|
25
|
+
export declare type SetDeviceParameterValuesRequest = MotionMasterMessage.Request.ISetDeviceParameterValues & DeviceRefObj;
|
|
26
|
+
export declare type SetMultiDeviceParameterValuesRequest = MotionMasterMessage.Request.ISetMultiDeviceParameterValues;
|
|
27
|
+
export declare type GetDeviceFileListRequest = MotionMasterMessage.Request.IGetDeviceFileList & DeviceRefObj;
|
|
28
|
+
export declare type GetDeviceFileRequest = MotionMasterMessage.Request.IGetDeviceFile & DeviceRefObj;
|
|
29
|
+
export declare type SetDeviceFileRequest = MotionMasterMessage.Request.ISetDeviceFile & DeviceRefObj;
|
|
30
|
+
export declare type DeleteDeviceFileRequest = MotionMasterMessage.Request.IDeleteDeviceFile & DeviceRefObj;
|
|
31
|
+
export declare type ResetDeviceFaultRequest = MotionMasterMessage.Request.IResetDeviceFault & DeviceRefObj;
|
|
32
|
+
export declare type StopDeviceRequest = MotionMasterMessage.Request.IStopDevice & DeviceRefObj;
|
|
33
|
+
export declare type StartDeviceFirmwareInstallationRequest = MotionMasterMessage.Request.IStartDeviceFirmwareInstallation & DeviceRefObj;
|
|
34
|
+
export declare type GetDeviceLogRequest = MotionMasterMessage.Request.IGetDeviceLog & DeviceRefObj;
|
|
35
|
+
export declare type StartCoggingTorqueRecordingRequest = MotionMasterMessage.Request.IStartCoggingTorqueRecording & DeviceRefObj;
|
|
36
|
+
export declare type GetCoggingTorqueDataRequest = MotionMasterMessage.Request.IGetCoggingTorqueData & DeviceRefObj;
|
|
37
|
+
export declare type StartOffsetDetectionRequest = MotionMasterMessage.Request.IStartOffsetDetection & DeviceRefObj;
|
|
38
|
+
export declare type StartPlantModelIdentificationRequest = MotionMasterMessage.Request.IStartPlantIdentification;
|
|
39
|
+
export declare type ComputeAutoTuningGainsRequest = MotionMasterMessage.Request.IComputeAutoTuningGains & DeviceRefObj;
|
|
40
|
+
export declare type SetMotionControllerParametersRequest = MotionMasterMessage.Request.ISetMotionControllerParameters & DeviceRefObj;
|
|
41
|
+
export declare type EnableMotionControllerRequest = MotionMasterMessage.Request.IEnableMotionController & DeviceRefObj;
|
|
42
|
+
export declare type DisableMotionControllerRequest = MotionMasterMessage.Request.IDisableMotionController & DeviceRefObj;
|
|
43
|
+
export declare type SetSignalGeneratorParametersRequest = MotionMasterMessage.Request.ISetSignalGeneratorParameters & DeviceRefObj;
|
|
44
|
+
export declare type StartSignalGeneratorRequest = MotionMasterMessage.Request.IStartSignalGenerator & DeviceRefObj;
|
|
45
|
+
export declare type StopSignalGeneratorRequest = MotionMasterMessage.Request.IStopSignalGenerator & DeviceRefObj;
|
|
46
|
+
export declare type StartMonitoringDeviceParameterValuesRequest = MotionMasterMessage.Request.IStartMonitoringDeviceParameterValues;
|
|
47
|
+
export declare type StopMonitoringDeviceParameterValuesRequest = MotionMasterMessage.Request.IStopMonitoringDeviceParameterValues;
|
|
48
|
+
export declare type GetEthercatNetworkStateRequest = MotionMasterMessage.Request.IGetEthercatNetworkState & DeviceRefObj;
|
|
49
|
+
export declare type SetEthercatNetworkStateRequest = MotionMasterMessage.Request.ISetEthercatNetworkState & DeviceRefObj;
|
|
50
|
+
export declare type StartNarrowAngleCalibrationRequest = MotionMasterMessage.Request.IStartNarrowAngleCalibration & DeviceRefObj;
|
|
51
|
+
export declare type SetSystemClientTimeoutRequest = MotionMasterMessage.Request.ISetSystemClientTimeout;
|
|
52
|
+
export declare type StartSystemIdentificationRequest = MotionMasterMessage.Request.IStartSystemIdentification & DeviceRefObj;
|
|
53
|
+
export declare type GetCirculoEncoderMagnetDistanceRequest = MotionMasterMessage.Request.IGetCirculoEncoderMagnetDistance & DeviceRefObj;
|
|
54
|
+
export declare type StartCirculoEncoderNarrowAngleCalibrationProcedureRequest = MotionMasterMessage.Request.IStartCirculoEncoderNarrowAngleCalibrationProcedure & DeviceRefObj;
|
|
55
|
+
export declare type GetDeviceCiA402StateRequest = MotionMasterMessage.Request.IGetDeviceCiA402State & DeviceRefObj;
|
|
56
|
+
export declare type SetDeviceCiA402StateRequest = MotionMasterMessage.Request.ISetDeviceCiA402State & DeviceRefObj;
|
|
57
|
+
export declare type StartDeviceSiiRestoreRequest = MotionMasterMessage.Request.IStartDeviceSiiRestore;
|
|
58
|
+
export declare type StartOpenLoopFieldControlRequest = MotionMasterMessage.Request.IStartOpenLoopFieldControl & DeviceRefObj;
|
|
59
|
+
export declare type ComputeFullAutoTuningGainsRequest = MotionMasterMessage.Request.IComputeFullAutoTuningGains & DeviceRefObj;
|
|
60
|
+
export declare type StartFullAutoTuningRequest = MotionMasterMessage.Request.IStartFullAutoTuning & DeviceRefObj;
|
|
61
|
+
export declare type StopFullAutoTuningRequest = MotionMasterMessage.Request.IStopFullAutoTuning & DeviceRefObj;
|
|
62
|
+
export declare type StartCirculoEncoderConfigurationRequest = MotionMasterMessage.Request.IStartCirculoEncoderConfiguration & DeviceRefObj;
|
|
63
|
+
export declare type StopCirculoEncoderNarrowAngleCalibrationProcedureRequest = MotionMasterMessage.Request.IStopCirculoEncoderNarrowAngleCalibrationProcedure & DeviceRefObj;
|
|
64
|
+
export declare type StartOsCommandRequest = MotionMasterMessage.Request.IStartOsCommand & DeviceRefObj;
|
|
65
|
+
export declare type SystemVersionStatus = MotionMasterMessage.Status.ISystemVersion & {
|
|
66
|
+
request: RequestStatus;
|
|
67
|
+
messageId?: string;
|
|
68
|
+
};
|
|
69
|
+
export declare type DeviceInfoStatus = MotionMasterMessage.Status.IDeviceInfo & {
|
|
70
|
+
request: RequestStatus;
|
|
71
|
+
messageId?: string;
|
|
72
|
+
};
|
|
73
|
+
export declare type DeviceParameterInfoStatus = MotionMasterMessage.Status.IDeviceParameterInfo & {
|
|
74
|
+
request: RequestStatus;
|
|
75
|
+
messageId?: string;
|
|
76
|
+
};
|
|
77
|
+
export declare type DeviceParameterValuesStatus = MotionMasterMessage.Status.IDeviceParameterValues & {
|
|
78
|
+
request: RequestStatus;
|
|
79
|
+
messageId?: string;
|
|
80
|
+
};
|
|
81
|
+
export declare type MultiDeviceParameterValuesStatus = MotionMasterMessage.Status.IMultiDeviceParameterValues & {
|
|
82
|
+
request: RequestStatus;
|
|
83
|
+
messageId?: string;
|
|
84
|
+
};
|
|
85
|
+
export declare type DeviceFileListStatus = MotionMasterMessage.Status.IDeviceFileList & {
|
|
86
|
+
request: RequestStatus;
|
|
87
|
+
messageId?: string;
|
|
88
|
+
};
|
|
89
|
+
export declare type DeviceFileStatus = MotionMasterMessage.Status.IDeviceFile & {
|
|
90
|
+
request: RequestStatus;
|
|
91
|
+
messageId?: string;
|
|
92
|
+
};
|
|
93
|
+
export declare type DeviceFaultResetStatus = MotionMasterMessage.Status.IDeviceFaultReset & {
|
|
94
|
+
request: RequestStatus;
|
|
95
|
+
messageId?: string;
|
|
96
|
+
};
|
|
97
|
+
export declare type DeviceStopStatus = MotionMasterMessage.Status.IDeviceStop & {
|
|
98
|
+
request: RequestStatus;
|
|
99
|
+
messageId?: string;
|
|
100
|
+
};
|
|
101
|
+
export declare type DeviceFirmwareInstallationStatus = MotionMasterMessage.Status.IDeviceFirmwareInstallation & {
|
|
102
|
+
request: RequestStatus;
|
|
103
|
+
messageId?: string;
|
|
104
|
+
};
|
|
105
|
+
export declare type DeviceLogStatus = MotionMasterMessage.Status.IDeviceLog & {
|
|
106
|
+
request: RequestStatus;
|
|
107
|
+
messageId?: string;
|
|
108
|
+
};
|
|
109
|
+
export declare type CoggingTorqueRecordingStatus = MotionMasterMessage.Status.ICoggingTorqueRecording & {
|
|
110
|
+
request: RequestStatus;
|
|
111
|
+
messageId?: string;
|
|
112
|
+
};
|
|
113
|
+
export declare type CoggingTorqueDataStatus = MotionMasterMessage.Status.ICoggingTorqueData & {
|
|
114
|
+
request: RequestStatus;
|
|
115
|
+
messageId?: string;
|
|
116
|
+
};
|
|
117
|
+
export declare type OffsetDetectionStatus = MotionMasterMessage.Status.IOffsetDetection & {
|
|
118
|
+
request: RequestStatus;
|
|
119
|
+
messageId?: string;
|
|
120
|
+
};
|
|
121
|
+
export declare type PlantIdentificationStatus = MotionMasterMessage.Status.IPlantIdentification & {
|
|
122
|
+
request: RequestStatus;
|
|
123
|
+
messageId?: string;
|
|
124
|
+
};
|
|
125
|
+
export declare type AutoTuningStatus = MotionMasterMessage.Status.IAutoTuning & {
|
|
126
|
+
request: RequestStatus;
|
|
127
|
+
messageId?: string;
|
|
128
|
+
};
|
|
129
|
+
export declare type MotionControllerStatus = MotionMasterMessage.Status.IMotionController & {
|
|
130
|
+
request: RequestStatus;
|
|
131
|
+
messageId?: string;
|
|
132
|
+
};
|
|
133
|
+
export declare type SignalGeneratorStatus = MotionMasterMessage.Status.ISignalGenerator & {
|
|
134
|
+
request: RequestStatus;
|
|
135
|
+
messageId?: string;
|
|
136
|
+
};
|
|
137
|
+
export declare type MonitoringParameterValuesStatus = MotionMasterMessage.Status.IMonitoringParameterValues & {
|
|
138
|
+
request: RequestStatus;
|
|
139
|
+
messageId?: string;
|
|
140
|
+
};
|
|
141
|
+
export declare type EthercatNetworkStateStatus = MotionMasterMessage.Status.IEthercatNetworkState & {
|
|
142
|
+
request: RequestStatus;
|
|
143
|
+
messageId?: string;
|
|
144
|
+
};
|
|
145
|
+
export declare type NarrowAngleCalibrationStatus = MotionMasterMessage.Status.INarrowAngleCalibration & {
|
|
146
|
+
request: RequestStatus;
|
|
147
|
+
messageId?: string;
|
|
148
|
+
};
|
|
149
|
+
export declare type SystemIdentificationStatus = MotionMasterMessage.Status.ISystemIdentification & {
|
|
150
|
+
request: RequestStatus;
|
|
151
|
+
messageId?: string;
|
|
152
|
+
};
|
|
153
|
+
export declare type CirculoEncoderMagnetDistanceStatus = MotionMasterMessage.Status.ICirculoEncoderMagnetDistance & {
|
|
154
|
+
request: RequestStatus;
|
|
155
|
+
messageId?: string;
|
|
156
|
+
};
|
|
157
|
+
export declare type CirculoEncoderNarrowAngleCalibrationProcedureStatus = MotionMasterMessage.Status.ICirculoEncoderNarrowAngleCalibrationProcedure & {
|
|
158
|
+
request: RequestStatus;
|
|
159
|
+
messageId?: string;
|
|
160
|
+
};
|
|
161
|
+
export declare type DeviceCiA402StateStatus = MotionMasterMessage.Status.IDeviceCiA402State & {
|
|
162
|
+
request: RequestStatus;
|
|
163
|
+
messageId?: string;
|
|
164
|
+
};
|
|
165
|
+
export declare type SystemLogStatus = MotionMasterMessage.Status.ISystemLog & {
|
|
166
|
+
request: RequestStatus;
|
|
167
|
+
messageId?: string;
|
|
168
|
+
};
|
|
169
|
+
export declare type DeviceSiiRestoreStatus = MotionMasterMessage.Status.IDeviceSiiRestore & {
|
|
170
|
+
request: RequestStatus;
|
|
171
|
+
messageId?: string;
|
|
172
|
+
};
|
|
173
|
+
export declare type OpenLoopFieldControlStatus = MotionMasterMessage.Status.IOpenLoopFieldControl & {
|
|
174
|
+
request: RequestStatus;
|
|
175
|
+
messageId?: string;
|
|
176
|
+
};
|
|
177
|
+
export declare type FullAutoTuningStatus = MotionMasterMessage.Status.IFullAutoTuning & {
|
|
178
|
+
request: RequestStatus;
|
|
179
|
+
messageId?: string;
|
|
180
|
+
};
|
|
181
|
+
export declare type CirculoEncoderConfigurationStatus = MotionMasterMessage.Status.ICirculoEncoderConfiguration & {
|
|
182
|
+
request: RequestStatus;
|
|
183
|
+
messageId?: string;
|
|
184
|
+
};
|
|
185
|
+
export declare type OsCommandStatus = MotionMasterMessage.Status.IOsCommand & {
|
|
186
|
+
request: RequestStatus;
|
|
187
|
+
messageId?: string;
|
|
188
|
+
};
|
|
189
|
+
export import ValueType = MotionMasterMessage.Status.DeviceParameterInfo.Parameter.ValueType;
|
|
190
|
+
export declare function isArrayOfDeviceSerialNumbers(ids: string[] | [DeviceRef, number, number][]): ids is string[];
|
|
191
|
+
export declare function isObjectOfDeviceSerialNumberToValues(ids: {
|
|
192
|
+
[deviceParameterId: string]: ParameterValueType;
|
|
193
|
+
} | [DeviceRef, number, number, ParameterValueType, ParameterTypeValueKey?][]): ids is {
|
|
194
|
+
[deviceParameterId: string]: ParameterValueType;
|
|
195
|
+
};
|
package/src/lib/types.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
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
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10
|
+
exports.EthercatNetworkState = exports.MotionMasterMessage.Request.SetEthercatNetworkState.State;
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12
|
+
exports.ControllerType = exports.MotionMasterMessage.Request.EnableMotionController.ControllerType;
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14
|
+
exports.ValueType = exports.MotionMasterMessage.Status.DeviceParameterInfo.Parameter.ValueType;
|
|
15
|
+
function isArrayOfDeviceSerialNumbers(ids) {
|
|
16
|
+
return ids.length > 0 && typeof ids[0] === 'string';
|
|
17
|
+
}
|
|
18
|
+
exports.isArrayOfDeviceSerialNumbers = isArrayOfDeviceSerialNumbers;
|
|
19
|
+
function isObjectOfDeviceSerialNumberToValues(ids) {
|
|
20
|
+
return !Array.isArray(ids);
|
|
21
|
+
}
|
|
22
|
+
exports.isObjectOfDeviceSerialNumberToValues = isObjectOfDeviceSerialNumberToValues;
|
|
23
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/types.ts"],"names":[],"mappings":";;;AACA,+DAAqD;AAEvC,QAAA,mBAAmB,GAAG,kCAAY,CAAC,mBAAmB,CAAC;AASrE,MAAa,YAAa,SAAQ,KAAK;CAAI;AAA3C,oCAA2C;AAmB3C,6DAA6D;AAC/C,QAAA,oBAAoB,GAAG,2BAAmB,CAAC,OAAO,CAAC,uBAAuB,CAAC,KAAK,CAAC;AAE/F,6DAA6D;AAC/C,QAAA,cAAc,GAAG,2BAAmB,CAAC,OAAO,CAAC,sBAAsB,CAAC,cAAc,CAAC;AA8EjG,6DAA6D;AAC/C,QAAA,SAAS,GAAG,2BAAmB,CAAC,MAAM,CAAC,mBAAmB,CAAC,SAAS,CAAC,SAAS,CAAC;AAE7F,SAAgB,4BAA4B,CAAC,GAA6C;IACxF,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC;AACtD,CAAC;AAFD,oEAEC;AAED,SAAgB,oCAAoC,CAAC,GAAoI;IACvL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC;AAFD,oFAEC"}
|
|
@@ -0,0 +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;
|
package/src/lib/urls.js
ADDED
|
@@ -0,0 +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;
|
|
10
|
+
//# sourceMappingURL=urls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urls.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/urls.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG,gEAAgE,CAAC;AAC1F,QAAA,uBAAuB,GAAG,qFAAqF,CAAC;AAE7H,SAAgB,qBAAqB,CAAC,QAAgB;IACpD,OAAO,8BAAsB,GAAG,QAAQ,CAAC;AAC3C,CAAC;AAFD,sDAEC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DeviceLogLine } from "./device-log-line";
|
|
2
|
+
import { Parameter, ParameterIndexSubindex } from "./parameter";
|
|
3
|
+
import { SystemLogLine } from "./system-log-line";
|
|
4
|
+
import { DeviceRef, DeviceRefObj, MotionMasterMessage, ParameterAddressValue, ParameterTypeValue, ParameterTypeValueKey, ParameterValueType, ValueType } from "./types";
|
|
5
|
+
export declare function getParameterTypeValueDefault(key: ParameterTypeValueKey): 0 | Uint8Array | "";
|
|
6
|
+
export declare function getParameterTypeValue(parameter: MotionMasterMessage.Status.DeviceParameterValues.IParameterValue): ParameterTypeValueKey | undefined;
|
|
7
|
+
export declare function getParameterValue(parameter: MotionMasterMessage.Status.DeviceParameterValues.IParameterValue): ParameterValueType;
|
|
8
|
+
export declare function makeDeviceRefObj(deviceRef: DeviceRef): DeviceRefObj;
|
|
9
|
+
export declare function parseSystemLogLine(line: string): SystemLogLine | undefined;
|
|
10
|
+
export declare function parseSystemLogContent(content: string): SystemLogLine[];
|
|
11
|
+
export declare function parseDeviceLog(line: string): DeviceLogLine | undefined;
|
|
12
|
+
export declare function parseDeviceLogContent(content: string): DeviceLogLine[];
|
|
13
|
+
export declare function mapParameterTypeValueToObject(type: keyof ParameterTypeValue, value: number | string): ParameterTypeValue;
|
|
14
|
+
export declare function createPlainObjectFromMotionMasterMessage(motionMasterMessage: MotionMasterMessage): any;
|
|
15
|
+
export declare function decodeTextContent(content: Uint8Array): string;
|
|
16
|
+
export declare function isRxPdoIndex(index: number): boolean;
|
|
17
|
+
export declare function isTxPdoIndex(index: number): boolean;
|
|
18
|
+
export declare function filterRxPdoParameters<T extends ParameterIndexSubindex>(parameters: T[], excludeSubIndex000?: boolean): T[];
|
|
19
|
+
export declare function filterTxPdoParameters<T extends ParameterIndexSubindex>(parameters: T[], excludeSubIndex000?: boolean): T[];
|
|
20
|
+
export declare function fillPdoParametersWithMappingEntries(parameters: Parameter[], entriesPerPdo?: number): Parameter[];
|
|
21
|
+
export declare function mapParameterToPdoSubItemValue(parameter: Parameter): number;
|
|
22
|
+
export declare function mapValueTypeToBitSize(valueType: ValueType): number;
|
|
23
|
+
export declare const valueTypeToParameterTypeValueKeyMap: Map<ValueType, "intValue" | "uintValue" | "floatValue" | "stringValue" | "rawValue">;
|
|
24
|
+
export declare function isValidDeviceRefObj(obj: DeviceRefObj): boolean;
|
|
25
|
+
export declare function createPdoParameterValues(parameters: Array<{
|
|
26
|
+
index: number;
|
|
27
|
+
subindex: number;
|
|
28
|
+
typeValue?: ParameterTypeValueKey;
|
|
29
|
+
}>, values: Array<ParameterValueType>): ParameterAddressValue[];
|
|
30
|
+
export declare function resolveAfter(ms: number, value?: unknown): Promise<unknown>;
|
package/src/lib/util.js
ADDED
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveAfter = exports.createPdoParameterValues = exports.isValidDeviceRefObj = exports.valueTypeToParameterTypeValueKeyMap = exports.mapValueTypeToBitSize = exports.mapParameterToPdoSubItemValue = exports.fillPdoParametersWithMappingEntries = exports.filterTxPdoParameters = exports.filterRxPdoParameters = exports.isTxPdoIndex = exports.isRxPdoIndex = exports.decodeTextContent = exports.createPlainObjectFromMotionMasterMessage = exports.mapParameterTypeValueToObject = exports.parseDeviceLogContent = exports.parseDeviceLog = exports.parseSystemLogContent = exports.parseSystemLogLine = exports.makeDeviceRefObj = exports.getParameterValue = exports.getParameterTypeValue = exports.getParameterTypeValueDefault = void 0;
|
|
4
|
+
const lodash_1 = require("lodash");
|
|
5
|
+
const types_1 = require("./types");
|
|
6
|
+
function getParameterTypeValueDefault(key) {
|
|
7
|
+
if (key === 'floatValue' || key === 'intValue' || key === 'uintValue') {
|
|
8
|
+
return 0;
|
|
9
|
+
}
|
|
10
|
+
else if (key === 'rawValue') {
|
|
11
|
+
return Uint8Array.from([]);
|
|
12
|
+
}
|
|
13
|
+
else if (key === 'stringValue') {
|
|
14
|
+
return '';
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.getParameterTypeValueDefault = getParameterTypeValueDefault;
|
|
21
|
+
function getParameterTypeValue(parameter) {
|
|
22
|
+
return (types_1.MotionMasterMessage.Status.DeviceParameterValues.ParameterValue.create(parameter)).typeValue;
|
|
23
|
+
}
|
|
24
|
+
exports.getParameterTypeValue = getParameterTypeValue;
|
|
25
|
+
function getParameterValue(parameter) {
|
|
26
|
+
var _a;
|
|
27
|
+
const key = getParameterTypeValue(parameter);
|
|
28
|
+
if (key && key in parameter) {
|
|
29
|
+
return (_a = parameter[key]) !== null && _a !== void 0 ? _a : getParameterTypeValueDefault(key);
|
|
30
|
+
}
|
|
31
|
+
return 0;
|
|
32
|
+
}
|
|
33
|
+
exports.getParameterValue = getParameterValue;
|
|
34
|
+
function makeDeviceRefObj(deviceRef) {
|
|
35
|
+
if (typeof deviceRef === 'number') {
|
|
36
|
+
if (deviceRef <= 0xFFFF) {
|
|
37
|
+
return { devicePosition: deviceRef };
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
return { deviceAddress: deviceRef };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return { deviceSerialNumber: deviceRef };
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.makeDeviceRefObj = makeDeviceRefObj;
|
|
48
|
+
function parseSystemLogLine(line) {
|
|
49
|
+
const re = /(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d+)\s\((.*)\)\s\[(.*)\]\s(.*:\d+)\s(.*)\|(.*)$/gm;
|
|
50
|
+
const result = re.exec(line);
|
|
51
|
+
if (result) {
|
|
52
|
+
return {
|
|
53
|
+
date: new Date(result[1]),
|
|
54
|
+
uptime: result[2].trim(),
|
|
55
|
+
id: result[3].trim(),
|
|
56
|
+
file: result[4].trim(),
|
|
57
|
+
level: result[5].trim(),
|
|
58
|
+
message: result[6].trim(),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
exports.parseSystemLogLine = parseSystemLogLine;
|
|
64
|
+
function parseSystemLogContent(content) {
|
|
65
|
+
return content.split('\n')
|
|
66
|
+
.map((v) => parseSystemLogLine(v))
|
|
67
|
+
.filter((l) => l !== undefined);
|
|
68
|
+
}
|
|
69
|
+
exports.parseSystemLogContent = parseSystemLogContent;
|
|
70
|
+
function parseDeviceLog(line) {
|
|
71
|
+
const re = /^(\d{2}:\d{2}:\d{2}\.\d+)\s(.*)\|(.*)$/gm;
|
|
72
|
+
const result = re.exec(line);
|
|
73
|
+
if (result) {
|
|
74
|
+
return {
|
|
75
|
+
time: result[1].trim(),
|
|
76
|
+
level: result[2].trim(),
|
|
77
|
+
message: result[3].trim(),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
exports.parseDeviceLog = parseDeviceLog;
|
|
83
|
+
function parseDeviceLogContent(content) {
|
|
84
|
+
return content.split('\n')
|
|
85
|
+
.map((v) => parseDeviceLog(v))
|
|
86
|
+
.filter((l) => l !== undefined);
|
|
87
|
+
}
|
|
88
|
+
exports.parseDeviceLogContent = parseDeviceLogContent;
|
|
89
|
+
function mapParameterTypeValueToObject(type, value) {
|
|
90
|
+
var _a, _b;
|
|
91
|
+
const p = {};
|
|
92
|
+
if (type === 'floatValue') {
|
|
93
|
+
p['floatValue'] = typeof value === 'number' ? value : parseFloat(value);
|
|
94
|
+
}
|
|
95
|
+
else if (type === 'intValue') {
|
|
96
|
+
p['intValue'] = typeof value === 'number' ? value : parseInt(value, 10);
|
|
97
|
+
}
|
|
98
|
+
else if (type === 'rawValue') {
|
|
99
|
+
if (typeof value === 'number') {
|
|
100
|
+
p['rawValue'] = Uint8Array.from([value]);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
let bytes = [];
|
|
104
|
+
if (value.startsWith('0x')) {
|
|
105
|
+
bytes = (_b = (_a = value.slice(2).match(/.{1,2}/g)) === null || _a === void 0 ? void 0 : _a.map((h) => parseInt(h, 16))) !== null && _b !== void 0 ? _b : [];
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
bytes = value.split(',').map((c) => c.trim()).map((c) => parseInt(c, 10));
|
|
109
|
+
}
|
|
110
|
+
p['rawValue'] = Uint8Array.from(bytes);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else if (type === 'stringValue') {
|
|
114
|
+
p['stringValue'] = typeof value === 'string' ? value : value.toString();
|
|
115
|
+
}
|
|
116
|
+
else if (type === 'uintValue') {
|
|
117
|
+
p['uintValue'] = typeof value === 'number' ? value : parseInt(value, 10);
|
|
118
|
+
}
|
|
119
|
+
return p;
|
|
120
|
+
}
|
|
121
|
+
exports.mapParameterTypeValueToObject = mapParameterTypeValueToObject;
|
|
122
|
+
// Using bytes fixes: ERROR TypeError: Cannot freeze array buffer views with elements in NgRx
|
|
123
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
124
|
+
function createPlainObjectFromMotionMasterMessage(motionMasterMessage) {
|
|
125
|
+
return types_1.MotionMasterMessage.toObject(motionMasterMessage, {
|
|
126
|
+
arrays: true,
|
|
127
|
+
bytes: Array,
|
|
128
|
+
defaults: true,
|
|
129
|
+
objects: true,
|
|
130
|
+
oneofs: true, // includes virtual oneof fields set to the present field's name
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
exports.createPlainObjectFromMotionMasterMessage = createPlainObjectFromMotionMasterMessage;
|
|
134
|
+
function decodeTextContent(content) {
|
|
135
|
+
const decoder = new TextDecoder();
|
|
136
|
+
const buffer = Uint8Array.from(content);
|
|
137
|
+
return decoder.decode(buffer);
|
|
138
|
+
}
|
|
139
|
+
exports.decodeTextContent = decodeTextContent;
|
|
140
|
+
function isRxPdoIndex(index) {
|
|
141
|
+
return (0, lodash_1.inRange)(index, 0x1600, 0x1800);
|
|
142
|
+
}
|
|
143
|
+
exports.isRxPdoIndex = isRxPdoIndex;
|
|
144
|
+
function isTxPdoIndex(index) {
|
|
145
|
+
return (0, lodash_1.inRange)(index, 0x1A00, 0x1C00);
|
|
146
|
+
}
|
|
147
|
+
exports.isTxPdoIndex = isTxPdoIndex;
|
|
148
|
+
function filterRxPdoParameters(parameters, excludeSubIndex000 = false) {
|
|
149
|
+
return parameters.filter((p) => isRxPdoIndex(p.index) && (excludeSubIndex000 ? p.subindex > 0 : true)); // RxPDOs: Index area 0x1600 to 0x17FF
|
|
150
|
+
}
|
|
151
|
+
exports.filterRxPdoParameters = filterRxPdoParameters;
|
|
152
|
+
function filterTxPdoParameters(parameters, excludeSubIndex000 = false) {
|
|
153
|
+
return parameters.filter((p) => isTxPdoIndex(p.index) && (excludeSubIndex000 ? p.subindex > 0 : true)); // TxPDOs: Index area 0x1A00 to 0x1BFF
|
|
154
|
+
}
|
|
155
|
+
exports.filterTxPdoParameters = filterTxPdoParameters;
|
|
156
|
+
function fillPdoParametersWithMappingEntries(parameters, entriesPerPdo = 10) {
|
|
157
|
+
const output = [];
|
|
158
|
+
let i = 0;
|
|
159
|
+
while (i < parameters.length) {
|
|
160
|
+
if (parameters[i].subindex === 0) {
|
|
161
|
+
let j = i;
|
|
162
|
+
while (parameters[j] && (parameters[j].index === parameters[i].index)) {
|
|
163
|
+
output.push(parameters[j]);
|
|
164
|
+
j++;
|
|
165
|
+
}
|
|
166
|
+
let d = j - i;
|
|
167
|
+
while (d <= entriesPerPdo) {
|
|
168
|
+
output.push({
|
|
169
|
+
index: parameters[i].index,
|
|
170
|
+
subindex: d,
|
|
171
|
+
name: parameters[i].name,
|
|
172
|
+
uintValue: 0,
|
|
173
|
+
value: 0,
|
|
174
|
+
valueType: types_1.ValueType.UNSIGNED32,
|
|
175
|
+
group: parameters[i].group,
|
|
176
|
+
typeValue: "uintValue",
|
|
177
|
+
readAccess: true,
|
|
178
|
+
writeAccess: true,
|
|
179
|
+
});
|
|
180
|
+
d++;
|
|
181
|
+
}
|
|
182
|
+
i = j;
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
i++;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return output;
|
|
189
|
+
}
|
|
190
|
+
exports.fillPdoParametersWithMappingEntries = fillPdoParametersWithMappingEntries;
|
|
191
|
+
function mapParameterToPdoSubItemValue(parameter) {
|
|
192
|
+
const { index, subindex } = parameter;
|
|
193
|
+
if (parameter.valueType && parameter.valueType < types_1.ValueType.VISIBLE_STRING) {
|
|
194
|
+
const buffer = new ArrayBuffer(4);
|
|
195
|
+
const view = new DataView(buffer);
|
|
196
|
+
const bitSize = mapValueTypeToBitSize(parameter.valueType);
|
|
197
|
+
view.setUint16(0, index);
|
|
198
|
+
view.setUint8(2, subindex);
|
|
199
|
+
view.setUint8(3, bitSize);
|
|
200
|
+
return view.getUint32(0);
|
|
201
|
+
}
|
|
202
|
+
return 0;
|
|
203
|
+
}
|
|
204
|
+
exports.mapParameterToPdoSubItemValue = mapParameterToPdoSubItemValue;
|
|
205
|
+
function mapValueTypeToBitSize(valueType) {
|
|
206
|
+
switch (valueType) {
|
|
207
|
+
case types_1.ValueType.UNSPECIFIED:
|
|
208
|
+
return 0;
|
|
209
|
+
case types_1.ValueType.BOOLEAN:
|
|
210
|
+
return 1;
|
|
211
|
+
case types_1.ValueType.INTEGER8:
|
|
212
|
+
case types_1.ValueType.UNSIGNED8:
|
|
213
|
+
return 8;
|
|
214
|
+
case types_1.ValueType.INTEGER16:
|
|
215
|
+
case types_1.ValueType.UNSIGNED16:
|
|
216
|
+
return 16;
|
|
217
|
+
case types_1.ValueType.INTEGER32:
|
|
218
|
+
case types_1.ValueType.UNSIGNED32:
|
|
219
|
+
case types_1.ValueType.REAL32:
|
|
220
|
+
return 32;
|
|
221
|
+
}
|
|
222
|
+
throw new Error(`Non-numeric value type "${valueType}" (data types with variable length) cannot be mapped to bit size. You will have to get this info from ESI.`);
|
|
223
|
+
}
|
|
224
|
+
exports.mapValueTypeToBitSize = mapValueTypeToBitSize;
|
|
225
|
+
exports.valueTypeToParameterTypeValueKeyMap = new Map([
|
|
226
|
+
[types_1.ValueType.BOOLEAN, 'uintValue'],
|
|
227
|
+
[types_1.ValueType.INTEGER8, 'intValue'],
|
|
228
|
+
[types_1.ValueType.INTEGER16, 'intValue'],
|
|
229
|
+
[types_1.ValueType.INTEGER32, 'intValue'],
|
|
230
|
+
[types_1.ValueType.UNSIGNED8, 'uintValue'],
|
|
231
|
+
[types_1.ValueType.UNSIGNED16, 'uintValue'],
|
|
232
|
+
[types_1.ValueType.UNSIGNED32, 'uintValue'],
|
|
233
|
+
[types_1.ValueType.REAL32, 'floatValue'],
|
|
234
|
+
[types_1.ValueType.VISIBLE_STRING, 'stringValue'],
|
|
235
|
+
[types_1.ValueType.OCTET_STRING, 'stringValue'],
|
|
236
|
+
[types_1.ValueType.UNICODE_STRING, 'stringValue'],
|
|
237
|
+
]);
|
|
238
|
+
function isValidDeviceRefObj(obj) {
|
|
239
|
+
return Number.isFinite(Number(obj.deviceAddress))
|
|
240
|
+
|| (typeof obj.devicePosition === 'number' && obj.devicePosition >= 0)
|
|
241
|
+
|| typeof obj.deviceSerialNumber === 'string';
|
|
242
|
+
}
|
|
243
|
+
exports.isValidDeviceRefObj = isValidDeviceRefObj;
|
|
244
|
+
function createPdoParameterValues(parameters, values) {
|
|
245
|
+
const output = parameters.map((parameter, i, arr) => {
|
|
246
|
+
const { index, subindex, typeValue } = parameter;
|
|
247
|
+
let value = values[i];
|
|
248
|
+
if (subindex === 0) {
|
|
249
|
+
value = arr.reduce((n, p, j) => (p.index === index && p.subindex > 0 && values[j]) ? n + 1 : n, 0);
|
|
250
|
+
}
|
|
251
|
+
return [index, subindex, value, typeValue];
|
|
252
|
+
});
|
|
253
|
+
for (let i = 0; i < output.length - 1; i++) {
|
|
254
|
+
const [, subindex1, value1] = output[i];
|
|
255
|
+
if (subindex1 > 0 && value1 === 0) {
|
|
256
|
+
let j = i + 1;
|
|
257
|
+
let [, subindex2, value2] = output[j];
|
|
258
|
+
while (subindex2 > subindex1 && output[j]) {
|
|
259
|
+
if (value2 > 0) {
|
|
260
|
+
output[i][2] = value2;
|
|
261
|
+
output[j][2] = 0;
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
if (output[++j]) {
|
|
265
|
+
[, subindex2, value2] = output[j];
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return output;
|
|
271
|
+
}
|
|
272
|
+
exports.createPdoParameterValues = createPdoParameterValues;
|
|
273
|
+
function resolveAfter(ms, value) {
|
|
274
|
+
return new Promise(function (resolve) {
|
|
275
|
+
setTimeout(resolve.bind(null, value), ms);
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
exports.resolveAfter = resolveAfter;
|
|
279
|
+
//# sourceMappingURL=util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/util.ts"],"names":[],"mappings":";;;AAAA,mCAAiC;AAIjC,mCAAwK;AAExK,SAAgB,4BAA4B,CAAC,GAA0B;IACrE,IAAI,GAAG,KAAK,YAAY,IAAI,GAAG,KAAK,UAAU,IAAI,GAAG,KAAK,WAAW,EAAE;QACrE,OAAO,CAAC,CAAC;KACV;SAAM,IAAI,GAAG,KAAK,UAA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AE;YACjC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACd,IAAI,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACtC,OAAO,SAAS,GAAG,SAAS,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE;gBACzC,IAAI,MAAM,GAAG,CAAC,EAAE;oBACd,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;oBACtB,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;oBACjB,MAAM;iBACP;gBACD,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE;oBACf,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;iBACnC;aACF;SACF;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AA7BD,4DA6BC;AAED,SAAgB,YAAY,CAAC,EAAU,EAAE,KAAe;IACtD,OAAO,IAAI,OAAO,CAAC,UAAU,OAAO;QAClC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,oCAIC"}
|
package/.babelrc
DELETED
package/.eslintrc.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": ["../../.eslintrc.json"],
|
|
3
|
-
"ignorePatterns": ["!**/*"],
|
|
4
|
-
"overrides": [
|
|
5
|
-
{
|
|
6
|
-
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
7
|
-
"rules": {}
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"files": ["*.ts", "*.tsx"],
|
|
11
|
-
"rules": {}
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"files": ["*.js", "*.jsx"],
|
|
15
|
-
"rules": {}
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
}
|
package/jest.config.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
export default {
|
|
3
|
-
displayName: 'motion-master-client',
|
|
4
|
-
preset: '../../jest.preset.js',
|
|
5
|
-
globals: {
|
|
6
|
-
'ts-jest': {
|
|
7
|
-
tsconfig: '<rootDir>/tsconfig.spec.json',
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
transform: {
|
|
11
|
-
'^.+\\.[tj]sx?$': 'ts-jest',
|
|
12
|
-
},
|
|
13
|
-
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
|
14
|
-
coverageDirectory: '../../coverage/libs/motion-master-client',
|
|
15
|
-
};
|