@synapticon/motion-master-client 2.3.0-beta.0 → 6.0.0-alpha.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/LICENSE +21 -0
  2. package/dist/client.d.ts +20 -0
  3. package/dist/client.js +37 -0
  4. package/dist/constants.d.ts +2 -0
  5. package/dist/constants.js +8 -0
  6. package/dist/generated/Api.d.ts +991 -0
  7. package/dist/generated/Api.js +614 -0
  8. package/dist/generated/data-contracts.d.ts +644 -0
  9. package/dist/generated/data-contracts.js +12 -0
  10. package/dist/generated/http-client.d.ts +60 -0
  11. package/dist/generated/http-client.js +171 -0
  12. package/dist/hex.d.ts +2 -0
  13. package/dist/hex.js +20 -0
  14. package/dist/index.d.ts +10 -7
  15. package/dist/index.js +16 -22
  16. package/dist/mmpd.d.ts +54 -0
  17. package/dist/mmpd.js +323 -0
  18. package/dist/sdo.d.ts +15 -0
  19. package/dist/sdo.js +212 -0
  20. package/dist/somanet.d.ts +5 -0
  21. package/dist/somanet.js +15 -0
  22. package/dist/web-socket-connection.d.ts +69 -0
  23. package/dist/web-socket-connection.js +206 -0
  24. package/package.json +29 -35
  25. package/.vscode/launch.json +0 -23
  26. package/README.md +0 -118
  27. package/box.config.json +0 -7
  28. package/dist/index.d.ts.map +0 -1
  29. package/dist/index.js.map +0 -1
  30. package/dist/motion-master-client-web-socket-connection.d.ts +0 -43
  31. package/dist/motion-master-client-web-socket-connection.d.ts.map +0 -1
  32. package/dist/motion-master-client-web-socket-connection.js +0 -91
  33. package/dist/motion-master-client-web-socket-connection.js.map +0 -1
  34. package/dist/motion-master-client.d.ts +0 -105
  35. package/dist/motion-master-client.d.ts.map +0 -1
  36. package/dist/motion-master-client.js +0 -348
  37. package/dist/motion-master-client.js.map +0 -1
  38. package/dist/motion-master-notification-subscribe-data.d.ts +0 -8
  39. package/dist/motion-master-notification-subscribe-data.d.ts.map +0 -1
  40. package/dist/motion-master-notification-subscribe-data.js +0 -3
  41. package/dist/motion-master-notification-subscribe-data.js.map +0 -1
  42. package/dist/motion-master-notification-web-socket-connection.d.ts +0 -56
  43. package/dist/motion-master-notification-web-socket-connection.d.ts.map +0 -1
  44. package/dist/motion-master-notification-web-socket-connection.js +0 -115
  45. package/dist/motion-master-notification-web-socket-connection.js.map +0 -1
  46. package/dist/motion-master-notification.d.ts +0 -31
  47. package/dist/motion-master-notification.d.ts.map +0 -1
  48. package/dist/motion-master-notification.js +0 -44
  49. package/dist/motion-master-notification.js.map +0 -1
  50. package/dist/util.d.ts +0 -16
  51. package/dist/util.d.ts.map +0 -1
  52. package/dist/util.js +0 -24
  53. package/dist/util.js.map +0 -1
  54. package/licenses.format.json +0 -4
  55. package/motion-master-client.config.json +0 -7
  56. package/smm_data_dic.json +0 -1213
  57. package/src/index.ts +0 -7
  58. package/src/motion-master-client-web-socket-connection.ts +0 -104
  59. package/src/motion-master-client.ts +0 -468
  60. package/src/motion-master-notification-subscribe-data.ts +0 -7
  61. package/src/motion-master-notification-web-socket-connection.ts +0 -143
  62. package/src/motion-master-notification.ts +0 -51
  63. package/src/util.ts +0 -22
  64. package/test.sh +0 -122
  65. package/tsconfig.json +0 -63
  66. package/tslint.json +0 -118
