node-opcua-client 2.71.0 → 2.72.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.
Files changed (81) hide show
  1. package/dist/alarms_and_conditions/client_alarm.d.ts +45 -43
  2. package/dist/alarms_and_conditions/client_alarm.js +101 -84
  3. package/dist/alarms_and_conditions/client_alarm.js.map +1 -1
  4. package/dist/alarms_and_conditions/client_alarm_list.d.ts +25 -21
  5. package/dist/alarms_and_conditions/client_alarm_list.js +97 -97
  6. package/dist/alarms_and_conditions/client_alarm_list.js.map +1 -1
  7. package/dist/alarms_and_conditions/client_alarm_tools.d.ts +4 -4
  8. package/dist/alarms_and_conditions/client_alarm_tools.js +152 -139
  9. package/dist/alarms_and_conditions/client_alarm_tools.js.map +1 -1
  10. package/dist/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.d.ts +18 -18
  11. package/dist/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.js +190 -190
  12. package/dist/alarms_and_conditions/client_alarm_tools_dump_event.d.ts +9 -9
  13. package/dist/alarms_and_conditions/client_alarm_tools_dump_event.js +73 -73
  14. package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.d.ts +8 -8
  15. package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.js +120 -120
  16. package/dist/alarms_and_conditions/client_tools.d.ts +7 -7
  17. package/dist/alarms_and_conditions/client_tools.js +180 -180
  18. package/dist/alarms_and_conditions/client_tools.js.map +1 -1
  19. package/dist/client_base.d.ts +294 -290
  20. package/dist/client_base.js +13 -13
  21. package/dist/client_base.js.map +1 -1
  22. package/dist/client_monitored_item.d.ts +21 -21
  23. package/dist/client_monitored_item.js +11 -11
  24. package/dist/client_monitored_item_base.d.ts +39 -39
  25. package/dist/client_monitored_item_base.js +2 -2
  26. package/dist/client_monitored_item_group.d.ts +18 -18
  27. package/dist/client_monitored_item_group.js +13 -13
  28. package/dist/client_monitored_item_toolbox.d.ts +15 -15
  29. package/dist/client_monitored_item_toolbox.js +117 -117
  30. package/dist/client_session.d.ts +484 -484
  31. package/dist/client_session.js +10 -10
  32. package/dist/client_session_keepalive_manager.d.ts +34 -34
  33. package/dist/client_session_keepalive_manager.js +150 -150
  34. package/dist/client_subscription.d.ts +241 -241
  35. package/dist/client_subscription.js +14 -14
  36. package/dist/client_utils.d.ts +22 -22
  37. package/dist/client_utils.js +88 -88
  38. package/dist/common.d.ts +17 -17
  39. package/dist/common.js +5 -5
  40. package/dist/index.d.ts +55 -55
  41. package/dist/index.js +93 -93
  42. package/dist/opcua_client.d.ts +132 -132
  43. package/dist/opcua_client.js +33 -33
  44. package/dist/opcua_client.js.map +1 -1
  45. package/dist/private/client_base_impl.d.ts +169 -169
  46. package/dist/private/client_base_impl.js +1324 -1316
  47. package/dist/private/client_base_impl.js.map +1 -1
  48. package/dist/private/client_monitored_item_base_impl.d.ts +3 -3
  49. package/dist/private/client_monitored_item_base_impl.js +4 -4
  50. package/dist/private/client_monitored_item_group_impl.d.ts +53 -53
  51. package/dist/private/client_monitored_item_group_impl.js +159 -159
  52. package/dist/private/client_monitored_item_impl.d.ts +93 -93
  53. package/dist/private/client_monitored_item_impl.js +304 -304
  54. package/dist/private/client_publish_engine.d.ts +62 -62
  55. package/dist/private/client_publish_engine.js +408 -408
  56. package/dist/private/client_session_impl.d.ts +621 -621
  57. package/dist/private/client_session_impl.js +1301 -1301
  58. package/dist/private/client_subscription_impl.d.ts +93 -93
  59. package/dist/private/client_subscription_impl.js +743 -734
  60. package/dist/private/client_subscription_impl.js.map +1 -1
  61. package/dist/private/i_private_client.d.ts +18 -18
  62. package/dist/private/i_private_client.js +2 -2
  63. package/dist/private/opcua_client_impl.d.ts +169 -169
  64. package/dist/private/opcua_client_impl.js +978 -978
  65. package/dist/reconnection.d.ts +9 -9
  66. package/dist/reconnection.js +362 -362
  67. package/dist/tools/findservers.d.ts +20 -20
  68. package/dist/tools/findservers.js +61 -61
  69. package/dist/tools/read_history_server_capabilities.d.ts +6 -6
  70. package/dist/tools/read_history_server_capabilities.js +99 -99
  71. package/dist/verify.d.ts +5 -5
  72. package/dist/verify.js +134 -134
  73. package/package.json +30 -30
  74. package/source/alarms_and_conditions/client_alarm.ts +21 -1
  75. package/source/alarms_and_conditions/client_alarm_list.ts +6 -2
  76. package/source/alarms_and_conditions/client_alarm_tools.ts +32 -15
  77. package/source/alarms_and_conditions/client_tools.ts +4 -4
  78. package/source/client_base.ts +6 -3
  79. package/source/opcua_client.ts +0 -2
  80. package/source/private/client_base_impl.ts +22 -13
  81. package/source/private/client_subscription_impl.ts +8 -0
@@ -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 {};