node-opcua-client 2.63.1 → 2.64.1

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 (71) hide show
  1. package/dist/alarms_and_conditions/client_alarm.d.ts +42 -42
  2. package/dist/alarms_and_conditions/client_alarm.js +84 -84
  3. package/dist/alarms_and_conditions/client_alarm_list.d.ts +21 -21
  4. package/dist/alarms_and_conditions/client_alarm_list.js +97 -97
  5. package/dist/alarms_and_conditions/client_alarm_tools.d.ts +4 -4
  6. package/dist/alarms_and_conditions/client_alarm_tools.js +139 -139
  7. package/dist/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.d.ts +18 -18
  8. package/dist/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.js +190 -190
  9. package/dist/alarms_and_conditions/client_alarm_tools_dump_event.d.ts +9 -9
  10. package/dist/alarms_and_conditions/client_alarm_tools_dump_event.js +73 -73
  11. package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.d.ts +8 -8
  12. package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.js +120 -120
  13. package/dist/alarms_and_conditions/client_tools.d.ts +7 -7
  14. package/dist/alarms_and_conditions/client_tools.js +179 -179
  15. package/dist/client_base.d.ts +270 -270
  16. package/dist/client_base.js +13 -13
  17. package/dist/client_monitored_item.d.ts +21 -21
  18. package/dist/client_monitored_item.js +11 -11
  19. package/dist/client_monitored_item_base.d.ts +39 -39
  20. package/dist/client_monitored_item_base.js +2 -2
  21. package/dist/client_monitored_item_group.d.ts +18 -18
  22. package/dist/client_monitored_item_group.js +13 -13
  23. package/dist/client_monitored_item_toolbox.d.ts +15 -15
  24. package/dist/client_monitored_item_toolbox.js +117 -117
  25. package/dist/client_session.d.ts +483 -483
  26. package/dist/client_session.js +10 -10
  27. package/dist/client_session_keepalive_manager.d.ts +34 -34
  28. package/dist/client_session_keepalive_manager.js +150 -150
  29. package/dist/client_session_keepalive_manager.js.map +1 -1
  30. package/dist/client_subscription.d.ts +241 -241
  31. package/dist/client_subscription.js +14 -14
  32. package/dist/client_utils.d.ts +22 -22
  33. package/dist/client_utils.js +88 -88
  34. package/dist/common.d.ts +17 -17
  35. package/dist/common.js +5 -5
  36. package/dist/index.d.ts +55 -55
  37. package/dist/index.js +89 -89
  38. package/dist/opcua_client.d.ts +132 -132
  39. package/dist/opcua_client.js +33 -33
  40. package/dist/private/client_base_impl.d.ts +169 -169
  41. package/dist/private/client_base_impl.js +1315 -1318
  42. package/dist/private/client_base_impl.js.map +1 -1
  43. package/dist/private/client_monitored_item_base_impl.d.ts +3 -3
  44. package/dist/private/client_monitored_item_base_impl.js +4 -4
  45. package/dist/private/client_monitored_item_group_impl.d.ts +53 -53
  46. package/dist/private/client_monitored_item_group_impl.js +159 -159
  47. package/dist/private/client_monitored_item_impl.d.ts +93 -93
  48. package/dist/private/client_monitored_item_impl.js +304 -304
  49. package/dist/private/client_publish_engine.d.ts +62 -62
  50. package/dist/private/client_publish_engine.js +408 -408
  51. package/dist/private/client_session_impl.d.ts +620 -620
  52. package/dist/private/client_session_impl.js +1298 -1298
  53. package/dist/private/client_subscription_impl.d.ts +93 -93
  54. package/dist/private/client_subscription_impl.js +779 -779
  55. package/dist/private/i_private_client.d.ts +18 -18
  56. package/dist/private/i_private_client.js +2 -2
  57. package/dist/private/opcua_client_impl.d.ts +169 -169
  58. package/dist/private/opcua_client_impl.js +978 -975
  59. package/dist/private/opcua_client_impl.js.map +1 -1
  60. package/dist/reconnection.d.ts +9 -9
  61. package/dist/reconnection.js +362 -362
  62. package/dist/tools/findservers.d.ts +20 -20
  63. package/dist/tools/findservers.js +61 -61
  64. package/dist/tools/read_history_server_capabilities.d.ts +6 -6
  65. package/dist/tools/read_history_server_capabilities.js +99 -99
  66. package/dist/verify.d.ts +5 -5
  67. package/dist/verify.js +134 -134
  68. package/package.json +46 -46
  69. package/source/client_session_keepalive_manager.ts +1 -1
  70. package/source/private/client_base_impl.ts +0 -3
  71. package/source/private/opcua_client_impl.ts +4 -1
