motion-master-client 0.0.246 → 0.0.248

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/src/lib/smm.js CHANGED
@@ -1,27 +1,122 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.smmVerificationGroupNames = exports.smmVerificationGroupNameToOrdinal = exports.SmmVerificationGroupOrdinal = exports.unpackSmmParameterValues = exports.packSmmSoftwareUpdateCrc = exports.packSmmChangePassword = exports.packSmmCredentials = exports.packSmmParameterValues = exports.smmPackFormat = exports.packSmmValidationReport = exports.packSmmDate = exports.calcSmmBitmask = exports.smmGroupPackFormats = exports.calcSmmCRC32 = exports.smmGroupBitMasks = void 0;
3
+ exports.smmOdV1DefaultValues = exports.getSmmParametersGroupNames = exports.packSmmSoftwareUpdateCrc = exports.packSmmValidationReport = exports.packSmmDate = exports.packSmmParameterValuesForVerification = exports.unpackSmmParameterValues = exports.packSmmParameterValues = exports.packSmmChangePassword = exports.packSmmCredentials = exports.calcSmmCRC32 = exports.buildSmmParametersPackFormat = exports.buildSmmParametersGroupPackFormats = exports.buildSmmParametersGroupBitmask = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const python_struct_1 = tslib_1.__importDefault(require("python-struct"));
6
6
  const buffer_1 = require("buffer");
7
7
  const util_1 = require("./util");
