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