node-opcua-client 2.76.1 → 2.76.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 (68) hide show
  1. package/dist/alarms_and_conditions/client_alarm.d.ts +49 -49
  2. package/dist/alarms_and_conditions/client_alarm.js +109 -109
  3. package/dist/alarms_and_conditions/client_alarm_list.d.ts +25 -25
  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 +156 -156
  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 +192 -192
  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 +3 -3
  12. package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.js +118 -118
  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 +277 -277
  16. package/dist/client_base.js +14 -14
  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 +485 -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 +157 -157
  40. package/dist/private/client_base_impl.js +1337 -1337
  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 +305 -305
  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 +1302 -1302
  51. package/dist/private/client_session_impl.js.map +1 -1
  52. package/dist/private/client_subscription_impl.d.ts +93 -93
  53. package/dist/private/client_subscription_impl.js +748 -748
  54. package/dist/private/i_private_client.d.ts +18 -18
  55. package/dist/private/i_private_client.js +2 -2
  56. package/dist/private/opcua_client_impl.d.ts +169 -169
  57. package/dist/private/opcua_client_impl.js +981 -981
  58. package/dist/reconnection.d.ts +9 -9
  59. package/dist/reconnection.js +408 -408
  60. package/dist/tools/findservers.d.ts +20 -20
  61. package/dist/tools/findservers.js +61 -61
  62. package/dist/tools/read_history_server_capabilities.d.ts +6 -6
  63. package/dist/tools/read_history_server_capabilities.js +99 -99
  64. package/dist/verify.d.ts +5 -5
  65. package/dist/verify.js +134 -134
  66. package/package.json +40 -40
  67. package/source/client_session.ts +1 -1
  68. package/source/private/client_session_impl.ts +1 -1