8
- exports.smmGroupBitMasks = [
9
- [0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00],
10
- [0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00],
11
- [0x03, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00],
12
- [0x00, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00],
13
- [0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00],
14
- [0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00],
15
- [0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00],
16
- [0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00],
17
- [0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00],
18
- [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00],
19
- [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x22, 0x20, 0x00],
20
- [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x10, 0x00],
21
- [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x88, 0x88, 0x88, 0x00],
22
- [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x44, 0x44, 0x44, 0x00],
23
- [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80], // G_SMS
24
- ];
8
+ const smm_od_v1_json_1 = tslib_1.__importDefault(require("./smm-od-v1.json"));
9
+ const smm_od_v2_json_1 = tslib_1.__importDefault(require("./smm-od-v2.json"));
10
+ /**
11
+ * Builds a bitmask for the safety parameters of a given group in the SMM parameter set.
12
+ *
13
+ * The bitmask is an array of bytes where each bit represents whether a specific safety
14
+ * parameter belongs to the specified group. The group index determines which group's
15
+ * parameters are marked as `1` in the bitmask, and others are marked as `0`.
16
+ *
17
+ * @param groupIndex - The index of the group for which to build the bitmask. The index corresponds
18
+ * to the position of the group in the safety parameters.
19
+ * @param parameterStructVersion - The version of the parameter struct to use. Defaults to `0x0041`.
20
+ * If the version is less than `0x0203`, the `smmOdV1` format is used;
21
+ * otherwise, the `smmOdV2` format is used.
22
+ *
23
+ * @returns A `Uint8Array` representing the bitmask for the specified group. Each byte contains 8 bits,
24
+ * where each bit corresponds to a safety parameter.
25
+ *
26
+ * @throws If the `groupIndex` is out of range or if the parameter structure is not valid for the given version.
27
+ */
28
+ function buildSmmParametersGroupBitmask(groupIndex, parameterStructVersion = 0x0041) {
29
+ const smmOd = (parameterStructVersion < 0x0203 ? smm_od_v1_json_1.default : smm_od_v2_json_1.default);
30
+ const groupMap = (0, util_1.mapByProperty)(smmOd.parameters.safety, 'group');
31
+ const groupNames = Array.from(groupMap.keys());
32
+ const bits = [0];
33
+ smmOd.parameters.safety.forEach((parameter) => {
34
+ bits.push(parameter.group === groupNames[groupIndex] ? 1 : 0);
35
+ });
36
+ const uint8Array = new Uint8Array(Math.ceil(bits.length / 8));
37
+ for (let i = 0; i < bits.length; i++) {
38
+ let byte = 0;
39
+ for (let j = 0; j < 8; j++) {
40
+ byte = (byte << 1) | (bits[i + j] || 0);
41
+ }
42
+ uint8Array[i / 8] = byte;
43
+ }
44
+ return uint8Array;
45
+ }
46
+ exports.buildSmmParametersGroupBitmask = buildSmmParametersGroupBitmask;
47
+ /**
48
+ * Builds the structure format strings for each group of parameters based on the given struct version.
49
+ *
50
+ * This function maps parameters in the `smmOd` object to their respective safety groups, processes
51
+ * them, and converts their types to structure format characters (e.g., `<` for little-endian).
52
+ * The function supports different versions of the parameter struct format, defaulting to version `0x0041`.
53
+ *
54
+ * @param parameterStructVersion - The version of the parameter struct to use. Defaults to `0x0041`.
55
+ * If the version is less than `0x0203`, the `smmOdV1` format is used;
56
+ * otherwise, the `smmOdV2` format is used.
57
+ *
58
+ * @returns An array of structure format strings for each group of parameters.
59
+ */
60
+ function buildSmmParametersGroupPackFormats(parameterStructVersion = 0x0041) {
61
+ const smmOd = (parameterStructVersion < 0x0203 ? smm_od_v1_json_1.default : smm_od_v2_json_1.default);
62
+ const groupMap = (0, util_1.mapByProperty)(smmOd.parameters.safety, 'group'); // mapByProperty keeps the order of the original array
63
+ const groups = Array.from(groupMap.values());
64
+ let packFormats = groups.map((parameters) => {
65
+ return parameters.reduce((packFormat, parameter) => {
66
+ if (parameter.type === 'enum' && parameter.typeRef) {
67
+ const enumType = smmOd.types[parameter.typeRef];
68
+ packFormat += (0, util_1.convertCTypeToStructFormatCharacter)(enumType.type);
69
+ }
70
+ else {
71
+ packFormat += (0, util_1.convertCTypeToStructFormatCharacter)(parameter.type);
72
+ }
73
+ return packFormat;
74
+ }, '<');
75
+ });
76
+ return packFormats;
77
+ }
78
+ exports.buildSmmParametersGroupPackFormats = buildSmmParametersGroupPackFormats;
79
+ /**
80
+ * Builds the structure format string for all parameters based on the given struct version.
81
+ *
82
+ * This function processes the parameters in the `smmOd` object, converting each parameter's type
83
+ * to its corresponding structure format character (e.g., `<` for little-endian). It supports different
84
+ * versions of the parameter struct format, defaulting to version `0x0041`.
85
+ *
86
+ * @param parameterStructVersion - The version of the parameter struct to use. Defaults to `0x0041`.
87
+ * If the version is less than `0x0203`, the `smmOdV1` format is used;
88
+ * otherwise, the `smmOdV2` format is used.
89
+ *
90
+ * @returns A structure format string representing all the parameters, starting with a `<` (little-endian).
91
+ */
92
+ function buildSmmParametersPackFormat(parameterStructVersion = 0x0041) {
93
+ const smmOd = (parameterStructVersion < 0x0203 ? smm_od_v1_json_1.default : smm_od_v2_json_1.default);
94
+ const parameters = smmOd.parameters.safety;
95
+ const packFormat = parameters.reduce((packFormat, parameter) => {
96
+ if (parameter.type === 'enum' && parameter.typeRef) {
97
+ const enumType = smmOd.types[parameter.typeRef];
98
+ packFormat += (0, util_1.convertCTypeToStructFormatCharacter)(enumType.type);
99
+ }
100
+ else {
101
+ packFormat += (0, util_1.convertCTypeToStructFormatCharacter)(parameter.type);
102
+ }
103
+ return packFormat;
104
+ }, '<');
105
+ return packFormat;
106
+ }
107
+ exports.buildSmmParametersPackFormat = buildSmmParametersPackFormat;
108
+ /**
109
+ * Calculates a CRC-32 checksum using a custom SMM-specific polynomial lookup table.
110
+ *
111
+ * This CRC implementation is tailored for Safety Motion Module (SMM) data validation,
112
+ * ensuring data integrity across packed buffers. It supports an initial CRC seed,
113
+ * allowing for chained calculations or non-standard CRC resets.
114
+ *
115
+ * @param buffer - The input data buffer (`Uint8Array`) for which to calculate the CRC.
116
+ * @param initial - The initial CRC value, typically `0xFFFFFFFF` for standard calculations.
117
+ *
118
+ * @returns The computed CRC-32 checksum as a 32-bit unsigned integer.
119
+ */
25
120
  function calcSmmCRC32(buffer, initial) {
26
121
  const crcTable = [
27
122
  0x00000000, 0xf4acfb13, 0x1df50d35, 0xe959f626, 0x3bea1a6a, 0xcf46e179, 0x261f175f, 0xd2b3ec4c, 0x77d434d4,
@@ -63,35 +158,127 @@ function calcSmmCRC32(buffer, initial) {
63
158
  return new Uint32Array([crc])[0];
64
159
  }
65
160
  exports.calcSmmCRC32 = calcSmmCRC32;
66
- exports.smmGroupPackFormats = [
67
- 'H',
68
- '24sBHB',
69
- 'BBBBHB2B',
70
- 'ihihI',
71
- 'BIBBHBBIB',
72
- 'BBIHHHhH',
73
- 'BBHB',
74
- 'BHiIB',
75
- 'BHBHHii',
76
- 'BHHHiI',
77
- 'BHHHiiI',
78
- 'BHHHiiI',
79
- 'BHHHiiI',
80
- 'BHHHiiI',
81
- 'iiI', // G_SMS
82
- ];
83
- function calcSmmBitmask(values, group) {
84
- const valuesPackFormat = '<' + exports.smmGroupPackFormats[group];
161
+ /**
162
+ * Packs SMM (Safety Motion Module) credentials (username and password) into a fixed-size binary format.
163
+ * Each field is padded or truncated to 24 bytes.
164
+ *
165
+ * @param username - The username to be packed. It will be padded or truncated to 24 bytes.
166
+ * @param password - The password to be packed. It will also be padded or truncated to 24 bytes.
167
+ *
168
+ * @returns A `Buffer` containing the packed username and password.
169
+ *
170
+ * @throws Error if the username or password contains invalid characters or types.
171
+ */
172
+ function packSmmCredentials(username, password) {
173
+ return python_struct_1.default.pack('<24s24s', username, password);
174
+ }
175
+ exports.packSmmCredentials = packSmmCredentials;
176
+ /**
177
+ * Packs the new and old passwords into a fixed-size binary format for SMM (Safety Motion Module) password change operations.
178
+ * Each password is padded or truncated to 24 bytes.
179
+ *
180
+ * @param newPassword - The new password to be packed. It will be padded or truncated to 24 bytes.
181
+ * @param oldPassword - The current/old password to be packed. It will be padded or truncated to 24 bytes.
182
+ *
183
+ * @returns A `Buffer` containing the packed new and old passwords.
184
+ *
185
+ * @throws Error if either password contains invalid characters or types.
186
+ */
187
+ function packSmmChangePassword(newPassword, oldPassword) {
188
+ return python_struct_1.default.pack('<24s24s', newPassword, oldPassword);
189
+ }
190
+ exports.packSmmChangePassword = packSmmChangePassword;
191
+ /**
192
+ * Packs SMM (Safety Motion Module) parameter values into a binary buffer,
193
+ * following the specified SMM parameter structure version.
194
+ * It computes and appends a CRC32 checksum to ensure data integrity.
195
+ *
196
+ * @param values - An array of `DataType` values to be packed.
197
+ * @param parameterStructVersion - The version of the parameter struct to use. Defaults to `0x0041`.
198
+ * If the version is less than `0x0203`, the `smmOdV1` format is used;
199
+ * otherwise, the `smmOdV2` format is used.
200
+ *
201
+ * @returns An object containing:
202
+ * - `buffer`: A `Buffer` with the packed values followed by the CRC32 checksum.
203
+ * - `crc`: The computed CRC32 checksum for the packed data.
204
+ * - `crcBuffer`: A `Buffer` representing the packed CRC32 checksum.
205
+ * - `values`: The original `DataType[]` values.
206
+ * - `valuesBuffer`: A `Buffer` containing the packed values (without the CRC).
207
+ *
208
+ * @throws Error if packing fails due to an invalid structure or value mismatch.
209
+ */
210
+ function packSmmParameterValues(values, parameterStructVersion = 0x0041) {
211
+ const packFormat = buildSmmParametersPackFormat(parameterStructVersion);
212
+ const valuesBuffer = python_struct_1.default.pack(packFormat, values);
213
+ const crc = calcSmmCRC32(valuesBuffer, 0xffffffff);
214
+ const crcBuffer = python_struct_1.default.pack('<I', crc);
215
+ const buffer = buffer_1.Buffer.concat([valuesBuffer, crcBuffer]);
216
+ return { buffer, crc, crcBuffer, values, valuesBuffer };
217
+ }
218
+ exports.packSmmParameterValues = packSmmParameterValues;
219
+ /**
220
+ * Unpacks SMM (Safety Motion Module) parameter values from a `Uint8Array` buffer
221
+ * according to the specified parameter structure version.
222
+ *
223
+ * This function decodes the packed buffer back into its original data values,
224
+ * using the structure format defined for the given SMM parameter structure version.
225
+ *
226
+ * @param values - A `Uint8Array` representing the packed parameter values.
227
+ * @param parameterStructVersion - The version of the parameter struct to use. Defaults to `0x0041`.
228
+ * If the version is less than `0x0203`, the `smmOdV1` format is used;
229
+ * otherwise, the `smmOdV2` format is used.
230
+ *
231
+ * @returns An array of unpacked values, decoded according to the structure format.
232
+ *
233
+ * @throws Error if the unpacking fails or the data format is incorrect.
234
+ */
235
+ function unpackSmmParameterValues(values, parameterStructVersion = 0x0041) {
236
+ const packFormat = buildSmmParametersPackFormat(parameterStructVersion);
237
+ const buffer = buffer_1.Buffer.from(values);
238
+ return python_struct_1.default.unpack(packFormat, buffer);
239
+ }
240
+ exports.unpackSmmParameterValues = unpackSmmParameterValues;
241
+ /**
242
+ * Packs SMM (Safety Motion Module) parameter values into a buffer for verification,
243
+ * including a bitmask and CRC32 checksum to ensure data integrity.
244
+ *
245
+ * This function prepares data specifically for verification purposes, combining
246
+ * parameter values, a group-specific bitmask, and a CRC32 checksum.
247
+ *
248
+ * @param values - An array of `DataType` representing the parameter values to be packed.
249
+ * @param groupIndex - The index of the parameter group, determining the bitmask and packing format.
250
+ * @param parameterStructVersion - The version of the parameter struct to use. Defaults to `0x0041`.
251
+ * If the version is less than `0x0203`, the `smmOdV1` format is used;
252
+ * otherwise, the `smmOdV2` format is used.
253
+ *
254
+ * @returns An object containing:
255
+ * - `buffer`: A `Uint8Array` combining the bitmask and CRC32 checksum for verification.
256
+ * - `crc`: The CRC32 checksum calculated from the packed data and bitmask.
257
+ *
258
+ * @throws Error if the groupIndex is invalid or packing fails.
259
+ */
260
+ function packSmmParameterValuesForVerification(values, groupIndex, parameterStructVersion = 0x0041) {
261
+ const packFormats = buildSmmParametersGroupPackFormats(parameterStructVersion);
262
+ const valuesPackFormat = packFormats[groupIndex];
85
263
  const valuesBuffer = python_struct_1.default.pack(valuesPackFormat, values);
86
- const bitmaskArray = exports.smmGroupBitMasks[group];
87
- const bitmaskBuffer = Uint8Array.from(bitmaskArray);
264
+ const bitmaskBuffer = buildSmmParametersGroupBitmask(parameterStructVersion, groupIndex);
88
265
  const crcInputBuffer = (0, util_1.mergeUint8Arrays)(valuesBuffer, bitmaskBuffer);
89
266
  const crc = calcSmmCRC32(crcInputBuffer, 0xffffffff);
90
267
  const crcBuffer = python_struct_1.default.pack('<I', crc);
91
268
  const buffer = (0, util_1.mergeUint8Arrays)(bitmaskBuffer, crcBuffer);
92
269
  return { buffer, crc };
93
270
  }
94
- exports.calcSmmBitmask = calcSmmBitmask;
271
+ exports.packSmmParameterValuesForVerification = packSmmParameterValuesForVerification;
272
+ /**
273
+ * Packs a `Date` object into a binary buffer in a specific format for the SMM (Safety Motion Module).
274
+ * The date is serialized into the following fields: year (2 bytes), month (1 byte), day (1 byte),
275
+ * hours (1 byte), minutes (1 byte), seconds (1 byte), and a trailing byte (set to 0).
276
+ * The packed data can be used for storing or transmitting the date in a structured format compatible with SMM.
277
+ *
278
+ * @param date - The `Date` object to be packed. It is expected to be in UTC time.
279
+ *
280
+ * @returns A `Buffer` containing the packed date.
281
+ */
95
282
  function packSmmDate(date) {
96
283
  const year = date.getUTCFullYear();
97
284
  const month = date.getUTCMonth() + 1;
@@ -103,6 +290,26 @@ function packSmmDate(date) {
103
290
  return buffer;
104
291
  }
105
292
  exports.packSmmDate = packSmmDate;
293
+ /**
294
+ * Packs a validation report for the SMM (Safety Motion Module), including a CRC, date, and credentials.
295
+ * The function takes a content `Uint8Array`, a `Date`, a `username`, and a `password`, and returns an object
296
+ * containing the packed report, the CRC, and the credentials used for packing.
297
+ *
298
+ * The packed report includes the following components:
299
+ * - CRC32 checksum of the content.
300
+ * - The date packed into a specific format.
301
+ * - The credentials (username and password) packed into a specific format.
302
+ *
303
+ * @param content - The content of the validation report, as a `Uint8Array`.
304
+ * @param date - The date of the report to be packed into the format used by SMM.
305
+ * @param username - The username associated with the report.
306
+ * @param password - The password associated with the report.
307
+ *
308
+ * @returns An object containing:
309
+ * - `buffer`: A `Uint8Array` that includes the packed CRC, date, and credentials.
310
+ * - `crc`: The CRC32 checksum of the `content`.
311
+ * - `credentials`: The packed username and password.
312
+ */
106
313
  function packSmmValidationReport(content, date, username, password) {
107
314
  const crc = calcSmmCRC32(content, 0xffffffff);
108
315
  const crcBuffer = python_struct_1.default.pack('<I', crc);
@@ -112,64 +319,37 @@ function packSmmValidationReport(content, date, username, password) {
112
319
  return { buffer, crc, credentials };
113
320
  }
114
321
  exports.packSmmValidationReport = packSmmValidationReport;
115
- exports.smmPackFormat = '<H24sBHBBBBBHB2BihihIBIBBHBBIBBBIHHHhHBBHBBHiIBBHBHHiiBHHHiI4B4H4H4H4i4i4IiiI';
116
- function packSmmParameterValues(values, format = exports.smmPackFormat) {
117
- const valuesBuffer = python_struct_1.default.pack(format, values);
118
- const crc = calcSmmCRC32(valuesBuffer, 0xffffffff);
119
- const crcBuffer = python_struct_1.default.pack('<I', crc);
120
- const buffer = buffer_1.Buffer.concat([valuesBuffer, crcBuffer]);
121
- return { buffer, crc, crcBuffer, values, valuesBuffer };
122
- }
123
- exports.packSmmParameterValues = packSmmParameterValues;
124
- function packSmmCredentials(username, password) {
125
- return python_struct_1.default.pack('<24s24s', username, password);
126
- }
127
- exports.packSmmCredentials = packSmmCredentials;
128
- function packSmmChangePassword(newPassword, oldPassword) {
129
- return python_struct_1.default.pack('<24s24s', newPassword, oldPassword);
130
- }
131
- exports.packSmmChangePassword = packSmmChangePassword;
322
+ /**
323
+ * Packs a CRC (Cyclic Redundancy Check) value into a 4-byte little-endian binary format.
324
+ * This is typically used for verifying software updates in the SMM (Safety Motion Module).
325
+ *
326
+ * @param crc - The CRC value to be packed, represented as a 32-bit unsigned integer.
327
+ *
328
+ * @returns A `Buffer` containing the packed CRC value in little-endian format.
329
+ *
330
+ * @throws Error if the provided CRC is not a valid number.
331
+ */
132
332
  function packSmmSoftwareUpdateCrc(crc) {
133
333
  return python_struct_1.default.pack('<I', crc);
134
334
  }
135
335
  exports.packSmmSoftwareUpdateCrc = packSmmSoftwareUpdateCrc;
136
- function unpackSmmParameterValues(values, format = exports.smmPackFormat) {
137
- const buffer = buffer_1.Buffer.from(values);
138
- return python_struct_1.default.unpack(format, buffer);
336
+ /**
337
+ * Retrieves the names of all safety parameter groups from the specified parameter structure version.
338
+ *
339
+ * The function returns a list of unique group names based on the version of the parameter structure.
340
+ * It will select `smmOdV1` if the version is lower than `0x0203`, and `smmOdV2` otherwise.
341
+ *
342
+ * @param parameterStructVersion - The version of the parameter struct to use. Defaults to `0x0041`.
343
+ * If the version is less than `0x0203`, the `smmOdV1` format is used;
344
+ * otherwise, the `smmOdV2` format is used.
345
+ *
346
+ * @returns An array of strings representing the group names in the safety parameters.
347
+ */
348
+ function getSmmParametersGroupNames(parameterStructVersion = 0x0041) {
349
+ const smmOd = (parameterStructVersion < 0x0203 ? smm_od_v1_json_1.default : smm_od_v2_json_1.default);
350
+ const groupMap = (0, util_1.mapByProperty)(smmOd.parameters.safety, 'group');
351
+ return Array.from(groupMap.keys());
139
352
  }
140
- exports.unpackSmmParameterValues = unpackSmmParameterValues;
141
- var SmmVerificationGroupOrdinal;
142
- (function (SmmVerificationGroupOrdinal) {
143
- SmmVerificationGroupOrdinal[SmmVerificationGroupOrdinal["GENERAL"] = 1] = "GENERAL";
144
- SmmVerificationGroupOrdinal[SmmVerificationGroupOrdinal["SAFETY_IO"] = 2] = "SAFETY_IO";
145
- SmmVerificationGroupOrdinal[SmmVerificationGroupOrdinal["ANALOG_IN"] = 3] = "ANALOG_IN";
146
- SmmVerificationGroupOrdinal[SmmVerificationGroupOrdinal["ENCODER_1"] = 4] = "ENCODER_1";
147
- SmmVerificationGroupOrdinal[SmmVerificationGroupOrdinal["ENCODER_2"] = 5] = "ENCODER_2";
148
- SmmVerificationGroupOrdinal[SmmVerificationGroupOrdinal["STO_SBC"] = 6] = "STO_SBC";
149
- SmmVerificationGroupOrdinal[SmmVerificationGroupOrdinal["SOS"] = 7] = "SOS";
150
- SmmVerificationGroupOrdinal[SmmVerificationGroupOrdinal["SS1"] = 8] = "SS1";
151
- SmmVerificationGroupOrdinal[SmmVerificationGroupOrdinal["SS2"] = 9] = "SS2";
152
- SmmVerificationGroupOrdinal[SmmVerificationGroupOrdinal["SLS1"] = 10] = "SLS1";
153
- SmmVerificationGroupOrdinal[SmmVerificationGroupOrdinal["SLS2"] = 11] = "SLS2";
154
- SmmVerificationGroupOrdinal[SmmVerificationGroupOrdinal["SLS3"] = 12] = "SLS3";
155
- SmmVerificationGroupOrdinal[SmmVerificationGroupOrdinal["SLS4"] = 13] = "SLS4";
156
- SmmVerificationGroupOrdinal[SmmVerificationGroupOrdinal["SMS"] = 14] = "SMS";
157
- })(SmmVerificationGroupOrdinal = exports.SmmVerificationGroupOrdinal || (exports.SmmVerificationGroupOrdinal = {}));
158
- exports.smmVerificationGroupNameToOrdinal = {
159
- 'General Parameters (General Parameters)': SmmVerificationGroupOrdinal.GENERAL,
160
- 'Safety IO (Digital I/O)': SmmVerificationGroupOrdinal.SAFETY_IO,
161
- 'Safety IO (Analog Input)': SmmVerificationGroupOrdinal.ANALOG_IN,
162
- 'Encoder selection (Encoders)': SmmVerificationGroupOrdinal.ENCODER_1,
163
- 'Encoder selection (Speed / position)': SmmVerificationGroupOrdinal.ENCODER_2,
164
- 'Safety functions (STO + SBC)': SmmVerificationGroupOrdinal.STO_SBC,
165
- 'Safety functions (SOS)': SmmVerificationGroupOrdinal.SOS,
166
- 'Safety functions (SS1)': SmmVerificationGroupOrdinal.SS1,
167
- 'Safety functions (SS2)': SmmVerificationGroupOrdinal.SS2,
168
- 'Safety functions (SLS1)': SmmVerificationGroupOrdinal.SLS1,
169
- 'Safety functions (SLS2)': SmmVerificationGroupOrdinal.SLS2,
170
- 'Safety functions (SLS3)': SmmVerificationGroupOrdinal.SLS3,
171
- 'Safety functions (SLS4)': SmmVerificationGroupOrdinal.SLS4,
172
- 'Safety functions (SMS)': SmmVerificationGroupOrdinal.SMS,
173
- };
174
- exports.smmVerificationGroupNames = Object.keys(exports.smmVerificationGroupNameToOrdinal);
353
+ exports.getSmmParametersGroupNames = getSmmParametersGroupNames;
354
+ exports.smmOdV1DefaultValues = smm_od_v1_json_1.default['parameters']['safety'].map((parameter) => parameter['defaultValue']);
175
355
  //# sourceMappingURL=smm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"smm.js","sourceRoot":"","sources":["../../../../../libs/motion-master-client/src/lib/smm.ts"],"names":[],"mappings":";;;;AAAA,0EAAuD;AACvD,mCAAgC;AAChC,iCAA0C;AAE7B,QAAA,gBAAgB,GAAG;IAC9B,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACxE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,I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