node-opcua-server 2.75.0 → 2.76.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 (61) 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/filter/check_where_clause_on_address_space.d.ts +3 -3
  6. package/dist/filter/check_where_clause_on_address_space.js +22 -22
  7. package/dist/filter/extract_event_fields.d.ts +10 -10
  8. package/dist/filter/extract_event_fields.js +17 -17
  9. package/dist/helper.d.ts +10 -10
  10. package/dist/helper.js +75 -75
  11. package/dist/history_server_capabilities.d.ts +35 -35
  12. package/dist/history_server_capabilities.js +43 -43
  13. package/dist/i_channel_data.d.ts +13 -13
  14. package/dist/i_channel_data.js +2 -2
  15. package/dist/i_register_server_manager.d.ts +16 -16
  16. package/dist/i_register_server_manager.js +2 -2
  17. package/dist/i_server_side_publish_engine.d.ts +36 -36
  18. package/dist/i_server_side_publish_engine.js +49 -49
  19. package/dist/i_socket_data.d.ts +11 -11
  20. package/dist/i_socket_data.js +2 -2
  21. package/dist/index.d.ts +16 -16
  22. package/dist/index.js +32 -32
  23. package/dist/monitored_item.d.ts +177 -177
  24. package/dist/monitored_item.js +1001 -1001
  25. package/dist/node_sampler.d.ts +3 -3
  26. package/dist/node_sampler.js +75 -75
  27. package/dist/opcua_server.d.ts +747 -650
  28. package/dist/opcua_server.js +2431 -2396
  29. package/dist/opcua_server.js.map +1 -1
  30. package/dist/queue.d.ts +11 -11
  31. package/dist/queue.js +71 -71
  32. package/dist/register_server_manager.d.ts +96 -96
  33. package/dist/register_server_manager.js +584 -584
  34. package/dist/register_server_manager_hidden.d.ts +17 -17
  35. package/dist/register_server_manager_hidden.js +27 -27
  36. package/dist/register_server_manager_mdns_only.d.ts +22 -22
  37. package/dist/register_server_manager_mdns_only.js +55 -55
  38. package/dist/server_capabilities.d.ts +148 -148
  39. package/dist/server_capabilities.js +92 -92
  40. package/dist/server_end_point.d.ts +183 -183
  41. package/dist/server_end_point.js +817 -817
  42. package/dist/server_engine.d.ts +317 -317
  43. package/dist/server_engine.js +1716 -1716
  44. package/dist/server_publish_engine.d.ts +113 -113
  45. package/dist/server_publish_engine.js +541 -541
  46. package/dist/server_publish_engine_for_orphan_subscriptions.d.ts +16 -16
  47. package/dist/server_publish_engine_for_orphan_subscriptions.js +51 -51
  48. package/dist/server_session.d.ts +182 -182
  49. package/dist/server_session.js +739 -739
  50. package/dist/server_subscription.d.ts +421 -421
  51. package/dist/server_subscription.js +1346 -1346
  52. package/dist/sessions_compatible_for_transfer.d.ts +2 -2
  53. package/dist/sessions_compatible_for_transfer.js +39 -39
  54. package/dist/user_manager.d.ts +32 -32
  55. package/dist/user_manager.js +74 -74
  56. package/dist/user_manager_ua.d.ts +3 -3
  57. package/dist/user_manager_ua.js +39 -39
  58. package/dist/validate_filter.d.ts +5 -5
  59. package/dist/validate_filter.js +60 -60
  60. package/package.json +47 -49
  61. package/source/opcua_server.ts +154 -14
