motion-master-client 0.0.1 → 0.0.2
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/.babelrc +3 -0
- package/.eslintrc.json +18 -0
- package/README.md +44 -2
- package/jest.config.ts +15 -0
- package/motion-master.proto +1822 -0
- package/package.json +6 -9
- package/src/{index.d.ts → index.ts} +1 -0
- package/src/lib/device-log-line.ts +5 -0
- package/src/lib/device-parameter.spec.ts +85 -0
- package/src/lib/device-parameter.ts +69 -0
- package/src/lib/hardware-description.spec.ts +223 -0
- package/src/lib/hardware-description.ts +79 -0
- package/src/lib/logger.ts +5 -0
- package/src/lib/monitoring-config.ts +6 -0
- package/src/lib/monitoring-entry.ts +11 -0
- package/src/lib/motion-master-client.ts +94 -0
- package/src/lib/motion-master-pub-sub-client.ts +94 -0
- package/src/lib/motion-master-pub-sub-socket.ts +33 -0
- package/src/lib/motion-master-pub-sub-web-socket.ts +71 -0
- package/src/lib/motion-master-pub-sub-worker-socket.ts +58 -0
- package/src/lib/motion-master-req-res-client.spec.ts +126 -0
- package/src/lib/motion-master-req-res-client.ts +1625 -0
- package/src/lib/motion-master-req-res-socket.ts +45 -0
- package/src/lib/motion-master-req-res-web-socket.ts +119 -0
- package/src/lib/motion-master-req-res-worker-socket.ts +63 -0
- package/src/lib/motion-master.proto.d.ts +5084 -0
- package/src/lib/motion-master.proto.js +52278 -0
- package/src/lib/operators.ts +93 -0
- package/src/lib/{options.js → options.ts} +7 -6
- package/src/lib/parameter.spec.ts +81 -0
- package/src/lib/parameter.ts +119 -0
- package/src/lib/request-status-resolver.ts +380 -0
- package/src/lib/system-log-line.ts +8 -0
- package/src/lib/types.ts +58 -0
- package/src/lib/{urls.js → urls.ts} +3 -3
- package/src/lib/util.ts +261 -0
- package/tsconfig.json +22 -0
- package/tsconfig.lib.json +10 -0
- package/tsconfig.spec.json +20 -0
- package/typedoc.json +10 -0
- package/src/index.js +0 -22
- package/src/index.js.map +0 -1
- package/src/lib/device-log-line.d.ts +0 -5
- package/src/lib/device-log-line.js +0 -2
- package/src/lib/device-log-line.js.map +0 -1
- package/src/lib/hardware-description.d.ts +0 -36
- package/src/lib/hardware-description.js +0 -38
- package/src/lib/hardware-description.js.map +0 -1
- package/src/lib/logger.d.ts +0 -1
- package/src/lib/logger.js +0 -5
- package/src/lib/logger.js.map +0 -1
- package/src/lib/monitoring-config.d.ts +0 -6
- package/src/lib/monitoring-config.js +0 -2
- package/src/lib/monitoring-config.js.map +0 -1
- package/src/lib/monitoring-entry.d.ts +0 -10
- package/src/lib/monitoring-entry.js +0 -2
- package/src/lib/monitoring-entry.js.map +0 -1
- package/src/lib/motion-master-client.d.ts +0 -18
- package/src/lib/motion-master-client.js +0 -48
- package/src/lib/motion-master-client.js.map +0 -1
- package/src/lib/motion-master-pub-sub-client.d.ts +0 -16
- package/src/lib/motion-master-pub-sub-client.js +0 -64
- package/src/lib/motion-master-pub-sub-client.js.map +0 -1
- package/src/lib/motion-master-pub-sub-socket.d.ts +0 -28
- package/src/lib/motion-master-pub-sub-socket.js +0 -2
- package/src/lib/motion-master-pub-sub-socket.js.map +0 -1
- package/src/lib/motion-master-pub-sub-web-socket.d.ts +0 -13
- package/src/lib/motion-master-pub-sub-web-socket.js +0 -57
- package/src/lib/motion-master-pub-sub-web-socket.js.map +0 -1
- package/src/lib/motion-master-pub-sub-worker-socket.d.ts +0 -16
- package/src/lib/motion-master-pub-sub-worker-socket.js +0 -37
- package/src/lib/motion-master-pub-sub-worker-socket.js.map +0 -1
- package/src/lib/motion-master-req-res-client.d.ts +0 -370
- package/src/lib/motion-master-req-res-client.js +0 -1067
- package/src/lib/motion-master-req-res-client.js.map +0 -1
- package/src/lib/motion-master-req-res-socket.d.ts +0 -38
- package/src/lib/motion-master-req-res-socket.js +0 -2
- package/src/lib/motion-master-req-res-socket.js.map +0 -1
- package/src/lib/motion-master-req-res-web-socket.d.ts +0 -20
- package/src/lib/motion-master-req-res-web-socket.js +0 -96
- package/src/lib/motion-master-req-res-web-socket.js.map +0 -1
- package/src/lib/motion-master-req-res-worker-socket.d.ts +0 -15
- package/src/lib/motion-master-req-res-worker-socket.js +0 -49
- package/src/lib/motion-master-req-res-worker-socket.js.map +0 -1
- package/src/lib/operators.d.ts +0 -21
- package/src/lib/operators.js +0 -62
- package/src/lib/operators.js.map +0 -1
- package/src/lib/options.d.ts +0 -10
- package/src/lib/options.js.map +0 -1
- package/src/lib/parameter.d.ts +0 -9
- package/src/lib/parameter.js +0 -2
- package/src/lib/parameter.js.map +0 -1
- package/src/lib/request-status-resolver.d.ts +0 -4
- package/src/lib/request-status-resolver.js +0 -320
- package/src/lib/request-status-resolver.js.map +0 -1
- package/src/lib/system-log-line.d.ts +0 -8
- package/src/lib/system-log-line.js +0 -2
- package/src/lib/system-log-line.js.map +0 -1
- package/src/lib/types.d.ts +0 -41
- package/src/lib/types.js +0 -9
- package/src/lib/types.js.map +0 -1
- package/src/lib/urls.d.ts +0 -3
- package/src/lib/urls.js.map +0 -1
- package/src/lib/util.d.ts +0 -33
- package/src/lib/util.js +0 -247
- package/src/lib/util.js.map +0 -1
package/src/lib/types.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { motionmaster } from "./motion-master.proto";
|
|
2
|
+
|
|
3
|
+
export import MotionMasterMessage = motionmaster.MotionMasterMessage;
|
|
4
|
+
|
|
5
|
+
export type StatusKey = keyof MotionMasterMessage.IStatus;
|
|
6
|
+
|
|
7
|
+
export type RequestStatus =
|
|
8
|
+
| 'succeeded'
|
|
9
|
+
| 'failed'
|
|
10
|
+
| 'running';
|
|
11
|
+
|
|
12
|
+
export class RequestError extends Error { }
|
|
13
|
+
|
|
14
|
+
export type ParameterAddress = [number, number]; // index, subindex
|
|
15
|
+
export type ParameterAddressValue = [number, number, number, ParameterTypeValueKey?]; // index, subindex, value, typeValue
|
|
16
|
+
export type ParameterTypeValue = Omit<MotionMasterMessage.Request.SetDeviceParameterValues.IParameterValue, 'index' | 'subindex'>;
|
|
17
|
+
export type ParameterTypeValueKey = keyof ParameterTypeValue;
|
|
18
|
+
export type ParameterValueType = number | string | Uint8Array;
|
|
19
|
+
|
|
20
|
+
export type DeviceRefObj = {
|
|
21
|
+
deviceAddress?: (number | null); // alredy defined in proto request messages
|
|
22
|
+
deviceSerialNumber?: (string | null);
|
|
23
|
+
devicePosition?: (number | null);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type ParameterInfoAndValue = MotionMasterMessage.Status.DeviceParameterInfo.IParameter
|
|
27
|
+
& MotionMasterMessage.Status.DeviceParameterValues.IParameterValue;
|
|
28
|
+
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
30
|
+
export import EthercatNetworkState = MotionMasterMessage.Request.SetEthercatNetworkState.State;
|
|
31
|
+
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33
|
+
export import ControllerType = MotionMasterMessage.Request.EnableMotionController.ControllerType;
|
|
34
|
+
|
|
35
|
+
export type ClientStatusProps = { request: RequestStatus, messageId?: string };
|
|
36
|
+
|
|
37
|
+
export type SystemVersionStatus = MotionMasterMessage.Status.ISystemVersion & ClientStatusProps;
|
|
38
|
+
export type SystemLogStatus = MotionMasterMessage.Status.ISystemLog & ClientStatusProps;
|
|
39
|
+
export type DeviceInfoStatus = MotionMasterMessage.Status.IDeviceInfo & ClientStatusProps;
|
|
40
|
+
export type DeviceParameterInfoStatus = MotionMasterMessage.Status.IDeviceParameterInfo & ClientStatusProps;
|
|
41
|
+
export type DeviceParameterValuesStatus = MotionMasterMessage.Status.IDeviceParameterValues & ClientStatusProps;
|
|
42
|
+
export type DeviceFileStatus = MotionMasterMessage.Status.IDeviceFile & ClientStatusProps;
|
|
43
|
+
export type DeviceFileListStatus = MotionMasterMessage.Status.IDeviceFileList & ClientStatusProps;
|
|
44
|
+
export type DeviceStopStatus = MotionMasterMessage.Status.IDeviceStop & ClientStatusProps;
|
|
45
|
+
export type DeviceFaultResetStatus = MotionMasterMessage.Status.IDeviceFaultReset & ClientStatusProps;
|
|
46
|
+
export type EthercatNetworkStateStatus = MotionMasterMessage.Status.IEthercatNetworkState & ClientStatusProps;
|
|
47
|
+
export type CoggingTorqueRecordingStatus = MotionMasterMessage.Status.ICoggingTorqueRecording & ClientStatusProps;
|
|
48
|
+
export type DeviceLogStatus = MotionMasterMessage.Status.IDeviceLog & ClientStatusProps;
|
|
49
|
+
export type MonitoringParameterValuesStatus = MotionMasterMessage.Status.IMonitoringParameterValues & ClientStatusProps;
|
|
50
|
+
export type CoggingTorqueDataStatus = MotionMasterMessage.Status.ICoggingTorqueData & ClientStatusProps;
|
|
51
|
+
export type OffsetDetectionStatus = MotionMasterMessage.Status.IOffsetDetection & ClientStatusProps;
|
|
52
|
+
export type SystemIdentificationStatus = MotionMasterMessage.Status.ISystemIdentification & ClientStatusProps;
|
|
53
|
+
export type CirculoEncoderMagnetDistanceStatus = MotionMasterMessage.Status.ICirculoEncoderMagnetDistance & ClientStatusProps;
|
|
54
|
+
export type DeviceFirmwareInstallationStatus = MotionMasterMessage.Status.IDeviceFirmwareInstallation & ClientStatusProps;
|
|
55
|
+
export type ComputeAutoTuningGainsStatus = MotionMasterMessage.Status.IAutoTuning & ClientStatusProps;
|
|
56
|
+
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
58
|
+
export import ValueType = MotionMasterMessage.Status.DeviceParameterInfo.Parameter.ValueType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const firmwarePackageBaseUrl = 'https://synapticon.s3.amazonaws.com/somanet-software/releases/';
|
|
2
2
|
export const listFirmwarePackagesUrl = 'https://pc27e3jixd.execute-api.us-east-1.amazonaws.com/default/listFirmwarePackages';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
|
|
4
|
+
export function getFirmwarePackageUrl(filename: string) {
|
|
5
|
+
return firmwarePackageBaseUrl + filename;
|
|
5
6
|
}
|
|
6
|
-
//# sourceMappingURL=urls.js.map
|
package/src/lib/util.ts
ADDED
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { inRange } from "lodash";
|
|
2
|
+
import { DeviceLogLine } from "./device-log-line";
|
|
3
|
+
import { Parameter, ParameterIndexSubindex } from "./parameter";
|
|
4
|
+
import { SystemLogLine } from "./system-log-line";
|
|
5
|
+
import { DeviceRefObj, MotionMasterMessage, ParameterAddressValue, ParameterTypeValue, ParameterTypeValueKey, ParameterValueType, ValueType } from "./types";
|
|
6
|
+
|
|
7
|
+
export function getParameterTypeValueDefault(key: ParameterTypeValueKey) {
|
|
8
|
+
if (key === 'floatValue' || key === 'intValue' || key === 'uintValue') {
|
|
9
|
+
return 0;
|
|
10
|
+
} else if (key === 'rawValue') {
|
|
11
|
+
return Uint8Array.from([]);
|
|
12
|
+
} else if (key === 'stringValue') {
|
|
13
|
+
return '';
|
|
14
|
+
} else {
|
|
15
|
+
return 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function getParameterTypeValue(parameter: MotionMasterMessage.Status.DeviceParameterValues.IParameterValue): ParameterTypeValueKey | undefined {
|
|
20
|
+
return (MotionMasterMessage.Status.DeviceParameterValues.ParameterValue.create(parameter)).typeValue;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function getParameterValue(parameter: MotionMasterMessage.Status.DeviceParameterValues.IParameterValue): ParameterValueType {
|
|
24
|
+
const key = getParameterTypeValue(parameter);
|
|
25
|
+
if (key && key in parameter) {
|
|
26
|
+
return parameter[key] ?? getParameterTypeValueDefault(key);
|
|
27
|
+
}
|
|
28
|
+
return 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function makeDeviceRefObj(deviceRef: number | string): DeviceRefObj {
|
|
32
|
+
if (typeof deviceRef === 'number') {
|
|
33
|
+
if (deviceRef <= 0xFFFF) {
|
|
34
|
+
return { devicePosition: deviceRef };
|
|
35
|
+
} else {
|
|
36
|
+
return { deviceAddress: deviceRef };
|
|
37
|
+
}
|
|
38
|
+
} else {
|
|
39
|
+
return { deviceSerialNumber: deviceRef };
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function parseSystemLogLine(line: string): SystemLogLine | undefined {
|
|
44
|
+
const re = /(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d+)\s\((.*)\)\s\[(.*)\]\s(.*:\d+)\s(.*)\|(.*)$/gm;
|
|
45
|
+
const result = re.exec(line);
|
|
46
|
+
if (result) {
|
|
47
|
+
return {
|
|
48
|
+
date: new Date(result[1]),
|
|
49
|
+
uptime: result[2].trim(),
|
|
50
|
+
id: result[3].trim(),
|
|
51
|
+
file: result[4].trim(),
|
|
52
|
+
level: result[5].trim(),
|
|
53
|
+
message: result[6].trim(),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function parseSystemLogContent(content: string): SystemLogLine[] {
|
|
60
|
+
return content.split('\n')
|
|
61
|
+
.map((v) => parseSystemLogLine(v))
|
|
62
|
+
.filter((l): l is SystemLogLine => l !== undefined);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function parseDeviceLog(line: string): DeviceLogLine | undefined {
|
|
66
|
+
const re = /^(\d{2}:\d{2}:\d{2}\.\d+)\s(.*)\|(.*)$/gm;
|
|
67
|
+
const result = re.exec(line);
|
|
68
|
+
if (result) {
|
|
69
|
+
return {
|
|
70
|
+
time: result[1].trim(),
|
|
71
|
+
level: result[2].trim(),
|
|
72
|
+
message: result[3].trim(),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function parseDeviceLogContent(content: string): DeviceLogLine[] {
|
|
79
|
+
return content.split('\n')
|
|
80
|
+
.map((v) => parseDeviceLog(v))
|
|
81
|
+
.filter((l): l is DeviceLogLine => l !== undefined);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function mapParameterTypeValueToObject(type: keyof ParameterTypeValue, value: number | string): ParameterTypeValue {
|
|
85
|
+
const p: ParameterTypeValue = {};
|
|
86
|
+
if (type === 'floatValue') {
|
|
87
|
+
p['floatValue'] = typeof value === 'number' ? value : parseFloat(value);
|
|
88
|
+
} else if (type === 'intValue') {
|
|
89
|
+
p['intValue'] = typeof value === 'number' ? value : parseInt(value, 10);
|
|
90
|
+
} else if (type === 'rawValue') {
|
|
91
|
+
if (typeof value === 'number') {
|
|
92
|
+
p['rawValue'] = Uint8Array.from([value]);
|
|
93
|
+
} else {
|
|
94
|
+
let bytes: number[] = [];
|
|
95
|
+
if (value.startsWith('0x')) {
|
|
96
|
+
bytes = value.slice(2).match(/.{1,2}/g)?.map((h) => parseInt(h, 16)) ?? [];
|
|
97
|
+
} else {
|
|
98
|
+
bytes = value.split(',').map((c) => c.trim()).map((c) => parseInt(c, 10));
|
|
99
|
+
}
|
|
100
|
+
p['rawValue'] = Uint8Array.from(bytes);
|
|
101
|
+
}
|
|
102
|
+
} else if (type === 'stringValue') {
|
|
103
|
+
p['stringValue'] = typeof value === 'string' ? value : value.toString();
|
|
104
|
+
} else if (type === 'uintValue') {
|
|
105
|
+
p['uintValue'] = typeof value === 'number' ? value : parseInt(value, 10);
|
|
106
|
+
}
|
|
107
|
+
return p;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Using bytes fixes: ERROR TypeError: Cannot freeze array buffer views with elements in NgRx
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
112
|
+
export function createPlainObjectFromMotionMasterMessage(motionMasterMessage: MotionMasterMessage): any {
|
|
113
|
+
return MotionMasterMessage.toObject(motionMasterMessage, {
|
|
114
|
+
arrays: true, // populates empty arrays (repeated fields) even if defaults=false
|
|
115
|
+
bytes: Array, // bytes as array of numbers
|
|
116
|
+
defaults: true, // includes default values
|
|
117
|
+
objects: true, // populates empty objects (map fields) even if defaults=false
|
|
118
|
+
oneofs: true, // includes virtual oneof fields set to the present field's name
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function decodeTextContent(content: Uint8Array): string {
|
|
123
|
+
const decoder = new TextDecoder();
|
|
124
|
+
const buffer = Uint8Array.from(content);
|
|
125
|
+
return decoder.decode(buffer);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function isRxPdoIndex(index: number): boolean {
|
|
129
|
+
return inRange(index, 0x1600, 0x1800);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function isTxPdoIndex(index: number): boolean {
|
|
133
|
+
return inRange(index, 0x1A00, 0x1C00);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function filterRxPdoParameters<T extends ParameterIndexSubindex>(parameters: T[], excludeSubIndex000 = false): T[] {
|
|
137
|
+
return parameters.filter((p) => isRxPdoIndex(p.index) && (excludeSubIndex000 ? p.subindex > 0 : true)); // RxPDOs: Index area 0x1600 to 0x17FF
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function filterTxPdoParameters<T extends ParameterIndexSubindex>(parameters: T[], excludeSubIndex000 = false): T[] {
|
|
141
|
+
return parameters.filter((p) => isTxPdoIndex(p.index) && (excludeSubIndex000 ? p.subindex > 0 : true)); // TxPDOs: Index area 0x1A00 to 0x1BFF
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function fillPdoParametersWithMappingEntries(parameters: Parameter[], entriesPerPdo = 10): Parameter[] {
|
|
145
|
+
const output: Parameter[] = [];
|
|
146
|
+
let i = 0;
|
|
147
|
+
while (i < parameters.length) {
|
|
148
|
+
if (parameters[i].subindex === 0) {
|
|
149
|
+
let j = i;
|
|
150
|
+
while (parameters[j] && (parameters[j].index === parameters[i].index)) {
|
|
151
|
+
output.push(parameters[j]);
|
|
152
|
+
j++;
|
|
153
|
+
}
|
|
154
|
+
let d = j - i;
|
|
155
|
+
while (d <= entriesPerPdo) {
|
|
156
|
+
output.push({
|
|
157
|
+
index: parameters[i].index,
|
|
158
|
+
subindex: d,
|
|
159
|
+
name: parameters[i].name,
|
|
160
|
+
uintValue: 0,
|
|
161
|
+
value: 0,
|
|
162
|
+
valueType: ValueType.UNSIGNED32,
|
|
163
|
+
group: parameters[i].group,
|
|
164
|
+
typeValue: "uintValue",
|
|
165
|
+
readAccess: true,
|
|
166
|
+
writeAccess: true,
|
|
167
|
+
});
|
|
168
|
+
d++;
|
|
169
|
+
}
|
|
170
|
+
i = j;
|
|
171
|
+
} else {
|
|
172
|
+
i++;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return output;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export function mapParameterToPdoSubItemValue(parameter: Parameter): number {
|
|
179
|
+
const { index, subindex } = parameter;
|
|
180
|
+
if (parameter.valueType && parameter.valueType < ValueType.VISIBLE_STRING) {
|
|
181
|
+
const buffer = new ArrayBuffer(4);
|
|
182
|
+
const view = new DataView(buffer);
|
|
183
|
+
const bitSize = mapValueTypeToBitSize(parameter.valueType);
|
|
184
|
+
view.setUint16(0, index);
|
|
185
|
+
view.setUint8(2, subindex);
|
|
186
|
+
view.setUint8(3, bitSize);
|
|
187
|
+
return view.getUint32(0);
|
|
188
|
+
}
|
|
189
|
+
return 0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export function mapValueTypeToBitSize(valueType: ValueType): number {
|
|
193
|
+
switch (valueType) {
|
|
194
|
+
case ValueType.UNSPECIFIED:
|
|
195
|
+
return 0;
|
|
196
|
+
case ValueType.BOOLEAN:
|
|
197
|
+
return 1;
|
|
198
|
+
case ValueType.INTEGER8:
|
|
199
|
+
case ValueType.UNSIGNED8:
|
|
200
|
+
return 8;
|
|
201
|
+
case ValueType.INTEGER16:
|
|
202
|
+
case ValueType.UNSIGNED16:
|
|
203
|
+
return 16;
|
|
204
|
+
case ValueType.INTEGER32:
|
|
205
|
+
case ValueType.UNSIGNED32:
|
|
206
|
+
case ValueType.REAL32:
|
|
207
|
+
return 32;
|
|
208
|
+
}
|
|
209
|
+
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.`);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export const valueTypeToParameterTypeValueKeyMap = new Map<ValueType, keyof Required<ParameterTypeValue>>([
|
|
213
|
+
[ValueType.BOOLEAN, 'uintValue'],
|
|
214
|
+
[ValueType.INTEGER8, 'intValue'],
|
|
215
|
+
[ValueType.INTEGER16, 'intValue'],
|
|
216
|
+
[ValueType.INTEGER32, 'intValue'],
|
|
217
|
+
[ValueType.UNSIGNED8, 'uintValue'],
|
|
218
|
+
[ValueType.UNSIGNED16, 'uintValue'],
|
|
219
|
+
[ValueType.UNSIGNED32, 'uintValue'],
|
|
220
|
+
[ValueType.REAL32, 'floatValue'],
|
|
221
|
+
[ValueType.VISIBLE_STRING, 'stringValue'],
|
|
222
|
+
[ValueType.OCTET_STRING, 'stringValue'],
|
|
223
|
+
[ValueType.UNICODE_STRING, 'stringValue'],
|
|
224
|
+
]);
|
|
225
|
+
|
|
226
|
+
export function createPdoParameterValues(parameters: Array<{ index: number, subindex: number, typeValue?: ParameterTypeValueKey }>, values: Array<ParameterValueType>) {
|
|
227
|
+
const output = parameters.map((parameter, i, arr) => {
|
|
228
|
+
const { index, subindex, typeValue } = parameter;
|
|
229
|
+
let value = values[i];
|
|
230
|
+
if (subindex === 0) {
|
|
231
|
+
value = arr.reduce((n, p, j) => (p.index === index && p.subindex > 0 && values[j]) ? n + 1 : n, 0);
|
|
232
|
+
}
|
|
233
|
+
return [index, subindex, value, typeValue];
|
|
234
|
+
}) as ParameterAddressValue[];
|
|
235
|
+
|
|
236
|
+
for (let i = 0; i < output.length - 1; i++) {
|
|
237
|
+
const [, subindex1, value1] = output[i];
|
|
238
|
+
if (subindex1 > 0 && value1 === 0) {
|
|
239
|
+
let j = i + 1;
|
|
240
|
+
let [, subindex2, value2] = output[j];
|
|
241
|
+
while (subindex2 > subindex1 && output[j]) {
|
|
242
|
+
if (value2 > 0) {
|
|
243
|
+
output[i][2] = value2;
|
|
244
|
+
output[j][2] = 0;
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
if (output[++j]) {
|
|
248
|
+
[, subindex2, value2] = output[j];
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
return output;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export function resolveAfter(ms: number, value?: unknown) {
|
|
258
|
+
return new Promise(function (resolve) {
|
|
259
|
+
setTimeout(resolve.bind(null, value), ms);
|
|
260
|
+
});
|
|
261
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.base.json",
|
|
3
|
+
"files": [],
|
|
4
|
+
"include": [],
|
|
5
|
+
"references": [
|
|
6
|
+
{
|
|
7
|
+
"path": "./tsconfig.lib.json"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"path": "./tsconfig.spec.json"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"compilerOptions": {
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"strict": true,
|
|
16
|
+
"noImplicitOverride": true,
|
|
17
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
18
|
+
"noImplicitReturns": true,
|
|
19
|
+
"noFallthroughCasesInSwitch": true,
|
|
20
|
+
"allowJs": true
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "../../dist/out-tsc",
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"types": ["jest", "node"]
|
|
7
|
+
},
|
|
8
|
+
"include": [
|
|
9
|
+
"**/*.test.ts",
|
|
10
|
+
"**/*.spec.ts",
|
|
11
|
+
"**/*.test.tsx",
|
|
12
|
+
"**/*.spec.tsx",
|
|
13
|
+
"**/*.test.js",
|
|
14
|
+
"**/*.spec.js",
|
|
15
|
+
"**/*.test.jsx",
|
|
16
|
+
"**/*.spec.jsx",
|
|
17
|
+
"**/*.d.ts",
|
|
18
|
+
"jest.config.ts"
|
|
19
|
+
]
|
|
20
|
+
}
|
package/typedoc.json
ADDED
package/src/index.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export * from './lib/device-log-line';
|
|
2
|
-
export * from './lib/hardware-description';
|
|
3
|
-
export * from './lib/monitoring-config';
|
|
4
|
-
export * from './lib/monitoring-entry';
|
|
5
|
-
export * from './lib/motion-master-client';
|
|
6
|
-
export * from './lib/motion-master-pub-sub-client';
|
|
7
|
-
export * from './lib/motion-master-pub-sub-socket';
|
|
8
|
-
export * from './lib/motion-master-pub-sub-web-socket';
|
|
9
|
-
export * from './lib/motion-master-pub-sub-worker-socket';
|
|
10
|
-
export * from './lib/motion-master-req-res-client';
|
|
11
|
-
export * from './lib/motion-master-req-res-socket';
|
|
12
|
-
export * from './lib/motion-master-req-res-web-socket';
|
|
13
|
-
export * from './lib/motion-master-req-res-worker-socket';
|
|
14
|
-
export * from './lib/operators';
|
|
15
|
-
export * from './lib/options';
|
|
16
|
-
export * from './lib/parameter';
|
|
17
|
-
export * from './lib/request-status-resolver';
|
|
18
|
-
export * from './lib/system-log-line';
|
|
19
|
-
export * from './lib/types';
|
|
20
|
-
export * from './lib/urls';
|
|
21
|
-
export * from './lib/util';
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/motion-master-client/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"device-log-line.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/device-log-line.ts"],"names":[],"mappings":""}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export interface HardwareComponent {
|
|
2
|
-
name: string;
|
|
3
|
-
version: string;
|
|
4
|
-
serialNumber: string;
|
|
5
|
-
}
|
|
6
|
-
export declare type AssemblyComponent = HardwareComponent;
|
|
7
|
-
export declare type DeviceComponent = HardwareComponent;
|
|
8
|
-
export interface Assembly {
|
|
9
|
-
name: string;
|
|
10
|
-
id: string;
|
|
11
|
-
version: string;
|
|
12
|
-
serialNumber: string;
|
|
13
|
-
components: AssemblyComponent[];
|
|
14
|
-
}
|
|
15
|
-
export interface HardwareDevice {
|
|
16
|
-
name: string;
|
|
17
|
-
id: string;
|
|
18
|
-
version: string;
|
|
19
|
-
serialNumber: string;
|
|
20
|
-
macAddress: string;
|
|
21
|
-
components: DeviceComponent[];
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* @link https://docs.google.com/document/d/1N00-ZjxHkjoWNIsnoTtza9CUHrxm8-e54298DXLuD94
|
|
25
|
-
*/
|
|
26
|
-
export interface HardwareDescription {
|
|
27
|
-
fileVersion: string;
|
|
28
|
-
assembly?: Assembly;
|
|
29
|
-
device: HardwareDevice;
|
|
30
|
-
}
|
|
31
|
-
export declare function getIdFromHardwareDescription(hardwareDescription: HardwareDescription): string;
|
|
32
|
-
export declare function getApiIdentifierFromHardwareDescription(hardwareDescription: HardwareDescription): string;
|
|
33
|
-
export declare function getNameFromHardwareDescription(hardwareDescription: HardwareDescription): string;
|
|
34
|
-
export declare function getSerialNumberFromHardwareDescription(hardwareDescription: HardwareDescription): string;
|
|
35
|
-
export declare function getAllComponentsFromHardwareDescription(hardwareDescription: HardwareDescription): HardwareComponent[];
|
|
36
|
-
export declare function hardwareComponentsMatch(a: HardwareComponent[], b: HardwareComponent[]): boolean;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { isEqual } from 'lodash';
|
|
2
|
-
export function getIdFromHardwareDescription(hardwareDescription) {
|
|
3
|
-
return hardwareDescription.assembly
|
|
4
|
-
? hardwareDescription.assembly.id
|
|
5
|
-
: hardwareDescription.device.id;
|
|
6
|
-
}
|
|
7
|
-
export function getApiIdentifierFromHardwareDescription(hardwareDescription) {
|
|
8
|
-
return hardwareDescription.assembly
|
|
9
|
-
? `${hardwareDescription.assembly.id}-${hardwareDescription.assembly.version}`
|
|
10
|
-
: `${hardwareDescription.device.id}-${hardwareDescription.device.version}`;
|
|
11
|
-
}
|
|
12
|
-
export function getNameFromHardwareDescription(hardwareDescription) {
|
|
13
|
-
return hardwareDescription.assembly
|
|
14
|
-
? hardwareDescription.assembly.name
|
|
15
|
-
: hardwareDescription.device.name;
|
|
16
|
-
}
|
|
17
|
-
export function getSerialNumberFromHardwareDescription(hardwareDescription) {
|
|
18
|
-
return hardwareDescription.assembly
|
|
19
|
-
? hardwareDescription.assembly.serialNumber
|
|
20
|
-
: hardwareDescription.device.serialNumber;
|
|
21
|
-
}
|
|
22
|
-
export function getAllComponentsFromHardwareDescription(hardwareDescription) {
|
|
23
|
-
if (hardwareDescription.assembly) {
|
|
24
|
-
return [...hardwareDescription.assembly.components, ...hardwareDescription.device.components];
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
return hardwareDescription.device.components;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export function hardwareComponentsMatch(a, b) {
|
|
31
|
-
if (a.length === 0 && b.length === 0) {
|
|
32
|
-
return false; // edge case: when both components are empty they don't match since there are no components to compare
|
|
33
|
-
}
|
|
34
|
-
const ac = a.map((c) => `${c.name}-${c.version[0]}`.replace(/\s/g, '').toLocaleLowerCase()).sort();
|
|
35
|
-
const bc = b.map((c) => `${c.name}-${c.version[0]}`.replace(/\s/g, '').toLocaleLowerCase()).sort();
|
|
36
|
-
return isEqual(ac, bc);
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=hardware-description.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hardware-description.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/hardware-description.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAqCjC,MAAM,UAAU,4BAA4B,CAAC,mBAAwC;IACnF,OAAO,mBAAmB,CAAC,QAAQ;QACjC,CAAC,CAAC,mBAAmB,CAAC,QAAQ,CAAC,EAAE;QACjC,CAAC,CAAC,mBAAmB,CAAC,MAAM,CAAC,EAAE,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,uCAAuC,CAAC,mBAAwC;IAC9F,OAAO,mBAAmB,CAAC,QAAQ;QACjC,CAAC,CAAC,GAAG,mBAAmB,CAAC,QAAQ,CAAC,EAAE,IAAI,mBAAmB,CAAC,QAAQ,CAAC,OAAO,EAAE;QAC9E,CAAC,CAAC,GAAG,mBAAmB,CAAC,MAAM,CAAC,EAAE,IAAI,mBAAmB,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAC,mBAAwC;IACrF,OAAO,mBAAmB,CAAC,QAAQ;QACjC,CAAC,CAAC,mBAAmB,CAA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nG,OAAO,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AACzB,CAAC"}
|
package/src/lib/logger.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const logger: import("roarr").Logger<import("roarr/dist/src/types").JsonObject>;
|
package/src/lib/logger.js
DELETED
package/src/lib/logger.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC;IAChC,OAAO,EAAE,kCAAkC;CAC5C,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"monitoring-config.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/monitoring-config.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Observable } from "rxjs";
|
|
2
|
-
import { MonitoringConfig } from "./monitoring-config";
|
|
3
|
-
import { MotionMasterMessage, ParameterValueType } from "./types";
|
|
4
|
-
export interface MonitoringEntry {
|
|
5
|
-
config: MonitoringConfig;
|
|
6
|
-
interval: number;
|
|
7
|
-
message$: Observable<MotionMasterMessage>;
|
|
8
|
-
values$: Observable<ParameterValueType[]>;
|
|
9
|
-
parameters: MotionMasterMessage.Request.GetDeviceParameterValues.IParameter[];
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"monitoring-entry.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/monitoring-entry.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Observable } from "rxjs";
|
|
2
|
-
import { MonitoringConfig } from "./monitoring-config";
|
|
3
|
-
import { MotionMasterPubSubClient } from "./motion-master-pub-sub-client";
|
|
4
|
-
import { MotionMasterPubSubSocket } from "./motion-master-pub-sub-socket";
|
|
5
|
-
import { MotionMasterReqResClient } from "./motion-master-req-res-client";
|
|
6
|
-
import { MotionMasterReqResSocket } from "./motion-master-req-res-socket";
|
|
7
|
-
import { MotionMasterMessage, ParameterAddress } from "./types";
|
|
8
|
-
export declare class MotionMasterClient {
|
|
9
|
-
private readonly reqResSocket;
|
|
10
|
-
private readonly pubSubSocket;
|
|
11
|
-
readonly request: MotionMasterReqResClient;
|
|
12
|
-
readonly monitor: MotionMasterPubSubClient;
|
|
13
|
-
constructor(reqResSocket: MotionMasterReqResSocket, pubSubSocket: MotionMasterPubSubSocket);
|
|
14
|
-
startMonitoringDeviceParameterValues(deviceAddress: number, parameters: MotionMasterMessage.Request.GetDeviceParameterValues.IParameter[], interval: number, config: MonitoringConfig, requestTimeout?: number): [string, Observable<MotionMasterMessage>];
|
|
15
|
-
startMonitoringValues<T = number[]>(deviceAddress: number, parameterAddresses: ParameterAddress[], interval: number, config?: MonitoringConfig, requestTimeout?: number): [string, Observable<T>];
|
|
16
|
-
startMonitoring<T = number[]>(deviceAddress: number, parameterAddresses: [number, number][], interval: number, config?: MonitoringConfig, requestTimeout?: number): Observable<T>;
|
|
17
|
-
stopMonitoring(messageId: string): void;
|
|
18
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Observable } from "rxjs";
|
|
2
|
-
import { v4 } from "uuid";
|
|
3
|
-
import { MotionMasterPubSubClient } from "./motion-master-pub-sub-client";
|
|
4
|
-
import { MotionMasterReqResClient } from "./motion-master-req-res-client";
|
|
5
|
-
import { mapStatusMessageToParameterValues, selectMotionMasterMessageByTopic } from "./operators";
|
|
6
|
-
export class MotionMasterClient {
|
|
7
|
-
constructor(reqResSocket, pubSubSocket) {
|
|
8
|
-
this.reqResSocket = reqResSocket;
|
|
9
|
-
this.pubSubSocket = pubSubSocket;
|
|
10
|
-
this.request = new MotionMasterReqResClient(this.reqResSocket);
|
|
11
|
-
this.monitor = new MotionMasterPubSubClient(this.pubSubSocket);
|
|
12
|
-
}
|
|
13
|
-
startMonitoringDeviceParameterValues(deviceAddress, parameters, interval, config, requestTimeout = 5000) {
|
|
14
|
-
const props = {
|
|
15
|
-
interval,
|
|
16
|
-
topic: config.topic,
|
|
17
|
-
getDeviceParameterValues: { deviceAddress, parameters },
|
|
18
|
-
};
|
|
19
|
-
this.monitor.subscribe(config);
|
|
20
|
-
this.request.startMonitoringDeviceParameterValues(props, requestTimeout, config.messageId);
|
|
21
|
-
const message$ = this.monitor.socket.data$.pipe(selectMotionMasterMessageByTopic(config.topic));
|
|
22
|
-
return [config.messageId, message$];
|
|
23
|
-
}
|
|
24
|
-
startMonitoringValues(deviceAddress, parameterAddresses, interval, config, requestTimeout = 5000) {
|
|
25
|
-
const parameters = parameterAddresses.map((addr) => ({ index: addr[0], subindex: addr[1], loadFromCache: false }));
|
|
26
|
-
if (!config) {
|
|
27
|
-
config = { messageId: v4(), topic: v4(), bufferSize: 1, distinct: false };
|
|
28
|
-
}
|
|
29
|
-
const [messageId, message$] = this.startMonitoringDeviceParameterValues(deviceAddress, parameters, interval, config, requestTimeout);
|
|
30
|
-
const values$ = message$.pipe(mapStatusMessageToParameterValues());
|
|
31
|
-
return [messageId, values$];
|
|
32
|
-
}
|
|
33
|
-
startMonitoring(deviceAddress, parameterAddresses, interval, config, requestTimeout = 5000) {
|
|
34
|
-
return new Observable((subscriber) => {
|
|
35
|
-
const [messageId, values$] = this.startMonitoringValues(deviceAddress, parameterAddresses, interval, config, requestTimeout);
|
|
36
|
-
const subscription = values$.subscribe(subscriber);
|
|
37
|
-
return () => {
|
|
38
|
-
subscription.unsubscribe();
|
|
39
|
-
this.stopMonitoring(messageId);
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
stopMonitoring(messageId) {
|
|
44
|
-
this.request.stopMonitoringDeviceParameterValues({ startMonitoringRequestId: messageId });
|
|
45
|
-
this.monitor.unsubscribe(messageId);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=motion-master-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"motion-master-client.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/motion-master-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAE1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,OAAO,EAAE,iCAAiC,EAAE,gCAAgC,EAAE,MAAM,aAAa,CAAC;AAGlG,MAAM,OAAO,kBAAkB;IAK7B,YACmB,YAAsC,EACtC,YAAsC;QADtC,iBAAY,GAAZ,YAAY,CAA0B;QACtC,iBAAY,GAAZ,YAAY,CAA0B;QAEvD,IAAI,CAAC,OAAO,GAAG,IAAI,wBAAwB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC/D,IAAI,CAAC,OAAO,GAAG,IAAI,wBAAwB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACjE,CAAC;IAED,oCAAoC,CAClC,aAAqB,EACrB,UAA6E,EAC7E,QAAgB,EAChB,MAAwB,EACxB,cAAc,GAAG,IAAI;QAErB,MAAM,KAAK,GAAsE;YAC/E,QAAQ;YACR,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,wBAAwB,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE;SACxD,CAAC;QAEF,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAE/B,IAAI,CAAC,OAAO,CAAC,oCAAoC,CAAC,KAAK,EAAE,cAAc,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;QAE3F,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,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