node-opcua-server 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 (53) hide show
  1. package/dist/base_server.d.ts +110 -110
  2. package/dist/base_server.js +473 -473
  3. package/dist/factory.d.ts +12 -12
  4. package/dist/factory.js +23 -23
  5. package/dist/history_server_capabilities.d.ts +35 -35
  6. package/dist/history_server_capabilities.js +43 -43
  7. package/dist/i_channel_data.d.ts +13 -13
  8. package/dist/i_channel_data.js +2 -2
  9. package/dist/i_register_server_manager.d.ts +16 -16
  10. package/dist/i_register_server_manager.js +2 -2
  11. package/dist/i_server_side_publish_engine.d.ts +36 -36
  12. package/dist/i_server_side_publish_engine.js +49 -49
  13. package/dist/i_socket_data.d.ts +11 -11
  14. package/dist/i_socket_data.js +2 -2
  15. package/dist/index.d.ts +15 -15
  16. package/dist/index.js +31 -31
  17. package/dist/monitored_item.d.ts +177 -177
  18. package/dist/monitored_item.js +998 -998
  19. package/dist/node_sampler.d.ts +3 -3
  20. package/dist/node_sampler.js +75 -75
  21. package/dist/opcua_server.d.ts +647 -647
  22. package/dist/opcua_server.js +2385 -2385
  23. package/dist/queue.d.ts +11 -11
  24. package/dist/queue.js +71 -71
  25. package/dist/register_server_manager.d.ts +96 -96
  26. package/dist/register_server_manager.js +584 -584
  27. package/dist/register_server_manager_hidden.d.ts +17 -17
  28. package/dist/register_server_manager_hidden.js +27 -27
  29. package/dist/register_server_manager_mdns_only.d.ts +22 -22
  30. package/dist/register_server_manager_mdns_only.js +55 -55
  31. package/dist/server_capabilities.d.ts +61 -61
  32. package/dist/server_capabilities.js +108 -108
  33. package/dist/server_end_point.d.ts +183 -183
  34. package/dist/server_end_point.js +816 -816
  35. package/dist/server_engine.d.ts +316 -316
  36. package/dist/server_engine.js +1688 -1688
  37. package/dist/server_publish_engine.d.ts +112 -112
  38. package/dist/server_publish_engine.js +530 -530
  39. package/dist/server_publish_engine_for_orphan_subscriptions.d.ts +16 -16
  40. package/dist/server_publish_engine_for_orphan_subscriptions.js +49 -49
  41. package/dist/server_session.d.ts +181 -181
  42. package/dist/server_session.js +738 -738
  43. package/dist/server_subscription.d.ts +395 -395
  44. package/dist/server_subscription.js +1316 -1316
  45. package/dist/sessions_compatible_for_transfer.d.ts +2 -2
  46. package/dist/sessions_compatible_for_transfer.js +36 -36
  47. package/dist/user_manager.d.ts +32 -32
  48. package/dist/user_manager.js +74 -74
  49. package/dist/user_manager_ua.d.ts +3 -3
  50. package/dist/user_manager_ua.js +39 -39
  51. package/dist/validate_filter.d.ts +5 -5
  52. package/dist/validate_filter.js +60 -60
  53. package/package.json +46 -46