@@ -1,16 +1,16 @@
1
- import { ServerSidePublishEngine, ServerSidePublishEngineOptions } from "./server_publish_engine";
2
- import { Subscription } from "./server_subscription";
3
- /**
4
- * the ServerSidePublishEngineForOrphanSubscription is keeping track of
5
- * live subscription that have been detached from timed out session.
6
- * It takes care of providing back those subscription to any session that
7
- * will claim them again with transferSubscription service
8
- * It also make sure that subscription are properly disposed when they expire.
9
- *
10
- * @internal
11
- */
12
- export declare class ServerSidePublishEngineForOrphanSubscription extends ServerSidePublishEngine {
13
- constructor(options: ServerSidePublishEngineOptions);
14
- add_subscription(subscription: Subscription): Subscription;
15
- detach_subscription(subscription: Subscription): Subscription;
16
- }
1
+ import { ServerSidePublishEngine, ServerSidePublishEngineOptions } from "./server_publish_engine";
2
+ import { Subscription } from "./server_subscription";
3
+ /**
4
+ * the ServerSidePublishEngineForOrphanSubscription is keeping track of
5
+ * live subscription that have been detached from timed out session.
6
+ * It takes care of providing back those subscription to any session that
7
+ * will claim them again with transferSubscription service
8
+ * It also make sure that subscription are properly disposed when they expire.
9
+ *
10
+ * @internal
11
+ */
12
+ export declare class ServerSidePublishEngineForOrphanSubscription extends ServerSidePublishEngine {
13
+ constructor(options: ServerSidePublishEngineOptions);
14
+ add_subscription(subscription: Subscription): Subscription;
15
+ detach_subscription(subscription: Subscription): Subscription;
16
+ }
@@ -1,52 +1,52 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServerSidePublishEngineForOrphanSubscription = void 0;
4
- /**
5
- * @module node-opcua-server
6
- */
7
- // tslint:disable:no-console
8
- const chalk = require("chalk");
9
- const node_opcua_debug_1 = require("node-opcua-debug");
10
- const server_publish_engine_1 = require("./server_publish_engine");
11
- const debugLog = (0, node_opcua_debug_1.make_debugLog)(__filename);
12
- const doDebug = (0, node_opcua_debug_1.checkDebugFlag)(__filename);
13
- /**
14
- * the ServerSidePublishEngineForOrphanSubscription is keeping track of
15
- * live subscription that have been detached from timed out session.
16
- * It takes care of providing back those subscription to any session that
17
- * will claim them again with transferSubscription service
18
- * It also make sure that subscription are properly disposed when they expire.
19
- *
20
- * @internal
21
- */
22
- class ServerSidePublishEngineForOrphanSubscription extends server_publish_engine_1.ServerSidePublishEngine {
23
- constructor(options) {
24
- super(options);
25
- }
26
- add_subscription(subscription) {
27
- debugLog(chalk.bgCyan.yellow.bold(" adding live subscription with id="), subscription.id, " to orphan");
28
- // detach subscription from old seession
29
- subscription.$session = undefined;
30
- super.add_subscription(subscription);
31
- // also add an event handler to detected when the subscription has ended
32
- // so we can automatically remove it from the orphan table
33
- subscription._expired_func = function () {
34
- debugLog(chalk.bgCyan.yellow(" Removing expired subscription with id="), this.id, " from orphan");
35
- // make sure all monitored item have been deleted
36
- // Xx subscription.terminate();
37
- // xx publish_engine.detach_subscription(subscription);
38
- // Xx subscription.dispose();
39
- };
40
- subscription.once("expired", subscription._expired_func);
41
- return subscription;
42
- }
43
- detach_subscription(subscription) {
44
- // un set the event handler
45
- super.detach_subscription(subscription);
46
- subscription.removeListener("expired", subscription._expired_func);
47
- subscription._expired_func = null;
48
- return subscription;
49
- }
50
- }
51
- exports.ServerSidePublishEngineForOrphanSubscription = ServerSidePublishEngineForOrphanSubscription;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServerSidePublishEngineForOrphanSubscription = void 0;
4
+ /**
5
+ * @module node-opcua-server
6
+ */
7
+ // tslint:disable:no-console
8
+ const chalk = require("chalk");
9
+ const node_opcua_debug_1 = require("node-opcua-debug");
10
+ const server_publish_engine_1 = require("./server_publish_engine");
11
+ const debugLog = (0, node_opcua_debug_1.make_debugLog)(__filename);
12
+ const doDebug = (0, node_opcua_debug_1.checkDebugFlag)(__filename);
13
+ /**
14
+ * the ServerSidePublishEngineForOrphanSubscription is keeping track of
15
+ * live subscription that have been detached from timed out session.
16
+ * It takes care of providing back those subscription to any session that
17
+ * will claim them again with transferSubscription service
18
+ * It also make sure that subscription are properly disposed when they expire.
19
+ *
20
+ * @internal
21
+ */
22
+ class ServerSidePublishEngineForOrphanSubscription extends server_publish_engine_1.ServerSidePublishEngine {
23
+ constructor(options) {
24
+ super(options);
25
+ }
26
+ add_subscription(subscription) {
27
+ debugLog(chalk.bgCyan.yellow.bold(" adding live subscription with id="), subscription.id, " to orphan");
28
+ // detach subscription from old seession
29
+ subscription.$session = undefined;
30
+ super.add_subscription(subscription);
31
+ // also add an event handler to detected when the subscription has ended
32
+ // so we can automatically remove it from the orphan table
33
+ subscription._expired_func = function () {
34
+ debugLog(chalk.bgCyan.yellow(" Removing expired subscription with id="), this.id, " from orphan");
35
+ // make sure all monitored item have been deleted
36
+ // Xx subscription.terminate();
37
+ // xx publish_engine.detach_subscription(subscription);
38
+ // Xx subscription.dispose();
39
+ };
40
+ subscription.once("expired", subscription._expired_func);
41
+ return subscription;
42
+ }
43
+ detach_subscription(subscription) {
44
+ // un set the event handler
45
+ super.detach_subscription(subscription);
46
+ subscription.removeListener("expired", subscription._expired_func);
47
+ subscription._expired_func = null;
48
+ return subscription;
49
+ }
50
+ }
51
+ exports.ServerSidePublishEngineForOrphanSubscription = ServerSidePublishEngineForOrphanSubscription;
52
52
  //# sourceMappingURL=server_publish_engine_for_orphan_subscriptions.js.map
