motion-master-client 0.0.260 → 0.0.262
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 +1 -1
- package/src/lib/device.d.ts +31 -23
- package/src/lib/device.js.map +1 -1
- package/src/lib/hardware-description.d.ts +12 -0
- package/src/lib/hardware-description.js +12 -0
- package/src/lib/hardware-description.js.map +1 -1
- package/src/lib/motion-master-req-res-client.js +21 -3
- package/src/lib/motion-master-req-res-client.js.map +1 -1
- package/src/lib/smm-od-v1.json +93 -93
- package/src/lib/smm-od-v2.json +93 -93
- package/src/lib/smm.js +2 -0
- package/src/lib/smm.js.map +1 -1
package/package.json
CHANGED
package/src/lib/device.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DeviceLogLine } from './device-log-line';
|
|
2
2
|
import { HardwareDescription, StackInfo } from './hardware-description';
|
|
3
3
|
import { IntegroVariant } from './integro-variant';
|
|
4
|
+
import { UIFeaturesConfig } from './parameter';
|
|
4
5
|
import { DeviceRef, DeviceRefObj } from './types';
|
|
5
6
|
export declare const filenamePartRegExp: RegExp;
|
|
6
7
|
/**
|
|
@@ -9,51 +10,58 @@ export declare const filenamePartRegExp: RegExp;
|
|
|
9
10
|
*/
|
|
10
11
|
export interface Device {
|
|
11
12
|
/**
|
|
12
|
-
* The
|
|
13
|
+
* The EtherCAT alias number of the device.
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* The serial number of the device as read from the hardware description file.
|
|
17
|
-
*/
|
|
18
|
-
serialNumber?: string;
|
|
15
|
+
alias?: number;
|
|
19
16
|
/**
|
|
20
|
-
*
|
|
17
|
+
* The unique address assigned to the device in the network.
|
|
21
18
|
* This number is included in messages to Motion Master to reference the device.
|
|
22
19
|
* Since the device address changes with each power cycle, the client library uses {@link DeviceRef} for consistent device referencing.
|
|
23
20
|
*/
|
|
24
21
|
deviceAddress: number;
|
|
25
22
|
/**
|
|
26
|
-
* The
|
|
27
|
-
* - 0: UNSPECIFIED
|
|
28
|
-
* - 1: SOMANET_CIA401_ETHERCAT
|
|
29
|
-
* - 2: SOMANET_CIA402_ETHERCAT
|
|
23
|
+
* The firmware ID for the device, used to identify and resolve the corresponding firmware package.
|
|
30
24
|
*/
|
|
31
|
-
|
|
25
|
+
fwid?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Parsed `.hardware_description` file containing hardware details.
|
|
28
|
+
*/
|
|
29
|
+
hardwareDescription?: HardwareDescription;
|
|
30
|
+
/**
|
|
31
|
+
* A unique identifier for the device.
|
|
32
|
+
* The device serial number is a strong candidate for this identifier.
|
|
33
|
+
*/
|
|
34
|
+
id: string;
|
|
35
|
+
/**
|
|
36
|
+
* Parsed `.variant` file containing variant-specific information.
|
|
37
|
+
*/
|
|
38
|
+
integroVariant?: IntegroVariant;
|
|
32
39
|
/**
|
|
33
40
|
* Device position in the network stack.
|
|
34
41
|
* Note: In SOEM, the position starts at 1, as 0 is reserved for broadcasting.
|
|
35
42
|
* In the IgH EtherCAT Master, the position starts at 0.
|
|
36
43
|
*/
|
|
37
44
|
position?: number;
|
|
45
|
+
productId?: string;
|
|
38
46
|
/**
|
|
39
|
-
*
|
|
47
|
+
* The serial number of the device as read from the hardware description file.
|
|
40
48
|
*/
|
|
41
|
-
|
|
49
|
+
serialNumber?: string;
|
|
42
50
|
/**
|
|
43
|
-
* Parsed `.
|
|
44
|
-
* {@link HardwareDescription}
|
|
51
|
+
* Parsed `.stack_info.json` file containing stack-related metadata.
|
|
45
52
|
*/
|
|
46
|
-
|
|
53
|
+
stackInfo?: StackInfo;
|
|
47
54
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
55
|
+
* The type of the device, which can be one of the following:
|
|
56
|
+
* - `0`: UNSPECIFIED
|
|
57
|
+
* - `1`: SOMANET_CIA401_ETHERCAT
|
|
58
|
+
* - `2`: SOMANET_CIA402_ETHERCAT
|
|
50
59
|
*/
|
|
51
|
-
|
|
60
|
+
type?: number;
|
|
52
61
|
/**
|
|
53
|
-
*
|
|
54
|
-
* {@link IntegroVariant}
|
|
62
|
+
* User interface configuration for device-specific features.
|
|
55
63
|
*/
|
|
56
|
-
|
|
64
|
+
uiFeaturesConfig?: UIFeaturesConfig;
|
|
57
65
|
}
|
|
58
66
|
export declare function getDeviceRefFromDeviceRefObj(deviceRefObj: DeviceRefObj): string | number | null;
|
|
59
67
|
export declare function ensureDeviceRef(deviceRef: DeviceRef): DeviceRef;
|
package/src/lib/device.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/device.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"device.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/device.ts"],"names":[],"mappings":";;;AAMa,QAAA,kBAAkB,GAAG,gCAAgC,CAAC;AAyEnE,SAAgB,4BAA4B,CAAC,YAA0B;IACrE,KAAK,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;QACrD,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,OAAO,KAAK,CAAC;SACd;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAPD,oEAOC;AAED,SAAgB,eAAe,CAAC,SAAoB;IAClD,MAAM,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IAC5B,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC;AAHD,0CAGC;AAED,SAAgB,gBAAgB,CAAC,SAAoB;IACnD,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;IACvC,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;QACjC,IAAI,SAAS,IAAI,MAAM,EAAE;YACvB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC;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,CAAC,CAAC;SAC7B,MAAM,CAAC,CAAC,CAAC,EAAsB,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;AACxD,CAAC;AALD,sDAKC;AAED,SAAgB,iCAAiC,CAAC,UAAkB,EAAE,QAAgB;IACpF,OAAO,UAAU,GAAG,QAAQ,CAAC;AAC/B,CAAC;AAFD,8EAEC;AAED;;GAEG;AACU,QAAA,mBAAmB,GAAG,uBAAuB,CAAC;AAE3D;;GAEG;AACU,QAAA,cAAc,GACzB,sRAAsR,CAAC;AAEzR,SAAgB,cAAc,CAAC,QAAgB;IAC7C,OAAO,0BAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC3C,CAAC;AAFD,wCAEC;AAEY,QAAA,8BAA8B,GAAG;IAC5C,kBAAkB;IAClB,iBAAiB;IACjB,uBAAuB;IACvB,UAAU;IACV,iBAAiB;CAClB,CAAC"}
|
|
@@ -89,4 +89,16 @@ export interface StackInfo {
|
|
|
89
89
|
* The Stack Info typically includes three components: Com, Core, and Drive, each with a name, serial number, and version.
|
|
90
90
|
*/
|
|
91
91
|
export declare function extractDeviceComponentsFromStackInfo(stackInfo: StackInfo): DeviceComponent[];
|
|
92
|
+
/**
|
|
93
|
+
* Generates a device serial number from a given address.
|
|
94
|
+
* The address is formatted into a string in the form `XXXX-XX-XXXX000-0000`.
|
|
95
|
+
*
|
|
96
|
+
* @param address - The device address as a number, which will be used to create the serial number.
|
|
97
|
+
* @returns A string representing the formatted device serial number.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* const address = 95010100014791843;
|
|
101
|
+
* const serialNumber = makeDeviceSerialNumberFromAddress(address);
|
|
102
|
+
* console.log(serialNumber); // "9501-01-00014790000-0000"
|
|
103
|
+
*/
|
|
92
104
|
export declare function makeDeviceSerialNumberFromAddress(address: number): string;
|
|
@@ -99,6 +99,18 @@ function extractDeviceComponentsFromStackInfo(stackInfo) {
|
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
exports.extractDeviceComponentsFromStackInfo = extractDeviceComponentsFromStackInfo;
|
|
102
|
+
/**
|
|
103
|
+
* Generates a device serial number from a given address.
|
|
104
|
+
* The address is formatted into a string in the form `XXXX-XX-XXXX000-0000`.
|
|
105
|
+
*
|
|
106
|
+
* @param address - The device address as a number, which will be used to create the serial number.
|
|
107
|
+
* @returns A string representing the formatted device serial number.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* const address = 95010100014791843;
|
|
111
|
+
* const serialNumber = makeDeviceSerialNumberFromAddress(address);
|
|
112
|
+
* console.log(serialNumber); // "9501-01-00014790000-0000"
|
|
113
|
+
*/
|
|
102
114
|
function makeDeviceSerialNumberFromAddress(address) {
|
|
103
115
|
const addr = address.toString();
|
|
104
116
|
return addr.slice(0, 4) + '-' + addr.slice(4, 6) + '-' + addr.slice(6, 10) + '000-0000';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hardware-description.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/hardware-description.ts"],"names":[],"mappings":";;;AAAA,mCAAiC;AAsCjC;;;;;GAKG;AACH,SAAgB,4BAA4B,CAAC,EAAuB;IAClE,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;AACrD,CAAC;AAFD,oEAEC;AAED;;;;;;;GAOG;AACH,SAAgB,uCAAuC,CAAC,EAAuB,EAAE,SAAS,GAAG,KAAK;IAChG,IAAI,KAAK,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;IAE9G,IAAI,CAA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QAAC,OAAA,CAAC;YAC3B,IAAI,EAAE,MAAA,KAAK,CAAC,WAAW,mCAAI,EAAE;YAC7B,YAAY,EAAE,MAAA,KAAK,CAAC,aAAa,mCAAI,EAAE;YACvC,OAAO,EAAE,MAAA,CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,mCAAI,EAAE;SACjD,CAAC,CAAA;KAAA,CACH,CAAC;AACJ,CAAC;AARD,oFAQC;AAED,SAAgB,iCAAiC,CAAC,OAAe;IAC/D,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAChC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,UAAU,CAAC;AAC1F,CAAC;AAHD,8EAGC"}
|
|
1
|
+
{"version":3,"file":"hardware-description.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/hardware-description.ts"],"names":[],"mappings":";;;AAAA,mCAAiC;AAsCjC;;;;;GAKG;AACH,SAAgB,4BAA4B,CAAC,EAAuB;IAClE,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;AACrD,CAAC;AAFD,oEAEC;AAED;;;;;;;GAOG;AACH,SAAgB,uCAAuC,CAAC,EAAuB,EAAE,SAAS,GAAG,KAAK;IAChG,IAAI,KAAK,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,MA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CAAC,GAAG,CACzB,CAAC,KAAK,EAAmB,EAAE;;QAAC,OAAA,CAAC;YAC3B,IAAI,EAAE,MAAA,KAAK,CAAC,WAAW,mCAAI,EAAE;YAC7B,YAAY,EAAE,MAAA,KAAK,CAAC,aAAa,mCAAI,EAAE;YACvC,OAAO,EAAE,MAAA,CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,mCAAI,EAAE;SACjD,CAAC,CAAA;KAAA,CACH,CAAC;AACJ,CAAC;AARD,oFAQC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,iCAAiC,CAAC,OAAe;IAC/D,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAChC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,UAAU,CAAC;AAC1F,CAAC;AAHD,8EAGC"}
|
|
@@ -1240,12 +1240,25 @@ class MotionMasterReqResClient {
|
|
|
1240
1240
|
return (0, rxjs_1.forkJoin)(devices.map((device) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1241
1241
|
const { deviceAddress } = device;
|
|
1242
1242
|
const hardwareDescription = yield (0, rxjs_1.lastValueFrom)(this.getHardwareDescription(deviceAddress));
|
|
1243
|
-
|
|
1243
|
+
const stackInfo = hardwareDescription ? undefined : yield (0, rxjs_1.lastValueFrom)(this.getStackInfo(deviceAddress));
|
|
1244
|
+
let serialNumber = undefined;
|
|
1244
1245
|
if (hardwareDescription) {
|
|
1245
1246
|
serialNumber = (0, hardware_description_1.getSerialNumberFromHardwareDescription)(hardwareDescription);
|
|
1246
1247
|
}
|
|
1248
|
+
else if (stackInfo) {
|
|
1249
|
+
serialNumber = stackInfo.stack_serial_number;
|
|
1250
|
+
}
|
|
1247
1251
|
const id = serialNumber !== null && serialNumber !== void 0 ? serialNumber : (0, hardware_description_1.makeDeviceSerialNumberFromAddress)(device.deviceAddress);
|
|
1248
|
-
|
|
1252
|
+
let productId = undefined;
|
|
1253
|
+
let apiId = undefined;
|
|
1254
|
+
try {
|
|
1255
|
+
({ productId, apiId } = (0, hardware_description_1.parseSerialNumber)(id));
|
|
1256
|
+
}
|
|
1257
|
+
catch (err) {
|
|
1258
|
+
if (err instanceof Error) {
|
|
1259
|
+
console.warn(`Unable to parse serial number ${id}: ${err.message}`);
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1249
1262
|
let integroVariant = undefined;
|
|
1250
1263
|
try {
|
|
1251
1264
|
integroVariant = yield (0, rxjs_1.lastValueFrom)(this.getIntegroVariant(deviceAddress));
|
|
@@ -1255,7 +1268,12 @@ class MotionMasterReqResClient {
|
|
|
1255
1268
|
console.warn(`Unable to retrieve Integro variant for device ${id}: ${err.message}`);
|
|
1256
1269
|
}
|
|
1257
1270
|
}
|
|
1258
|
-
|
|
1271
|
+
const uiFeaturesConfig = yield this.getUIFeaturesConfig(deviceAddress);
|
|
1272
|
+
return Object.assign(Object.assign({}, device), { fwid: apiId, hardwareDescription,
|
|
1273
|
+
id,
|
|
1274
|
+
integroVariant,
|
|
1275
|
+
productId, serialNumber: serialNumber, stackInfo,
|
|
1276
|
+
uiFeaturesConfig });
|
|
1259
1277
|
})));
|
|
1260
1278
|
}));
|
|
1261
1279
|
}
|