@@ -1,18 +1,18 @@
1
- import { ClientSecureChannelLayer } from "node-opcua-secure-channel";
2
- import { EndpointDescription } from "node-opcua-service-endpoints";
3
- import { ClientSession, ResponseCallback } from "../client_session";
4
- import { Request, Response } from "../common";
5
- import { ClientSessionImpl } from "./client_session_impl";
6
- export interface IClientBase {
7
- __createSession_step2(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
8
- _activateSession(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
9
- _removeSession(session: ClientSessionImpl): void;
10
- closeSession(session: ClientSession, deleteSubscription: any, arg2: (err?: Error | undefined) => void): void;
11
- performMessageTransaction(request: Request, callback: ResponseCallback<Response>): void;
12
- endpoint?: EndpointDescription;
13
- readonly isReconnecting: boolean;
14
- _secureChannel: ClientSecureChannelLayer | null;
15
- getSessions(): ClientSession[];
16
- endpointUrl: string;
17
- _sessions: ClientSessionImpl[];
18
- }
1
+ import { ClientSecureChannelLayer } from "node-opcua-secure-channel";
2
+ import { EndpointDescription } from "node-opcua-service-endpoints";
3
+ import { ClientSession, ResponseCallback } from "../client_session";
4
+ import { Request, Response } from "../common";
5
+ import { ClientSessionImpl } from "./client_session_impl";
6
+ export interface IClientBase {
7
+ __createSession_step2(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
8
+ _activateSession(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
9
+ _removeSession(session: ClientSessionImpl): void;
10
+ closeSession(session: ClientSession, deleteSubscription: any, arg2: (err?: Error | undefined) => void): void;
11
+ performMessageTransaction(request: Request, callback: ResponseCallback<Response>): void;
12
+ endpoint?: EndpointDescription;
13
+ readonly isReconnecting: boolean;
14
+ _secureChannel: ClientSecureChannelLayer | null;
15
+ getSessions(): ClientSession[];
16
+ endpointUrl: string;
17
+ _sessions: ClientSessionImpl[];
18
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=i_private_client.js.map
@@ -1,169 +1,169 @@
1
- /**
2
- * @module node-opcua-client-private
3
- */
4
- import { EndpointDescription } from "node-opcua-service-endpoints";
5
- import { Callback } from "node-opcua-status-code";
6
- import { ClientSession } from "../client_session";
7
- import { ClientSubscription, ClientSubscriptionOptions } from "../client_subscription";
8
- import { OPCUAClient, OPCUAClientOptions, UserIdentityInfo, WithSessionFuncP, WithSubscriptionFuncP, EndpointWithUserIdentity } from "../opcua_client";
9
- import { ClientBaseImpl } from "./client_base_impl";
10
- import { ClientSessionImpl } from "./client_session_impl";
11
- /***
12
- * @constructor
13
- * @internal
14
- */
15
- export declare class OPCUAClientImpl extends ClientBaseImpl implements OPCUAClient {
16
- static minimumRevisedSessionTimeout: number;
17
- static create(options: OPCUAClientOptions): OPCUAClient;
18
- endpoint?: EndpointDescription;
19
- private endpointMustExist;
20
- private requestedSessionTimeout;
21
- private ___sessionName_counter;
22
- private userIdentityInfo;
23
- private serverUri?;
24
- private clientNonce?;
25
- constructor(options?: OPCUAClientOptions);
26
- /**
27
- * create and activate a new session
28
- * @async
29
- * @method createSession
30
- *
31
- *
32
- * @example
33
- * // create a anonymous session
34
- * const session = await client.createSession();
35
- *
36
- * @example
37
- * // create a session with a userName and password
38
- * const session = await client.createSession({
39
- * type: UserTokenType.UserName,
40
- * userName: "JoeDoe",
41
- * password:"secret"
42
- * });
43
- *
44
- */
45
- createSession(userIdentityInfo?: UserIdentityInfo): Promise<ClientSession>;
46
- createSession(userIdentityInfo: UserIdentityInfo, callback: Callback<ClientSession>): void;
47
- createSession(callback: Callback<ClientSession>): void;
48
- /**
49
- * createSession2 create a session with persistance
50
- *
51
- * - if the server returns BadTooManySession, the method will make an other attempt
52
- * unitl create session succeed or connection is closed.
53
- *
54
- * @experiemental
55
- * @param userIdentityInfo
56
- */
57
- createSession2(userIdentityInfo?: UserIdentityInfo): Promise<ClientSession>;
58
- createSession2(userIdentityInfo: UserIdentityInfo, callback: Callback<ClientSession>): void;
59
- createSession2(callback: Callback<ClientSession>): void;
60
- /**
61
- * @method changeSessionIdentity
62
- * @param session
63
- * @param userIdentityInfo
64
- * @param callback
65
- * @async
66
- */
67
- changeSessionIdentity(session: ClientSession, userIdentityInfo: UserIdentityInfo): Promise<void>;
68
- changeSessionIdentity(session: ClientSession, userIdentityInfo: UserIdentityInfo, callback: (err?: Error) => void): void;
69
- /**
70
- *
71
- * @method closeSession
72
- * @async
73
- * @param session - the created client session
74
- * @param deleteSubscriptions - whether to delete subscriptions or not
75
- */
76
- closeSession(session: ClientSession, deleteSubscriptions: boolean): Promise<void>;
77
- closeSession(session: ClientSession, deleteSubscriptions: boolean, callback: (err?: Error) => void): void;
78
- toString(): string;
79
- /**
80
- *
81
- * @example
82
- *
83
- * ```javascript
84
- *
85
- * const session = await OPCUAClient.createSession(endpointUrl);
86
- * const dataValue = await session.read({ nodeId, attributeId: AttributeIds.Value });
87
- * await session.close();
88
- *
89
- * ```
90
- * @stability experimental
91
- *
92
- * @param endpointUrl
93
- * @param userIdentity
94
- * @returns session
95
- *
96
- *
97
- * const create
98
- */
99
- static createSession(endpointUrl: string, userIdentity?: UserIdentityInfo, clientOptions?: OPCUAClientOptions): Promise<ClientSession>;
100
- /**
101
- * @method withSession
102
- */
103
- withSession<T>(endpointUrl: string | EndpointWithUserIdentity, inner_func: (session: ClientSession) => Promise<T>): Promise<T>;
104
- withSession(endpointUrl: string | EndpointWithUserIdentity, inner_func: (session: ClientSession, done: (err?: Error) => void) => void, callback: (err?: Error) => void): void;
105
- withSubscription(endpointUrl: string | EndpointWithUserIdentity, subscriptionParameters: ClientSubscriptionOptions, innerFunc: (session: ClientSession, subscription: ClientSubscription, done: (err?: Error) => void) => void, callback: (err?: Error) => void): void;
106
- withSessionAsync(connectionPoint: string | EndpointWithUserIdentity, func: WithSessionFuncP<any>): Promise<any>;
107
- withSubscriptionAsync(connectionPoint: string | EndpointWithUserIdentity, parameters: ClientSubscriptionOptions, func: WithSubscriptionFuncP<any>): Promise<any>;
108
- /**
109
- * transfer session to this client
110
- * @method reactivateSession
111
- * @param session
112
- * @param callback
113
- * @return {*}
114
- */
115
- reactivateSession(session: ClientSession): Promise<void>;
116
- reactivateSession(session: ClientSession, callback: (err?: Error) => void): void;
117
- /**
118
- * @internal
119
- * @private
120
- */
121
- _on_connection_reestablished(callback: (err?: Error) => void): void;
122
- /**
123
- *
124
- * @internal
125
- * @private
126
- */
127
- __createSession_step3(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
128
- /**
129
- *
130
- * @internal
131
- * @private
132
- */
133
- __createSession_step2(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
134
- /**
135
- * @internal
136
- * @private
137
- */
138
- _activateSession(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
139
- /**
140
- *
141
- * @private
142
- */
143
- private _nextSessionName;
144
- /**
145
- *
146
- * @private
147
- */
148
- private _getApplicationUri;
149
- /**
150
- *
151
- * @private
152
- */
153
- private __resolveEndPoint;
154
- /**
155
- *
156
- * @private
157
- */
158
- private _createSession;
159
- /**
160
- *
161
- * @private
162
- */
163
- private computeClientSignature;
164
- /**
165
- *
166
- * @private
167
- */
168
- private createUserIdentityToken;
169
- }
1
+ /**
2
+ * @module node-opcua-client-private
3
+ */
4
+ import { EndpointDescription } from "node-opcua-service-endpoints";
5
+ import { Callback } from "node-opcua-status-code";
6
+ import { ClientSession } from "../client_session";
7
+ import { ClientSubscription, ClientSubscriptionOptions } from "../client_subscription";
8
+ import { OPCUAClient, OPCUAClientOptions, UserIdentityInfo, WithSessionFuncP, WithSubscriptionFuncP, EndpointWithUserIdentity } from "../opcua_client";
9
+ import { ClientBaseImpl } from "./client_base_impl";
10
+ import { ClientSessionImpl } from "./client_session_impl";
11
+ /***
12
+ * @constructor
13
+ * @internal
14
+ */
15
+ export declare class OPCUAClientImpl extends ClientBaseImpl implements OPCUAClient {
16
+ static minimumRevisedSessionTimeout: number;
17
+ static create(options: OPCUAClientOptions): OPCUAClient;
18
+ endpoint?: EndpointDescription;
19
+ private endpointMustExist;
20
+ private requestedSessionTimeout;
21
+ private ___sessionName_counter;
22
+ private userIdentityInfo;
23
+ private serverUri?;
24
+ private clientNonce?;
25
+ constructor(options?: OPCUAClientOptions);
26
+ /**
27
+ * create and activate a new session
28
+ * @async
29
+ * @method createSession
30
+ *
31
+ *
32
+ * @example
33
+ * // create a anonymous session
34
+ * const session = await client.createSession();
35
+ *
36
+ * @example
37
+ * // create a session with a userName and password
38
+ * const session = await client.createSession({
39
+ * type: UserTokenType.UserName,
40
+ * userName: "JoeDoe",
41
+ * password:"secret"
42
+ * });
43
+ *
44
+ */
45
+ createSession(userIdentityInfo?: UserIdentityInfo): Promise<ClientSession>;
46
+ createSession(userIdentityInfo: UserIdentityInfo, callback: Callback<ClientSession>): void;
47
+ createSession(callback: Callback<ClientSession>): void;
48
+ /**
49
+ * createSession2 create a session with persistance
50
+ *
51
+ * - if the server returns BadTooManySession, the method will make an other attempt
52
+ * unitl create session succeed or connection is closed.
53
+ *
54
+ * @experiemental
55
+ * @param userIdentityInfo
56
+ */
57
+ createSession2(userIdentityInfo?: UserIdentityInfo): Promise<ClientSession>;
58
+ createSession2(userIdentityInfo: UserIdentityInfo, callback: Callback<ClientSession>): void;
59
+ createSession2(callback: Callback<ClientSession>): void;
60
+ /**
61
+ * @method changeSessionIdentity
62
+ * @param session
63
+ * @param userIdentityInfo
64
+ * @param callback
65
+ * @async
66
+ */
67
+ changeSessionIdentity(session: ClientSession, userIdentityInfo: UserIdentityInfo): Promise<void>;
68
+ changeSessionIdentity(session: ClientSession, userIdentityInfo: UserIdentityInfo, callback: (err?: Error) => void): void;
69
+ /**
70
+ *
71
+ * @method closeSession
72
+ * @async
73
+ * @param session - the created client session
74
+ * @param deleteSubscriptions - whether to delete subscriptions or not
75
+ */
76
+ closeSession(session: ClientSession, deleteSubscriptions: boolean): Promise<void>;
77
+ closeSession(session: ClientSession, deleteSubscriptions: boolean, callback: (err?: Error) => void): void;
78
+ toString(): string;
79
+ /**
80
+ *
81
+ * @example
82
+ *
83
+ * ```javascript
84
+ *
85
+ * const session = await OPCUAClient.createSession(endpointUrl);
86
+ * const dataValue = await session.read({ nodeId, attributeId: AttributeIds.Value });
87
+ * await session.close();
88
+ *
89
+ * ```
90
+ * @stability experimental
91
+ *
92
+ * @param endpointUrl
93
+ * @param userIdentity
94
+ * @returns session
95
+ *
96
+ *
97
+ * const create
98
+ */
99
+ static createSession(endpointUrl: string, userIdentity?: UserIdentityInfo, clientOptions?: OPCUAClientOptions): Promise<ClientSession>;
100
+ /**
101
+ * @method withSession
102
+ */
103
+ withSession<T>(endpointUrl: string | EndpointWithUserIdentity, inner_func: (session: ClientSession) => Promise<T>): Promise<T>;
104
+ withSession(endpointUrl: string | EndpointWithUserIdentity, inner_func: (session: ClientSession, done: (err?: Error) => void) => void, callback: (err?: Error) => void): void;
105
+ withSubscription(endpointUrl: string | EndpointWithUserIdentity, subscriptionParameters: ClientSubscriptionOptions, innerFunc: (session: ClientSession, subscription: ClientSubscription, done: (err?: Error) => void) => void, callback: (err?: Error) => void): void;
106
+ withSessionAsync(connectionPoint: string | EndpointWithUserIdentity, func: WithSessionFuncP<any>): Promise<any>;
107
+ withSubscriptionAsync(connectionPoint: string | EndpointWithUserIdentity, parameters: ClientSubscriptionOptions, func: WithSubscriptionFuncP<any>): Promise<any>;
108
+ /**
109
+ * transfer session to this client
110
+ * @method reactivateSession
111
+ * @param session
112
+ * @param callback
113
+ * @return {*}
114
+ */
115
+ reactivateSession(session: ClientSession): Promise<void>;
116
+ reactivateSession(session: ClientSession, callback: (err?: Error) => void): void;
117
+ /**
118
+ * @internal
119
+ * @private
120
+ */
121
+ _on_connection_reestablished(callback: (err?: Error) => void): void;
122
+ /**
123
+ *
124
+ * @internal
125
+ * @private
126
+ */
127
+ __createSession_step3(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
128
+ /**
129
+ *
130
+ * @internal
131
+ * @private
132
+ */
133
+ __createSession_step2(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
134
+ /**
135
+ * @internal
136
+ * @private
137
+ */
138
+ _activateSession(session: ClientSessionImpl, callback: (err: Error | null, session?: ClientSessionImpl) => void): void;
139
+ /**
140
+ *
141
+ * @private
142
+ */
143
+ private _nextSessionName;
144
+ /**
145
+ *
146
+ * @private
147
+ */
148
+ private _getApplicationUri;
149
+ /**
150
+ *
151
+ * @private
152
+ */
153
+ private __resolveEndPoint;
154
+ /**
155
+ *
156
+ * @private
157
+ */
158
+ private _createSession;
159
+ /**
160
+ *
161
+ * @private
162
+ */
163
+ private computeClientSignature;
164
+ /**
165
+ *
166
+ * @private
167
+ */
168
+ private createUserIdentityToken;
169
+ }