node-opcua-server 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 (57) 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 +14 -14
  16. package/dist/index.js +26 -26
  17. package/dist/monitored_item.d.ts +176 -176
  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 +654 -654
  22. package/dist/opcua_server.js +2389 -2389
  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 +95 -95
  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 +57 -57
  32. package/dist/server_capabilities.d.ts +61 -61
  33. package/dist/server_capabilities.js +108 -108
  34. package/dist/server_end_point.d.ts +183 -183
  35. package/dist/server_end_point.js +816 -816
  36. package/dist/server_engine.d.ts +315 -315
  37. package/dist/server_engine.js +1678 -1678
  38. package/dist/server_publish_engine.d.ts +112 -112
  39. package/dist/server_publish_engine.js +530 -530
  40. package/dist/server_publish_engine_for_orphan_subscriptions.d.ts +16 -16
  41. package/dist/server_publish_engine_for_orphan_subscriptions.js +49 -49
  42. package/dist/server_session.d.ts +180 -180
  43. package/dist/server_session.js +737 -737
  44. package/dist/server_subscription.d.ts +395 -395
  45. package/dist/server_subscription.js +1316 -1316
  46. package/dist/sessions_compatible_for_transfer.d.ts +2 -2
  47. package/dist/sessions_compatible_for_transfer.js +36 -36
  48. package/dist/validate_filter.d.ts +5 -5
  49. package/dist/validate_filter.js +60 -60
  50. package/package.json +27 -27
  51. package/source/opcua_server.ts +1 -1
  52. package/dist/I_register_server_manager.d.ts +0 -15
  53. package/dist/I_register_server_manager.js +0 -3
  54. package/dist/I_register_server_manager.js.map +0 -1
  55. package/dist/continuation_point_manager.d.ts +0 -18
  56. package/dist/continuation_point_manager.js +0 -84
  57. package/dist/continuation_point_manager.js.map +0 -1
