node-opcua-client 2.64.1 → 2.65.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 (65) 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_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 +89 -89
  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 +1315 -1315
  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 +620 -620
  50. package/dist/private/client_session_impl.js +1298 -1298
  51. package/dist/private/client_subscription_impl.d.ts +93 -93
  52. package/dist/private/client_subscription_impl.js +779 -779
  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 +24 -24
@@ -1,132 +1,132 @@
1
- /**
2
- * @module node-opcua-client
3
- */
4
- import { ByteString } from "node-opcua-basic-types";
5
- import { Certificate, PrivateKeyPEM } from "node-opcua-crypto";
6
- import { ConnectionStrategyOptions, SecurityPolicy } from "node-opcua-secure-channel";
7
- import { ApplicationDescription, EndpointDescription, UserTokenType } from "node-opcua-service-endpoints";
8
- import { MessageSecurityMode } from "node-opcua-service-secure-channel";
9
- import { X509IdentityTokenOptions } from "node-opcua-types";
10
- import { ErrorCallback } from "node-opcua-status-code";
11
- import { FindServersRequestLike, GetEndpointsOptions, OPCUAClientBase, OPCUAClientBaseOptions } from "./client_base";
12
- import { ClientSession, ResponseCallback } from "./client_session";
13
- import { ClientSubscription, ClientSubscriptionOptions } from "./client_subscription";
14
- export interface UserIdentityInfoUserName {
15
- type: UserTokenType.UserName;
16
- userName: string;
17
- password: string;
18
- }
19
- export interface UserIdentityInfoX509 extends X509IdentityTokenOptions {
20
- type: UserTokenType.Certificate;
21
- certificateData: ByteString;
22
- privateKey: PrivateKeyPEM;
23
- }
24
- export interface AnonymousIdentity {
25
- type: UserTokenType.Anonymous;
26
- }
27
- export declare type UserIdentityInfo = AnonymousIdentity | UserIdentityInfoX509 | UserIdentityInfoUserName;
28
- export interface OPCUAClientOptions extends OPCUAClientBaseOptions {
29
- /**
30
- * the requested session timeout in CreateSession (ms)
31
- *
32
- * Note:
33
- * - make sure that this value is large enough, especially larger than the
34
- * time between two transactions to the server.
35
- *
36
- * - If your client establishes a subscription with the server, make sure that
37
- * (maxKeepAliveCount * publishingInterval) calculated with negotiated values
38
- * from the server stay by large below the session time out, as you make
39
- * encountered unexpected behavior.
40
- *
41
- * @default 60000 - default value is 60 secondes
42
- */
43
- requestedSessionTimeout?: number;
44
- /**
45
- * @deprecated(use endpointMustExist instead)
46
- */
47
- endpoint_must_exist?: boolean;
48
- /**
49
- * set to false if the client should accept server endpoint mismatch
50
- * @default true
51
- */
52
- endpointMustExist?: boolean;
53
- connectionStrategy?: ConnectionStrategyOptions;
54
- /** the server certificate. */
55
- serverCertificate?: Certificate;
56
- /***
57
- * default secure token lifetime in ms
58
- */
59
- defaultSecureTokenLifetime?: number;
60
- /**
61
- * the security mode
62
- * @default MessageSecurityMode.None
63
- */
64
- securityMode?: MessageSecurityMode | string;
65
- /**
66
- * the security policy
67
- * @default SecurityPolicy.None
68
- */
69
- securityPolicy?: SecurityPolicy | string;
70
- /**
71
- * @default false
72
- */
73
- keepSessionAlive?: boolean;
74
- /**
75
- * client certificate pem file.
76
- * @default "certificates/client_self-signed_cert_2048.pem"
77
- */
78
- certificateFile?: string;
79
- /**
80
- * client private key pem file.
81
- * @default "certificates/client_key_2048.pem"
82
- */
83
- privateKeyFile?: string;
84
- /**
85
- * a client name string that will be used to generate session names.
86
- */
87
- clientName?: string;
88
- }
89
- export interface OPCUAClient extends OPCUAClientBase {
90
- connect(endpointUrl: string): Promise<void>;
91
- connect(endpointUrl: string, callback: ErrorCallback): void;
92
- disconnect(): Promise<void>;
93
- disconnect(callback: ErrorCallback): void;
94
- getEndpoints(options?: GetEndpointsOptions): Promise<EndpointDescription[]>;
95
- getEndpoints(options: GetEndpointsOptions, callback: ResponseCallback<EndpointDescription[]>): void;
96
- getEndpoints(callback: ResponseCallback<EndpointDescription[]>): void;
97
- findServers(options?: FindServersRequestLike): Promise<ApplicationDescription[]>;
98
- findServers(options: FindServersRequestLike, callback: ResponseCallback<ApplicationDescription[]>): void;
99
- findServers(callback: ResponseCallback<ApplicationDescription[]>): void;
100
- createSession(userIdentityInfo?: UserIdentityInfo): Promise<ClientSession>;
101
- createSession(userIdentityInfo: UserIdentityInfo, callback: (err: Error | null, session?: ClientSession) => void): void;
102
- createSession(callback: (err: Error | null, session?: ClientSession) => void): void;
103
- createSession2(userIdentityInfo?: UserIdentityInfo): Promise<ClientSession>;
104
- createSession2(userIdentityInfo: UserIdentityInfo, callback: (err: Error | null, session?: ClientSession) => void): void;
105
- createSession2(callback: (err: Error | null, session?: ClientSession) => void): void;
106
- changeSessionIdentity(session: ClientSession, userIdentityInfo: UserIdentityInfo): Promise<void>;
107
- changeSessionIdentity(session: ClientSession, userIdentityInfo: UserIdentityInfo, callback: (err?: Error) => void): void;
108
- closeSession(session: ClientSession, deleteSubscriptions: boolean): Promise<void>;
109
- closeSession(session: ClientSession, deleteSubscriptions: boolean, callback: (err?: Error) => void): void;
110
- reactivateSession(session: ClientSession): Promise<void>;
111
- reactivateSession(session: ClientSession, callback: (err?: Error) => void): void;
112
- createDefaultCertificate(): Promise<void>;
113
- }
114
- export interface EndpointWithUserIdentity {
115
- endpointUrl: string;
116
- userIdentity: UserIdentityInfo;
117
- }
118
- export declare type WithSessionFunc = (session: ClientSession) => Promise<void>;
119
- export declare type WithSessionFuncP<T> = (session: ClientSession) => Promise<T>;
120
- export declare type WithSubscriptionFunc = (session: ClientSession, subscription: ClientSubscription) => Promise<void>;
121
- export declare type WithSubscriptionFuncP<T> = (session: ClientSession, subscription: ClientSubscription) => Promise<T>;
122
- export interface OPCUAClient {
123
- withSessionAsync<T>(endpointUrl: string | EndpointWithUserIdentity, inner_func: WithSessionFuncP<T>): Promise<T>;
124
- withSession(endpointUrl: string | EndpointWithUserIdentity, inner_func: (session: ClientSession, done: (err?: Error) => void) => void, callback: (err?: Error) => void): void;
125
- withSubscriptionAsync<T>(endpointUrl: string | EndpointWithUserIdentity, parameters: ClientSubscriptionOptions, inner_func: WithSubscriptionFuncP<T>): Promise<T>;
126
- }
127
- export declare class OPCUAClient {
128
- static create(options: OPCUAClientOptions): OPCUAClient;
129
- static createSession(endpointUrl: string, userIdentity?: UserIdentityInfo, clientOptions?: OPCUAClientOptions): Promise<ClientSession>;
130
- static set minimumRevisedSessionTimeout(minimumRevisedSessionTimeout: number);
131
- static get minimumRevisedSessionTimeout(): number;
132
- }
1
+ /**
2
+ * @module node-opcua-client
3
+ */
4
+ import { ByteString } from "node-opcua-basic-types";
5
+ import { Certificate, PrivateKeyPEM } from "node-opcua-crypto";
6
+ import { ConnectionStrategyOptions, SecurityPolicy } from "node-opcua-secure-channel";
7
+ import { ApplicationDescription, EndpointDescription, UserTokenType } from "node-opcua-service-endpoints";
8
+ import { MessageSecurityMode } from "node-opcua-service-secure-channel";
9
+ import { X509IdentityTokenOptions } from "node-opcua-types";
10
+ import { ErrorCallback } from "node-opcua-status-code";
11
+ import { FindServersRequestLike, GetEndpointsOptions, OPCUAClientBase, OPCUAClientBaseOptions } from "./client_base";
12
+ import { ClientSession, ResponseCallback } from "./client_session";
13
+ import { ClientSubscription, ClientSubscriptionOptions } from "./client_subscription";
14
+ export interface UserIdentityInfoUserName {
15
+ type: UserTokenType.UserName;
16
+ userName: string;
17
+ password: string;
18
+ }
19
+ export interface UserIdentityInfoX509 extends X509IdentityTokenOptions {
20
+ type: UserTokenType.Certificate;
21
+ certificateData: ByteString;
22
+ privateKey: PrivateKeyPEM;
23
+ }
24
+ export interface AnonymousIdentity {
25
+ type: UserTokenType.Anonymous;
26
+ }
27
+ export declare type UserIdentityInfo = AnonymousIdentity | UserIdentityInfoX509 | UserIdentityInfoUserName;
28
+ export interface OPCUAClientOptions extends OPCUAClientBaseOptions {
29
+ /**
30
+ * the requested session timeout in CreateSession (ms)
31
+ *
32
+ * Note:
33
+ * - make sure that this value is large enough, especially larger than the
34
+ * time between two transactions to the server.
35
+ *
36
+ * - If your client establishes a subscription with the server, make sure that
37
+ * (maxKeepAliveCount * publishingInterval) calculated with negotiated values
38
+ * from the server stay by large below the session time out, as you make
39
+ * encountered unexpected behavior.
40
+ *
41
+ * @default 60000 - default value is 60 secondes
42
+ */
43
+ requestedSessionTimeout?: number;
44
+ /**
45
+ * @deprecated(use endpointMustExist instead)
46
+ */
47
+ endpoint_must_exist?: boolean;
48
+ /**
49
+ * set to false if the client should accept server endpoint mismatch
50
+ * @default true
51
+ */
52
+ endpointMustExist?: boolean;
53
+ connectionStrategy?: ConnectionStrategyOptions;
54
+ /** the server certificate. */
55
+ serverCertificate?: Certificate;
56
+ /***
57
+ * default secure token lifetime in ms
58
+ */
59
+ defaultSecureTokenLifetime?: number;
60
+ /**
61
+ * the security mode
62
+ * @default MessageSecurityMode.None
63
+ */
64
+ securityMode?: MessageSecurityMode | string;
65
+ /**
66
+ * the security policy
67
+ * @default SecurityPolicy.None
68
+ */
69
+ securityPolicy?: SecurityPolicy | string;
70
+ /**
71
+ * @default false
72
+ */
73
+ keepSessionAlive?: boolean;
74
+ /**
75
+ * client certificate pem file.
76
+ * @default "certificates/client_self-signed_cert_2048.pem"
77
+ */
78
+ certificateFile?: string;
79
+ /**
80
+ * client private key pem file.
81
+ * @default "certificates/client_key_2048.pem"
82
+ */
83
+ privateKeyFile?: string;
84
+ /**
85
+ * a client name string that will be used to generate session names.
86
+ */
87
+ clientName?: string;
88
+ }
89
+ export interface OPCUAClient extends OPCUAClientBase {
90
+ connect(endpointUrl: string): Promise<void>;
91
+ connect(endpointUrl: string, callback: ErrorCallback): void;
92
+ disconnect(): Promise<void>;
93
+ disconnect(callback: ErrorCallback): void;
94
+ getEndpoints(options?: GetEndpointsOptions): Promise<EndpointDescription[]>;
95
+ getEndpoints(options: GetEndpointsOptions, callback: ResponseCallback<EndpointDescription[]>): void;
96
+ getEndpoints(callback: ResponseCallback<EndpointDescription[]>): void;
97
+ findServers(options?: FindServersRequestLike): Promise<ApplicationDescription[]>;
98
+ findServers(options: FindServersRequestLike, callback: ResponseCallback<ApplicationDescription[]>): void;
99
+ findServers(callback: ResponseCallback<ApplicationDescription[]>): void;
100
+ createSession(userIdentityInfo?: UserIdentityInfo): Promise<ClientSession>;
101
+ createSession(userIdentityInfo: UserIdentityInfo, callback: (err: Error | null, session?: ClientSession) => void): void;
102
+ createSession(callback: (err: Error | null, session?: ClientSession) => void): void;
103
+ createSession2(userIdentityInfo?: UserIdentityInfo): Promise<ClientSession>;
104
+ createSession2(userIdentityInfo: UserIdentityInfo, callback: (err: Error | null, session?: ClientSession) => void): void;
105
+ createSession2(callback: (err: Error | null, session?: ClientSession) => void): void;
106
+ changeSessionIdentity(session: ClientSession, userIdentityInfo: UserIdentityInfo): Promise<void>;
107
+ changeSessionIdentity(session: ClientSession, userIdentityInfo: UserIdentityInfo, callback: (err?: Error) => void): void;
108
+ closeSession(session: ClientSession, deleteSubscriptions: boolean): Promise<void>;
109
+ closeSession(session: ClientSession, deleteSubscriptions: boolean, callback: (err?: Error) => void): void;
110
+ reactivateSession(session: ClientSession): Promise<void>;
111
+ reactivateSession(session: ClientSession, callback: (err?: Error) => void): void;
112
+ createDefaultCertificate(): Promise<void>;
113
+ }
114
+ export interface EndpointWithUserIdentity {
115
+ endpointUrl: string;
116
+ userIdentity: UserIdentityInfo;
117
+ }
118
+ export declare type WithSessionFunc = (session: ClientSession) => Promise<void>;
119
+ export declare type WithSessionFuncP<T> = (session: ClientSession) => Promise<T>;
120
+ export declare type WithSubscriptionFunc = (session: ClientSession, subscription: ClientSubscription) => Promise<void>;
121
+ export declare type WithSubscriptionFuncP<T> = (session: ClientSession, subscription: ClientSubscription) => Promise<T>;
122
+ export interface OPCUAClient {
123
+ withSessionAsync<T>(endpointUrl: string | EndpointWithUserIdentity, inner_func: WithSessionFuncP<T>): Promise<T>;
124
+ withSession(endpointUrl: string | EndpointWithUserIdentity, inner_func: (session: ClientSession, done: (err?: Error) => void) => void, callback: (err?: Error) => void): void;
125
+ withSubscriptionAsync<T>(endpointUrl: string | EndpointWithUserIdentity, parameters: ClientSubscriptionOptions, inner_func: WithSubscriptionFuncP<T>): Promise<T>;
126
+ }
127
+ export declare class OPCUAClient {
128
+ static create(options: OPCUAClientOptions): OPCUAClient;
129
+ static createSession(endpointUrl: string, userIdentity?: UserIdentityInfo, clientOptions?: OPCUAClientOptions): Promise<ClientSession>;
130
+ static set minimumRevisedSessionTimeout(minimumRevisedSessionTimeout: number);
131
+ static get minimumRevisedSessionTimeout(): number;
132
+ }
@@ -1,34 +1,34 @@
1
- "use strict";
2
- /**
3
- * @module node-opcua-client
4
- */
5
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
6
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7
- return new (P || (P = Promise))(function (resolve, reject) {
8
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
9
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
10
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
11
- step((generator = generator.apply(thisArg, _arguments || [])).next());
12
- });
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.OPCUAClient = void 0;
16
- const opcua_client_impl_1 = require("./private/opcua_client_impl");
17
- class OPCUAClient {
18
- static create(options) {
19
- return new opcua_client_impl_1.OPCUAClientImpl(options);
20
- }
21
- static createSession(endpointUrl, userIdentity, clientOptions) {
22
- return __awaiter(this, void 0, void 0, function* () {
23
- return opcua_client_impl_1.OPCUAClientImpl.createSession(endpointUrl, userIdentity, clientOptions);
24
- });
25
- }
26
- static set minimumRevisedSessionTimeout(minimumRevisedSessionTimeout) {
27
- opcua_client_impl_1.OPCUAClientImpl.minimumRevisedSessionTimeout = minimumRevisedSessionTimeout;
28
- }
29
- static get minimumRevisedSessionTimeout() {
30
- return opcua_client_impl_1.OPCUAClientImpl.minimumRevisedSessionTimeout;
31
- }
32
- }
33
- exports.OPCUAClient = OPCUAClient;
1
+ "use strict";
2
+ /**
3
+ * @module node-opcua-client
4
+ */
5
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
6
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7
+ return new (P || (P = Promise))(function (resolve, reject) {
8
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
9
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
10
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
11
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
12
+ });
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.OPCUAClient = void 0;
16
+ const opcua_client_impl_1 = require("./private/opcua_client_impl");
17
+ class OPCUAClient {
18
+ static create(options) {
19
+ return new opcua_client_impl_1.OPCUAClientImpl(options);
20
+ }
21
+ static createSession(endpointUrl, userIdentity, clientOptions) {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ return opcua_client_impl_1.OPCUAClientImpl.createSession(endpointUrl, userIdentity, clientOptions);
24
+ });
25
+ }
26
+ static set minimumRevisedSessionTimeout(minimumRevisedSessionTimeout) {
27
+ opcua_client_impl_1.OPCUAClientImpl.minimumRevisedSessionTimeout = minimumRevisedSessionTimeout;
28
+ }
29
+ static get minimumRevisedSessionTimeout() {
30
+ return opcua_client_impl_1.OPCUAClientImpl.minimumRevisedSessionTimeout;
31
+ }
32
+ }
33
+ exports.OPCUAClient = OPCUAClient;
34
34
  //# sourceMappingURL=opcua_client.js.map