@@ -1,270 +1,270 @@
1
- /// <reference types="node" />
2
- /**
3
- * @module node-opcua-client
4
- */
5
- import { EventEmitter } from "events";
6
- import { LocaleId } from "node-opcua-basic-types";
7
- import { OPCUACertificateManager } from "node-opcua-certificate-manager";
8
- import { OPCUASecureObject } from "node-opcua-common";
9
- import { Certificate } from "node-opcua-crypto";
10
- import { ObjectRegistry } from "node-opcua-object-registry";
11
- import { ClientSecureChannelLayer, ConnectionStrategy, ConnectionStrategyOptions, SecurityPolicy } from "node-opcua-secure-channel";
12
- import { FindServersOnNetworkRequestOptions, FindServersRequestOptions, ServerOnNetwork } from "node-opcua-service-discovery";
13
- import { ApplicationDescription, EndpointDescription } from "node-opcua-service-endpoints";
14
- import { ChannelSecurityToken, MessageSecurityMode } from "node-opcua-service-secure-channel";
15
- import { ErrorCallback } from "node-opcua-status-code";
16
- import { ResponseCallback } from "./client_session";
17
- import { Request, Response } from "./common";
18
- export declare type FindServersRequestLike = FindServersRequestOptions;
19
- export declare type FindServersOnNetworkRequestLike = FindServersOnNetworkRequestOptions;
20
- export declare type CreateSecureChannelCallbackFunc = (err: Error | null, secureChannel?: ClientSecureChannelLayer) => void;
21
- export interface FindEndpointOptions {
22
- securityMode: MessageSecurityMode;
23
- securityPolicy: SecurityPolicy;
24
- connectionStrategy: ConnectionStrategyOptions;
25
- certificateFile: string;
26
- privateKeyFile: string;
27
- applicationName: string;
28
- applicationUri: string;
29
- clientCertificateManager: OPCUACertificateManager;
30
- }
31
- export interface FindEndpointResult {
32
- selectedEndpoint: EndpointDescription;
33
- endpoints: EndpointDescription[];
34
- }
35
- export declare type FindEndpointCallback = (err: Error | null, result?: FindEndpointResult) => void;
36
- export interface OPCUAClientBaseOptions {
37
- /**
38
- * the client application name
39
- * @default "NodeOPCUA-Client"
40
- */
41
- applicationName?: string;
42
- /**
43
- * the application Uri
44
- * @default: `urn:${hostname}:${applicationName}`
45
- */
46
- applicationUri?: string;
47
- connectionStrategy?: ConnectionStrategyOptions;
48
- /**
49
- * if not specify or set to 0 , token renewal will happen
50
- * around 75% of the defaultSecureTokenLifetime
51
- */
52
- tokenRenewalInterval?: number;
53
- /**
54
- * if set to true, pending session will not be automatically closed when disconnect is called
55
- */
56
- keepPendingSessionsOnDisconnect?: boolean;
57
- /**
58
- * the server certificate.
59
- */
60
- serverCertificate?: Certificate;
61
- /**
62
- * default secure token lifetime in ms
63
- */
64
- defaultSecureTokenLifetime?: number;
65
- /**
66
- * the security mode
67
- * @default MessageSecurityMode.None
68
- */
69
- securityMode?: MessageSecurityMode | string;
70
- /**
71
- * the security policy
72
- * @default SecurityPolicy.None
73
- */
74
- securityPolicy?: SecurityPolicy | string;
75
- /**
76
- * can be set when the client doesn't create subscription. In this case,
77
- * the client will send a dummy request on a regular basis to keep the
78
- * connection active.
79
- * @default false
80
- */
81
- keepSessionAlive?: boolean;
82
- /**
83
- * certificate Manager
84
- */
85
- clientCertificateManager?: OPCUACertificateManager;
86
- /**
87
- * client certificate pem file.
88
- * @default `${clientCertificateManager/rootFolder}/own/certs/client_certificate.pem"
89
- */
90
- certificateFile?: string;
91
- /**
92
- * client private key pem file.
93
- * @default `${clientCertificateManager/rootFolder}/own/private/private_key.pem"
94
- */
95
- privateKeyFile?: string;
96
- /**
97
- * a client name string that will be used to generate session names.
98
- */
99
- clientName?: string;
100
- /**
101
- * discovery url:
102
- */
103
- discoveryUrl?: string;
104
- }
105
- export interface GetEndpointsOptions {
106
- endpointUrl?: string;
107
- localeIds?: LocaleId[];
108
- profileUris?: string[];
109
- }
110
- export interface OPCUAClientBase extends OPCUASecureObject {
111
- /**
112
- * certificate Manager
113
- */
114
- readonly clientCertificateManager: OPCUACertificateManager;
115
- /***
116
- *
117
- * @param endpointUrl the endpoint of the server to connect to ( i.e "opc.tcp://machine.name:3434/name" )
118
- */
119
- connect(endpointUrl: string): Promise<void>;
120
- connect(endpointUrl: string, callback: ErrorCallback): void;
121
- /***
122
- * causes client to close and disconnect the communication with server
123
- */
124
- disconnect(): Promise<void>;
125
- disconnect(callback: ErrorCallback): void;
126
- findEndpointForSecurity(securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy): EndpointDescription | undefined;
127
- getEndpoints(options?: GetEndpointsOptions): Promise<EndpointDescription[]>;
128
- getEndpoints(options: GetEndpointsOptions, callback: ResponseCallback<EndpointDescription[]>): void;
129
- getEndpoints(callback: ResponseCallback<EndpointDescription[]>): void;
130
- findServers(options?: FindServersRequestLike): Promise<ApplicationDescription[]>;
131
- findServers(options: FindServersRequestLike, callback: ResponseCallback<ApplicationDescription[]>): void;
132
- findServers(callback: ResponseCallback<ApplicationDescription[]>): void;
133
- findServersOnNetwork(options?: FindServersOnNetworkRequestLike): Promise<ServerOnNetwork[]>;
134
- findServersOnNetwork(callback: ResponseCallback<ServerOnNetwork[]>): void;
135
- findServersOnNetwork(options: FindServersOnNetworkRequestLike, callback: ResponseCallback<ServerOnNetwork[]>): void;
136
- }
137
- export interface OPCUAClientBase extends EventEmitter {
138
- /**
139
- * this Event is raised when the initial connection has succeeded
140
- * @param event
141
- * @param eventHandler
142
- */
143
- on(event: "connected", eventHandler: () => void): this;
144
- /**
145
- * this Event is raised when the initial connection has failed
146
- * @param event
147
- * @param eventHandler
148
- */
149
- on(event: "connection_failed", eventHandler: (err: Error) => void): this;
150
- /**
151
- * this Event is raised when a failing connection is about to be tried again
152
- * @param event
153
- * @param eventHandler
154
- */
155
- on(event: "backoff", eventHandler: (count: number, delay: number) => void): this;
156
- /**
157
- * this event is raised when the client has encountered a connection failure and
158
- * and is going to reconnection mode.
159
- * You can intercept start_reconnection event to pause your interaction with the remote
160
- * OPCUA server.
161
- * @param event
162
- * @param eventHandler
163
- */
164
- on(event: "start_reconnection", eventHandler: () => void): this;
165
- /**
166
- * this event is raised when the client has failed one attempt to reconnect to the server
167
- * This event will be raised if the socket has successfully being created to the server but
168
- * if something went wrong during the reconnection process.
169
- * @param event
170
- * @param eventHandler
171
- */
172
- on(event: "reconnection_attempt_has_failed", eventHandler: (err: Error, message: string) => void): this;
173
- /**
174
- * this event is raised after the client has successfully managed to re-establish the connection with
175
- * the remote OPCUA Server.
176
- * You can intercept after_reconnection event to resume your interaction with the remote
177
- * OPCUA server.
178
- *
179
- * @param event
180
- * @param eventHandler
181
- */
182
- on(event: "after_reconnection", eventHandler: (err?: Error) => void): this;
183
- /**
184
- * the event is raised when the connection has been aborted by the remote OPCUA Server
185
- * @param event
186
- * @param eventHandler
187
- */
188
- on(event: "abort", eventHandler: () => void): this;
189
- /**
190
- * this event is raised when the connection is closed
191
- * @param event
192
- * @param eventHandler
193
- */
194
- on(event: "close", eventHandler: () => void): this;
195
- /**
196
- * this event is raised when the client is sending a message chunk to the server
197
- * (advanced use only)
198
- * @param event
199
- * @param eventHandler
200
- */
201
- on(event: "send_chunk", eventHandler: (chunk: Buffer) => void): this;
202
- /**
203
- * this event is raised when the client has received a new message chunk from the servers
204
- * (advanced use only)
205
- * @param event
206
- * @param eventHandler
207
- */
208
- on(event: "receive_chunk", eventHandler: (chunk: Buffer) => void): this;
209
- on(event: "send_request", eventHandler: (request: Request) => void): this;
210
- on(event: "receive_response", eventHandler: (response: Response) => void): this;
211
- /**
212
- * this event is raised when the current security token has reached 75% of its lifetime and is therefore
213
- * about to expired.
214
- * @param event
215
- * @param eventHandler
216
- */
217
- on(event: "lifetime_75", eventHandler: (token: ChannelSecurityToken) => void): this;
218
- /**
219
- * this event is raised after the (about ) security token as been renewed
220
- * and renegotiated with the server.to expire
221
- * @param event
222
- * @param eventHandler
223
- */
224
- on(event: "security_token_renewed", eventHandler: () => void): this;
225
- /**
226
- * this event is raised when the connection has been broken
227
- * @param event
228
- * @param eventHandler
229
- */
230
- on(event: "connection_lost", eventHandler: () => void): this;
231
- /**
232
- * this event is raised when a broken connection with the remote Server has been reestablished
233
- * @param event
234
- * @param eventHandler
235
- */
236
- on(event: "connection_reestablished", eventHandler: () => void): this;
237
- /**
238
- * This event is raised when a request sent to the remote OPCUA server has reach it's timeout value without
239
- * a Response from the server.
240
- * @param event
241
- * @param eventHandler
242
- */
243
- on(event: "timed_out_request", eventHandler: (request: Request) => void): this;
244
- on(event: string | symbol, listener: (...args: any[]) => void): this;
245
- }
246
- export interface OPCUAClientBase {
247
- readonly endpoint?: EndpointDescription;
248
- readonly isReconnecting: boolean;
249
- readonly transactionsPerformed: number;
250
- readonly knowsServerEndpoint: boolean;
251
- readonly reconnectOnFailure: boolean;
252
- readonly bytesRead: number;
253
- readonly bytesWritten: number;
254
- readonly securityMode: MessageSecurityMode;
255
- readonly securityPolicy: SecurityPolicy;
256
- readonly serverCertificate?: Certificate;
257
- readonly clientName: string;
258
- readonly protocolVersion: 0;
259
- readonly defaultSecureTokenLifetime: number;
260
- readonly tokenRenewalInterval: number;
261
- readonly connectionStrategy: ConnectionStrategy;
262
- readonly keepPendingSessionsOnDisconnect: boolean;
263
- readonly endpointUrl: string;
264
- readonly keepSessionAlive: boolean;
265
- readonly applicationName: string;
266
- }
267
- export declare class OPCUAClientBase {
268
- static registry: ObjectRegistry;
269
- static create(options: OPCUAClientBaseOptions): OPCUAClientBase;
270
- }
1
+ /// <reference types="node" />
2
+ /**
3
+ * @module node-opcua-client
4
+ */
5
+ import { EventEmitter } from "events";
6
+ import { LocaleId } from "node-opcua-basic-types";
7
+ import { OPCUACertificateManager } from "node-opcua-certificate-manager";
8
+ import { OPCUASecureObject } from "node-opcua-common";
9
+ import { Certificate } from "node-opcua-crypto";
10
+ import { ObjectRegistry } from "node-opcua-object-registry";
11
+ import { ClientSecureChannelLayer, ConnectionStrategy, ConnectionStrategyOptions, SecurityPolicy } from "node-opcua-secure-channel";
12
+ import { FindServersOnNetworkRequestOptions, FindServersRequestOptions, ServerOnNetwork } from "node-opcua-service-discovery";
13
+ import { ApplicationDescription, EndpointDescription } from "node-opcua-service-endpoints";
14
+ import { ChannelSecurityToken, MessageSecurityMode } from "node-opcua-service-secure-channel";
15
+ import { ErrorCallback } from "node-opcua-status-code";
16
+ import { ResponseCallback } from "./client_session";
17
+ import { Request, Response } from "./common";
18
+ export declare type FindServersRequestLike = FindServersRequestOptions;
19
+ export declare type FindServersOnNetworkRequestLike = FindServersOnNetworkRequestOptions;
20
+ export declare type CreateSecureChannelCallbackFunc = (err: Error | null, secureChannel?: ClientSecureChannelLayer) => void;
21
+ export interface FindEndpointOptions {
22
+ securityMode: MessageSecurityMode;
23
+ securityPolicy: SecurityPolicy;
24
+ connectionStrategy: ConnectionStrategyOptions;
25
+ certificateFile: string;
26
+ privateKeyFile: string;
27
+ applicationName: string;
28
+ applicationUri: string;
29
+ clientCertificateManager: OPCUACertificateManager;
30
+ }
31
+ export interface FindEndpointResult {
32
+ selectedEndpoint: EndpointDescription;
33
+ endpoints: EndpointDescription[];
34
+ }
35
+ export declare type FindEndpointCallback = (err: Error | null, result?: FindEndpointResult) => void;
36
+ export interface OPCUAClientBaseOptions {
37
+ /**
38
+ * the client application name
39
+ * @default "NodeOPCUA-Client"
40
+ */
41
+ applicationName?: string;
42
+ /**
43
+ * the application Uri
44
+ * @default: `urn:${hostname}:${applicationName}`
45
+ */
46
+ applicationUri?: string;
47
+ connectionStrategy?: ConnectionStrategyOptions;
48
+ /**
49
+ * if not specify or set to 0 , token renewal will happen
50
+ * around 75% of the defaultSecureTokenLifetime
51
+ */
52
+ tokenRenewalInterval?: number;
53
+ /**
54
+ * if set to true, pending session will not be automatically closed when disconnect is called
55
+ */
56
+ keepPendingSessionsOnDisconnect?: boolean;
57
+ /**
58
+ * the server certificate.
59
+ */
60
+ serverCertificate?: Certificate;
61
+ /**
62
+ * default secure token lifetime in ms
63
+ */
64
+ defaultSecureTokenLifetime?: number;
65
+ /**
66
+ * the security mode
67
+ * @default MessageSecurityMode.None
68
+ */
69
+ securityMode?: MessageSecurityMode | string;
70
+ /**
71
+ * the security policy
72
+ * @default SecurityPolicy.None
73
+ */
74
+ securityPolicy?: SecurityPolicy | string;
75
+ /**
76
+ * can be set when the client doesn't create subscription. In this case,
77
+ * the client will send a dummy request on a regular basis to keep the
78
+ * connection active.
79
+ * @default false
80
+ */
81
+ keepSessionAlive?: boolean;
82
+ /**
83
+ * certificate Manager
84
+ */
85
+ clientCertificateManager?: OPCUACertificateManager;
86
+ /**
87
+ * client certificate pem file.
88
+ * @default `${clientCertificateManager/rootFolder}/own/certs/client_certificate.pem"
89
+ */
90
+ certificateFile?: string;
91
+ /**
92
+ * client private key pem file.
93
+ * @default `${clientCertificateManager/rootFolder}/own/private/private_key.pem"
94
+ */
95
+ privateKeyFile?: string;
96
+ /**
97
+ * a client name string that will be used to generate session names.
98
+ */
99
+ clientName?: string;
100
+ /**
101
+ * discovery url:
102
+ */
103
+ discoveryUrl?: string;
104
+ }
105
+ export interface GetEndpointsOptions {
106
+ endpointUrl?: string;
107
+ localeIds?: LocaleId[];
108
+ profileUris?: string[];
109
+ }
110
+ export interface OPCUAClientBase extends OPCUASecureObject {
111
+ /**
112
+ * certificate Manager
113
+ */
114
+ readonly clientCertificateManager: OPCUACertificateManager;
115
+ /***
116
+ *
117
+ * @param endpointUrl the endpoint of the server to connect to ( i.e "opc.tcp://machine.name:3434/name" )
118
+ */
119
+ connect(endpointUrl: string): Promise<void>;
120
+ connect(endpointUrl: string, callback: ErrorCallback): void;
121
+ /***
122
+ * causes client to close and disconnect the communication with server
123
+ */
124
+ disconnect(): Promise<void>;
125
+ disconnect(callback: ErrorCallback): void;
126
+ findEndpointForSecurity(securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy): EndpointDescription | undefined;
127
+ getEndpoints(options?: GetEndpointsOptions): Promise<EndpointDescription[]>;
128
+ getEndpoints(options: GetEndpointsOptions, callback: ResponseCallback<EndpointDescription[]>): void;
129
+ getEndpoints(callback: ResponseCallback<EndpointDescription[]>): void;
130
+ findServers(options?: FindServersRequestLike): Promise<ApplicationDescription[]>;
131
+ findServers(options: FindServersRequestLike, callback: ResponseCallback<ApplicationDescription[]>): void;
132
+ findServers(callback: ResponseCallback<ApplicationDescription[]>): void;
133
+ findServersOnNetwork(options?: FindServersOnNetworkRequestLike): Promise<ServerOnNetwork[]>;
134
+ findServersOnNetwork(callback: ResponseCallback<ServerOnNetwork[]>): void;
135
+ findServersOnNetwork(options: FindServersOnNetworkRequestLike, callback: ResponseCallback<ServerOnNetwork[]>): void;
136
+ }
137
+ export interface OPCUAClientBase extends EventEmitter {
138
+ /**
139
+ * this Event is raised when the initial connection has succeeded
140
+ * @param event
141
+ * @param eventHandler
142
+ */
143
+ on(event: "connected", eventHandler: () => void): this;
144
+ /**
145
+ * this Event is raised when the initial connection has failed
146
+ * @param event
147
+ * @param eventHandler
148
+ */
149
+ on(event: "connection_failed", eventHandler: (err: Error) => void): this;
150
+ /**
151
+ * this Event is raised when a failing connection is about to be tried again
152
+ * @param event
153
+ * @param eventHandler
154
+ */
155
+ on(event: "backoff", eventHandler: (count: number, delay: number) => void): this;
156
+ /**
157
+ * this event is raised when the client has encountered a connection failure and
158
+ * and is going to reconnection mode.
159
+ * You can intercept start_reconnection event to pause your interaction with the remote
160
+ * OPCUA server.
161
+ * @param event
162
+ * @param eventHandler
163
+ */
164
+ on(event: "start_reconnection", eventHandler: () => void): this;
165
+ /**
166
+ * this event is raised when the client has failed one attempt to reconnect to the server
167
+ * This event will be raised if the socket has successfully being created to the server but
168
+ * if something went wrong during the reconnection process.
169
+ * @param event
170
+ * @param eventHandler
171
+ */
172
+ on(event: "reconnection_attempt_has_failed", eventHandler: (err: Error, message: string) => void): this;
173
+ /**
174
+ * this event is raised after the client has successfully managed to re-establish the connection with
175
+ * the remote OPCUA Server.
176
+ * You can intercept after_reconnection event to resume your interaction with the remote
177
+ * OPCUA server.
178
+ *
179
+ * @param event
180
+ * @param eventHandler
181
+ */
182
+ on(event: "after_reconnection", eventHandler: (err?: Error) => void): this;
183
+ /**
184
+ * the event is raised when the connection has been aborted by the remote OPCUA Server
185
+ * @param event
186
+ * @param eventHandler
187
+ */
188
+ on(event: "abort", eventHandler: () => void): this;
189
+ /**
190
+ * this event is raised when the connection is closed
191
+ * @param event
192
+ * @param eventHandler
193
+ */
194
+ on(event: "close", eventHandler: () => void): this;
195
+ /**
196
+ * this event is raised when the client is sending a message chunk to the server
197
+ * (advanced use only)
198
+ * @param event
199
+ * @param eventHandler
200
+ */
201
+ on(event: "send_chunk", eventHandler: (chunk: Buffer) => void): this;
202
+ /**
203
+ * this event is raised when the client has received a new message chunk from the servers
204
+ * (advanced use only)
205
+ * @param event
206
+ * @param eventHandler
207
+ */
208
+ on(event: "receive_chunk", eventHandler: (chunk: Buffer) => void): this;
209
+ on(event: "send_request", eventHandler: (request: Request) => void): this;
210
+ on(event: "receive_response", eventHandler: (response: Response) => void): this;
211
+ /**
212
+ * this event is raised when the current security token has reached 75% of its lifetime and is therefore
213
+ * about to expired.
214
+ * @param event
215
+ * @param eventHandler
216
+ */
217
+ on(event: "lifetime_75", eventHandler: (token: ChannelSecurityToken) => void): this;
218
+ /**
219
+ * this event is raised after the (about ) security token as been renewed
220
+ * and renegotiated with the server.to expire
221
+ * @param event
222
+ * @param eventHandler
223
+ */
224
+ on(event: "security_token_renewed", eventHandler: () => void): this;
225
+ /**
226
+ * this event is raised when the connection has been broken
227
+ * @param event
228
+ * @param eventHandler
229
+ */
230
+ on(event: "connection_lost", eventHandler: () => void): this;
231
+ /**
232
+ * this event is raised when a broken connection with the remote Server has been reestablished
233
+ * @param event
234
+ * @param eventHandler
235
+ */
236
+ on(event: "connection_reestablished", eventHandler: () => void): this;
237
+ /**
238
+ * This event is raised when a request sent to the remote OPCUA server has reach it's timeout value without
239
+ * a Response from the server.
240
+ * @param event
241
+ * @param eventHandler
242
+ */
243
+ on(event: "timed_out_request", eventHandler: (request: Request) => void): this;
244
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
245
+ }
246
+ export interface OPCUAClientBase {
247
+ readonly endpoint?: EndpointDescription;
248
+ readonly isReconnecting: boolean;
249
+ readonly transactionsPerformed: number;
250
+ readonly knowsServerEndpoint: boolean;
251
+ readonly reconnectOnFailure: boolean;
252
+ readonly bytesRead: number;
253
+ readonly bytesWritten: number;
254
+ readonly securityMode: MessageSecurityMode;
255
+ readonly securityPolicy: SecurityPolicy;
256
+ readonly serverCertificate?: Certificate;
257
+ readonly clientName: string;
258
+ readonly protocolVersion: 0;
259
+ readonly defaultSecureTokenLifetime: number;
260
+ readonly tokenRenewalInterval: number;
261
+ readonly connectionStrategy: ConnectionStrategy;
262
+ readonly keepPendingSessionsOnDisconnect: boolean;
263
+ readonly endpointUrl: string;
264
+ readonly keepSessionAlive: boolean;
265
+ readonly applicationName: string;
266
+ }
267
+ export declare class OPCUAClientBase {
268
+ static registry: ObjectRegistry;
269
+ static create(options: OPCUAClientBaseOptions): OPCUAClientBase;
270
+ }
@@ -1,14 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OPCUAClientBase = void 0;
4
- const node_opcua_object_registry_1 = require("node-opcua-object-registry");
5
- class OPCUAClientBase {
6
- static create(options) {
7
- /* istanbul ignore next*/
8
- options;
9
- throw new Error("Not Implemented");
10
- }
11
- }
12
- exports.OPCUAClientBase = OPCUAClientBase;
13
- OPCUAClientBase.registry = new node_opcua_object_registry_1.ObjectRegistry();
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OPCUAClientBase = void 0;
4
+ const node_opcua_object_registry_1 = require("node-opcua-object-registry");
5
+ class OPCUAClientBase {
6
+ static create(options) {
7
+ /* istanbul ignore next*/
8
+ options;
9
+ throw new Error("Not Implemented");
10
+ }
11
+ }
12
+ exports.OPCUAClientBase = OPCUAClientBase;
13
+ OPCUAClientBase.registry = new node_opcua_object_registry_1.ObjectRegistry();
14
14
  //# sourceMappingURL=client_base.js.map