@@ -1,183 +1,183 @@
1
- /// <reference types="node" />
2
- /**
3
- * @module node-opcua-server
4
- */
5
- import { EventEmitter } from "events";
6
- import { OPCUACertificateManager } from "node-opcua-certificate-manager";
7
- import { Certificate, PrivateKeyPEM } from "node-opcua-crypto";
8
- import { MessageSecurityMode, SecurityPolicy, ServerSecureChannelLayer, ServerSecureChannelParent } from "node-opcua-secure-channel";
9
- import { EndpointDescription } from "node-opcua-service-endpoints";
10
- import { ApplicationDescription } from "node-opcua-service-endpoints";
11
- export interface OPCUAServerEndPointOptions {
12
- /**
13
- * the tcp port
14
- */
15
- port: number;
16
- /**
17
- * the DER certificate chain
18
- */
19
- certificateChain: Certificate;
20
- /**
21
- * privateKey
22
- */
23
- privateKey: PrivateKeyPEM;
24
- certificateManager: OPCUACertificateManager;
25
- /**
26
- * the default secureToken lifetime @default=60000
27
- */
28
- defaultSecureTokenLifetime?: number;
29
- /**
30
- * the maximum number of connection allowed on the TCP server socket
31
- * @default 20
32
- */
33
- maxConnections?: number;
34
- /**
35
- * the timeout for the TCP HEL/ACK transaction (in ms)
36
- * @default 30000
37
- */
38
- timeout?: number;
39
- serverInfo: ApplicationDescription;
40
- objectFactory?: any;
41
- }
42
- export interface EndpointDescriptionParams {
43
- allowAnonymous?: boolean;
44
- restricted?: boolean;
45
- allowUnsecurePassword?: boolean;
46
- resourcePath?: string;
47
- alternateHostname?: string[];
48
- hostname: string;
49
- securityPolicies: SecurityPolicy[];
50
- }
51
- export interface AddStandardEndpointDescriptionsParam {
52
- securityModes?: MessageSecurityMode[];
53
- securityPolicies?: SecurityPolicy[];
54
- disableDiscovery?: boolean;
55
- allowAnonymous?: boolean;
56
- restricted?: boolean;
57
- hostname?: string;
58
- alternateHostname?: string[];
59
- allowUnsecurePassword?: boolean;
60
- resourcePath?: string;
61
- }
62
- /**
63
- * OPCUAServerEndPoint a Server EndPoint.
64
- * A sever end point is listening to one port
65
- * note:
66
- * see OPCUA Release 1.03 part 4 page 108 7.1 ApplicationDescription
67
- */
68
- export declare class OPCUAServerEndPoint extends EventEmitter implements ServerSecureChannelParent {
69
- /**
70
- * the tcp port
71
- */
72
- port: number;
73
- certificateManager: OPCUACertificateManager;
74
- defaultSecureTokenLifetime: number;
75
- maxConnections: number;
76
- timeout: number;
77
- bytesWrittenInOldChannels: number;
78
- bytesReadInOldChannels: number;
79
- transactionsCountOldChannels: number;
80
- securityTokenCountOldChannels: number;
81
- serverInfo: ApplicationDescription;
82
- objectFactory: any;
83
- _on_new_channel?: (channel: ServerSecureChannelLayer) => void;
84
- _on_close_channel?: (channel: ServerSecureChannelLayer) => void;
85
- _on_connectionRefused?: (socketData: any) => void;
86
- _on_openSecureChannelFailure?: (socketData: any, channelData: any) => void;
87
- private _certificateChain;
88
- private _privateKey;
89
- private _channels;
90
- private _server?;
91
- private _endpoints;
92
- private _listen_callback?;
93
- private _started;
94
- private _counter;
95
- private _policy_deduplicator;
96
- constructor(options: OPCUAServerEndPointOptions);
97
- dispose(): void;
98
- toString(): string;
99
- getChannels(): ServerSecureChannelLayer[];
100
- /**
101
- * Returns the X509 DER form of the server certificate
102
- */
103
- getCertificate(): Certificate;
104
- /**
105
- * Returns the X509 DER form of the server certificate
106
- */
107
- getCertificateChain(): Certificate;
108
- /**
109
- * the private key
110
- */
111
- getPrivateKey(): PrivateKeyPEM;
112
- /**
113
- * The number of active channel on this end point.
114
- */
115
- get currentChannelCount(): number;
116
- /**
117
- * @method getEndpointDescription
118
- * @param securityMode
119
- * @param securityPolicy
120
- * @return endpoint_description {EndpointDescription|null}
121
- */
122
- getEndpointDescription(securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy, endpointUrl: string | null): EndpointDescription | null;
123
- addEndpointDescription(securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy, options?: EndpointDescriptionParams): void;
124
- addRestrictedEndpointDescription(options: EndpointDescriptionParams): void;
125
- addStandardEndpointDescriptions(options?: AddStandardEndpointDescriptionsParam): void;
126
- /**
127
- * returns the list of end point descriptions.
128
- */
129
- endpointDescriptions(): EndpointDescription[];
130
- /**
131
- * @method listen
132
- * @async
133
- */
134
- listen(callback: (err?: Error) => void): void;
135
- killClientSockets(callback: (err?: Error) => void): void;
136
- suspendConnection(callback: (err?: Error) => void): void;
137
- restoreConnection(callback: (err?: Error) => void): void;
138
- abruptlyInterruptChannels(): void;
139
- /**
140
- * @method shutdown
141
- * @async
142
- */
143
- shutdown(callback: (err?: Error) => void): void;
144
- /**
145
- * @method start
146
- * @async
147
- * @param callback
148
- */
149
- start(callback: (err?: Error) => void): void;
150
- get bytesWritten(): number;
151
- get bytesRead(): number;
152
- get transactionsCount(): number;
153
- get securityTokenCount(): number;
154
- get activeChannelCount(): number;
155
- private _dump_statistics;
156
- private _setup_server;
157
- private _on_client_connection;
158
- private _preregisterChannel;
159
- private _un_pre_registerChannel;
160
- /**
161
- * @method _registerChannel
162
- * @param channel
163
- * @private
164
- */
165
- private _registerChannel;
166
- /**
167
- * @method _unregisterChannel
168
- * @param channel
169
- * @private
170
- */
171
- private _unregisterChannel;
172
- private _end_listen;
173
- /**
174
- * shutdown_channel
175
- * @param channel
176
- * @param inner_callback
177
- */
178
- private shutdown_channel;
179
- /**
180
- * @private
181
- */
182
- private _prevent_DDOS_Attack;
183
- }
1
+ /// <reference types="node" />
2
+ /**
3
+ * @module node-opcua-server
4
+ */
5
+ import { EventEmitter } from "events";
6
+ import { OPCUACertificateManager } from "node-opcua-certificate-manager";
7
+ import { Certificate, PrivateKeyPEM } from "node-opcua-crypto";
8
+ import { MessageSecurityMode, SecurityPolicy, ServerSecureChannelLayer, ServerSecureChannelParent } from "node-opcua-secure-channel";
9
+ import { EndpointDescription } from "node-opcua-service-endpoints";
10
+ import { ApplicationDescription } from "node-opcua-service-endpoints";
11
+ export interface OPCUAServerEndPointOptions {
12
+ /**
13
+ * the tcp port
14
+ */
15
+ port: number;
16
+ /**
17
+ * the DER certificate chain
18
+ */
19
+ certificateChain: Certificate;
20
+ /**
21
+ * privateKey
22
+ */
23
+ privateKey: PrivateKeyPEM;
24
+ certificateManager: OPCUACertificateManager;
25
+ /**
26
+ * the default secureToken lifetime @default=60000
27
+ */
28
+ defaultSecureTokenLifetime?: number;
29
+ /**
30
+ * the maximum number of connection allowed on the TCP server socket
31
+ * @default 20
32
+ */
33
+ maxConnections?: number;
34
+ /**
35
+ * the timeout for the TCP HEL/ACK transaction (in ms)
36
+ * @default 30000
37
+ */
38
+ timeout?: number;
39
+ serverInfo: ApplicationDescription;
40
+ objectFactory?: any;
41
+ }
42
+ export interface EndpointDescriptionParams {
43
+ allowAnonymous?: boolean;
44
+ restricted?: boolean;
45
+ allowUnsecurePassword?: boolean;
46
+ resourcePath?: string;
47
+ alternateHostname?: string[];
48
+ hostname: string;
49
+ securityPolicies: SecurityPolicy[];
50
+ }
51
+ export interface AddStandardEndpointDescriptionsParam {
52
+ securityModes?: MessageSecurityMode[];
53
+ securityPolicies?: SecurityPolicy[];
54
+ disableDiscovery?: boolean;
55
+ allowAnonymous?: boolean;
56
+ restricted?: boolean;
57
+ hostname?: string;
58
+ alternateHostname?: string[];
59
+ allowUnsecurePassword?: boolean;
60
+ resourcePath?: string;
61
+ }
62
+ /**
63
+ * OPCUAServerEndPoint a Server EndPoint.
64
+ * A sever end point is listening to one port
65
+ * note:
66
+ * see OPCUA Release 1.03 part 4 page 108 7.1 ApplicationDescription
67
+ */
68
+ export declare class OPCUAServerEndPoint extends EventEmitter implements ServerSecureChannelParent {
69
+ /**
70
+ * the tcp port
71
+ */
72
+ port: number;
73
+ certificateManager: OPCUACertificateManager;
74
+ defaultSecureTokenLifetime: number;
75
+ maxConnections: number;
76
+ timeout: number;
77
+ bytesWrittenInOldChannels: number;
78
+ bytesReadInOldChannels: number;
79
+ transactionsCountOldChannels: number;
80
+ securityTokenCountOldChannels: number;
81
+ serverInfo: ApplicationDescription;
82
+ objectFactory: any;
83
+ _on_new_channel?: (channel: ServerSecureChannelLayer) => void;
84
+ _on_close_channel?: (channel: ServerSecureChannelLayer) => void;
85
+ _on_connectionRefused?: (socketData: any) => void;
86
+ _on_openSecureChannelFailure?: (socketData: any, channelData: any) => void;
87
+ private _certificateChain;
88
+ private _privateKey;
89
+ private _channels;
90
+ private _server?;
91
+ private _endpoints;
92
+ private _listen_callback?;
93
+ private _started;
94
+ private _counter;
95
+ private _policy_deduplicator;
96
+ constructor(options: OPCUAServerEndPointOptions);
97
+ dispose(): void;
98
+ toString(): string;
99
+ getChannels(): ServerSecureChannelLayer[];
100
+ /**
101
+ * Returns the X509 DER form of the server certificate
102
+ */
103
+ getCertificate(): Certificate;
104
+ /**
105
+ * Returns the X509 DER form of the server certificate
106
+ */
107
+ getCertificateChain(): Certificate;
108
+ /**
109
+ * the private key
110
+ */
111
+ getPrivateKey(): PrivateKeyPEM;
112
+ /**
113
+ * The number of active channel on this end point.
114
+ */
115
+ get currentChannelCount(): number;
116
+ /**
117
+ * @method getEndpointDescription
118
+ * @param securityMode
119
+ * @param securityPolicy
120
+ * @return endpoint_description {EndpointDescription|null}
121
+ */
122
+ getEndpointDescription(securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy, endpointUrl: string | null): EndpointDescription | null;
123
+ addEndpointDescription(securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy, options?: EndpointDescriptionParams): void;
124
+ addRestrictedEndpointDescription(options: EndpointDescriptionParams): void;
125
+ addStandardEndpointDescriptions(options?: AddStandardEndpointDescriptionsParam): void;
126
+ /**
127
+ * returns the list of end point descriptions.
128
+ */
129
+ endpointDescriptions(): EndpointDescription[];
130
+ /**
131
+ * @method listen
132
+ * @async
133
+ */
134
+ listen(callback: (err?: Error) => void): void;
135
+ killClientSockets(callback: (err?: Error) => void): void;
136
+ suspendConnection(callback: (err?: Error) => void): void;
137
+ restoreConnection(callback: (err?: Error) => void): void;
138
+ abruptlyInterruptChannels(): void;
139
+ /**
140
+ * @method shutdown
141
+ * @async
142
+ */
143
+ shutdown(callback: (err?: Error) => void): void;
144
+ /**
145
+ * @method start
146
+ * @async
147
+ * @param callback
148
+ */
149
+ start(callback: (err?: Error) => void): void;
150
+ get bytesWritten(): number;
151
+ get bytesRead(): number;
152
+ get transactionsCount(): number;
153
+ get securityTokenCount(): number;
154
+ get activeChannelCount(): number;
155
+ private _dump_statistics;
156
+ private _setup_server;
157
+ private _on_client_connection;
158
+ private _preregisterChannel;
159
+ private _un_pre_registerChannel;
160
+ /**
161
+ * @method _registerChannel
162
+ * @param channel
163
+ * @private
164
+ */
165
+ private _registerChannel;
166
+ /**
167
+ * @method _unregisterChannel
168
+ * @param channel
169
+ * @private
170
+ */
171
+ private _unregisterChannel;
172
+ private _end_listen;
173
+ /**
174
+ * shutdown_channel
175
+ * @param channel
176
+ * @param inner_callback
177
+ */
178
+ private shutdown_channel;
179
+ /**
180
+ * @private
181
+ */
182
+ private _prevent_DDOS_Attack;
183
+ }