@danidoble/webserial 4.4.4 → 4.5.0-alpha.0

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 (116) hide show
  1. package/dist/boardroid.cjs +1 -1
  2. package/dist/boardroid.js +4 -3
  3. package/dist/devices-BndwHuvP.cjs +1 -0
  4. package/dist/devices-CHc7K4eY.js +67 -0
  5. package/dist/hopper.cjs +1 -1
  6. package/dist/hopper.js +1 -1
  7. package/dist/jofemar.cjs +1 -1
  8. package/dist/jofemar.js +30 -29
  9. package/dist/jsd.cjs +1 -0
  10. package/dist/jsd.js +2443 -0
  11. package/dist/kernel-As0xv_MS.cjs +1 -0
  12. package/dist/{kernel-BZzs36vi.js → kernel-CFxkp4Nz.js} +147 -204
  13. package/dist/kernel.cjs +1 -1
  14. package/dist/kernel.js +4 -3
  15. package/dist/locker.cjs +1 -1
  16. package/dist/locker.js +12 -11
  17. package/dist/pinpad.cjs +11 -11
  18. package/dist/pinpad.js +684 -639
  19. package/dist/pinpax.cjs +2 -2
  20. package/dist/pinpax.js +4 -3
  21. package/dist/relay.cjs +1 -1
  22. package/dist/relay.js +8 -7
  23. package/dist/types/lib/commands/jsd/applications/licensing.d.ts +51 -0
  24. package/dist/types/lib/commands/jsd/applications/licensing.d.ts.map +1 -0
  25. package/dist/types/lib/commands/jsd/applications/manifest.d.ts +73 -0
  26. package/dist/types/lib/commands/jsd/applications/manifest.d.ts.map +1 -0
  27. package/dist/types/lib/commands/jsd/applications/vision.d.ts +444 -0
  28. package/dist/types/lib/commands/jsd/applications/vision.d.ts.map +1 -0
  29. package/dist/types/lib/commands/jsd/frames/licensing/licensingClient.d.ts +34 -0
  30. package/dist/types/lib/commands/jsd/frames/licensing/licensingClient.d.ts.map +1 -0
  31. package/dist/types/lib/commands/jsd/frames/licensing/opCodes.d.ts +28 -0
  32. package/dist/types/lib/commands/jsd/frames/licensing/opCodes.d.ts.map +1 -0
  33. package/dist/types/lib/commands/jsd/frames/manifest/manifestClient.d.ts +40 -0
  34. package/dist/types/lib/commands/jsd/frames/manifest/manifestClient.d.ts.map +1 -0
  35. package/dist/types/lib/commands/jsd/frames/manifest/opCodes.d.ts +28 -0
  36. package/dist/types/lib/commands/jsd/frames/manifest/opCodes.d.ts.map +1 -0
  37. package/dist/types/lib/commands/jsd/frames/vision/opCodes.d.ts +72 -0
  38. package/dist/types/lib/commands/jsd/frames/vision/opCodes.d.ts.map +1 -0
  39. package/dist/types/lib/commands/jsd/frames/vision/visionClient.d.ts +336 -0
  40. package/dist/types/lib/commands/jsd/frames/vision/visionClient.d.ts.map +1 -0
  41. package/dist/types/lib/commands/jsd/protocol/crc16.d.ts +37 -0
  42. package/dist/types/lib/commands/jsd/protocol/crc16.d.ts.map +1 -0
  43. package/dist/types/lib/commands/jsd/protocol/responseHandler.d.ts +38 -0
  44. package/dist/types/lib/commands/jsd/protocol/responseHandler.d.ts.map +1 -0
  45. package/dist/types/lib/commands/jsd/protocol/rs232Strategy.d.ts +23 -0
  46. package/dist/types/lib/commands/jsd/protocol/rs232Strategy.d.ts.map +1 -0
  47. package/dist/types/lib/commands/jsd/protocol/tcpIpStrategy.d.ts +49 -0
  48. package/dist/types/lib/commands/jsd/protocol/tcpIpStrategy.d.ts.map +1 -0
  49. package/dist/types/lib/commands/jsd/types/LicensingClient.d.ts +32 -0
  50. package/dist/types/lib/commands/jsd/types/LicensingClient.d.ts.map +1 -0
  51. package/dist/types/lib/commands/jsd/types/jsd.types.d.ts +140 -0
  52. package/dist/types/lib/commands/jsd/types/jsd.types.d.ts.map +1 -0
  53. package/dist/types/lib/commands/jsd/types/manifestClient.d.ts +40 -0
  54. package/dist/types/lib/commands/jsd/types/manifestClient.d.ts.map +1 -0
  55. package/dist/types/lib/commands/jsd/types/transport.types.d.ts +29 -0
  56. package/dist/types/lib/commands/jsd/types/transport.types.d.ts.map +1 -0
  57. package/dist/types/lib/commands/jsd/types/visionClient.types.d.ts +356 -0
  58. package/dist/types/lib/commands/jsd/types/visionClient.types.d.ts.map +1 -0
  59. package/dist/types/lib/commands/jsd/utils/aplications.d.ts +48 -0
  60. package/dist/types/lib/commands/jsd/utils/aplications.d.ts.map +1 -0
  61. package/dist/types/lib/commands/jsd/utils/helpers.d.ts +15 -0
  62. package/dist/types/lib/commands/jsd/utils/helpers.d.ts.map +1 -0
  63. package/dist/types/lib/kernel.d.ts.map +1 -0
  64. package/dist/types/{main.d.ts → lib/main.d.ts} +6 -0
  65. package/dist/types/lib/main.d.ts.map +1 -0
  66. package/dist/types/lib/parsers/delimiterTransformer.d.ts +29 -0
  67. package/dist/types/lib/parsers/delimiterTransformer.d.ts.map +1 -0
  68. package/dist/types/lib/serial/boardroid.d.ts.map +1 -0
  69. package/dist/types/lib/serial/hopper.d.ts.map +1 -0
  70. package/dist/types/lib/serial/jofemar.d.ts.map +1 -0
  71. package/dist/types/lib/serial/jsd.d.ts +40 -0
  72. package/dist/types/lib/serial/jsd.d.ts.map +1 -0
  73. package/dist/types/{serial → lib/serial}/kernel.d.ts +1 -0
  74. package/dist/types/{serial → lib/serial}/kernel.d.ts.map +1 -1
  75. package/dist/types/lib/serial/locker.d.ts.map +1 -0
  76. package/dist/types/lib/serial/pinpad.d.ts.map +1 -0
  77. package/dist/types/lib/serial/pinpax.d.ts.map +1 -0
  78. package/dist/types/lib/serial/relay.d.ts.map +1 -0
  79. package/dist/types/{utils → lib/utils}/devices.d.ts +2 -0
  80. package/dist/types/lib/utils/devices.d.ts.map +1 -0
  81. package/dist/types/lib/utils/dispatcher.d.ts.map +1 -0
  82. package/dist/types/lib/utils/emulator.d.ts.map +1 -0
  83. package/dist/types/lib/utils/utils.d.ts.map +1 -0
  84. package/dist/types/test/t.d.ts +2 -0
  85. package/dist/types/test/t.d.ts.map +1 -0
  86. package/dist/webserial-core-3UL91lxi.cjs +4 -0
  87. package/dist/{webserial-core-Zwd9L-Y9.js → webserial-core-DSv1dX3s.js} +160 -148
  88. package/dist/webserial.cjs +1 -1
  89. package/dist/webserial.js +29 -23
  90. package/package.json +15 -10
  91. package/dist/kernel-7ObJp74F.cjs +0 -1
  92. package/dist/types/kernel.d.ts.map +0 -1
  93. package/dist/types/main.d.ts.map +0 -1
  94. package/dist/types/serial/boardroid.d.ts.map +0 -1
  95. package/dist/types/serial/hopper.d.ts.map +0 -1
  96. package/dist/types/serial/jofemar.d.ts.map +0 -1
  97. package/dist/types/serial/locker.d.ts.map +0 -1
  98. package/dist/types/serial/pinpad.d.ts.map +0 -1
  99. package/dist/types/serial/pinpax.d.ts.map +0 -1
  100. package/dist/types/serial/relay.d.ts.map +0 -1
  101. package/dist/types/utils/devices.d.ts.map +0 -1
  102. package/dist/types/utils/dispatcher.d.ts.map +0 -1
  103. package/dist/types/utils/emulator.d.ts.map +0 -1
  104. package/dist/types/utils/utils.d.ts.map +0 -1
  105. package/dist/webserial-core-Co8HLQvu.cjs +0 -4
  106. /package/dist/types/{kernel.d.ts → lib/kernel.d.ts} +0 -0
  107. /package/dist/types/{serial → lib/serial}/boardroid.d.ts +0 -0
  108. /package/dist/types/{serial → lib/serial}/hopper.d.ts +0 -0
  109. /package/dist/types/{serial → lib/serial}/jofemar.d.ts +0 -0
  110. /package/dist/types/{serial → lib/serial}/locker.d.ts +0 -0
  111. /package/dist/types/{serial → lib/serial}/pinpad.d.ts +0 -0
  112. /package/dist/types/{serial → lib/serial}/pinpax.d.ts +0 -0
  113. /package/dist/types/{serial → lib/serial}/relay.d.ts +0 -0
  114. /package/dist/types/{utils → lib/utils}/dispatcher.d.ts +0 -0
  115. /package/dist/types/{utils → lib/utils}/emulator.d.ts +0 -0
  116. /package/dist/types/{utils → lib/utils}/utils.d.ts +0 -0