@@ -1,182 +1,182 @@
1
- /**
2
- * @module node-opcua-server
3
- */
4
- /// <reference types="node" />
5
- /// <reference types="node" />
6
- import { EventEmitter } from "events";
7
- import { AddressSpace, ContinuationPointManager, ISessionBase, UADynamicVariableArray, UASessionDiagnosticsVariable, UASessionSecurityDiagnostics, DTSessionDiagnostics, DTSessionSecurityDiagnostics } from "node-opcua-address-space";
8
- import { SessionDiagnosticsDataType, SessionSecurityDiagnosticsDataType, SubscriptionDiagnosticsDataType } from "node-opcua-common";
9
- import { NodeId } from "node-opcua-nodeid";
10
- import { ObjectRegistry } from "node-opcua-object-registry";
11
- import { StatusCode } from "node-opcua-status-code";
12
- import { WatchDog } from "node-opcua-utils";
13
- import { ISubscriber, IWatchdogData2 } from "node-opcua-utils";
14
- import { IServerSession, IServerSessionBase, ServerSecureChannelLayer } from "node-opcua-secure-channel";
15
- import { ApplicationDescription, UserIdentityToken, CreateSubscriptionRequestOptions, EndpointDescription } from "node-opcua-types";
16
- import { ServerSidePublishEngine } from "./server_publish_engine";
17
- import { Subscription } from "./server_subscription";
18
- import { ServerEngine } from "./server_engine";
19
- export declare type SessionStatus = "new" | "active" | "screwed" | "disposed" | "closed";
20
- /**
21
- *
22
- * A Server session object.
23
- *
24
- * **from OPCUA Spec 1.02:**
25
- *
26
- * * Sessions are created to be independent of the underlying communications connection. Therefore, if a communication
27
- * connection fails, the Session is not immediately affected. The exact mechanism to recover from an underlying
28
- * communication connection error depends on the SecureChannel mapping as described in Part 6.
29
- *
30
- * * Sessions are terminated by the Server automatically if the Client fails to issue a Service request on the Session
31
- * within the timeout period negotiated by the Server in the CreateSession Service response. This protects the Server
32
- * against Client failures and against situations where a failed underlying connection cannot be re-established.
33
- *
34
- * * Clients shall be prepared to submit requests in a timely manner to prevent the Session from closing automatically.
35
- *
36
- * * Clients may explicitly terminate Sessions using the CloseSession Service.
37
- *
38
- * * When a Session is terminated, all outstanding requests on the Session are aborted and BadSessionClosed StatusCodes
39
- * are returned to the Client. In addition, the Server deletes the entry for the Client from its
40
- * SessionDiagnosticsArray Variable and notifies any other Clients who were subscribed to this entry.
41
- *
42
- */
43
- export declare class ServerSession extends EventEmitter implements ISubscriber, ISessionBase, IServerSession, IServerSessionBase {
44
- static registry: ObjectRegistry;
45
- static maxPublishRequestInQueue: number;
46
- __status: SessionStatus;
47
- parent: ServerEngine;
48
- authenticationToken: NodeId;
49
- nodeId: NodeId;
50
- sessionName: string;
51
- publishEngine: ServerSidePublishEngine;
52
- sessionObject: any;
53
- readonly creationDate: Date;
54
- sessionTimeout: number;
55
- sessionDiagnostics?: UASessionDiagnosticsVariable<DTSessionDiagnostics>;
56
- sessionSecurityDiagnostics?: UASessionSecurityDiagnostics<DTSessionSecurityDiagnostics>;
57
- subscriptionDiagnosticsArray?: UADynamicVariableArray<SubscriptionDiagnosticsDataType>;
58
- channel?: ServerSecureChannelLayer;
59
- nonce?: Buffer;
60
- userIdentityToken?: UserIdentityToken;
61
- clientDescription?: ApplicationDescription;
62
- channelId?: number | null;
63
- continuationPointManager: ContinuationPointManager;
64
- _watchDog?: WatchDog;
65
- _watchDogData?: IWatchdogData2;
66
- keepAlive: () => void;
67
- private _registeredNodesCounter;
68
- private _registeredNodes;
69
- private _registeredNodesInv;
70
- private _cumulatedSubscriptionCount;
71
- private _sessionDiagnostics?;
72
- private _sessionSecurityDiagnostics?;
73
- private channel_abort_event_handler;
74
- constructor(parent: ServerEngine, sessionTimeout: number);
75
- getSessionId(): NodeId;
76
- endpoint?: EndpointDescription;
77
- getEndpointDescription(): EndpointDescription;
78
- dispose(): void;
79
- get clientConnectionTime(): Date;
80
- /**
81
- * return the number of milisecond since last session transaction occurs from client
82
- * the first transaction is the creation of the session
83
- */
84
- get clientLastContactTime(): number;
85
- get status(): SessionStatus;
86
- set status(value: SessionStatus);
87
- get addressSpace(): AddressSpace | null;
88
- get currentPublishRequestInQueue(): number;
89
- updateClientLastContactTime(): void;
90
- /**
91
- * @method onClientSeen
92
- * required for watch dog
93
- * @param currentTime {DateTime}
94
- * @private
95
- */
96
- onClientSeen(): void;
97
- incrementTotalRequestCount(): void;
98
- incrementRequestTotalCounter(counterName: string): void;
99
- incrementRequestErrorCounter(counterName: string): void;
100
- /**
101
- * returns rootFolder.objects.server.serverDiagnostics.sessionsDiagnosticsSummary.sessionDiagnosticsArray
102
- */
103
- getSessionDiagnosticsArray(): UADynamicVariableArray<SessionDiagnosticsDataType>;
104
- /**
105
- * returns rootFolder.objects.server.serverDiagnostics.sessionsDiagnosticsSummary.sessionSecurityDiagnosticsArray
106
- */
107
- getSessionSecurityDiagnosticsArray(): UADynamicVariableArray<SessionSecurityDiagnosticsDataType>;
108
- /**
109
- * number of active subscriptions
110
- */
111
- get currentSubscriptionCount(): number;
112
- /**
113
- * number of subscriptions ever created since this object is live
114
- */
115
- get cumulatedSubscriptionCount(): number;
116
- /**
117
- * number of monitored items
118
- */
119
- get currentMonitoredItemCount(): number;
120
- /**
121
- * retrieve an existing subscription by subscriptionId
122
- * @method getSubscription
123
- * @param subscriptionId {Number}
124
- * @return {Subscription}
125
- */
126
- getSubscription(subscriptionId: number): Subscription | null;
127
- /**
128
- * @method deleteSubscription
129
- * @param subscriptionId {Number}
130
- * @return {StatusCode}
131
- */
132
- deleteSubscription(subscriptionId: number): StatusCode;
133
- /**
134
- * close a ServerSession, this will also delete the subscriptions if the flag is set.
135
- *
136
- * Spec extract:
137
- *
138
- * If a Client invokes the CloseSession Service then all Subscriptions associated with the Session are also deleted
139
- * if the deleteSubscriptions flag is set to TRUE. If a Server terminates a Session for any other reason,
140
- * Subscriptions associated with the Session, are not deleted. Each Subscription has its own lifetime to protect
141
- * against data loss in the case of a Session termination. In these cases, the Subscription can be reassigned to
142
- * another Client before its lifetime expires.
143
- *
144
- * @method close
145
- * @param deleteSubscriptions : should we delete subscription ?
146
- * @param [reason = "CloseSession"] the reason for closing the session
147
- * (shall be "Timeout", "Terminated" or "CloseSession")
148
- *
149
- */
150
- close(deleteSubscriptions: boolean, reason: string): void;
151
- registerNode(nodeId: NodeId): NodeId;
152
- unRegisterNode(aliasNodeId: NodeId): void;
153
- resolveRegisteredNode(aliasNodeId: NodeId): NodeId;
154
- /**
155
- * true if the underlying channel has been closed or aborted...
156
- */
157
- get aborted(): boolean;
158
- createSubscription(parameters: CreateSubscriptionRequestOptions): Subscription;
159
- _attach_channel(channel: ServerSecureChannelLayer): void;
160
- _detach_channel(): void;
161
- _exposeSubscriptionDiagnostics(subscription: Subscription): void;
162
- _unexposeSubscriptionDiagnostics(subscription: Subscription): void;
163
- /**
164
- * @method watchdogReset
165
- * used as a callback for the Watchdog
166
- * @private
167
- */
168
- watchdogReset(): void;
169
- private _createSessionObjectInAddressSpace;
170
- /**
171
- *
172
- * @private
173
- */
174
- private _removeSessionObjectFromAddressSpace;
175
- /**
176
- *
177
- * @private
178
- */
179
- private _getSubscriptionDiagnosticsArray;
180
- private assignSubscription;
181
- private _deleteSubscriptions;
182
- }
1
+ /**
2
+ * @module node-opcua-server
3
+ */
4
+ /// <reference types="node" />
5
+ /// <reference types="node" />
6
+ import { EventEmitter } from "events";
7
+ import { AddressSpace, ContinuationPointManager, ISessionBase, UADynamicVariableArray, UASessionDiagnosticsVariable, UASessionSecurityDiagnostics, DTSessionDiagnostics, DTSessionSecurityDiagnostics } from "node-opcua-address-space";
8
+ import { SessionDiagnosticsDataType, SessionSecurityDiagnosticsDataType, SubscriptionDiagnosticsDataType } from "node-opcua-common";
9
+ import { NodeId } from "node-opcua-nodeid";
10
+ import { ObjectRegistry } from "node-opcua-object-registry";
11
+ import { StatusCode } from "node-opcua-status-code";
12
+ import { WatchDog } from "node-opcua-utils";
13
+ import { ISubscriber, IWatchdogData2 } from "node-opcua-utils";
14
+ import { IServerSession, IServerSessionBase, ServerSecureChannelLayer } from "node-opcua-secure-channel";
15
+ import { ApplicationDescription, UserIdentityToken, CreateSubscriptionRequestOptions, EndpointDescription } from "node-opcua-types";
16
+ import { ServerSidePublishEngine } from "./server_publish_engine";
17
+ import { Subscription } from "./server_subscription";
18
+ import { ServerEngine } from "./server_engine";
19
+ export declare type SessionStatus = "new" | "active" | "screwed" | "disposed" | "closed";
20
+ /**
21
+ *
22
+ * A Server session object.
23
+ *
24
+ * **from OPCUA Spec 1.02:**
25
+ *
26
+ * * Sessions are created to be independent of the underlying communications connection. Therefore, if a communication
27
+ * connection fails, the Session is not immediately affected. The exact mechanism to recover from an underlying
28
+ * communication connection error depends on the SecureChannel mapping as described in Part 6.
29
+ *
30
+ * * Sessions are terminated by the Server automatically if the Client fails to issue a Service request on the Session
31
+ * within the timeout period negotiated by the Server in the CreateSession Service response. This protects the Server
32
+ * against Client failures and against situations where a failed underlying connection cannot be re-established.
33
+ *
34
+ * * Clients shall be prepared to submit requests in a timely manner to prevent the Session from closing automatically.
35
+ *
36
+ * * Clients may explicitly terminate Sessions using the CloseSession Service.
37
+ *
38
+ * * When a Session is terminated, all outstanding requests on the Session are aborted and BadSessionClosed StatusCodes
39
+ * are returned to the Client. In addition, the Server deletes the entry for the Client from its
40
+ * SessionDiagnosticsArray Variable and notifies any other Clients who were subscribed to this entry.
41
+ *
42
+ */
43
+ export declare class ServerSession extends EventEmitter implements ISubscriber, ISessionBase, IServerSession, IServerSessionBase {
44
+ static registry: ObjectRegistry;
45
+ static maxPublishRequestInQueue: number;
46
+ __status: SessionStatus;
47
+ parent: ServerEngine;
48
+ authenticationToken: NodeId;
49
+ nodeId: NodeId;
50
+ sessionName: string;
51
+ publishEngine: ServerSidePublishEngine;
52
+ sessionObject: any;
53
+ readonly creationDate: Date;
54
+ sessionTimeout: number;
55
+ sessionDiagnostics?: UASessionDiagnosticsVariable<DTSessionDiagnostics>;
56
+ sessionSecurityDiagnostics?: UASessionSecurityDiagnostics<DTSessionSecurityDiagnostics>;
57
+ subscriptionDiagnosticsArray?: UADynamicVariableArray<SubscriptionDiagnosticsDataType>;
58
+ channel?: ServerSecureChannelLayer;
59
+ nonce?: Buffer;
60
+ userIdentityToken?: UserIdentityToken;
61
+ clientDescription?: ApplicationDescription;
62
+ channelId?: number | null;
63
+ continuationPointManager: ContinuationPointManager;
64
+ _watchDog?: WatchDog;
65
+ _watchDogData?: IWatchdogData2;
66
+ keepAlive: () => void;
67
+ private _registeredNodesCounter;
68
+ private _registeredNodes;
69
+ private _registeredNodesInv;
70
+ private _cumulatedSubscriptionCount;
71
+ private _sessionDiagnostics?;
72
+ private _sessionSecurityDiagnostics?;
73
+ private channel_abort_event_handler;
74
+ constructor(parent: ServerEngine, sessionTimeout: number);
75
+ getSessionId(): NodeId;
76
+ endpoint?: EndpointDescription;
77
+ getEndpointDescription(): EndpointDescription;
78
+ dispose(): void;
79
+ get clientConnectionTime(): Date;
80
+ /**
81
+ * return the number of milisecond since last session transaction occurs from client
82
+ * the first transaction is the creation of the session
83
+ */
84
+ get clientLastContactTime(): number;
85
+ get status(): SessionStatus;
86
+ set status(value: SessionStatus);
87
+ get addressSpace(): AddressSpace | null;
88
+ get currentPublishRequestInQueue(): number;
89
+ updateClientLastContactTime(): void;
90
+ /**
91
+ * @method onClientSeen
92
+ * required for watch dog
93
+ * @param currentTime {DateTime}
94
+ * @private
95
+ */
96
+ onClientSeen(): void;
97
+ incrementTotalRequestCount(): void;
98
+ incrementRequestTotalCounter(counterName: string): void;
99
+ incrementRequestErrorCounter(counterName: string): void;
100
+ /**
101
+ * returns rootFolder.objects.server.serverDiagnostics.sessionsDiagnosticsSummary.sessionDiagnosticsArray
102
+ */
103
+ getSessionDiagnosticsArray(): UADynamicVariableArray<SessionDiagnosticsDataType>;
104
+ /**
105
+ * returns rootFolder.objects.server.serverDiagnostics.sessionsDiagnosticsSummary.sessionSecurityDiagnosticsArray
106
+ */
107
+ getSessionSecurityDiagnosticsArray(): UADynamicVariableArray<SessionSecurityDiagnosticsDataType>;
108
+ /**
109
+ * number of active subscriptions
110
+ */
111
+ get currentSubscriptionCount(): number;
112
+ /**
113
+ * number of subscriptions ever created since this object is live
114
+ */
115
+ get cumulatedSubscriptionCount(): number;
116
+ /**
117
+ * number of monitored items
118
+ */
119
+ get currentMonitoredItemCount(): number;
120
+ /**
121
+ * retrieve an existing subscription by subscriptionId
122
+ * @method getSubscription
123
+ * @param subscriptionId {Number}
124
+ * @return {Subscription}
125
+ */
126
+ getSubscription(subscriptionId: number): Subscription | null;
127
+ /**
128
+ * @method deleteSubscription
129
+ * @param subscriptionId {Number}
130
+ * @return {StatusCode}
131
+ */
132
+ deleteSubscription(subscriptionId: number): StatusCode;
133
+ /**
134
+ * close a ServerSession, this will also delete the subscriptions if the flag is set.
135
+ *
136
+ * Spec extract:
137
+ *
138
+ * If a Client invokes the CloseSession Service then all Subscriptions associated with the Session are also deleted
139
+ * if the deleteSubscriptions flag is set to TRUE. If a Server terminates a Session for any other reason,
140
+ * Subscriptions associated with the Session, are not deleted. Each Subscription has its own lifetime to protect
141
+ * against data loss in the case of a Session termination. In these cases, the Subscription can be reassigned to
142
+ * another Client before its lifetime expires.
143
+ *
144
+ * @method close
145
+ * @param deleteSubscriptions : should we delete subscription ?
146
+ * @param [reason = "CloseSession"] the reason for closing the session
147
+ * (shall be "Timeout", "Terminated" or "CloseSession")
148
+ *
149
+ */
150
+ close(deleteSubscriptions: boolean, reason: string): void;
151
+ registerNode(nodeId: NodeId): NodeId;
152
+ unRegisterNode(aliasNodeId: NodeId): void;
153
+ resolveRegisteredNode(aliasNodeId: NodeId): NodeId;
154
+ /**
155
+ * true if the underlying channel has been closed or aborted...
156
+ */
157
+ get aborted(): boolean;
158
+ createSubscription(parameters: CreateSubscriptionRequestOptions): Subscription;
159
+ _attach_channel(channel: ServerSecureChannelLayer): void;
160
+ _detach_channel(): void;
161
+ _exposeSubscriptionDiagnostics(subscription: Subscription): void;
162
+ _unexposeSubscriptionDiagnostics(subscription: Subscription): void;
163
+ /**
164
+ * @method watchdogReset
165
+ * used as a callback for the Watchdog
166
+ * @private
167
+ */
168
+ watchdogReset(): void;
169
+ private _createSessionObjectInAddressSpace;
170
+ /**
171
+ *
172
+ * @private
173
+ */
174
+ private _removeSessionObjectFromAddressSpace;
175
+ /**
176
+ *
177
+ * @private
178
+ */
179
+ private _getSubscriptionDiagnosticsArray;
180
+ private assignSubscription;
181
+ private _deleteSubscriptions;
182
+ }