node-opcua-client 2.70.1 → 2.71.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 (66) hide show
  1. package/dist/alarms_and_conditions/client_alarm.d.ts +43 -43
  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 +180 -180
  15. package/dist/client_base.d.ts +290 -290
  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 +484 -484
  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_subscription.d.ts +241 -241
  30. package/dist/client_subscription.js +14 -14
  31. package/dist/client_utils.d.ts +22 -22
  32. package/dist/client_utils.js +88 -88
  33. package/dist/common.d.ts +17 -17
  34. package/dist/common.js +5 -5
  35. package/dist/index.d.ts +55 -55
  36. package/dist/index.js +93 -93
  37. package/dist/opcua_client.d.ts +132 -132
  38. package/dist/opcua_client.js +33 -33
  39. package/dist/private/client_base_impl.d.ts +169 -169
  40. package/dist/private/client_base_impl.js +1316 -1316
  41. package/dist/private/client_monitored_item_base_impl.d.ts +3 -3
  42. package/dist/private/client_monitored_item_base_impl.js +4 -4
  43. package/dist/private/client_monitored_item_group_impl.d.ts +53 -53
  44. package/dist/private/client_monitored_item_group_impl.js +159 -159
  45. package/dist/private/client_monitored_item_impl.d.ts +93 -93
  46. package/dist/private/client_monitored_item_impl.js +304 -304
  47. package/dist/private/client_publish_engine.d.ts +62 -62
  48. package/dist/private/client_publish_engine.js +408 -408
  49. package/dist/private/client_session_impl.d.ts +621 -621
  50. package/dist/private/client_session_impl.js +1301 -1301
  51. package/dist/private/client_subscription_impl.d.ts +93 -93
  52. package/dist/private/client_subscription_impl.js +734 -734
  53. package/dist/private/i_private_client.d.ts +18 -18
  54. package/dist/private/i_private_client.js +2 -2
  55. package/dist/private/opcua_client_impl.d.ts +169 -169
  56. package/dist/private/opcua_client_impl.js +978 -978
  57. package/dist/reconnection.d.ts +9 -9
  58. package/dist/reconnection.js +362 -362
  59. package/dist/tools/findservers.d.ts +20 -20
  60. package/dist/tools/findservers.js +61 -61
  61. package/dist/tools/read_history_server_capabilities.d.ts +6 -6
  62. package/dist/tools/read_history_server_capabilities.js +99 -99
  63. package/dist/verify.d.ts +5 -5
  64. package/dist/verify.js +134 -134
  65. package/package.json +44 -44
  66. package/source/client_session.ts +14 -14