@@ -0,0 +1,444 @@
1
+ import type { TransportProtocol } from '../types/transport.types';
2
+ import type { ChannelLinkedToSelectionOptions, ConfigureExtendedDispenseStatusDataOptions, ConfigureSelectionDispenseOptions, DefineSpecialCharacteristicsSelectionOptions, DispenseFromSelectionOptions, DispenseStatusOptions, MachineValid, OneTo240, ProgramTimeWaitingAfterPickupOptions, ProgramWaitingTimingsOptions, Range, SpecialCharacteristicsSelectionOptions } from '../types/visionClient.types';
3
+ import type { AddChannelToSelectionOptions, ConfigurePerishableProductsOptions, DispenseFromChannelExtendedOptions, DispenseFromChannelOptions, DispenseOptions, MachineStatus, ProgramWorkingTemperatureOptions, Range0To81, SelectionStatus } from '../types/jsd.types';
4
+ import type { JSD } from '../../../serial/jsd';
5
+ import type { VisionResponse } from '../protocol/responseHandler';
6
+ import { APP_NO } from '../utils/aplications';
7
+ /**
8
+ * Application layer for Vision operations.
9
+ * Handles high-level logic, state management, and event emission for Vision machines.
10
+ */
11
+ export declare class Vision {
12
+ private _commands;
13
+ private jsd;
14
+ readonly APP_ID: typeof APP_NO.VISION;
15
+ private _machineStatus;
16
+ constructor(jsd: JSD, transport: TransportProtocol);
17
+ private _performingChannelAssignment;
18
+ private _dispensingTokens;
19
+ private send;
20
+ private get cmd();
21
+ private _getMachineIndex;
22
+ /**
23
+ * Check if a machine is available to dispense based on its status.
24
+ * @param options.machine Machine index to check availability for.
25
+ * @returns True if the machine is available to dispense, false otherwise.
26
+ */
27
+ isAvailableToDispense({ machine }?: {
28
+ machine?: MachineValid;
29
+ }): boolean;
30
+ /**
31
+ * Request machine status.
32
+ * @param options Object containing the machine index.
33
+ * @param options.machine Machine index (defaults to 1).
34
+ * @returns Promise resolving when the command is sent.
35
+ */
36
+ requestMachineStatus({ machine }?: {
37
+ machine?: MachineValid;
38
+ }): Promise<void>;
39
+ private _getTrayChannelFromSelection;
40
+ private _getSelectionFromTrayChannel;
41
+ /**
42
+ * Request status of a specific channel.
43
+ * @param options Object containing machine and selection.
44
+ * @param options.machine Machine index.
45
+ * @param options.selection Selection number (1-81) to derive tray and channel.
46
+ * @returns Promise resolving when the command is sent.
47
+ */
48
+ requestStatusChannel({ machine, selection }: {
49
+ machine: MachineValid;
50
+ selection: Range<1, 81>;
51
+ }): Promise<void>;
52
+ /**
53
+ * Get status of all channels in a machine.
54
+ * WARNING: This method triggers a sequence of requests for all 80 selections.
55
+ * @param options Object containing the machine index.
56
+ * @param options.machine Machine index.
57
+ * @returns Promise resolving to an array of SelectionStatus objects.
58
+ */
59
+ assignChannels({ machine }: {
60
+ machine: MachineValid;
61
+ }): Promise<SelectionStatus[]>;
62
+ /**
63
+ * Request status of a specific selection.
64
+ * @param options Object containing the selection number.
65
+ * @param options.selection Selection number (1-240).
66
+ * @returns Promise resolving when the command is sent.
67
+ */
68
+ requestStatusSelection({ selection }: {
69
+ selection: OneTo240;
70
+ }): Promise<void>;
71
+ /**
72
+ * Configure dispense parameters for a selection.
73
+ * @param options Object containing selection, speed, and timePostRun.
74
+ * @param options.selection Selection number.
75
+ * @param options.speed Dispense speed.
76
+ * @param options.timePostRun Time post run.
77
+ * @returns Promise resolving when the command is sent.
78
+ */
79
+ configureSelectionDispense({ selection, speed, timePostRun }: ConfigureSelectionDispenseOptions): Promise<void>;
80
+ /**
81
+ * Get current dispense configuration for a selection.
82
+ * @param options Object containing the machine index.
83
+ * @param options.machine Machine index.
84
+ * @returns Promise resolving when the command is sent.
85
+ */
86
+ requestSelectionDispenseConfig({ machine }: {
87
+ machine: MachineValid;
88
+ }): Promise<void>;
89
+ /**
90
+ * Add a channel to a selection.
91
+ * @param options Object containing details for adding a channel.
92
+ * @param options.selection Selection number.
93
+ * @param options.machine Machine index.
94
+ * @param options.tray Tray number.
95
+ * @param options.channel Channel number.
96
+ * @returns Promise resolving when the command is sent.
97
+ */
98
+ configureAddChannelToSelection({ selection, machine, tray, channel }: AddChannelToSelectionOptions): Promise<void>;
99
+ /**
100
+ * Get channels linked to a selection.
101
+ * @param options Object containing the selection number.
102
+ * @param options.selection Selection number.
103
+ * @returns Promise resolving when the command is sent.
104
+ */
105
+ requestChannelsLinkedToSelection({ selection }: ChannelLinkedToSelectionOptions): Promise<void>;
106
+ /**
107
+ * Request machine identification.
108
+ * @param options Object containing the machine index.
109
+ * @param options.machine Machine index.
110
+ * @returns Promise resolving when the command is sent.
111
+ */
112
+ requestMachineIdentification({ machine }: {
113
+ machine: MachineValid;
114
+ }): Promise<void>;
115
+ /**
116
+ * Program working temperature.
117
+ * @param options Object containing temperature settings.
118
+ * @param options.machine Machine index.
119
+ * @param options.temperature Target temperature.
120
+ * @param options.enable Enable or disable temperature control.
121
+ * @returns Promise resolving when the command is sent.
122
+ */
123
+ configureWorkingTemperature({ machine, temperature, enable }: ProgramWorkingTemperatureOptions): Promise<void>;
124
+ /**
125
+ * Get working temperature.
126
+ * @param options Object containing the machine index.
127
+ * @param options.machine Machine index.
128
+ * @returns Promise resolving when the command is sent.
129
+ */
130
+ requestWorkingTemperature({ machine }: {
131
+ machine: MachineValid;
132
+ }): Promise<void>;
133
+ /**
134
+ * Program waiting timings.
135
+ * @param options Object containing timing settings.
136
+ * @param options.collectPosition Time for collect position.
137
+ * @param options.dispenseManoeuvres Time for dispense manoeuvres.
138
+ * @param options.afterPickup Time waiting after pickup.
139
+ * @returns Promise resolving when the command is sent.
140
+ */
141
+ configureWaitingTimings({ collectPosition, dispenseManoeuvres, afterPickup }: ProgramWaitingTimingsOptions): Promise<void>;
142
+ /**
143
+ * Get waiting timings.
144
+ * @returns Promise resolving when the command is sent.
145
+ */
146
+ requestWaitingTimings(): Promise<void>;
147
+ /**
148
+ * Reset sold-out status for all channels in a machine.
149
+ * @param options Object containing the machine index.
150
+ * @param options.machine Machine index.
151
+ * @returns Promise resolving when the command is sent.
152
+ */
153
+ resetSoldOutChannels({ machine }: {
154
+ machine: MachineValid;
155
+ }): Promise<void>;
156
+ /**
157
+ * Reset faults and perform self-test for a machine.
158
+ * @param options Object containing the machine index.
159
+ * @param options.machine Machine index.
160
+ * @returns Promise resolving when the command is sent.
161
+ */
162
+ resetAllErrors({ machine }: {
163
+ machine: MachineValid;
164
+ }): Promise<void[]>;
165
+ /**
166
+ * Program time waiting after pickup.
167
+ * @param options Object containing time setting.
168
+ * @param options.time Time in seconds.
169
+ * @returns Promise resolving when the command is sent.
170
+ */
171
+ configureTimeWaitingAfterPickup({ time }: ProgramTimeWaitingAfterPickupOptions): Promise<void>;
172
+ /**
173
+ * Get time waiting after pickup.
174
+ * @returns Promise resolving when the command is sent.
175
+ */
176
+ requestTimeWaitingAfterPickup(): Promise<void>;
177
+ /**
178
+ * Request JSD firmware version.
179
+ * @returns Promise resolving when the command is sent.
180
+ */
181
+ requestJSDVersion(): Promise<void>;
182
+ /**
183
+ * Request report of active faults.
184
+ * @param machine Machine index.
185
+ * @returns Promise resolving when the command is sent.
186
+ */
187
+ requestReportActiveFaults({ machine }: {
188
+ machine: MachineValid;
189
+ }): Promise<void>;
190
+ /**
191
+ * Request report of inactive faults.
192
+ * @param machine Machine index.
193
+ * @returns Promise resolving when the command is sent.
194
+ */
195
+ requestReportInactiveFaults({ machine }: {
196
+ machine: MachineValid;
197
+ }): Promise<void>;
198
+ /**
199
+ * Request to clear inactive faults.
200
+ * @param machine Machine index.
201
+ * @returns Promise resolving when the command is sent.
202
+ */
203
+ clearInactiveFaults({ machine }: {
204
+ machine: MachineValid;
205
+ }): Promise<void>;
206
+ /**
207
+ * Request JSD dispensing queue status.
208
+ * @returns Promise resolving when the command is sent.
209
+ */
210
+ requestJSDDispensingQueueStatus(): Promise<void>;
211
+ /**
212
+ * Clear JSD dispensing queue.
213
+ * @returns Promise resolving when the command is sent.
214
+ */
215
+ clearJSDDispensingQueue(): Promise<void>;
216
+ /**
217
+ * Define special characteristics for a selection.
218
+ * @param options Object containing special characteristics.
219
+ * @param options.selection Selection number.
220
+ * @param options.perishable Perishable flag.
221
+ * @param options.fragileOrHeavy Fragile or heavy flag.
222
+ * @param options.typeAdjustElevator Elevator adjustment type.
223
+ * @param options.timeAdjustElevator Elevator adjustment time.
224
+ * @returns Promise resolving when the command is sent.
225
+ */
226
+ configureSpecialCharacteristicsSelection({ selection, perishable, fragileOrHeavy, typeAdjustElevator, timeAdjustElevator }: DefineSpecialCharacteristicsSelectionOptions): Promise<void>;
227
+ /**
228
+ * Get special characteristics for a selection.
229
+ * @param options Object containing the selection number.
230
+ * @param options.selection Selection number.
231
+ * @returns Promise resolving when the command is sent.
232
+ */
233
+ requestSpecialCharacteristicsSelection({ selection }: SpecialCharacteristicsSelectionOptions): Promise<void>;
234
+ /**
235
+ * Configure perishable products settings.
236
+ * @param options Object containing perishable product settings.
237
+ * @param options.machine Machine index.
238
+ * @param options.enable Enable or disable.
239
+ * @param options.temperatureLimit Temperature limit.
240
+ * @param options.minutesToExpiry Minutes to expiry.
241
+ * @returns Promise resolving when the command is sent.
242
+ */
243
+ configurePerishableProducts({ machine, enable, temperatureLimit, minutesToExpiry }: ConfigurePerishableProductsOptions): Promise<void>;
244
+ /**
245
+ * Request active faults.
246
+ * @param options Object containing the machine index.
247
+ * @param options.machine Machine index.
248
+ * @returns Promise resolving when the command is sent.
249
+ */
250
+ requestActiveFaults({ machine }: {
251
+ machine: MachineValid;
252
+ }): Promise<void>;
253
+ /**
254
+ * Configure extended dispense status data.
255
+ * @param options Object containing enable flag.
256
+ * @param options.enable Enable extended data.
257
+ * @returns Promise resolving when the command is sent.
258
+ */
259
+ configureExtendedDispenseStatusData({ enable }: ConfigureExtendedDispenseStatusDataOptions): Promise<void>;
260
+ /**
261
+ * Get extended dispense status data configuration.
262
+ * @returns Promise resolving when the command is sent.
263
+ */
264
+ requestExtendedDispenseStatusDataConfig(): Promise<void>;
265
+ /**
266
+ * Request status of tray positioning phototransistors.
267
+ * @param options Object containing the machine index.
268
+ * @param options.machine Machine index.
269
+ * @returns Promise resolving when the command is sent.
270
+ */
271
+ requestStatusTrayPositioningPhototransistors({ machine }: {
272
+ machine: MachineValid;
273
+ }): Promise<void>;
274
+ /**
275
+ * Dispense from a specific channel.
276
+ * @param options Object containing dispense details.
277
+ * @param options.machine Machine index.
278
+ * @param options.tray Tray number.
279
+ * @param options.channel Channel number.
280
+ * @param options.speed Dispense speed.
281
+ * @param options.timePostRun Time post run.
282
+ * @param options.cart Cart flag (optional, defaults to false).
283
+ * @returns Promise resolving when the command is sent.
284
+ */
285
+ dispenseFromChannel({ machine, tray, channel, speed, timePostRun, cart }: DispenseFromChannelOptions): Promise<boolean>;
286
+ /**
287
+ * Dispense from a selection using the channel assignment logic.
288
+ * @param options Object containing dispense details.
289
+ * @param options.machine Machine index.
290
+ * @param options.selection Selection number (1-81).
291
+ * @param options.speed Dispense speed.
292
+ * @param options.timePostRun Time post run.
293
+ * @param options.cart Cart flag (optional, defaults to false).
294
+ * @returns Promise resolving when the command is sent.
295
+ */
296
+ dispense({ machine, selection, speed, timePostRun, cart }: DispenseOptions): Promise<boolean>;
297
+ /**
298
+ * Dispense multiple selections in a cart.
299
+ * WARNING: This method sends dispense commands in batches of 10 and waits for machines to be available before sending the next batch.
300
+ * @param data Array of objects containing machine and selection details for each dispense command.
301
+ * @param data.machine Machine index for each dispense command.
302
+ * @param data.selection Selection number (1-81) for each dispense command.
303
+ * @returns Promise resolving to an array of objects containing selection and dispense result for each command.
304
+ */
305
+ dispenseCart(data?: {
306
+ machine: MachineValid;
307
+ selection: Range0To81;
308
+ }[]): Promise<{
309
+ selection: Range0To81;
310
+ dispensed: boolean;
311
+ }[]>;
312
+ /**
313
+ * Get dispense status from channel using a token.
314
+ * @param options Object containing the token.
315
+ * @param options.token Dispense token.
316
+ * @returns Promise resolving when the command is sent.
317
+ */
318
+ requestDispenseStatusFromChannel({ token }: DispenseStatusOptions): Promise<void>;
319
+ /**
320
+ * Dispense from a selection.
321
+ * @param options Object containing selection dispense details.
322
+ * @param options.selection Selection number.
323
+ * @param options.cart Cart flag (optional, defaults to false).
324
+ * @returns Promise resolving when the command is sent.
325
+ */
326
+ dispenseFromSelection({ selection, cart }: DispenseFromSelectionOptions): Promise<boolean>;
327
+ /**
328
+ * Get dispense status from selection using a token.
329
+ * @param options Object containing the token.
330
+ * @param options.token Dispense token.
331
+ * @returns Promise resolving when the command is sent.
332
+ */
333
+ requestDispenseStatusFromSelection({ token }: DispenseStatusOptions): Promise<void>;
334
+ /**
335
+ * Control lights.
336
+ * @param options Object containing machine and light status.
337
+ * @param options.machine Machine index.
338
+ * @param options.turnOn Turn lights on or off.
339
+ * @returns Promise resolving when the command is sent.
340
+ */
341
+ private _configureLights;
342
+ /**
343
+ * Turn lights on for a machine.
344
+ * @param options Object containing the machine index.
345
+ * @param options.machine Machine index.
346
+ * @returns Promise resolving when the command is sent.
347
+ */
348
+ lightsOn({ machine }: {
349
+ machine: MachineValid;
350
+ }): Promise<void>;
351
+ /**
352
+ * Turn lights off for a machine.
353
+ * @param options Object containing the machine index.
354
+ * @param options.machine Machine index.
355
+ * @returns Promise resolving when the command is sent.
356
+ */
357
+ lightsOff({ machine }: {
358
+ machine: MachineValid;
359
+ }): Promise<void>;
360
+ /**
361
+ * Reset faults and perform self-test.
362
+ * @param options Object containing the machine index.
363
+ * @param options.machine Machine index.
364
+ * @returns Promise resolving when the command is sent.
365
+ */
366
+ resetFaultsAndSelfTest({ machine }: {
367
+ machine: MachineValid;
368
+ }): Promise<void>;
369
+ /**
370
+ * Perform collect cycle.
371
+ * @param options Object containing the machine index.
372
+ * @param options.machine Machine index.
373
+ * @returns Promise resolving when the command is sent.
374
+ */
375
+ collect({ machine }: {
376
+ machine: MachineValid;
377
+ }): Promise<void>;
378
+ /**
379
+ * Dispense from a channel with extended options.
380
+ * @param options Object containing extended dispense details.
381
+ * @param options.machine Machine index.
382
+ * @param options.tray Tray number.
383
+ * @param options.channel Channel number.
384
+ * @param options.speed Dispense speed.
385
+ * @param options.timePostRun Time post run.
386
+ * @param options.fragileOrHeavy Fragile or heavy flag.
387
+ * @param options.typeAdjustElevator Elevator adjustment type.
388
+ * @param options.timeAdjustElevator Elevator adjustment time.
389
+ * @param options.cart Cart flag (optional, defaults to false).
390
+ * @returns Promise resolving when the command is sent.
391
+ */
392
+ dispenseFromChannelExtended({ machine, tray, channel, speed, timePostRun, fragileOrHeavy, typeAdjustElevator, timeAdjustElevator, cart }: DispenseFromChannelExtendedOptions): Promise<boolean>;
393
+ /**
394
+ * Get dispense status from channel with extended options using a token.
395
+ * @param options Object containing the token.
396
+ * @param options.token Dispense token.
397
+ * @returns Promise resolving when the command is sent.
398
+ */
399
+ requestDispenseStatusFromChannelExtended({ token }: DispenseStatusOptions): Promise<void>;
400
+ /**
401
+ * Request for a complete JSD reset (DANGEROUS).
402
+ * @returns Promise resolving when the command is sent.
403
+ */
404
+ restartJSD(): Promise<void>;
405
+ serialMessage(parsed: VisionResponse): void;
406
+ private emit;
407
+ private _responseFormatCmdWrong;
408
+ private setMachineStatus;
409
+ /**
410
+ * Get the last known status of a machine.
411
+ * @param machine Machine index.
412
+ * @returns MachineStatus object or null.
413
+ */
414
+ getMachineStatus(machine: MachineValid): MachineStatus | null;
415
+ private _getMachineStatusName;
416
+ private _responseMachineStatus;
417
+ private _statusChannelName;
418
+ private _responseStatusChannel;
419
+ private _statusSelectionName;
420
+ private _responseStatusSelection;
421
+ private _responseDispenseStatus;
422
+ private _responseConfigurationSelectionDispense;
423
+ private _responseConfigurationChannelsLinkedToSelection;
424
+ private _responseMachineIdentification;
425
+ private _responseCurrentTemperature;
426
+ private _responseReportEventsAlarmsAndFaults;
427
+ private _responseNewTimingWaitingForProductCollection;
428
+ private _responsePerformingProductCollectionCycle;
429
+ private _responseResetMachineSoldOutChannels;
430
+ private _responseNewTimingWaitingAfterProductCollection;
431
+ private _responseJSDVersion;
432
+ private _responseActiveFaults;
433
+ private _responseJSDDispensingQueue;
434
+ private _responseSpecialCharacteristicsSelection;
435
+ private _responsePerishableProducts;
436
+ private _responseActiveFaultsList;
437
+ private _responseJSDResetStatus;
438
+ private _responseExtendedDispenseStatusData;
439
+ private _responseTraysPositioningPhototransistorsStatus;
440
+ private _responseJsdErrorLicenseTemporarilyBlocked;
441
+ private _responseJsdErrorLicenseNotActive;
442
+ private _responseJsdErrorCommandNotExecutable;
443
+ }
444
+ //# sourceMappingURL=vision.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vision.d.ts","sourceRoot":"","sources":["../../../../../../lib/commands/j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@
1
+ import { BuildPacketResult } from '../../types/jsd.types';
2
+ import type { TransportProtocol } from '../../types/transport.types';
3
+ /**
4
+ * High-Level Client for Vision Machines.
5
+ * It is agnostic to the transport layer (RS232 or TCP).
6
+ */
7
+ export declare class LicensingClient {
8
+ private transport;
9
+ private static readonly APP_ID;
10
+ constructor(transport: TransportProtocol);
11
+ /**
12
+ * Opcode 100: Request feature status.
13
+ * @param feature Feature ID to check.
14
+ * @returns The generated packet as a number array.
15
+ */
16
+ requestFeatureStatus(feature: number): BuildPacketResult;
17
+ /**
18
+ * Opcode 101: Request temporary license status.
19
+ * @returns The generated packet as a number array.
20
+ */
21
+ requestTemporaryLicenseStatus(): BuildPacketResult;
22
+ /**
23
+ * Opcode 102: Request seed data for license generation.
24
+ * @returns The generated packet as a number array.
25
+ */
26
+ requestSeedData(): BuildPacketResult;
27
+ /**
28
+ * Opcode 110: Request license activation.
29
+ * @param licenseFile The license file content or identifier.
30
+ * @returns The generated packet as a number array.
31
+ */
32
+ requestLicenseActivation(licenseFile: string): BuildPacketResult;
33
+ }
34
+ //# sourceMappingURL=licensingClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"licensingClient.d.ts","sourceRoot":"","sources":["../../../../../../../lib/commands/jsd/frames/licensing/licensingClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAIrE;;;GAGG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,SAAS,CAAoB;IAErC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAoB;gBAEtC,SAAS,EAAE,iBAAiB;IAIxC;;;;OAIG;IACI,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAE,iBAAiB;IAI9D;;;OAGG;IACI,6BAA6B,IAAG,iBAAiB;IAIxD;;;OAGG;IACI,eAAe,IAAG,iBAAiB;IAI1C;;;;OAIG;IACI,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAE,iBAAiB;CAIvE"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Object containing JSD Operation Codes for Licensing operations.
3
+ */
4
+ export declare const JsdOpCode: {
5
+ readonly requestFeatureStatus: 100;
6
+ readonly requestTemporaryLicenseStatus: 101;
7
+ readonly requestSeedData: 102;
8
+ readonly requestLicenseActivation: 110;
9
+ readonly responseCmdWrong: 200;
10
+ readonly responseFeatureStatus: 201;
11
+ readonly responseSeedData: 202;
12
+ readonly responseTemporaryLicenseStatus: 203;
13
+ };
14
+ /**
15
+ * Type representing the values of the JsdOpCode object.
16
+ */
17
+ export type JsdOpCode = (typeof JsdOpCode)[keyof typeof JsdOpCode];
18
+ /**
19
+ * Exported constant containing the JsdOpCode object.
20
+ */
21
+ export declare const OP_CODES: typeof JsdOpCode;
22
+ /**
23
+ * Helper to get the name of an OpCode from its value.
24
+ * @param value OpCode value
25
+ * @returns OpCode name or 'Unknown'
26
+ */
27
+ export declare const opCodeName: (value: number) => string;
28
+ //# sourceMappingURL=opCodes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opCodes.d.ts","sourceRoot":"","sources":["../../../../../../../lib/commands/jsd/frames/licensing/opCodes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;CAUZ,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,OAAO,SAAqB,CAAC;AAEpD;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAG3C,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { BuildPacketResult } from '../../types/jsd.types';
2
+ import type { DateMMDDhhmmss } from '../../types/manifestClient';
3
+ import type { TransportProtocol } from '../../types/transport.types';
4
+ /**
5
+ * High-Level Client for Vision Machines.
6
+ * It is agnostic to the transport layer (RS232 or TCP).
7
+ */
8
+ export declare class ManifestClient {
9
+ private transport;
10
+ private static readonly APP_ID;
11
+ constructor(transport: TransportProtocol);
12
+ /**
13
+ * Opcode 101: Request for logs events.
14
+ * @param previous Boolean indicating whether to request previous logs (true) or current logs (false). Defaults to false.
15
+ * @returns The generated packet as a number array.
16
+ */
17
+ requestLogsEvents(previous?: boolean): BuildPacketResult;
18
+ /**
19
+ * Opcode 102: Request logs by date range.
20
+ * @param since Start date in MMDDhhmmss format.
21
+ * @param until End date in MMDDhhmmss format.
22
+ * @returns The generated packet as a number array.
23
+ */
24
+ requestLogsByDate(since: DateMMDDhhmmss, until: DateMMDDhhmmss): BuildPacketResult;
25
+ /**
26
+ * Opcode 110: Request for sending manifest.
27
+ * @param fileSizeBytes Size of the file in bytes.
28
+ * @param crcFile CRC of the file.
29
+ * @returns The generated packet as a number array.
30
+ */
31
+ requestForSendingManifest(fileSizeBytes: number, crcFile: string): BuildPacketResult;
32
+ /**
33
+ * Opcode 111: Send manifest data block.
34
+ * @param prevBlockId Previous block ID.
35
+ * @param dataBlock Data block buffer.
36
+ * @returns The generated packet as a number array.
37
+ */
38
+ sendManifestDataBlock(prevBlockId: number, dataBlock: Uint8Array): BuildPacketResult;
39
+ }
40
+ //# sourceMappingURL=manifestClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifestClient.d.ts","sourceRoot":"","sources":["../../../../../../../lib/commands/jsd/frames/manifest/manifestClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAIrE;;;GAGG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,SAAS,CAAoB;IAErC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAA6B;gBAE/C,SAAS,EAAE,iBAAiB;IAIxC;;;;OAIG;IACI,iBAAiB,CAAC,QAAQ,GAAE,OAAe,GAAE,iBAAiB;IAMrE;;;;;OAKG;IACI,iBAAiB,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,GAAE,iBAAiB;IAKxF;;;;;OAKG;IACI,yBAAyB,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAE,iBAAiB;IAK1F;;;;;OAKG;IACI,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,GAAE,iBAAiB;CAM3F"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Object containing JSD Operation Codes for Manifest operations.
3
+ */
4
+ export declare const JsdOpCode: {
5
+ readonly requestLogsEvents: 101;
6
+ readonly requestLogsByDate: 102;
7
+ readonly requestForSendingManifest: 110;
8
+ readonly sendManifestDataBlock: 111;
9
+ readonly responseCmdWrong: 200;
10
+ readonly responseLineLogEvent: 201;
11
+ readonly responseManifestDataBlock: 210;
12
+ readonly responseManifestCompleted: 211;
13
+ };
14
+ /**
15
+ * Type representing the values of the JsdOpCode object.
16
+ */
17
+ export type JsdOpCode = (typeof JsdOpCode)[keyof typeof JsdOpCode];
18
+ /**
19
+ * Exported constant containing the JsdOpCode object.
20
+ */
21
+ export declare const OP_CODES: typeof JsdOpCode;
22
+ /**
23
+ * Helper to get the name of an OpCode from its value.
24
+ * @param value OpCode value
25
+ * @returns OpCode name or 'Unknown'
26
+ */
27
+ export declare const opCodeName: (value: number) => string;
28
+ //# sourceMappingURL=opCodes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opCodes.d.ts","sourceRoot":"","sources":["../../../../../../../lib/commands/jsd/frames/manifest/opCodes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;CAUZ,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,OAAO,SAAqB,CAAC;AAEpD;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAG3C,CAAC"}