@@ -0,0 +1,644 @@
1
+ /** Summary of one on-disk parameter-cache file (its identity, size, and count). */
2
+ export interface ParameterCacheEntry {
3
+ /**
4
+ * Opaque key addressing this cache file in the download/delete endpoints ("<vendor>-<product>-<revision>"). Use it verbatim — do not construct it client-side.
5
+ * @example "000022d2-00000201-0000000a"
6
+ */
7
+ id: string;
8
+ /**
9
+ * EtherCAT vendor ID (0x22D2 = Synapticon).
10
+ * @example 8914
11
+ */
12
+ vendorId: number;
13
+ /**
14
+ * Product code.
15
+ * @example 513
16
+ */
17
+ productCode: number;
18
+ /**
19
+ * Revision number.
20
+ * @example 10
21
+ */
22
+ revisionNumber: number;
23
+ /**
24
+ * Number of cached parameter definitions in the file.
25
+ * @example 312
26
+ */
27
+ parameterCount: number;
28
+ /**
29
+ * File size on disk, in bytes.
30
+ * @example 48213
31
+ */
32
+ sizeBytes: number;
33
+ }
34
+ /** A device's process-data (sync-manager) watchdog configuration, decoded from the watchdog divider (0x0400) and process-data watchdog time (0x0420) ESC registers. */
35
+ export interface ProcessDataWatchdog {
36
+ /**
37
+ * 1-based position of the device on the fieldbus.
38
+ * @example 1
39
+ */
40
+ slavePosition: number;
41
+ /**
42
+ * False when the time register (ticks) is 0, i.e. the watchdog is disabled.
43
+ * @example true
44
+ */
45
+ enabled: boolean;
46
+ /**
47
+ * Live status register (0x0440 bit 0): true = the watchdog is counting, false = expired or disabled. Meaningful only when enabled; it counts down only while process data flows.
48
+ * @example true
49
+ */
50
+ running: boolean;
51
+ /**
52
+ * Configured timeout in nanoseconds: ticks × 40 ns × (divider + 2).
53
+ * @example 100000000
54
+ */
55
+ timeoutNs: number;
56
+ /**
57
+ * The same timeout in milliseconds (convenience for display/editing).
58
+ * @example 100
59
+ */
60
+ timeoutMs: number;
61
+ /**
62
+ * Raw watchdog divider register (0x0400); shared with the PDI watchdog.
63
+ * @example 2498
64
+ */
65
+ divider: number;
66
+ /**
67
+ * Raw process-data watchdog time register (0x0420), in watchdog ticks.
68
+ * @example 1000
69
+ */
70
+ ticks: number;
71
+ }
72
+ /** A monitoring's configuration plus its per-parameter source classification. */
73
+ export interface Monitoring {
74
+ /** @example "left-leg" */
75
+ topic: string;
76
+ /**
77
+ * Present only when a label was supplied at creation.
78
+ * @example "Left Leg"
79
+ */
80
+ name?: string;
81
+ /**
82
+ * Flush cadence in milliseconds (5–2000).
83
+ * @example 20
84
+ */
85
+ interval: number;
86
+ /** The sampled objects, in the positional order of each WebSocket sample row. */
87
+ parameters: {
88
+ /** @example 1 */
89
+ devicePosition: number;
90
+ /** @example 24676 */
91
+ index: number;
92
+ /** @example 0 */
93
+ subindex: number;
94
+ /**
95
+ * How the value is sourced — `pdo` (decoded from the live process image) or `sdo` (polled in the background and read from cache).
96
+ * @example "pdo"
97
+ */
98
+ source: "pdo" | "sdo";
99
+ }[];
100
+ }
101
+ export interface ProcessImageObject {
102
+ /**
103
+ * 1-based bus position of the owning device
104
+ * @example 1
105
+ */
106
+ slavePosition: number;
107
+ /**
108
+ * CoE object index
109
+ * @example 24640
110
+ */
111
+ index: number;
112
+ /**
113
+ * CoE object subindex
114
+ * @example 0
115
+ */
116
+ subindex: number;
117
+ /**
118
+ * Object name resolved from the device's parameter map; empty when the object dictionary has not been enumerated for that device
119
+ * @example "Target position"
120
+ */
121
+ name: string;
122
+ /**
123
+ * Absolute bit offset within the direction's image
124
+ * @example 32
125
+ */
126
+ bitOffset: number;
127
+ /**
128
+ * Width of the value in bits
129
+ * @example 32
130
+ */
131
+ bitLength: number;
132
+ }
133
+ export interface SyncManagerConfig {
134
+ /**
135
+ * Sync Manager number (0–7)
136
+ * @example 2
137
+ */
138
+ index: number;
139
+ /**
140
+ * Physical ESC memory start address the SM guards
141
+ * @example 4352
142
+ */
143
+ physicalStart: number;
144
+ /**
145
+ * Length of the guarded window in bytes
146
+ * @example 12
147
+ */
148
+ length: number;
149
+ /**
150
+ * Raw SM control/flags register (buffer mode, direction, watchdog, enable) — decoded by the client
151
+ * @example 100100
152
+ */
153
+ flags: number;
154
+ /**
155
+ * 0 unused, 1 MbxOut, 2 MbxIn, 3 Outputs, 4 Inputs
156
+ * @example 3
157
+ */
158
+ type: number;
159
+ }
160
+ export interface FmmuConfig {
161
+ /**
162
+ * FMMU number (0–3)
163
+ * @example 0
164
+ */
165
+ index: number;
166
+ /**
167
+ * Logical (bus-wide) start address
168
+ * @example 0
169
+ */
170
+ logicalStart: number;
171
+ /**
172
+ * Mapped length in bytes
173
+ * @example 12
174
+ */
175
+ length: number;
176
+ /**
177
+ * Start bit within the first logical byte
178
+ * @example 0
179
+ */
180
+ logicalStartBit: number;
181
+ /**
182
+ * End bit within the last logical byte
183
+ * @example 7
184
+ */
185
+ logicalEndBit: number;
186
+ /**
187
+ * Physical ESC start address (ties the FMMU to a Sync Manager)
188
+ * @example 4352
189
+ */
190
+ physicalStart: number;
191
+ /**
192
+ * Start bit within the first physical byte
193
+ * @example 0
194
+ */
195
+ physicalStartBit: number;
196
+ /**
197
+ * ESC FMMU type: 1 read (inputs/TxPDO), 2 write (outputs/RxPDO)
198
+ * @example 2
199
+ */
200
+ type: number;
201
+ /**
202
+ * Whether the FMMU is active
203
+ * @example true
204
+ */
205
+ active: boolean;
206
+ }
207
+ export interface SlaveConfig {
208
+ /**
209
+ * 1-based bus position
210
+ * @example 1
211
+ */
212
+ slavePosition: number;
213
+ /**
214
+ * Device name for this slave position, empty if unknown
215
+ * @example "SOMANET Node"
216
+ */
217
+ deviceName: string;
218
+ /**
219
+ * Station (configured) address assigned during scan
220
+ * @example 4097
221
+ */
222
+ configuredAddress: number;
223
+ /**
224
+ * Configured station alias from EEPROM
225
+ * @example 0
226
+ */
227
+ aliasAddress: number;
228
+ /**
229
+ * Mapped output (master→slave) bits
230
+ * @example 96
231
+ */
232
+ outputBits: number;
233
+ /**
234
+ * Mapped input (slave→master) bits
235
+ * @example 128
236
+ */
237
+ inputBits: number;
238
+ mailbox: {
239
+ /**
240
+ * Write (master→slave) mailbox length in bytes; 0 if none
241
+ * @example 128
242
+ */
243
+ writeLength: number;
244
+ /**
245
+ * Write mailbox physical ESC offset
246
+ * @example 4096
247
+ */
248
+ writeOffset: number;
249
+ /**
250
+ * Read (slave→master) mailbox length in bytes
251
+ * @example 128
252
+ */
253
+ readLength: number;
254
+ /**
255
+ * Read mailbox physical ESC offset
256
+ * @example 4224
257
+ */
258
+ readOffset: number;
259
+ /**
260
+ * Supported-protocol bits (0x01 AoE, 0x02 EoE, 0x04 CoE, 0x08 FoE, 0x10 SoE, 0x20 VoE) — decoded by the client
261
+ * @example 14
262
+ */
263
+ protocols: number;
264
+ };
265
+ dc: {
266
+ /**
267
+ * Slave has distributed-clock hardware
268
+ * @example true
269
+ */
270
+ capable: boolean;
271
+ /**
272
+ * SYNC0 generation enabled (false for SM-synchronous bring-up)
273
+ * @example false
274
+ */
275
+ active: boolean;
276
+ /**
277
+ * Measured propagation delay in nanoseconds
278
+ * @example 300
279
+ */
280
+ propagationDelay: number;
281
+ /**
282
+ * DC cycle time in nanoseconds
283
+ * @example 0
284
+ */
285
+ cycleTime: number;
286
+ /**
287
+ * Shift from the cycle-modulus boundary in nanoseconds
288
+ * @example 0
289
+ */
290
+ shift: number;
291
+ };
292
+ /** Configured Sync Managers, by index */
293
+ syncManagers: SyncManagerConfig[];
294
+ /** Configured FMMUs, by index */
295
+ fmmus: FmmuConfig[];
296
+ }
297
+ export interface PortDiagnostics {
298
+ /**
299
+ * Physical link detected on this port (DL Status link bit)
300
+ * @example true
301
+ */
302
+ linkUp: boolean;
303
+ /**
304
+ * Loop closed on this port (no downstream slave, or port disabled)
305
+ * @example false
306
+ */
307
+ loopClosed: boolean;
308
+ /**
309
+ * Stable communication established on this port
310
+ * @example true
311
+ */
312
+ communication: boolean;
313
+ /**
314
+ * Invalid-frame counter (0x0300+): frames with a bad FCS/structure. 8-bit, saturates at 255; watch for a rising delta rather than the absolute value
315
+ * @example 0
316
+ */
317
+ invalidFrame: number;
318
+ /**
319
+ * Physical-layer RX error counter (0x0301+): RX_ER asserted by the PHY
320
+ * @example 0
321
+ */
322
+ rxError: number;
323
+ /**
324
+ * Forwarded RX error counter (0x0308+): errors first flagged by an upstream ESC — pinpoints the segment where corruption began
325
+ * @example 0
326
+ */
327
+ forwardedError: number;
328
+ /**
329
+ * Lost-link counter (0x0310+): link-down events on this port
330
+ * @example 0
331
+ */
332
+ lostLink: number;
333
+ }
334
+ export interface DeviceDiagnostics {
335
+ /**
336
+ * 1-based position on the fieldbus
337
+ * @example 1
338
+ */
339
+ slavePosition: number;
340
+ /**
341
+ * Device name for this slave position, empty if unknown
342
+ * @example "SOMANET Node"
343
+ */
344
+ deviceName: string;
345
+ /** Per-port link state and error counters (ports 0–3, in order) */
346
+ ports: PortDiagnostics[];
347
+ /**
348
+ * ECAT processing-unit error counter (0x030C): datagrams reaching the unit malformed
349
+ * @example 0
350
+ */
351
+ processingUnitError: number;
352
+ /**
353
+ * PDI error counter (0x030D): problems on the slave-local process-data interface
354
+ * @example 0
355
+ */
356
+ pdiError: number;
357
+ /**
358
+ * Process-data (SM) watchdog expirations (0x0442): the slave stopped seeing fresh outputs
359
+ * @example 0
360
+ */
361
+ processDataWatchdog: number;
362
+ /**
363
+ * PDI watchdog expirations (0x0443)
364
+ * @example 0
365
+ */
366
+ pdiWatchdog: number;
367
+ }
368
+ export interface DcSyncStatus {
369
+ /**
370
+ * 1-based position on the fieldbus
371
+ * @example 1
372
+ */
373
+ slavePosition: number;
374
+ /**
375
+ * Device name for this slave position, empty if unknown
376
+ * @example "SOMANET Node"
377
+ */
378
+ deviceName: string;
379
+ /**
380
+ * Slave has distributed-clock hardware
381
+ * @example true
382
+ */
383
+ dcCapable: boolean;
384
+ /**
385
+ * This slave is the DC reference clock (the first DC-capable slave) — it defines bus time, so its own systemTimeDifference is zero
386
+ * @example false
387
+ */
388
+ referenceClock: boolean;
389
+ /**
390
+ * System-time delay / propagation delay (0x0928), nanoseconds
391
+ * @example 300
392
+ */
393
+ propagationDelay: number;
394
+ /**
395
+ * Signed deviation of the local system time from the reference clock (0x092C), in nanoseconds. Positive = local clock ahead of the reference, negative = behind; zero on the reference clock. Meaningful only while exchanging in SAFE-OP/OP; converges toward zero as the drift-compensation loop settles
396
+ * @example 0
397
+ */
398
+ systemTimeDifference: number;
399
+ }
400
+ export interface AlStatusCode {
401
+ /**
402
+ * AL Status Code value (ETG.1000.6 §6.4.1)
403
+ * @example 20
404
+ */
405
+ code: number;
406
+ /**
407
+ * Short human-readable name
408
+ * @example "No valid firmware"
409
+ */
410
+ name: string;
411
+ /**
412
+ * Full description of the error condition
413
+ * @example "No valid firmware is present — the slave needs firmware flashed"
414
+ */
415
+ description: string;
416
+ /**
417
+ * True if a slave reporting this code cannot reach the requested EtherCAT state by retrying. The server abandons the slave immediately during a state transition instead of waiting for timeout; the master must change something (re-init, reflash, power cycle) before another transition attempt can succeed.
418
+ * @example true
419
+ */
420
+ terminal: boolean;
421
+ }
422
+ export interface EscRegister {
423
+ /**
424
+ * Register address in the ESC address space (decimal)
425
+ * @example 272
426
+ */
427
+ address: number;
428
+ /**
429
+ * Register width in bytes (1, 2, 4, or 8)
430
+ * @example 2
431
+ */
432
+ length: number;
433
+ /**
434
+ * Short snake_case identifier
435
+ * @example "dl_status"
436
+ */
437
+ name: string;
438
+ /**
439
+ * Human-readable description from the Beckhoff ESC datasheet
440
+ * @example "DL status: EEPROM load ok, link detected, communication established per port"
441
+ */
442
+ description: string;
443
+ }
444
+ export interface FoeErrorCode {
445
+ /**
446
+ * 32-bit FoE error code as sent in the FoE ERROR packet (ETG.1000.6 §5.5)
447
+ * @example 32770
448
+ */
449
+ code: number;
450
+ /**
451
+ * Short human-readable name
452
+ * @example "File not found"
453
+ */
454
+ name: string;
455
+ /**
456
+ * Full description of the error condition
457
+ * @example "The requested file does not exist on the slave"
458
+ */
459
+ description: string;
460
+ }
461
+ export interface ObjectDataTypeInfo {
462
+ /**
463
+ * ETG.1020 data type code
464
+ * @example 7
465
+ */
466
+ code: number;
467
+ /**
468
+ * Symbolic name of the data type
469
+ * @example "UNSIGNED32"
470
+ */
471
+ name: string;
472
+ /**
473
+ * Declared bit width of one element; 0 for variable-length types
474
+ * @example 32
475
+ */
476
+ bitSize: number;
477
+ }
478
+ export interface DeviceParameter {
479
+ /**
480
+ * CoE object index
481
+ * @example 24640
482
+ */
483
+ index: number;
484
+ /**
485
+ * CoE object subindex
486
+ * @example 0
487
+ */
488
+ subindex: number;
489
+ /**
490
+ * Textual description from the slave's SDO Info "Get Entry Description"
491
+ * @example "Position actual value"
492
+ */
493
+ name: string;
494
+ /**
495
+ * ETG.1000.6 §5 object code (VAR=7, ARRAY=8, RECORD=9)
496
+ * @example 7
497
+ */
498
+ objectCode: number;
499
+ /**
500
+ * ETG.1020 data type code (e.g. 7 = UNSIGNED32)
501
+ * @example 4
502
+ */
503
+ dataType: number;
504
+ /**
505
+ * Symbolic name of the data type (resolved server-side from `dataType`)
506
+ * @example "INTEGER32"
507
+ */
508
+ dataTypeName: string;
509
+ /**
510
+ * Bit length of the entry's value
511
+ * @example 32
512
+ */
513
+ bitLength: number;
514
+ /**
515
+ * ObjAccess bitfield (read/write per AL state)
516
+ * @example 7
517
+ */
518
+ access: number;
519
+ /**
520
+ * Last-known value, decoded according to `dataType`. Initialised to a type-appropriate zero (0 for numbers, "" for strings, [] for raw bytes) before the first read. After a successful SDO upload, holds the decoded value; the JSON encoding follows the variant alternative — number, string, or array of byte values.
521
+ * @example 12345
522
+ */
523
+ value: number | string | number[];
524
+ /**
525
+ * ETG.1004 unit code reported by the slave for this entry. Absent when the slave does not populate the Unit field of the SDO Info response. The 32-bit code decomposes into prefix, base SI unit, and exponent per ETG.1004.
526
+ * @example 0
527
+ */
528
+ unit?: number;
529
+ /** Slave-reported default value, decoded with the same logic as `value`. Absent when the slave does not report a default. */
530
+ defaultValue?: number | string | number[];
531
+ /** Slave-reported minimum value, decoded with the same logic as `value`. Absent when the slave does not report a minimum. */
532
+ minValue?: number | string | number[];
533
+ /** Slave-reported maximum value, decoded with the same logic as `value`. Absent when the slave does not report a maximum. */
534
+ maxValue?: number | string | number[];
535
+ /**
536
+ * Freshness of `value` relative to the device. `synced` — matches the device (last successful read or write); `pending` — set locally while offline or after a failed write, not yet confirmed on the device; `unknown` — never read, `value` is the type-appropriate default.
537
+ * @example "synced"
538
+ */
539
+ syncState: "unknown" | "synced" | "pending";
540
+ }
541
+ /** Parsed SII (EEPROM) image of a slave — the fixed header plus the decoded category section. String-index fields are 1-based references into `category.strings`. */
542
+ export interface SlaveInformationInterface {
543
+ /** Fixed 128-byte header (identity and mailbox configuration) */
544
+ info: {
545
+ pdiControl?: number;
546
+ pdiConfiguration?: number;
547
+ syncImpulseLen?: number;
548
+ pdiConfiguration2?: number;
549
+ configuredStationAlias?: number;
550
+ checksum?: number;
551
+ /** @example 8914 */
552
+ vendorId?: number;
553
+ /** @example 769 */
554
+ productCode?: number;
555
+ revisionNumber?: number;
556
+ serialNumber?: number;
557
+ bootstrapReceiveMailboxOffset?: number;
558
+ bootstrapReceiveMailboxSize?: number;
559
+ bootstrapSendMailboxOffset?: number;
560
+ bootstrapSendMailboxSize?: number;
561
+ standardReceiveMailboxOffset?: number;
562
+ standardReceiveMailboxSize?: number;
563
+ standardSendMailboxOffset?: number;
564
+ standardSendMailboxSize?: number;
565
+ /**
566
+ * Bitfield: 0x01 AoE, 0x02 EoE, 0x04 CoE, 0x08 FoE, 0x10 SoE, 0x20 VoE
567
+ * @example 12
568
+ */
569
+ mailboxProtocol?: number;
570
+ /** Raw EEPROM-size word (ETG: size in KiBit − 1) */
571
+ size?: number;
572
+ version?: number;
573
+ };
574
+ /** Decoded SII category section */
575
+ category: {
576
+ /**
577
+ * STRINGS table (category 10), referenced by 1-based index
578
+ * @example ["SOMANET","SOMANET Circulo CiA402 Drive"]
579
+ */
580
+ strings?: string[];
581
+ /** GENERAL device information (category 30) */
582
+ general?: {
583
+ groupIdx?: number;
584
+ imgIdx?: number;
585
+ orderIdx?: number;
586
+ nameIdx?: number;
587
+ coeDetails?: number;
588
+ foeDetails?: number;
589
+ eoeDetails?: number;
590
+ soeChannels?: number;
591
+ ds402Channels?: number;
592
+ sysmanClass?: number;
593
+ flags?: number;
594
+ currentOnEBus?: number;
595
+ physicalPort?: number;
596
+ physicalMemoryAddress?: number;
597
+ };
598
+ /** FMMU defaults (category 40), one raw 16-bit word per entry */
599
+ fmmus?: number[];
600
+ /** Sync-Manager defaults (category 41) */
601
+ syncManagers?: {
602
+ physicalStartAddress?: number;
603
+ length?: number;
604
+ controlRegister?: number;
605
+ statusRegister?: number;
606
+ enableSyncManager?: number;
607
+ /** 1 MbxOut, 2 MbxIn, 3 Outputs, 4 Inputs */
608
+ syncManagerType?: number;
609
+ }[];
610
+ /** Default RxPDOs (category 51) */
611
+ rxPdos?: SiiPdo[];
612
+ /** Default TxPDOs (category 50) */
613
+ txPdos?: SiiPdo[];
614
+ /** Distributed-clock settings (category 60) */
615
+ distributedClocks?: {
616
+ cycleTime0?: number;
617
+ shiftTime0?: number;
618
+ shiftTime1?: number;
619
+ sync1CycleFactor?: number;
620
+ assignActivate?: number;
621
+ sync0CycleFactor?: number;
622
+ nameIdx?: number;
623
+ descIdx?: number;
624
+ }[];
625
+ };
626
+ }
627
+ /** One default PDO from the SII (RxPDO category 51 or TxPDO category 50) */
628
+ export interface SiiPdo {
629
+ pdoIndex?: number;
630
+ /** Declared entry count (may exceed `entries.length` if the payload was truncated) */
631
+ nEntry?: number;
632
+ syncM?: number;
633
+ synchronization?: number;
634
+ nameIdx?: number;
635
+ flags?: number;
636
+ entries?: {
637
+ entryIndex?: number;
638
+ subindex?: number;
639
+ entryNameIdx?: number;
640
+ dataType?: number;
641
+ bitLen?: number;
642
+ flags?: number;
643
+ }[];
644
+ }
@@ -0,0 +1,12 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ // @ts-nocheck
4
+ /*
5
+ * ---------------------------------------------------------------
6
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
7
+ * ## ##
8
+ * ## AUTHOR: acacode ##
9
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
10
+ * ---------------------------------------------------------------
11
+ */
12
+ export {};
@@ -0,0 +1,60 @@
1
+ export type QueryParamsType = Record<string | number, any>;
2
+ export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
3
+ export interface FullRequestParams extends Omit<RequestInit, "body"> {
4
+ /** set parameter to `true` for call `securityWorker` for this request */
5
+ secure?: boolean;
6
+ /** request path */
7
+ path: string;
8
+ /** content type of request body */
9
+ type?: ContentType;
10
+ /** query params */
11
+ query?: QueryParamsType;
12
+ /** format of response (i.e. response.json() -> format: "json") */
13
+ format?: ResponseFormat;
14
+ /** request body */
15
+ body?: unknown;
16
+ /** base url */
17
+ baseUrl?: string;
18
+ /** request cancellation token */
19
+ cancelToken?: CancelToken;
20
+ }
21
+ export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
22
+ export interface ApiConfig<SecurityDataType = unknown> {
23
+ baseUrl?: string;
24
+ baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
25
+ securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
26
+ customFetch?: typeof fetch;
27
+ }
28
+ export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
29
+ data: D;
30
+ error: E;
31
+ }
32
+ type CancelToken = Symbol | string | number;
33
+ export declare enum ContentType {
34
+ Json = "application/json",
35
+ JsonApi = "application/vnd.api+json",
36
+ FormData = "multipart/form-data",
37
+ UrlEncoded = "application/x-www-form-urlencoded",
38
+ Text = "text/plain"
39
+ }
40
+ export declare class HttpClient<SecurityDataType = unknown> {
41
+ baseUrl: string;
42
+ private securityData;
43
+ private securityWorker?;
44
+ private abortControllers;
45
+ private customFetch;
46
+ private baseApiParams;
47
+ constructor(apiConfig?: ApiConfig<SecurityDataType>);
48
+ setSecurityData: (data: SecurityDataType | null) => void;
49
+ protected encodeQueryParam(key: string, value: any): string;
50
+ protected addQueryParam(query: QueryParamsType, key: string): string;
51
+ protected addArrayQueryParam(query: QueryParamsType, key: string): any;
52
+ protected toQueryString(rawQuery?: QueryParamsType): string;
53
+ protected addQueryParams(rawQuery?: QueryParamsType): string;
54
+ private contentFormatters;
55
+ protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams;
56
+ protected createAbortSignal: (cancelToken: CancelToken) => AbortSignal | undefined;
57
+ abortRequest: (cancelToken: CancelToken) => void;
58
+ request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<HttpResponse<T, E>>;
59
+ }
60
+ export {};