@@ -1,315 +1,315 @@
1
- /// <reference types="node" />
2
- /**
3
- * @module node-opcua-server
4
- */
5
- import { EventEmitter } from "events";
6
- import { AddressSpace, ISessionContext, ContinuationData } from "node-opcua-address-space";
7
- import { DataValue } from "node-opcua-data-value";
8
- import { ServerDiagnosticsSummaryDataType, ServerState, ServerStatusDataType } from "node-opcua-common";
9
- import { AttributeIds, LocalizedTextLike } from "node-opcua-data-model";
10
- import { NodeId, NodeIdLike } from "node-opcua-nodeid";
11
- import { BrowseResult } from "node-opcua-service-browse";
12
- import { ReadRequest, TimestampsToReturn } from "node-opcua-service-read";
13
- import { CreateSubscriptionRequestLike } from "node-opcua-client";
14
- import { ObjectRegistry } from "node-opcua-object-registry";
15
- import { TransferResult } from "node-opcua-service-subscription";
16
- import { ApplicationDescription } from "node-opcua-service-endpoints";
17
- import { HistoryReadRequest, HistoryReadResult, HistoryReadValueId } from "node-opcua-service-history";
18
- import { StatusCode } from "node-opcua-status-code";
19
- import { BrowseDescription, BrowsePath, BrowsePathResult, BuildInfo, BuildInfoOptions, ReadAtTimeDetails, ReadEventDetails, ReadProcessedDetails, ReadRawModifiedDetails, WriteValue, ReadValueId } from "node-opcua-types";
20
- import { HistoryServerCapabilities, HistoryServerCapabilitiesOptions } from "./history_server_capabilities";
21
- import { ServerCapabilities, ServerCapabilitiesOptions } from "./server_capabilities";
22
- import { ServerSession } from "./server_session";
23
- import { Subscription } from "./server_subscription";
24
- import { OPCUAServerOptions } from "./opcua_server";
25
- export declare type StringGetter = () => string;
26
- export interface ServerEngineOptions {
27
- applicationUri: string | StringGetter;
28
- buildInfo?: BuildInfoOptions;
29
- isAuditing?: boolean;
30
- /**
31
- * set to true to enable serverDiagnostics
32
- */
33
- serverDiagnosticsEnabled?: boolean;
34
- serverCapabilities?: ServerCapabilitiesOptions;
35
- historyServerCapabilities?: HistoryServerCapabilitiesOptions;
36
- }
37
- export interface CreateSessionOption {
38
- clientDescription?: ApplicationDescription;
39
- sessionTimeout?: number;
40
- }
41
- export declare type ClosingReason = "Timeout" | "Terminated" | "CloseSession" | "Forcing";
42
- /**
43
- *
44
- */
45
- export declare class ServerEngine extends EventEmitter {
46
- static readonly registry: ObjectRegistry;
47
- isAuditing: boolean;
48
- serverDiagnosticsSummary: ServerDiagnosticsSummaryDataType;
49
- serverDiagnosticsEnabled: boolean;
50
- serverCapabilities: ServerCapabilities;
51
- historyServerCapabilities: HistoryServerCapabilities;
52
- clientDescription?: ApplicationDescription;
53
- addressSpace: AddressSpace | null;
54
- _internalState: "creating" | "initializing" | "initialized" | "shutdown" | "disposed";
55
- private _sessions;
56
- private _closedSessions;
57
- private _orphanPublishEngine?;
58
- private _shutdownTasks;
59
- private _applicationUri;
60
- private _expectedShutdownTime;
61
- private _serverStatus;
62
- constructor(options: ServerEngineOptions);
63
- isStarted(): boolean;
64
- dispose(): void;
65
- get startTime(): Date;
66
- get currentTime(): Date;
67
- get buildInfo(): BuildInfo;
68
- /**
69
- * register a function that will be called when the server will perform its shut down.
70
- * @method registerShutdownTask
71
- */
72
- registerShutdownTask(task: (this: ServerEngine) => void): void;
73
- /**
74
- * @method shutdown
75
- */
76
- shutdown(): void;
77
- /**
78
- * the number of active sessions
79
- */
80
- get currentSessionCount(): number;
81
- /**
82
- * the cumulated number of sessions that have been opened since this object exists
83
- */
84
- get cumulatedSessionCount(): number;
85
- /**
86
- * the number of active subscriptions.
87
- */
88
- get currentSubscriptionCount(): number;
89
- /**
90
- * the cumulated number of subscriptions that have been created since this object exists
91
- */
92
- get cumulatedSubscriptionCount(): number;
93
- get rejectedSessionCount(): number;
94
- get rejectedRequestsCount(): number;
95
- get sessionAbortCount(): number;
96
- get sessionTimeoutCount(): number;
97
- get publishingIntervalCount(): number;
98
- incrementSessionTimeoutCount(): void;
99
- incrementSessionAbortCount(): void;
100
- incrementRejectedRequestsCount(): void;
101
- /**
102
- * increment rejected session count (also increment rejected requests count)
103
- */
104
- incrementRejectedSessionCount(): void;
105
- incrementSecurityRejectedRequestsCount(): void;
106
- /**
107
- * increment rejected session count (also increment rejected requests count)
108
- */
109
- incrementSecurityRejectedSessionCount(): void;
110
- setShutdownTime(date: Date): void;
111
- setShutdownReason(reason: LocalizedTextLike): void;
112
- /**
113
- * @method secondsTillShutdown
114
- * @return the approximate number of seconds until the server will be shut down. The
115
- * value is only relevant once the state changes into SHUTDOWN.
116
- */
117
- secondsTillShutdown(): number;
118
- /**
119
- * the name of the server
120
- */
121
- get serverName(): string;
122
- /**
123
- * the server urn
124
- */
125
- get serverNameUrn(): string;
126
- /**
127
- * the urn of the server namespace
128
- */
129
- get serverNamespaceUrn(): string;
130
- get serverStatus(): ServerStatusDataType;
131
- setServerState(serverState: ServerState): void;
132
- getServerDiagnosticsEnabledFlag(): boolean;
133
- /**
134
- * @method initialize
135
- * @async
136
- *
137
- * @param options {Object}
138
- * @param options.nodeset_filename {String} - [option](default : 'mini.Node.Set2.xml' )
139
- * @param callback
140
- */
141
- initialize(options: OPCUAServerOptions, callback: () => void): void;
142
- /**
143
- *
144
- * @method browseSingleNode
145
- * @param nodeId {NodeId|String} : the nodeid of the element to browse
146
- * @param browseDescription
147
- * @param browseDescription.browseDirection {BrowseDirection} :
148
- * @param browseDescription.referenceTypeId {String|NodeId}
149
- * @param [context]
150
- * @return the browse result
151
- */
152
- browseSingleNode(nodeId: NodeIdLike, browseDescription: BrowseDescription, context?: ISessionContext): BrowseResult;
153
- browseWithAutomaticExpansion(nodesToBrowse: BrowseDescription[], context?: ISessionContext): Promise<BrowseResult[]>;
154
- /**
155
- *
156
- */
157
- browse(nodesToBrowse: BrowseDescription[], context?: ISessionContext): BrowseResult[];
158
- /**
159
- *
160
- * @method readSingleNode
161
- * @param context
162
- * @param nodeId
163
- * @param attributeId
164
- * @param [timestampsToReturn=TimestampsToReturn.Neither]
165
- * @return DataValue
166
- */
167
- readSingleNode(context: ISessionContext, nodeId: NodeId | string, attributeId: AttributeIds, timestampsToReturn?: TimestampsToReturn): DataValue;
168
- /**
169
- *
170
- *
171
- * Maximum age of the value to be read in milliseconds. The age of the value is based on the difference between
172
- * the ServerTimestamp and the time when the Server starts processing the request. For example if the Client
173
- * specifies a maxAge of 500 milliseconds and it takes 100 milliseconds until the Server starts processing
174
- * the request, the age of the returned value could be 600 milliseconds prior to the time it was requested.
175
- * If the Server has one or more values of an Attribute that are within the maximum age, it can return any one
176
- * of the values or it can read a new value from the data source. The number of values of an Attribute that
177
- * a Server has depends on the number of MonitoredItems that are defined for the Attribute. In any case,
178
- * the Client can make no assumption about which copy of the data will be returned.
179
- * If the Server does not have a value that is within the maximum age, it shall attempt to read a new value
180
- * from the data source.
181
- * If the Server cannot meet the requested maxAge, it returns its 'best effort' value rather than rejecting the
182
- * request.
183
- * This may occur when the time it takes the Server to process and return the new data value after it has been
184
- * accessed is greater than the specified maximum age.
185
- * If maxAge is set to 0, the Server shall attempt to read a new value from the data source.
186
- * If maxAge is set to the max Int32 value or greater, the Server shall attempt to get a cached value.
187
- * Negative values are invalid for maxAge.
188
- *
189
- * @return an array of DataValue
190
- */
191
- read(context: ISessionContext, readRequest: ReadRequest): DataValue[];
192
- /**
193
- *
194
- * @method writeSingleNode
195
- * @param context
196
- * @param writeValue
197
- * @param callback
198
- * @param callback.err
199
- * @param callback.statusCode
200
- * @async
201
- */
202
- writeSingleNode(context: ISessionContext, writeValue: WriteValue, callback: (err: Error | null, statusCode?: StatusCode) => void): void;
203
- /**
204
- * write a collection of nodes
205
- * @method write
206
- * @param context
207
- * @param nodesToWrite
208
- * @param callback
209
- * @param callback.err
210
- * @param callback.results
211
- * @async
212
- */
213
- write(context: ISessionContext, nodesToWrite: WriteValue[], callback: (err: Error | null, statusCodes?: StatusCode[]) => void): void;
214
- /**
215
- *
216
- */
217
- historyReadSingleNode(context: ISessionContext, nodeId: NodeId, attributeId: AttributeIds, historyReadDetails: ReadRawModifiedDetails | ReadEventDetails | ReadProcessedDetails | ReadAtTimeDetails, timestampsToReturn: TimestampsToReturn, continuationData: ContinuationData, callback: (err: Error | null, results?: HistoryReadResult) => void): void;
218
- /**
219
- *
220
- * @method historyRead
221
- * @param context {SessionContext}
222
- * @param historyReadRequest {HistoryReadRequest}
223
- * @param historyReadRequest.requestHeader {RequestHeader}
224
- * @param historyReadRequest.historyReadDetails {HistoryReadDetails}
225
- * @param historyReadRequest.timestampsToReturn {TimestampsToReturn}
226
- * @param historyReadRequest.releaseContinuationPoints {Boolean}
227
- * @param historyReadRequest.nodesToRead {HistoryReadValueId[]}
228
- * @param callback
229
- * @param callback.err
230
- * @param callback.results {HistoryReadResult[]}
231
- */
232
- historyRead(context: ISessionContext, historyReadRequest: HistoryReadRequest, callback: (err: Error | null, results: HistoryReadResult[]) => void): void;
233
- getOldestUnactivatedSession(): ServerSession | null;
234
- /**
235
- * create a new server session object.
236
- * @class ServerEngine
237
- * @method createSession
238
- * @param [options] {Object}
239
- * @param [options.sessionTimeout = 1000] {Number} sessionTimeout
240
- * @param [options.clientDescription] {ApplicationDescription}
241
- * @return {ServerSession}
242
- */
243
- createSession(options: CreateSessionOption): ServerSession;
244
- /**
245
- * @method closeSession
246
- * @param authenticationToken
247
- * @param deleteSubscriptions {Boolean} : true if session's subscription shall be deleted
248
- * @param {String} [reason = "CloseSession"] the reason for closing the session (
249
- * shall be "Timeout", "Terminated" or "CloseSession")
250
- *
251
- *
252
- * what the specs say:
253
- * -------------------
254
- *
255
- * If a Client invokes the CloseSession Service then all Subscriptions associated with the Session are also deleted
256
- * if the deleteSubscriptions flag is set to TRUE. If a Server terminates a Session for any other reason,
257
- * Subscriptions associated with the Session, are not deleted. Each Subscription has its own lifetime to protect
258
- * against data loss in the case of a Session termination. In these cases, the Subscription can be reassigned to
259
- * another Client before its lifetime expires.
260
- */
261
- closeSession(authenticationToken: NodeId, deleteSubscriptions: boolean, reason: ClosingReason): void;
262
- findSubscription(subscriptionId: number): Subscription | null;
263
- findOrphanSubscription(subscriptionId: number): Subscription | null;
264
- deleteOrphanSubscription(subscription: Subscription): StatusCode;
265
- /**
266
- * @method transferSubscription
267
- * @param session {ServerSession} - the new session that will own the subscription
268
- * @param subscriptionId {IntegerId} - the subscription Id to transfer
269
- * @param sendInitialValues {Boolean} - true if initial values will be resent.
270
- * @return {TransferResult}
271
- */
272
- transferSubscription(session: ServerSession, subscriptionId: number, sendInitialValues: boolean): Promise<TransferResult>;
273
- /**
274
- * retrieve a session by its authenticationToken.
275
- *
276
- * @method getSession
277
- * @param authenticationToken
278
- * @param activeOnly
279
- * @return {ServerSession}
280
- */
281
- getSession(authenticationToken: NodeId, activeOnly?: boolean): ServerSession | null;
282
- /**
283
- */
284
- browsePath(browsePath: BrowsePath): BrowsePathResult;
285
- /**
286
- *
287
- * performs a call to ```asyncRefresh``` on all variable nodes that provide an async refresh func.
288
- *
289
- * @method refreshValues
290
- * @param nodesToRefresh {Array<Object>} an array containing the node to consider
291
- * Each element of the array shall be of the form { nodeId: <xxx>, attributeIds: <value> }.
292
- * @param callback
293
- * @param callback.err
294
- * @param callback.data an array containing value read
295
- * The array length matches the number of nodeIds that are candidate for an async refresh (i.e: nodes that
296
- * are of type Variable with asyncRefresh func }
297
- *
298
- * @async
299
- */
300
- refreshValues(nodesToRefresh: ReadValueId[] | HistoryReadValueId[], maxAge: number, callback: (err: Error | null, dataValues?: DataValue[]) => void): void;
301
- private _exposeSubscriptionDiagnostics;
302
- protected _unexposeSubscriptionDiagnostics(subscription: Subscription): void;
303
- /**
304
- * create a new subscription
305
- * @return {Subscription}
306
- */
307
- _createSubscriptionOnSession(session: ServerSession, request: CreateSubscriptionRequestLike): Subscription;
308
- private __findNode;
309
- private _readSingleNode;
310
- private _historyReadSingleNode;
311
- /**
312
- */
313
- private __internal_bindMethod;
314
- private _getServerSubscriptionDiagnosticsArrayNode;
315
- }
1
+ /// <reference types="node" />
2
+ /**
3
+ * @module node-opcua-server
4
+ */
5
+ import { EventEmitter } from "events";
6
+ import { AddressSpace, ISessionContext, ContinuationData } from "node-opcua-address-space";
7
+ import { DataValue } from "node-opcua-data-value";
8
+ import { ServerDiagnosticsSummaryDataType, ServerState, ServerStatusDataType } from "node-opcua-common";
9
+ import { AttributeIds, LocalizedTextLike } from "node-opcua-data-model";
10
+ import { NodeId, NodeIdLike } from "node-opcua-nodeid";
11
+ import { BrowseResult } from "node-opcua-service-browse";
12
+ import { ReadRequest, TimestampsToReturn } from "node-opcua-service-read";
13
+ import { CreateSubscriptionRequestLike } from "node-opcua-client";
14
+ import { ObjectRegistry } from "node-opcua-object-registry";
15
+ import { TransferResult } from "node-opcua-service-subscription";
16
+ import { ApplicationDescription } from "node-opcua-service-endpoints";
17
+ import { HistoryReadRequest, HistoryReadResult, HistoryReadValueId } from "node-opcua-service-history";
18
+ import { StatusCode } from "node-opcua-status-code";
19
+ import { BrowseDescription, BrowsePath, BrowsePathResult, BuildInfo, BuildInfoOptions, ReadAtTimeDetails, ReadEventDetails, ReadProcessedDetails, ReadRawModifiedDetails, WriteValue, ReadValueId } from "node-opcua-types";
20
+ import { HistoryServerCapabilities, HistoryServerCapabilitiesOptions } from "./history_server_capabilities";
21
+ import { ServerCapabilities, ServerCapabilitiesOptions } from "./server_capabilities";
22
+ import { ServerSession } from "./server_session";
23
+ import { Subscription } from "./server_subscription";
24
+ import { OPCUAServerOptions } from "./opcua_server";
25
+ export declare type StringGetter = () => string;
26
+ export interface ServerEngineOptions {
27
+ applicationUri: string | StringGetter;
28
+ buildInfo?: BuildInfoOptions;
29
+ isAuditing?: boolean;
30
+ /**
31
+ * set to true to enable serverDiagnostics
32
+ */
33
+ serverDiagnosticsEnabled?: boolean;
34
+ serverCapabilities?: ServerCapabilitiesOptions;
35
+ historyServerCapabilities?: HistoryServerCapabilitiesOptions;
36
+ }
37
+ export interface CreateSessionOption {
38
+ clientDescription?: ApplicationDescription;
39
+ sessionTimeout?: number;
40
+ }
41
+ export declare type ClosingReason = "Timeout" | "Terminated" | "CloseSession" | "Forcing";
42
+ /**
43
+ *
44
+ */
45
+ export declare class ServerEngine extends EventEmitter {
46
+ static readonly registry: ObjectRegistry;
47
+ isAuditing: boolean;
48
+ serverDiagnosticsSummary: ServerDiagnosticsSummaryDataType;
49
+ serverDiagnosticsEnabled: boolean;
50
+ serverCapabilities: ServerCapabilities;
51
+ historyServerCapabilities: HistoryServerCapabilities;
52
+ clientDescription?: ApplicationDescription;
53
+ addressSpace: AddressSpace | null;
54
+ _internalState: "creating" | "initializing" | "initialized" | "shutdown" | "disposed";
55
+ private _sessions;
56
+ private _closedSessions;
57
+ private _orphanPublishEngine?;
58
+ private _shutdownTasks;
59
+ private _applicationUri;
60
+ private _expectedShutdownTime;
61
+ private _serverStatus;
62
+ constructor(options: ServerEngineOptions);
63
+ isStarted(): boolean;
64
+ dispose(): void;
65
+ get startTime(): Date;
66
+ get currentTime(): Date;
67
+ get buildInfo(): BuildInfo;
68
+ /**
69
+ * register a function that will be called when the server will perform its shut down.
70
+ * @method registerShutdownTask
71
+ */
72
+ registerShutdownTask(task: (this: ServerEngine) => void): void;
73
+ /**
74
+ * @method shutdown
75
+ */
76
+ shutdown(): void;
77
+ /**
78
+ * the number of active sessions
79
+ */
80
+ get currentSessionCount(): number;
81
+ /**
82
+ * the cumulated number of sessions that have been opened since this object exists
83
+ */
84
+ get cumulatedSessionCount(): number;
85
+ /**
86
+ * the number of active subscriptions.
87
+ */
88
+ get currentSubscriptionCount(): number;
89
+ /**
90
+ * the cumulated number of subscriptions that have been created since this object exists
91
+ */
92
+ get cumulatedSubscriptionCount(): number;
93
+ get rejectedSessionCount(): number;
94
+ get rejectedRequestsCount(): number;
95
+ get sessionAbortCount(): number;
96
+ get sessionTimeoutCount(): number;
97
+ get publishingIntervalCount(): number;
98
+ incrementSessionTimeoutCount(): void;
99
+ incrementSessionAbortCount(): void;
100
+ incrementRejectedRequestsCount(): void;
101
+ /**
102
+ * increment rejected session count (also increment rejected requests count)
103
+ */
104
+ incrementRejectedSessionCount(): void;
105
+ incrementSecurityRejectedRequestsCount(): void;
106
+ /**
107
+ * increment rejected session count (also increment rejected requests count)
108
+ */
109
+ incrementSecurityRejectedSessionCount(): void;
110
+ setShutdownTime(date: Date): void;
111
+ setShutdownReason(reason: LocalizedTextLike): void;
112
+ /**
113
+ * @method secondsTillShutdown
114
+ * @return the approximate number of seconds until the server will be shut down. The
115
+ * value is only relevant once the state changes into SHUTDOWN.
116
+ */
117
+ secondsTillShutdown(): number;
118
+ /**
119
+ * the name of the server
120
+ */
121
+ get serverName(): string;
122
+ /**
123
+ * the server urn
124
+ */
125
+ get serverNameUrn(): string;
126
+ /**
127
+ * the urn of the server namespace
128
+ */
129
+ get serverNamespaceUrn(): string;
130
+ get serverStatus(): ServerStatusDataType;
131
+ setServerState(serverState: ServerState): void;
132
+ getServerDiagnosticsEnabledFlag(): boolean;
133
+ /**
134
+ * @method initialize
135
+ * @async
136
+ *
137
+ * @param options {Object}
138
+ * @param options.nodeset_filename {String} - [option](default : 'mini.Node.Set2.xml' )
139
+ * @param callback
140
+ */
141
+ initialize(options: OPCUAServerOptions, callback: () => void): void;
142
+ /**
143
+ *
144
+ * @method browseSingleNode
145
+ * @param nodeId {NodeId|String} : the nodeid of the element to browse
146
+ * @param browseDescription
147
+ * @param browseDescription.browseDirection {BrowseDirection} :
148
+ * @param browseDescription.referenceTypeId {String|NodeId}
149
+ * @param [context]
150
+ * @return the browse result
151
+ */
152
+ browseSingleNode(nodeId: NodeIdLike, browseDescription: BrowseDescription, context?: ISessionContext): BrowseResult;
153
+ browseWithAutomaticExpansion(nodesToBrowse: BrowseDescription[], context?: ISessionContext): Promise<BrowseResult[]>;
154
+ /**
155
+ *
156
+ */
157
+ browse(nodesToBrowse: BrowseDescription[], context?: ISessionContext): BrowseResult[];
158
+ /**
159
+ *
160
+ * @method readSingleNode
161
+ * @param context
162
+ * @param nodeId
163
+ * @param attributeId
164
+ * @param [timestampsToReturn=TimestampsToReturn.Neither]
165
+ * @return DataValue
166
+ */
167
+ readSingleNode(context: ISessionContext, nodeId: NodeId | string, attributeId: AttributeIds, timestampsToReturn?: TimestampsToReturn): DataValue;
168
+ /**
169
+ *
170
+ *
171
+ * Maximum age of the value to be read in milliseconds. The age of the value is based on the difference between
172
+ * the ServerTimestamp and the time when the Server starts processing the request. For example if the Client
173
+ * specifies a maxAge of 500 milliseconds and it takes 100 milliseconds until the Server starts processing
174
+ * the request, the age of the returned value could be 600 milliseconds prior to the time it was requested.
175
+ * If the Server has one or more values of an Attribute that are within the maximum age, it can return any one
176
+ * of the values or it can read a new value from the data source. The number of values of an Attribute that
177
+ * a Server has depends on the number of MonitoredItems that are defined for the Attribute. In any case,
178
+ * the Client can make no assumption about which copy of the data will be returned.
179
+ * If the Server does not have a value that is within the maximum age, it shall attempt to read a new value
180
+ * from the data source.
181
+ * If the Server cannot meet the requested maxAge, it returns its 'best effort' value rather than rejecting the
182
+ * request.
183
+ * This may occur when the time it takes the Server to process and return the new data value after it has been
184
+ * accessed is greater than the specified maximum age.
185
+ * If maxAge is set to 0, the Server shall attempt to read a new value from the data source.
186
+ * If maxAge is set to the max Int32 value or greater, the Server shall attempt to get a cached value.
187
+ * Negative values are invalid for maxAge.
188
+ *
189
+ * @return an array of DataValue
190
+ */
191
+ read(context: ISessionContext, readRequest: ReadRequest): DataValue[];
192
+ /**
193
+ *
194
+ * @method writeSingleNode
195
+ * @param context
196
+ * @param writeValue
197
+ * @param callback
198
+ * @param callback.err
199
+ * @param callback.statusCode
200
+ * @async
201
+ */
202
+ writeSingleNode(context: ISessionContext, writeValue: WriteValue, callback: (err: Error | null, statusCode?: StatusCode) => void): void;
203
+ /**
204
+ * write a collection of nodes
205
+ * @method write
206
+ * @param context
207
+ * @param nodesToWrite
208
+ * @param callback
209
+ * @param callback.err
210
+ * @param callback.results
211
+ * @async
212
+ */
213
+ write(context: ISessionContext, nodesToWrite: WriteValue[], callback: (err: Error | null, statusCodes?: StatusCode[]) => void): void;
214
+ /**
215
+ *
216
+ */
217
+ historyReadSingleNode(context: ISessionContext, nodeId: NodeId, attributeId: AttributeIds, historyReadDetails: ReadRawModifiedDetails | ReadEventDetails | ReadProcessedDetails | ReadAtTimeDetails, timestampsToReturn: TimestampsToReturn, continuationData: ContinuationData, callback: (err: Error | null, results?: HistoryReadResult) => void): void;
218
+ /**
219
+ *
220
+ * @method historyRead
221
+ * @param context {SessionContext}
222
+ * @param historyReadRequest {HistoryReadRequest}
223
+ * @param historyReadRequest.requestHeader {RequestHeader}
224
+ * @param historyReadRequest.historyReadDetails {HistoryReadDetails}
225
+ * @param historyReadRequest.timestampsToReturn {TimestampsToReturn}
226
+ * @param historyReadRequest.releaseContinuationPoints {Boolean}
227
+ * @param historyReadRequest.nodesToRead {HistoryReadValueId[]}
228
+ * @param callback
229
+ * @param callback.err
230
+ * @param callback.results {HistoryReadResult[]}
231
+ */
232
+ historyRead(context: ISessionContext, historyReadRequest: HistoryReadRequest, callback: (err: Error | null, results: HistoryReadResult[]) => void): void;
233
+ getOldestUnactivatedSession(): ServerSession | null;
234
+ /**
235
+ * create a new server session object.
236
+ * @class ServerEngine
237
+ * @method createSession
238
+ * @param [options] {Object}
239
+ * @param [options.sessionTimeout = 1000] {Number} sessionTimeout
240
+ * @param [options.clientDescription] {ApplicationDescription}
241
+ * @return {ServerSession}
242
+ */
243
+ createSession(options: CreateSessionOption): ServerSession;
244
+ /**
245
+ * @method closeSession
246
+ * @param authenticationToken
247
+ * @param deleteSubscriptions {Boolean} : true if session's subscription shall be deleted
248
+ * @param {String} [reason = "CloseSession"] the reason for closing the session (
249
+ * shall be "Timeout", "Terminated" or "CloseSession")
250
+ *
251
+ *
252
+ * what the specs say:
253
+ * -------------------
254
+ *
255
+ * If a Client invokes the CloseSession Service then all Subscriptions associated with the Session are also deleted
256
+ * if the deleteSubscriptions flag is set to TRUE. If a Server terminates a Session for any other reason,
257
+ * Subscriptions associated with the Session, are not deleted. Each Subscription has its own lifetime to protect
258
+ * against data loss in the case of a Session termination. In these cases, the Subscription can be reassigned to
259
+ * another Client before its lifetime expires.
260
+ */
261
+ closeSession(authenticationToken: NodeId, deleteSubscriptions: boolean, reason: ClosingReason): void;
262
+ findSubscription(subscriptionId: number): Subscription | null;
263
+ findOrphanSubscription(subscriptionId: number): Subscription | null;
264
+ deleteOrphanSubscription(subscription: Subscription): StatusCode;
265
+ /**
266
+ * @method transferSubscription
267
+ * @param session {ServerSession} - the new session that will own the subscription
268
+ * @param subscriptionId {IntegerId} - the subscription Id to transfer
269
+ * @param sendInitialValues {Boolean} - true if initial values will be resent.
270
+ * @return {TransferResult}
271
+ */
272
+ transferSubscription(session: ServerSession, subscriptionId: number, sendInitialValues: boolean): Promise<TransferResult>;
273
+ /**
274
+ * retrieve a session by its authenticationToken.
275
+ *
276
+ * @method getSession
277
+ * @param authenticationToken
278
+ * @param activeOnly
279
+ * @return {ServerSession}
280
+ */
281
+ getSession(authenticationToken: NodeId, activeOnly?: boolean): ServerSession | null;
282
+ /**
283
+ */
284
+ browsePath(browsePath: BrowsePath): BrowsePathResult;
285
+ /**
286
+ *
287
+ * performs a call to ```asyncRefresh``` on all variable nodes that provide an async refresh func.
288
+ *
289
+ * @method refreshValues
290
+ * @param nodesToRefresh {Array<Object>} an array containing the node to consider
291
+ * Each element of the array shall be of the form { nodeId: <xxx>, attributeIds: <value> }.
292
+ * @param callback
293
+ * @param callback.err
294
+ * @param callback.data an array containing value read
295
+ * The array length matches the number of nodeIds that are candidate for an async refresh (i.e: nodes that
296
+ * are of type Variable with asyncRefresh func }
297
+ *
298
+ * @async
299
+ */
300
+ refreshValues(nodesToRefresh: ReadValueId[] | HistoryReadValueId[], maxAge: number, callback: (err: Error | null, dataValues?: DataValue[]) => void): void;
301
+ private _exposeSubscriptionDiagnostics;
302
+ protected _unexposeSubscriptionDiagnostics(subscription: Subscription): void;
303
+ /**
304
+ * create a new subscription
305
+ * @return {Subscription}
306
+ */
307
+ _createSubscriptionOnSession(session: ServerSession, request: CreateSubscriptionRequestLike): Subscription;
308
+ private __findNode;
309
+ private _readSingleNode;
310
+ private _historyReadSingleNode;
311
+ /**
312
+ */
313
+ private __internal_bindMethod;
314
+ private _getServerSubscriptionDiagnosticsArrayNode;
315
+ }