@@ -1,169 +1,169 @@
1
- import { OPCUASecureObject } from "node-opcua-common";
2
- import { Certificate, Nonce } from "node-opcua-crypto";
3
- import { ClientSecureChannelLayer, ConnectionStrategy, ConnectionStrategyOptions, SecurityPolicy } from "node-opcua-secure-channel";
4
- import { ServerOnNetwork } from "node-opcua-service-discovery";
5
- import { ApplicationDescription, EndpointDescription } from "node-opcua-service-endpoints";
6
- import { MessageSecurityMode } from "node-opcua-service-secure-channel";
7
- import { ErrorCallback } from "node-opcua-status-code";
8
- import { OPCUACertificateManager } from "node-opcua-certificate-manager";
9
- import { ResponseCallback } from "../client_session";
10
- import { Request, Response } from "../common";
11
- import { CreateSecureChannelCallbackFunc, FindServersOnNetworkRequestLike, FindServersRequestLike, GetEndpointsOptions, OPCUAClientBase, OPCUAClientBaseOptions } from "../client_base";
12
- import { ClientSessionImpl } from "./client_session_impl";
13
- import { IClientBase } from "./i_private_client";
14
- declare type InternalClientState = "uninitialized" | "disconnected" | "connecting" | "connected" | "reconnecting" | "disconnecting";
15
- /**
16
- * @internal
17
- */
18
- export declare class ClientBaseImpl extends OPCUASecureObject implements OPCUAClientBase, IClientBase {
19
- /**
20
- * total number of requests that been canceled due to timeout
21
- * @property timedOutRequestCount
22
- * @type {Number}
23
- */
24
- get timedOutRequestCount(): number;
25
- /**
26
- * total number of transactions performed by the client
27
- * @property transactionsPerformed
28
- * @type {Number}
29
- */
30
- get transactionsPerformed(): number;
31
- /**
32
- * is true when the client has already requested the server end points.
33
- * @property knowsServerEndpoint
34
- * @type boolean
35
- */
36
- get knowsServerEndpoint(): boolean;
37
- /**
38
- * true if the client is trying to reconnect to the server after a connection break.
39
- * @property isReconnecting
40
- * @type {Boolean}
41
- */
42
- get isReconnecting(): boolean;
43
- /**
44
- * true if the connection strategy is set to automatically try to reconnect in case of failure
45
- * @property reconnectOnFailure
46
- * @type {Boolean}
47
- */
48
- get reconnectOnFailure(): boolean;
49
- /**
50
- * total number of bytes read by the client
51
- * @property bytesRead
52
- * @type {Number}
53
- */
54
- get bytesRead(): number;
55
- /**
56
- * total number of bytes written by the client
57
- * @property bytesWritten
58
- * @type {Number}
59
- */
60
- get bytesWritten(): number;
61
- securityMode: MessageSecurityMode;
62
- securityPolicy: SecurityPolicy;
63
- serverCertificate?: Certificate;
64
- clientName: string;
65
- protocolVersion: 0;
66
- defaultSecureTokenLifetime: number;
67
- tokenRenewalInterval: number;
68
- connectionStrategy: ConnectionStrategy;
69
- keepPendingSessionsOnDisconnect: boolean;
70
- endpointUrl: string;
71
- discoveryUrl: string;
72
- readonly applicationName: string;
73
- private _applicationUri;
74
- /**
75
- * true if session shall periodically probe the server to keep the session alive and prevent timeout
76
- */
77
- keepSessionAlive: boolean;
78
- _sessions: ClientSessionImpl[];
79
- protected _serverEndpoints: EndpointDescription[];
80
- _secureChannel: ClientSecureChannelLayer | null;
81
- protected disconnecting: boolean;
82
- private _byteRead;
83
- private _byteWritten;
84
- private _timedOutRequestCount;
85
- private _transactionsPerformed;
86
- private reconnectionIsCanceled;
87
- private _clockAdjuster?;
88
- private _tmpClient?;
89
- private _instanceNumber;
90
- clientCertificateManager: OPCUACertificateManager;
91
- protected _setInternalState(internalState: InternalClientState): void;
92
- emit(eventName: string | symbol, ...others: any[]): boolean;
93
- constructor(options?: OPCUAClientBaseOptions);
94
- private _cancel_reconnection;
95
- _recreate_secure_channel(callback: ErrorCallback): void;
96
- _internal_create_secure_channel(connectionStrategy: ConnectionStrategyOptions, callback: CreateSecureChannelCallbackFunc): void;
97
- static createCertificate(clientCertificateManager: OPCUACertificateManager, certificateFile: string, applicationName: string, applicationUri: string): Promise<void>;
98
- createDefaultCertificate(): Promise<void>;
99
- protected _getBuiltApplicationUri(): string;
100
- protected initializeCM(): Promise<void>;
101
- protected _internalState: InternalClientState;
102
- protected _handleUnrecoverableConnectionFailure(err: Error, callback: ErrorCallback): void;
103
- private _handleDisconnectionWhileConnecting;
104
- private _handleSuccessfulConnection;
105
- /**
106
- * connect the OPC-UA client to a server end point.
107
- * @async
108
- */
109
- connect(endpointUrl: string): Promise<void>;
110
- connect(endpointUrl: string, callback: ErrorCallback): void;
111
- /**
112
- * @private
113
- */
114
- _connectStep2(endpointUrl: string, callback: ErrorCallback): void;
115
- getClientNonce(): Nonce | null;
116
- performMessageTransaction(request: Request, callback: ResponseCallback<Response>): void;
117
- /**
118
- *
119
- * return the endpoint information matching security mode and security policy.
120
- * @method findEndpoint
121
- */
122
- findEndpointForSecurity(securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy): EndpointDescription | undefined;
123
- /**
124
- *
125
- * return the endpoint information matching the specified url , security mode and security policy.
126
- * @method findEndpoint
127
- */
128
- findEndpoint(endpointUrl: string, securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy): EndpointDescription | undefined;
129
- getEndpoints(options?: GetEndpointsOptions): Promise<EndpointDescription[]>;
130
- getEndpoints(options: GetEndpointsOptions, callback: ResponseCallback<EndpointDescription[]>): void;
131
- getEndpoints(callback: ResponseCallback<EndpointDescription[]>): void;
132
- /**
133
- * @deprecated
134
- */
135
- getEndpointsRequest(options: GetEndpointsOptions, callback: ResponseCallback<EndpointDescription[]>): void;
136
- /**
137
- * @method findServers
138
- */
139
- findServers(options?: FindServersRequestLike): Promise<ApplicationDescription[]>;
140
- findServers(options: FindServersRequestLike, callback: ResponseCallback<ApplicationDescription[]>): void;
141
- findServers(callback: ResponseCallback<ApplicationDescription[]>): void;
142
- findServersOnNetwork(options?: FindServersOnNetworkRequestLike): Promise<ServerOnNetwork[]>;
143
- findServersOnNetwork(callback: ResponseCallback<ServerOnNetwork[]>): void;
144
- findServersOnNetwork(options: FindServersOnNetworkRequestLike, callback: ResponseCallback<ServerOnNetwork[]>): void;
145
- _removeSession(session: ClientSessionImpl): void;
146
- private _closeSession;
147
- closeSession(...args: any[]): any;
148
- disconnect(): Promise<void>;
149
- disconnect(callback: ErrorCallback): void;
150
- _on_connection_reestablished(callback: ErrorCallback): void;
151
- toString(): string;
152
- getSessions(): ClientSessionImpl[];
153
- protected _addSession(session: ClientSessionImpl): void;
154
- private fetchServerCertificate;
155
- private _accumulate_statistics;
156
- private _destroy_secure_channel;
157
- private _close_pending_sessions;
158
- private _install_secure_channel_event_handlers;
159
- private _repairConnection;
160
- private _finalReconnectionStep;
161
- /**
162
- *
163
- * @internal
164
- * @private
165
- */
166
- __createSession_step2(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
167
- _activateSession(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
168
- }
169
- export {};
1
+ import { OPCUASecureObject } from "node-opcua-common";
2
+ import { Certificate, Nonce } from "node-opcua-crypto";
3
+ import { ClientSecureChannelLayer, ConnectionStrategy, ConnectionStrategyOptions, SecurityPolicy } from "node-opcua-secure-channel";
4
+ import { ServerOnNetwork } from "node-opcua-service-discovery";
5
+ import { ApplicationDescription, EndpointDescription } from "node-opcua-service-endpoints";
6
+ import { MessageSecurityMode } from "node-opcua-service-secure-channel";
7
+ import { ErrorCallback } from "node-opcua-status-code";
8
+ import { OPCUACertificateManager } from "node-opcua-certificate-manager";
9
+ import { ResponseCallback } from "../client_session";
10
+ import { Request, Response } from "../common";
11
+ import { CreateSecureChannelCallbackFunc, FindServersOnNetworkRequestLike, FindServersRequestLike, GetEndpointsOptions, OPCUAClientBase, OPCUAClientBaseOptions } from "../client_base";
12
+ import { ClientSessionImpl } from "./client_session_impl";
13
+ import { IClientBase } from "./i_private_client";
14
+ declare type InternalClientState = "uninitialized" | "disconnected" | "connecting" | "connected" | "reconnecting" | "disconnecting";
15
+ /**
16
+ * @internal
17
+ */
18
+ export declare class ClientBaseImpl extends OPCUASecureObject implements OPCUAClientBase, IClientBase {
19
+ /**
20
+ * total number of requests that been canceled due to timeout
21
+ * @property timedOutRequestCount
22
+ * @type {Number}
23
+ */
24
+ get timedOutRequestCount(): number;
25
+ /**
26
+ * total number of transactions performed by the client
27
+ * @property transactionsPerformed
28
+ * @type {Number}
29
+ */
30
+ get transactionsPerformed(): number;
31
+ /**
32
+ * is true when the client has already requested the server end points.
33
+ * @property knowsServerEndpoint
34
+ * @type boolean
35
+ */
36
+ get knowsServerEndpoint(): boolean;
37
+ /**
38
+ * true if the client is trying to reconnect to the server after a connection break.
39
+ * @property isReconnecting
40
+ * @type {Boolean}
41
+ */
42
+ get isReconnecting(): boolean;
43
+ /**
44
+ * true if the connection strategy is set to automatically try to reconnect in case of failure
45
+ * @property reconnectOnFailure
46
+ * @type {Boolean}
47
+ */
48
+ get reconnectOnFailure(): boolean;
49
+ /**
50
+ * total number of bytes read by the client
51
+ * @property bytesRead
52
+ * @type {Number}
53
+ */
54
+ get bytesRead(): number;
55
+ /**
56
+ * total number of bytes written by the client
57
+ * @property bytesWritten
58
+ * @type {Number}
59
+ */
60
+ get bytesWritten(): number;
61
+ securityMode: MessageSecurityMode;
62
+ securityPolicy: SecurityPolicy;
63
+ serverCertificate?: Certificate;
64
+ clientName: string;
65
+ protocolVersion: 0;
66
+ defaultSecureTokenLifetime: number;
67
+ tokenRenewalInterval: number;
68
+ connectionStrategy: ConnectionStrategy;
69
+ keepPendingSessionsOnDisconnect: boolean;
70
+ endpointUrl: string;
71
+ discoveryUrl: string;
72
+ readonly applicationName: string;
73
+ private _applicationUri;
74
+ /**
75
+ * true if session shall periodically probe the server to keep the session alive and prevent timeout
76
+ */
77
+ keepSessionAlive: boolean;
78
+ _sessions: ClientSessionImpl[];
79
+ protected _serverEndpoints: EndpointDescription[];
80
+ _secureChannel: ClientSecureChannelLayer | null;
81
+ protected disconnecting: boolean;
82
+ private _byteRead;
83
+ private _byteWritten;
84
+ private _timedOutRequestCount;
85
+ private _transactionsPerformed;
86
+ private reconnectionIsCanceled;
87
+ private _clockAdjuster?;
88
+ private _tmpClient?;
89
+ private _instanceNumber;
90
+ clientCertificateManager: OPCUACertificateManager;
91
+ protected _setInternalState(internalState: InternalClientState): void;
92
+ emit(eventName: string | symbol, ...others: any[]): boolean;
93
+ constructor(options?: OPCUAClientBaseOptions);
94
+ private _cancel_reconnection;
95
+ _recreate_secure_channel(callback: ErrorCallback): void;
96
+ _internal_create_secure_channel(connectionStrategy: ConnectionStrategyOptions, callback: CreateSecureChannelCallbackFunc): void;
97
+ static createCertificate(clientCertificateManager: OPCUACertificateManager, certificateFile: string, applicationName: string, applicationUri: string): Promise<void>;
98
+ createDefaultCertificate(): Promise<void>;
99
+ protected _getBuiltApplicationUri(): string;
100
+ protected initializeCM(): Promise<void>;
101
+ protected _internalState: InternalClientState;
102
+ protected _handleUnrecoverableConnectionFailure(err: Error, callback: ErrorCallback): void;
103
+ private _handleDisconnectionWhileConnecting;
104
+ private _handleSuccessfulConnection;
105
+ /**
106
+ * connect the OPC-UA client to a server end point.
107
+ * @async
108
+ */
109
+ connect(endpointUrl: string): Promise<void>;
110
+ connect(endpointUrl: string, callback: ErrorCallback): void;
111
+ /**
112
+ * @private
113
+ */
114
+ _connectStep2(endpointUrl: string, callback: ErrorCallback): void;
115
+ getClientNonce(): Nonce | null;
116
+ performMessageTransaction(request: Request, callback: ResponseCallback<Response>): void;
117
+ /**
118
+ *
119
+ * return the endpoint information matching security mode and security policy.
120
+ * @method findEndpoint
121
+ */
122
+ findEndpointForSecurity(securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy): EndpointDescription | undefined;
123
+ /**
124
+ *
125
+ * return the endpoint information matching the specified url , security mode and security policy.
126
+ * @method findEndpoint
127
+ */
128
+ findEndpoint(endpointUrl: string, securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy): EndpointDescription | undefined;
129
+ getEndpoints(options?: GetEndpointsOptions): Promise<EndpointDescription[]>;
130
+ getEndpoints(options: GetEndpointsOptions, callback: ResponseCallback<EndpointDescription[]>): void;
131
+ getEndpoints(callback: ResponseCallback<EndpointDescription[]>): void;
132
+ /**
133
+ * @deprecated
134
+ */
135
+ getEndpointsRequest(options: GetEndpointsOptions, callback: ResponseCallback<EndpointDescription[]>): void;
136
+ /**
137
+ * @method findServers
138
+ */
139
+ findServers(options?: FindServersRequestLike): Promise<ApplicationDescription[]>;
140
+ findServers(options: FindServersRequestLike, callback: ResponseCallback<ApplicationDescription[]>): void;
141
+ findServers(callback: ResponseCallback<ApplicationDescription[]>): void;
142
+ findServersOnNetwork(options?: FindServersOnNetworkRequestLike): Promise<ServerOnNetwork[]>;
143
+ findServersOnNetwork(callback: ResponseCallback<ServerOnNetwork[]>): void;
144
+ findServersOnNetwork(options: FindServersOnNetworkRequestLike, callback: ResponseCallback<ServerOnNetwork[]>): void;
145
+ _removeSession(session: ClientSessionImpl): void;
146
+ private _closeSession;
147
+ closeSession(...args: any[]): any;
148
+ disconnect(): Promise<void>;
149
+ disconnect(callback: ErrorCallback): void;
150
+ _on_connection_reestablished(callback: ErrorCallback): void;
151
+ toString(): string;
152
+ getSessions(): ClientSessionImpl[];
153
+ protected _addSession(session: ClientSessionImpl): void;
154
+ private fetchServerCertificate;
155
+ private _accumulate_statistics;
156
+ private _destroy_secure_channel;
157
+ private _close_pending_sessions;
158
+ private _install_secure_channel_event_handlers;
159
+ private _repairConnection;
160
+ private _finalReconnectionStep;
161
+ /**
162
+ *
163
+ * @internal
164
+ * @private
165
+ */
166
+ __createSession_step2(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
167
+ _activateSession(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
168
+ }
169
+ export {};