@@ -1,21 +1,21 @@
1
- /// <reference types="node" />
2
- /**
3
- * @module node-opcua-client
4
- */
5
- import { EventEmitter } from "events";
6
- import { DataValue, TimestampsToReturn } from "node-opcua-data-value";
7
- import { ReadValueIdOptions } from "node-opcua-service-read";
8
- import { Variant } from "node-opcua-variant";
9
- import { MonitoringParametersOptions } from "node-opcua-types";
10
- import { ClientMonitoredItemBase, ClientMonitoredItemOrGroupAction } from "./client_monitored_item_base";
11
- import { ClientSubscription } from "./client_subscription";
12
- export interface ClientMonitoredItem extends ClientMonitoredItemBase, ClientMonitoredItemOrGroupAction, EventEmitter {
13
- on(event: "changed", eventHandler: (dataValue: DataValue) => void): this;
14
- on(event: "changed", eventHandler: (values: Variant[]) => void): this;
15
- on(event: "terminated", eventHandler: () => void): this;
16
- on(event: "initialized", eventHandler: () => void): this;
17
- on(event: "err", eventHandler: (message: string) => void): this;
18
- }
19
- export declare class ClientMonitoredItem {
20
- static create(subscription: ClientSubscription, itemToMonitor: ReadValueIdOptions, monitoringParameters: MonitoringParametersOptions, timestampsToReturn?: TimestampsToReturn): ClientMonitoredItem;
21
- }
1
+ /// <reference types="node" />
2
+ /**
3
+ * @module node-opcua-client
4
+ */
5
+ import { EventEmitter } from "events";
6
+ import { DataValue, TimestampsToReturn } from "node-opcua-data-value";
7
+ import { ReadValueIdOptions } from "node-opcua-service-read";
8
+ import { Variant } from "node-opcua-variant";
9
+ import { MonitoringParametersOptions } from "node-opcua-types";
10
+ import { ClientMonitoredItemBase, ClientMonitoredItemOrGroupAction } from "./client_monitored_item_base";
11
+ import { ClientSubscription } from "./client_subscription";
12
+ export interface ClientMonitoredItem extends ClientMonitoredItemBase, ClientMonitoredItemOrGroupAction, EventEmitter {
13
+ on(event: "changed", eventHandler: (dataValue: DataValue) => void): this;
14
+ on(event: "changed", eventHandler: (values: Variant[]) => void): this;
15
+ on(event: "terminated", eventHandler: () => void): this;
16
+ on(event: "initialized", eventHandler: () => void): this;
17
+ on(event: "err", eventHandler: (message: string) => void): this;
18
+ }
19
+ export declare class ClientMonitoredItem {
20
+ static create(subscription: ClientSubscription, itemToMonitor: ReadValueIdOptions, monitoringParameters: MonitoringParametersOptions, timestampsToReturn?: TimestampsToReturn): ClientMonitoredItem;
21
+ }
@@ -1,12 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ClientMonitoredItem = void 0;
4
- const node_opcua_data_value_1 = require("node-opcua-data-value");
5
- class ClientMonitoredItem {
6
- static create(subscription, itemToMonitor, monitoringParameters, timestampsToReturn = node_opcua_data_value_1.TimestampsToReturn.Neither) {
7
- /* istanbul ignore next*/
8
- throw new Error("unimplemented");
9
- }
10
- }
11
- exports.ClientMonitoredItem = ClientMonitoredItem;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClientMonitoredItem = void 0;
4
+ const node_opcua_data_value_1 = require("node-opcua-data-value");
5
+ class ClientMonitoredItem {
6
+ static create(subscription, itemToMonitor, monitoringParameters, timestampsToReturn = node_opcua_data_value_1.TimestampsToReturn.Neither) {
7
+ /* istanbul ignore next*/
8
+ throw new Error("unimplemented");
9
+ }
10
+ }
11
+ exports.ClientMonitoredItem = ClientMonitoredItem;
12
12
  //# sourceMappingURL=client_monitored_item.js.map