ads-client 1.14.3 → 2.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,626 @@
1
+ import ClientError from "../client-error";
2
+ import { AdsDataType, AdsDeviceInfo, AdsRawAddress, AdsResponse, AdsState, AdsSymbol, AmsAddress, AmsRouterState, AmsTcpPacket, BaseAdsResponse } from "./ads-protocol-types";
3
+ export type DebugLevel = 0 | 1 | 2 | 3;
4
+ /**
5
+ * Events for the client, for example `client.on('connect', ...)`
6
+ */
7
+ export interface ClientEvents {
8
+ /**
9
+ * Emitted when client has connected to the target
10
+ *
11
+ * - `connection`: Active connection information
12
+ */
13
+ 'connect': [connection: AdsClientConnection];
14
+ /**
15
+ * Emitted when client has disconnected from the target
16
+ *
17
+ * - `isReconnecting`: True if disconnect happened during reconnecting
18
+ */
19
+ 'disconnect': [isReconnecting: boolean];
20
+ /**
21
+ * Emitted when client has reconnected to the target after a disconnection
22
+ *
23
+ * - `allSubscriptionsRestored`: True if all subscriptions were restored successfully
24
+ * - `unrestoredSubscriptions`: Array of subscription paths that failed to be restored
25
+ */
26
+ 'reconnect': [allSubscriptionsRestored: boolean, unrestoredSubscriptions: string[]];
27
+ /**
28
+ * Emitted when client has lost the connection to the target
29
+ *
30
+ * - `socketFailure`: True if connection was lost due to a socket/tcp problem
31
+ */
32
+ 'connectionLost': [socketFailure: boolean];
33
+ /**
34
+ * Emitted when PLC runtime symbol version has changed
35
+ *
36
+ * - `version`: New PLC runtime symbol version
37
+ * - `previousVersion`: Previous PLC runtime symbol version (if known)
38
+ */
39
+ 'plcSymbolVersionChange': [version: number, previousVersion?: number];
40
+ /**
41
+ * Emitted when PLC runtime state has changed
42
+ *
43
+ * - `state`: New PLC runtime state
44
+ * - `previousState`: Previous PLC runtime state (if known)
45
+ */
46
+ 'plcRuntimeStateChange': [state: AdsState, previousState?: AdsState];
47
+ /**
48
+ * Emitted when TwinCAT system state has changed
49
+ *
50
+ * - `state`: New TwinCAT system state
51
+ * - `previousState`: Previous TwinCAT system state (if known)
52
+ */
53
+ 'tcSystemStateChange': [state: AdsState, previousState?: AdsState];
54
+ /**
55
+ * Emitted when AMS router state has changed
56
+ *
57
+ * - `state`: New AMS router state
58
+ * - `previousState`: Previous AMS router state (if known)
59
+ */
60
+ 'routerStateChange': [state: AmsRouterState, previousState?: AmsRouterState];
61
+ /**
62
+ * Emitted when the client has had an error, such as
63
+ * - unknown ADS notification received
64
+ * - handling ADS notification failed
65
+ * - unknown ADS command received
66
+ *
67
+ * - `error`: Error that was thrown
68
+ */
69
+ 'client-error': [error: ClientError];
70
+ }
71
+ /**
72
+ * Client settings
73
+ */
74
+ export interface AdsClientSettings {
75
+ /**
76
+ * **REQUIRED**: Default target AmsNetId address
77
+ *
78
+ * Examples:
79
+ * - `localhost` or `127.0.0.1.1.1` - Local (same machine as Node.js)
80
+ * - `192.168.1.5.1.1` - PLC (example)
81
+ * - `192.168.1.5.2.1` - EtherCAT I/O device (example, see also `rawClient` setting)
82
+ */
83
+ targetAmsNetId: string;
84
+ /**
85
+ * **REQUIRED**: Default target ADS port
86
+ *
87
+ * Examples:
88
+ * - `851` - TwinCAT 3 PLC runtime 1
89
+ * - `852` - TwinCAT 3 PLC runtime 2
90
+ * - `801` - TwinCAT 2 PLC runtime 1
91
+ * - `10000` - TwinCAT system service
92
+ *
93
+ * NOTE: This is not a TCP port (no firewall config needed).
94
+ */
95
+ targetAdsPort: number;
96
+ /**
97
+ * **Optional**: Target ADS router TCP port (default: `48898`)
98
+ *
99
+ * This is usually `48898`, unless using port forwarding (e.g. in docker) or separate TwinCAT router.
100
+ *
101
+ * NOTE: Router needs to have firewall open for this port, TwinCAT PLC has as default.
102
+ */
103
+ routerTcpPort?: number;
104
+ /**
105
+ * **Optional**: Target ADS router IP address/hostname (default: `127.0.0.1`)
106
+ *
107
+ * This is usually ´127.0.0.1` (local machine), as the TwinCAT system is usually running on the same machine.
108
+ *
109
+ * However, if connecting from a system without router (such as Linux), this needs to be changed to be the router/PLC address.
110
+ */
111
+ routerAddress?: string;
112
+ /**
113
+ * **Optional**: Local IP address to use (default: `(empty string)` -> automatic)
114
+ *
115
+ * Can be used to force using another network interface
116
+ *
117
+ * See https://nodejs.org/api/net.html#socketconnectoptions-connectlistener
118
+ */
119
+ localAddress?: string;
120
+ /**
121
+ * **Optional**: Local TCP port to use for outgoing connection (default: `0` -> automatic)
122
+ *
123
+ * Can be used to force using specific local TCP port for outogoing connection
124
+ *
125
+ * See https://nodejs.org/api/net.html#socketconnectoptions-connectlistener
126
+ */
127
+ localTcpPort?: number;
128
+ /**
129
+ * **Optional**: Local AmsNetId to use (default: `(empty string)` -> automatic)
130
+ *
131
+ * Can be used to set used AmsNetId manually. If not set, AmsNetId is received from the target router.
132
+ *
133
+ * This is needed for example when connecting directly to the PLC without local router.
134
+ */
135
+ localAmsNetId?: string;
136
+ /**
137
+ * **Optional**: Local ADS port to use (default: `0` -> automatic)
138
+ *
139
+ * Can be used to set used ADS port manually. If not set, a free ADS port is received from the target router.
140
+ */
141
+ localAdsPort?: number;
142
+ /**
143
+ * **Optional**: Time (milliseconds) after a command is timeouted if no response received (default: `2000` ms)
144
+ *
145
+ * This is used for AMS and ADS commands.
146
+ *
147
+ * If using a slow connection, it might be useful to increase this limit.
148
+ */
149
+ timeoutDelay?: number;
150
+ /**
151
+ * **Optional**: If set, the client tries to reconnect automatically after a connection loss (default: `true`)
152
+ *
153
+ * The connection loss is detected by
154
+ * - TCP socket error
155
+ * - local router state change
156
+ * - target TwinCAT system state changes (not when `rawClient` setting is set)
157
+ *
158
+ * NOTE: when using `rawClient` setting, the client might not detect the connection loss
159
+ */
160
+ autoReconnect?: boolean;
161
+ /**
162
+ * **Optional**: Interval (milliseconds) how often the lost connection is tried to re-establish (default: `2000` ms)
163
+ *
164
+ * Value can be lowered if a very fast response if required, however usually getting the connection back on takes a while
165
+ * (TwinCAT system restart takes a while etc.)
166
+ */
167
+ reconnectInterval?: number;
168
+ /**
169
+ * **Optional**: If set, enumeration (ENUM) data types are converted to objects (default: `true`)
170
+ *
171
+ * If `true`, ENUM is converted to an object:
172
+ *
173
+ * ```js
174
+ * {
175
+ * name: 'enumValue',
176
+ * value: 5
177
+ * }
178
+ * ```
179
+ *
180
+ * If `false`, ENUM is converted to a plain number (`5`)
181
+ */
182
+ objectifyEnumerations?: boolean;
183
+ /**
184
+ * **Optional**: If set, PLC date types are converted to Javascript `Date` objects (default: `true`)
185
+ *
186
+ * If `true`, DATE_AND_TIME (DT) and DATE are converted to `Date` objects
187
+ *
188
+ * If `false`, DATE_AND_TIME (DT) and DATE are converted to numbers (epoch time, seconds)
189
+ */
190
+ convertDatesToJavascript?: boolean;
191
+ /**
192
+ * **Optional**: If set, all symbols from target are read and cached after connecting. (default: `false`)
193
+ *
194
+ * This is an intensive operation (symbol data is a large object).
195
+ *
196
+ * Can be useful when needing a fast response (client already knows all PLC symbol data) - for example
197
+ * when using subscriptions with high cycle times or when dealing with larger amount of ADS data.
198
+ *
199
+ * If not set, the client reads and caches symbol information only on demand.
200
+ *
201
+ * NOTE: This is not available when using the `rawClient` setting.
202
+ */
203
+ readAndCacheSymbols?: boolean;
204
+ /**
205
+ * **Optional**: If set, all data types from target are read and cached after connecting. (default: `false`)
206
+ *
207
+ * This is an intensive operation (symbol data is a large object).
208
+ *
209
+ * Can be useful when needing a fast response (client already knows all PLC datat types) - for example
210
+ * when using subscriptions with high cycle times or when dealing with larger amount of ADS data.
211
+ *
212
+ * If not set, the client reads and caches data types only on demand.
213
+ *
214
+ * NOTE: This is not available when using the `rawClient` setting.
215
+ */
216
+ readAndCacheDataTypes?: boolean;
217
+ /**
218
+ * **Optional**: If set, client detects target PLC symbol version changes and reloads symbols and data types (default: `true`)
219
+ *
220
+ * Symbol version changes when PLC software is updated with download (no online change). By detecting it,
221
+ * the client should work when dealing with a target that has software updated.
222
+ *
223
+ * NOTE: This is not available when using the `rawClient` setting.
224
+ */
225
+ monitorPlcSymbolVersion?: boolean;
226
+ /**
227
+ * **Optional**: If set, no warnings are written to console using `console.log()` (default: `false`)
228
+ *
229
+ * As default, the client writes some warnings to console, such as connection loss and reconnection information.
230
+ *
231
+ * If set, the client **never** writes anything to console.
232
+ */
233
+ hideConsoleWarnings?: boolean;
234
+ /**
235
+ * **Optional**: Interval (milliseconds) how often the client checks if the connection if working (default: `1000` ms)
236
+ *
237
+ * The client checks connection by reading the target TwinCAT system state.
238
+ *
239
+ * See setting `connectionDownDelay`.
240
+ *
241
+ * NOTE: This is not available when using the `rawClient` setting.
242
+ */
243
+ connectionCheckInterval?: number;
244
+ /**
245
+ * **Optional**: Time (milliseconds) how long after the target TwinCAT system state is not available, the connection is determined to be lost (default: `5000` ms)
246
+ * *
247
+ * See setting `connectionCheckInterval`.
248
+ *
249
+ * NOTE: This is not available when using the `rawClient` setting.
250
+ */
251
+ connectionDownDelay?: number;
252
+ /**
253
+ * **Optional**: If set, connecting to the target will success, even if there is no PLC runtime available or if the target TwinCAT system is in CONFIG mode (default: `false`)
254
+ *
255
+ * This can be useful if the target might not yet have a PLC software downloaded when connecting and client needs to be connected in advance.
256
+ */
257
+ allowHalfOpen?: boolean;
258
+ /**
259
+ * **Optional**: If set, only a direct raw ADS connection is established to the target (default: `false`)
260
+ *
261
+ * As default, the client always assumes the target has a TwinCAT system and a PLC runtime.
262
+ *
263
+ * However, in some cases only a direct ADS communication is required or a better choice:
264
+ * - connecting directly to I/O terminals by ADS
265
+ * - conneting to non-TwinCAT systems (such as custom ADS server - see https://github.com/jisotalo/ads-server)
266
+ * - connecting to TwinCAT system only (without PLC)
267
+ */
268
+ rawClient?: boolean;
269
+ /**
270
+ * **Optional**: If set, the client never caches symbols and data types (default: `false`)
271
+ *
272
+ * If set, the client always reads data type and symbol information from target.
273
+ * This slows the communication but guarantees up-to-date data in all cases.
274
+ *
275
+ * As default, the client caches the results after reading them from the target.
276
+ */
277
+ disableCaching?: boolean;
278
+ }
279
+ /**
280
+ * Internal timer object to keep the timer state saved
281
+ */
282
+ export interface TimerObject {
283
+ /** Timer ID */
284
+ id: number;
285
+ /** Timer handle */
286
+ timer?: NodeJS.Timeout;
287
+ }
288
+ /**
289
+ * Active client connection
290
+ */
291
+ export interface AdsClientConnection {
292
+ /** Connection status of the client, true if connected */
293
+ connected: boolean;
294
+ /** True if connected to local TwinCAT system (loopback)*/
295
+ isLocal?: boolean;
296
+ /** Local AmsNetId of the client */
297
+ localAmsNetId?: string;
298
+ /** Local ADS port of the client */
299
+ localAdsPort?: number;
300
+ /** Target AmsNetId */
301
+ targetAmsNetId?: string;
302
+ /** Target ADS port */
303
+ targetAdsPort?: number;
304
+ }
305
+ /**
306
+ * Object containing all active subscriptions for each target address
307
+ *
308
+ * Target address (`amsNetId:port`) is used as a key
309
+ */
310
+ export interface ActiveSubscriptionContainer {
311
+ [K: string]: TargetActiveSubscriptionContainer;
312
+ }
313
+ /**
314
+ * Object containing all active subscriptions for each notification handle (for one target)
315
+ *
316
+ * Notification handle is used as a key
317
+ */
318
+ export interface TargetActiveSubscriptionContainer {
319
+ [K: number]: ActiveSubscription;
320
+ }
321
+ /**
322
+ * Object containing information for a single active subscription
323
+ */
324
+ export interface ActiveSubscription<T = any> {
325
+ /** Settings for this subscription */
326
+ settings: SubscriptionSettings<T>;
327
+ /** True = This subscription is ads-client internal, not created by user */
328
+ internal: boolean;
329
+ /** Remote AMS address and port */
330
+ remoteAddress: AmsAddress;
331
+ /** Notification handle (number) of this subscription's ADS device notification */
332
+ notificationHandle: number;
333
+ /** Symbo of the target variable (if any) */
334
+ symbol?: AdsSymbol;
335
+ /** Function that can be called to unsubscribe (same as `client.unsubscribe(...)`) */
336
+ unsubscribe: () => Promise<void>;
337
+ /** Function that parses received raw data to a variable */
338
+ parseNotification: (data: Buffer, timestamp: Date) => Promise<SubscriptionData<T>>;
339
+ /** Latest data that has been received (if any) */
340
+ latestData?: SubscriptionData<T>;
341
+ /** Optional target settings that override values in `settings` (NOTE: If used, no caching is available -> worse performance) */
342
+ targetOpts?: Partial<AmsAddress>;
343
+ }
344
+ /**
345
+ * Subscription data (value and timestamp)
346
+ */
347
+ export interface SubscriptionData<T = any> {
348
+ timestamp: Date;
349
+ value: T;
350
+ }
351
+ /**
352
+ * Object containing all active ADS requests that are waiting for responses
353
+ *
354
+ * Invoke ID is used as a key
355
+ */
356
+ export interface ActiveAdsRequestContainer {
357
+ [K: number]: ActiveAdsRequest;
358
+ }
359
+ /**
360
+ * Active ADS command that is waiting for answer
361
+ * Callback is called when response is received
362
+ */
363
+ export interface ActiveAdsRequest {
364
+ timeoutTimerHandle?: NodeJS.Timeout;
365
+ responseCallback: (packet: AmsTcpPacket<AdsResponse>) => void;
366
+ }
367
+ /**
368
+ * Client connection metadata
369
+ */
370
+ export interface ConnectionMetaData {
371
+ /** Local AMS router state (if available) */
372
+ routerState?: AmsRouterState;
373
+ /** Target TwinCAT system state (if available) */
374
+ tcSystemState?: AdsState;
375
+ /** Target PLC device information (if available) */
376
+ plcDeviceInfo?: AdsDeviceInfo;
377
+ /** Target PLC runtime state (if available) */
378
+ plcRuntimeState?: AdsState;
379
+ /** Target PLC runtime symbol and datatype count/size information (if available) */
380
+ plcUploadInfo?: AdsUploadInfo;
381
+ /** Target PLC runtime symbol version (if available) */
382
+ plcSymbolVersion?: number;
383
+ /** Set to `true` if client has cached all symbols */
384
+ allPlcSymbolsCached: boolean;
385
+ /** Cached target PLC runtime symbols (if available) */
386
+ plcSymbols: AdsSymbolContainer;
387
+ /** Set to `true` if client has cached all data types */
388
+ allPlcDataTypesCached: boolean;
389
+ /** Cached target PLC runtime data types without subitems (if available) */
390
+ plcDataTypes: AdsDataTypeContainer;
391
+ }
392
+ /**
393
+ * PLC runtime upload info
394
+ *
395
+ * Contains information about symbols and data types
396
+ */
397
+ export interface AdsUploadInfo {
398
+ /** Number of symbols in the target runtime */
399
+ symbolCount: number;
400
+ /** Length of downloadable symbol description data (bytes) */
401
+ symbolLength: number;
402
+ /** Number of datatypes in the target runtime */
403
+ dataTypeCount: number;
404
+ /** Length of downloadable data type description data (bytes) */
405
+ dataTypeLength: number;
406
+ /** Unknown */
407
+ extraCount: number;
408
+ /** Unknown */
409
+ extraLength: number;
410
+ }
411
+ /**
412
+ * Object containing PLC runtime symbol information objects
413
+ */
414
+ export interface AdsSymbolContainer {
415
+ [K: string]: AdsSymbol;
416
+ }
417
+ /**
418
+ * Object containing PLC runtime data type objects
419
+ */
420
+ export interface AdsDataTypeContainer {
421
+ [K: string]: AdsDataType;
422
+ }
423
+ /**
424
+ * ADS command
425
+ */
426
+ export interface AdsCommandToSend {
427
+ /** Ads command (see `ADS.ADS_COMMAND`)*/
428
+ adsCommand: number;
429
+ /** Target AmsNetId (receiver) */
430
+ targetAmsNetId?: string;
431
+ /** Target ADS port (receiver) */
432
+ targetAdsPort?: number;
433
+ /** Payload data */
434
+ payload?: Buffer;
435
+ }
436
+ /**
437
+ * Represents a callback function used in a subscription.
438
+ *
439
+ * @template T - The type of data being passed to the callback
440
+ *
441
+ * @param data - The data received
442
+ * @param subscription - The active subscription object
443
+ */
444
+ export type SubscriptionCallback<T = any> = (data: SubscriptionData<T>, subscription: ActiveSubscription<T>) => void;
445
+ /**
446
+ * Settings for a subscription
447
+ */
448
+ export interface SubscriptionSettings<T = any> {
449
+ /**
450
+ * Subscription target (variable name as string or raw ADS address).
451
+ *
452
+ * Such as such as `GVL_Test.ExampleStruct` or `{indexGroup, indexOffset, size}` object
453
+ */
454
+ target: AdsRawAddress | string;
455
+ /** Callback function that is called when new value is received */
456
+ callback: SubscriptionCallback<T>;
457
+ /**
458
+ * Cycle time for subscription (default: `200 ms`)
459
+ *
460
+ * If `sendOnChange` is `true` (default), PLC checks if value has changed with `cycleTime` interval.
461
+ * If the value has changed, a new value is sent.
462
+ *
463
+ * If `sendOnChange` is `false`, PLC constantly sends the value with `cycleTime` interval.
464
+ */
465
+ cycleTime?: number;
466
+ /** Should the notification be sent only when the value changes? (default: `true`)
467
+ *
468
+ * If `false`, the value is sent with `cycleTime` interval (even if it doesn't change).
469
+ *
470
+ * If `true` (default), the value is checked every `cycleTime` and sent only if it has changed.
471
+ *
472
+ * NOTE: When subscribing, the value is always sent once.
473
+ */
474
+ sendOnChange?: boolean;
475
+ /**
476
+ * How long the PLC waits before sending the values at maximum? (default: `0` ms --> maximum delay is off)
477
+ *
478
+ * If value is not changing, the first notification with active value after subscribing is sent after `maxDelay`.
479
+ *
480
+ * If the value is changing, the PLC sends one or more notifications every `maxDelay`.
481
+ *
482
+ * So if `cycleTime` is 100 ms, `maxDelay` is 1000 ms and value changes every 100 ms, the PLC sends 10 notifications every 1000 ms.
483
+ * This can be useful for throttling.
484
+ */
485
+ maxDelay?: number;
486
+ }
487
+ /**
488
+ * PLC primitive types (not structs, function blocks etc.)
489
+ */
490
+ export type PlcPrimitiveType = string | boolean | number | Buffer | Date | BigInt;
491
+ /**
492
+ * Return value of `readValue()` and `readValueBySymbol()`
493
+ *
494
+ * @template T - Type of the value
495
+ */
496
+ export interface ReadValueResult<T = any> {
497
+ /** Value of the symbol as converted Javascript object */
498
+ value: T;
499
+ /** Raw value as Buffer */
500
+ rawValue: Buffer;
501
+ /** Data type of the target symbol */
502
+ dataType: AdsDataType;
503
+ /** Target symbol */
504
+ symbol: AdsSymbol;
505
+ }
506
+ /**
507
+ * Return value of `writeValue()` and `writeValueBySymbol()`
508
+ */
509
+ export interface WriteValueResult<T = any> {
510
+ /** Value of the symbol as converted Javascript object */
511
+ value: T;
512
+ /** Raw value as Buffer */
513
+ rawValue: Buffer;
514
+ /** Data type of the target symbol */
515
+ dataType: AdsDataType;
516
+ /** Symbol information of the target symbol */
517
+ symbol: AdsSymbol;
518
+ }
519
+ /**
520
+ * Return value of `convertObjectToBuffer()`
521
+ */
522
+ export interface ObjectToBufferConversionResult {
523
+ /** Converted raw value */
524
+ rawValue: Buffer;
525
+ /** Property key name, if a property is missing from the Javascript object */
526
+ missingProperty?: string;
527
+ }
528
+ /**
529
+ * Variable handle object created using `createVariableHandle()` or `createVariableHandleMulti()`
530
+ */
531
+ export interface VariableHandle {
532
+ /** Handle number */
533
+ handle: number;
534
+ /** Data type size */
535
+ size: number;
536
+ /** Unknown */
537
+ typeDecoration: number;
538
+ /** Data type name */
539
+ dataType: string;
540
+ }
541
+ /**
542
+ * Return value of `invokeRpcMethod()`
543
+ *
544
+ * @template T The type of method return value
545
+ * @template U The type of method outputs
546
+ */
547
+ export interface RpcMethodCallResult<T = any, U = Record<string, any>> {
548
+ /** Method return value (if any - `undefined` if none) */
549
+ returnValue?: T;
550
+ /** Method outputs (if any - `{}` if none)*/
551
+ outputs: U;
552
+ }
553
+ /**
554
+ * Parameter containing all read commands for `readRawMulti()`
555
+ */
556
+ export interface ReadRawMultiCommand extends Required<AdsRawAddress> {
557
+ }
558
+ /**
559
+ * Return value of `readRawMulti()`
560
+ */
561
+ export interface ReadRawMultiResult extends BaseAdsResponse {
562
+ /** Command */
563
+ command: ReadRawMultiCommand;
564
+ /** True if reading was successful */
565
+ success: boolean;
566
+ /** Value (if any) */
567
+ value?: Buffer;
568
+ }
569
+ /**
570
+ * Parameter containing all write commands for `writeRawMulti()`
571
+ */
572
+ export interface WriteRawMultiCommand extends AdsRawAddress {
573
+ /** Value to write */
574
+ value: Buffer;
575
+ /** Size (bytes) - optional - as default, size of value is used*/
576
+ size?: number;
577
+ }
578
+ /**
579
+ * Return value of `writeRawMulti()`
580
+ */
581
+ export interface WriteRawMultiResult extends BaseAdsResponse {
582
+ /** Command */
583
+ command: WriteRawMultiCommand;
584
+ /** True if writing was successful */
585
+ success: boolean;
586
+ }
587
+ /**
588
+ * Return value of `createVariableHandleMulti()`
589
+ */
590
+ export interface CreateVariableHandleMultiResult extends BaseAdsResponse {
591
+ /** Full variable path in the PLC (such as `GVL_Test.ExampleStruct`) */
592
+ path: string;
593
+ /** True if handle was created successfully */
594
+ success: boolean;
595
+ /** Created handle (if any) */
596
+ handle?: VariableHandle;
597
+ }
598
+ /**
599
+ * Return value of `deleteVariableHandleMulti()`
600
+ */
601
+ export interface DeleteVariableHandleMultiResult extends BaseAdsResponse {
602
+ /** Variable handle */
603
+ handle: VariableHandle | number;
604
+ /** True if handle was deleted successfully */
605
+ success: boolean;
606
+ }
607
+ /**
608
+ * Parameter containing all read/write commands for `readWriteRawMulti()`
609
+ */
610
+ export interface ReadWriteRawMultiCommand extends Required<AdsRawAddress> {
611
+ /** Data to write */
612
+ writeData: Buffer;
613
+ /** How many bytes to read */
614
+ size: number;
615
+ }
616
+ /**
617
+ * Return value of `readWriteRawMulti()`
618
+ */
619
+ export interface ReadWriteRawMultiResult extends BaseAdsResponse {
620
+ /** Command */
621
+ command: ReadWriteRawMultiCommand;
622
+ /** True if command was successful */
623
+ success: boolean;
624
+ /** Response data (if any) */
625
+ data?: Buffer;
626
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
4
+ ;
5
+ //# sourceMappingURL=ads-client-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ads-client-types.js","sourceRoot":"","sources":["../../src/types/ads-client-types.ts"],"names":[],"mappings":";;AAqZC,CAAC;AA0BD,CAAC"}