node-opcua-client 2.97.0 → 2.98.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.
- package/package.json +41 -41
- package/source/alarms_and_conditions/client_alarm_tools_dump_event.ts +1 -1
- package/dist/alarms_and_conditions/client_alarm.d.ts +0 -49
- package/dist/alarms_and_conditions/client_alarm.js +0 -110
- package/dist/alarms_and_conditions/client_alarm.js.map +0 -1
- package/dist/alarms_and_conditions/client_alarm_list.d.ts +0 -25
- package/dist/alarms_and_conditions/client_alarm_list.js +0 -98
- package/dist/alarms_and_conditions/client_alarm_list.js.map +0 -1
- package/dist/alarms_and_conditions/client_alarm_tools.d.ts +0 -4
- package/dist/alarms_and_conditions/client_alarm_tools.js +0 -157
- package/dist/alarms_and_conditions/client_alarm_tools.js.map +0 -1
- package/dist/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.d.ts +0 -18
- package/dist/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.js +0 -193
- package/dist/alarms_and_conditions/client_alarm_tools_acknowledge_all_conditions.js.map +0 -1
- package/dist/alarms_and_conditions/client_alarm_tools_dump_event.d.ts +0 -9
- package/dist/alarms_and_conditions/client_alarm_tools_dump_event.js +0 -73
- package/dist/alarms_and_conditions/client_alarm_tools_dump_event.js.map +0 -1
- package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.d.ts +0 -3
- package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.js +0 -119
- package/dist/alarms_and_conditions/client_alarm_tools_extractConditionFields.js.map +0 -1
- package/dist/alarms_and_conditions/client_tools.d.ts +0 -7
- package/dist/alarms_and_conditions/client_tools.js +0 -180
- package/dist/alarms_and_conditions/client_tools.js.map +0 -1
- package/dist/client_base.d.ts +0 -277
- package/dist/client_base.js +0 -15
- package/dist/client_base.js.map +0 -1
- package/dist/client_monitored_item.d.ts +0 -21
- package/dist/client_monitored_item.js +0 -12
- package/dist/client_monitored_item.js.map +0 -1
- package/dist/client_monitored_item_base.d.ts +0 -39
- package/dist/client_monitored_item_base.js +0 -3
- package/dist/client_monitored_item_base.js.map +0 -1
- package/dist/client_monitored_item_group.d.ts +0 -21
- package/dist/client_monitored_item_group.js +0 -14
- package/dist/client_monitored_item_group.js.map +0 -1
- package/dist/client_monitored_item_toolbox.d.ts +0 -15
- package/dist/client_monitored_item_toolbox.js +0 -117
- package/dist/client_monitored_item_toolbox.js.map +0 -1
- package/dist/client_session.d.ts +0 -529
- package/dist/client_session.js +0 -11
- package/dist/client_session.js.map +0 -1
- package/dist/client_session_keepalive_manager.d.ts +0 -34
- package/dist/client_session_keepalive_manager.js +0 -150
- package/dist/client_session_keepalive_manager.js.map +0 -1
- package/dist/client_subscription.d.ts +0 -241
- package/dist/client_subscription.js +0 -15
- package/dist/client_subscription.js.map +0 -1
- package/dist/client_utils.d.ts +0 -22
- package/dist/client_utils.js +0 -88
- package/dist/client_utils.js.map +0 -1
- package/dist/common.d.ts +0 -17
- package/dist/common.js +0 -6
- package/dist/common.js.map +0 -1
- package/dist/index.d.ts +0 -56
- package/dist/index.js +0 -95
- package/dist/index.js.map +0 -1
- package/dist/opcua_client.d.ts +0 -118
- package/dist/opcua_client.js +0 -34
- package/dist/opcua_client.js.map +0 -1
- package/dist/private/client_base_impl.d.ts +0 -160
- package/dist/private/client_base_impl.js +0 -1349
- package/dist/private/client_base_impl.js.map +0 -1
- package/dist/private/client_monitored_item_base_impl.d.ts +0 -3
- package/dist/private/client_monitored_item_base_impl.js +0 -5
- package/dist/private/client_monitored_item_base_impl.js.map +0 -1
- package/dist/private/client_monitored_item_group_impl.d.ts +0 -53
- package/dist/private/client_monitored_item_group_impl.js +0 -162
- package/dist/private/client_monitored_item_group_impl.js.map +0 -1
- package/dist/private/client_monitored_item_impl.d.ts +0 -93
- package/dist/private/client_monitored_item_impl.js +0 -305
- package/dist/private/client_monitored_item_impl.js.map +0 -1
- package/dist/private/client_publish_engine.d.ts +0 -62
- package/dist/private/client_publish_engine.js +0 -409
- package/dist/private/client_publish_engine.js.map +0 -1
- package/dist/private/client_session_impl.d.ts +0 -631
- package/dist/private/client_session_impl.js +0 -1349
- package/dist/private/client_session_impl.js.map +0 -1
- package/dist/private/client_subscription_impl.d.ts +0 -93
- package/dist/private/client_subscription_impl.js +0 -780
- package/dist/private/client_subscription_impl.js.map +0 -1
- package/dist/private/i_private_client.d.ts +0 -21
- package/dist/private/i_private_client.js +0 -3
- package/dist/private/i_private_client.js.map +0 -1
- package/dist/private/opcua_client_impl.d.ts +0 -166
- package/dist/private/opcua_client_impl.js +0 -1001
- package/dist/private/opcua_client_impl.js.map +0 -1
- package/dist/private/performance.d.ts +0 -1
- package/dist/private/performance.js +0 -19
- package/dist/private/performance.js.map +0 -1
- package/dist/reconnection.d.ts +0 -9
- package/dist/reconnection.js +0 -382
- package/dist/reconnection.js.map +0 -1
- package/dist/tools/findservers.d.ts +0 -20
- package/dist/tools/findservers.js +0 -62
- package/dist/tools/findservers.js.map +0 -1
- package/dist/tools/read_history_server_capabilities.d.ts +0 -6
- package/dist/tools/read_history_server_capabilities.js +0 -99
- package/dist/tools/read_history_server_capabilities.js.map +0 -1
- package/dist/user_identity_info.d.ts +0 -1
- package/dist/user_identity_info.js +0 -3
- package/dist/user_identity_info.js.map +0 -1
- package/dist/verify.d.ts +0 -5
- package/dist/verify.js +0 -135
- package/dist/verify.js.map +0 -1
package/dist/client_session.d.ts
DELETED
|
@@ -1,529 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module node-opcua-client
|
|
3
|
-
*/
|
|
4
|
-
/// <reference types="node" />
|
|
5
|
-
/// <reference types="node" />
|
|
6
|
-
import { EventEmitter } from "events";
|
|
7
|
-
import { DateTime, UInt8 } from "node-opcua-basic-types";
|
|
8
|
-
import { ServerState } from "node-opcua-common";
|
|
9
|
-
import { Certificate } from "node-opcua-crypto";
|
|
10
|
-
import { LocalizedTextLike } from "node-opcua-data-model";
|
|
11
|
-
import { DataValue, TimestampsToReturn } from "node-opcua-data-value";
|
|
12
|
-
import { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
13
|
-
import { IBasicSession } from "node-opcua-pseudo-session";
|
|
14
|
-
import { ErrorCallback } from "node-opcua-status-code";
|
|
15
|
-
import { BrowseDescriptionOptions, BrowseResult } from "node-opcua-service-browse";
|
|
16
|
-
import { CallMethodResult } from "node-opcua-service-call";
|
|
17
|
-
import { EndpointDescription } from "node-opcua-service-endpoints";
|
|
18
|
-
import { HistoryReadResult } from "node-opcua-service-history";
|
|
19
|
-
import { QueryFirstRequestOptions, QueryFirstResponse } from "node-opcua-service-query";
|
|
20
|
-
import { ReadValueIdOptions } from "node-opcua-service-read";
|
|
21
|
-
import { CreateMonitoredItemsRequestOptions, CreateMonitoredItemsResponse, CreateSubscriptionRequestOptions, CreateSubscriptionResponse, DeleteMonitoredItemsRequestOptions, DeleteMonitoredItemsResponse, DeleteSubscriptionsRequestOptions, DeleteSubscriptionsResponse, ModifyMonitoredItemsRequestOptions, ModifyMonitoredItemsResponse, ModifySubscriptionRequestOptions, ModifySubscriptionResponse, PublishRequest, PublishResponse, RepublishRequest, RepublishResponse, SetMonitoringModeRequestOptions, SetMonitoringModeResponse, TransferSubscriptionsRequestOptions, TransferSubscriptionsResponse, SetTriggeringResponse, SetTriggeringRequestOptions } from "node-opcua-service-subscription";
|
|
22
|
-
import { BrowsePath, BrowsePathResult } from "node-opcua-service-translate-browse-path";
|
|
23
|
-
import { WriteValueOptions } from "node-opcua-service-write";
|
|
24
|
-
import { StatusCode } from "node-opcua-status-code";
|
|
25
|
-
import { DataType, Variant } from "node-opcua-variant";
|
|
26
|
-
import { Callback } from "node-opcua-status-code";
|
|
27
|
-
import { IBasicSessionChangeUser } from "node-opcua-pseudo-session";
|
|
28
|
-
import { ExtensionObject } from "node-opcua-extension-object";
|
|
29
|
-
import { ArgumentDefinition, CallMethodRequestLike, MethodId } from "node-opcua-pseudo-session";
|
|
30
|
-
import { AggregateFunction } from "node-opcua-constants";
|
|
31
|
-
import { AggregateConfigurationOptions, HistoryReadRequest, HistoryReadResponse, HistoryReadValueIdOptions } from "node-opcua-types";
|
|
32
|
-
import { ExtraDataTypeManager } from "node-opcua-client-dynamic-extension-object";
|
|
33
|
-
export { ExtraDataTypeManager } from "node-opcua-client-dynamic-extension-object";
|
|
34
|
-
export { ExtensionObject } from "node-opcua-extension-object";
|
|
35
|
-
export { ArgumentDefinition, CallMethodRequestLike, MethodId } from "node-opcua-pseudo-session";
|
|
36
|
-
import { ClientSubscription } from "./client_subscription";
|
|
37
|
-
export type ResponseCallback<T> = (err: Error | null, response?: T) => void;
|
|
38
|
-
export interface NodeAttributes {
|
|
39
|
-
nodeId: NodeId;
|
|
40
|
-
statusCode: StatusCode;
|
|
41
|
-
[key: string]: Variant | NodeId | StatusCode;
|
|
42
|
-
}
|
|
43
|
-
export interface MonitoredItemData {
|
|
44
|
-
clientHandles: Uint32Array;
|
|
45
|
-
serverHandles: Uint32Array;
|
|
46
|
-
}
|
|
47
|
-
export interface CreateSubscriptionOptions {
|
|
48
|
-
requestedPublishingInterval: number;
|
|
49
|
-
requestedLifetimeCount: number;
|
|
50
|
-
requestedMaxKeepAliveCount: number;
|
|
51
|
-
maxNotificationsPerPublish?: number;
|
|
52
|
-
publishingEnabled?: boolean;
|
|
53
|
-
priority?: UInt8;
|
|
54
|
-
}
|
|
55
|
-
export type BrowseDescriptionLike = string | BrowseDescriptionOptions;
|
|
56
|
-
export type DeleteMonitoredItemsRequestLike = DeleteMonitoredItemsRequestOptions;
|
|
57
|
-
export type CreateSubscriptionRequestLike = CreateSubscriptionRequestOptions;
|
|
58
|
-
export type DeleteSubscriptionsRequestLike = DeleteSubscriptionsRequestOptions;
|
|
59
|
-
export type TransferSubscriptionsRequestLike = TransferSubscriptionsRequestOptions;
|
|
60
|
-
export type CreateMonitoredItemsRequestLike = CreateMonitoredItemsRequestOptions;
|
|
61
|
-
export type ModifyMonitoredItemsRequestLike = ModifyMonitoredItemsRequestOptions;
|
|
62
|
-
export type ModifySubscriptionRequestLike = ModifySubscriptionRequestOptions;
|
|
63
|
-
export type SetMonitoringModeRequestLike = SetMonitoringModeRequestOptions;
|
|
64
|
-
export type QueryFirstRequestLike = QueryFirstRequestOptions;
|
|
65
|
-
export type SubscriptionId = number;
|
|
66
|
-
export interface ClientSessionBase {
|
|
67
|
-
/** the session Id */
|
|
68
|
-
timeout: number;
|
|
69
|
-
authenticationToken?: NodeId;
|
|
70
|
-
sessionId: NodeId;
|
|
71
|
-
subscriptionCount: number;
|
|
72
|
-
isReconnecting: boolean;
|
|
73
|
-
endpoint: EndpointDescription;
|
|
74
|
-
/**
|
|
75
|
-
* the time of the latest request sent by the client to the server
|
|
76
|
-
*/
|
|
77
|
-
lastRequestSentTime: Date;
|
|
78
|
-
/**
|
|
79
|
-
* the time of the latest response received by the client
|
|
80
|
-
*/
|
|
81
|
-
lastResponseReceivedTime: Date;
|
|
82
|
-
/**
|
|
83
|
-
* the server certificate as provided by the server
|
|
84
|
-
*/
|
|
85
|
-
serverCertificate: Certificate;
|
|
86
|
-
/**
|
|
87
|
-
* the session name
|
|
88
|
-
*/
|
|
89
|
-
name: string;
|
|
90
|
-
close(callback: ErrorCallback): void;
|
|
91
|
-
close(deleteSubscription: boolean, callback: ErrorCallback): void;
|
|
92
|
-
close(deleteSubscription?: boolean): Promise<void>;
|
|
93
|
-
}
|
|
94
|
-
export interface ClientSession extends ClientSessionBase {
|
|
95
|
-
serverEndpoints: EndpointDescription[];
|
|
96
|
-
}
|
|
97
|
-
export interface ClientSession extends EventEmitter {
|
|
98
|
-
on(event: "keepalive", eventHandler: (lastKnownServerState: ServerState) => void): this;
|
|
99
|
-
on(event: "keepalive_failure", eventHandler: (state: any) => void): this;
|
|
100
|
-
on(event: "session_closed", eventHandler: (statusCode: StatusCode) => void): this;
|
|
101
|
-
/**
|
|
102
|
-
* session_restored is raised when the session and related subscription
|
|
103
|
-
* have been fully repaired after a reconnection.
|
|
104
|
-
*/
|
|
105
|
-
on(event: "session_restored", eventHandler: () => void): this;
|
|
106
|
-
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
107
|
-
}
|
|
108
|
-
export interface ClientSessionBrowseService {
|
|
109
|
-
/**
|
|
110
|
-
* the maximum number of reference that the server should return per browseResult
|
|
111
|
-
* Continuous points will be return by server to allow retrieving remaining references
|
|
112
|
-
* with browseNext
|
|
113
|
-
*/
|
|
114
|
-
requestedMaxReferencesPerNode: number;
|
|
115
|
-
browse(nodeToBrowse: BrowseDescriptionLike, callback: ResponseCallback<BrowseResult>): void;
|
|
116
|
-
browse(nodesToBrowse: BrowseDescriptionLike[], callback: ResponseCallback<BrowseResult[]>): void;
|
|
117
|
-
browse(nodeToBrowse: BrowseDescriptionLike): Promise<BrowseResult>;
|
|
118
|
-
browse(nodesToBrowse: BrowseDescriptionLike[]): Promise<BrowseResult[]>;
|
|
119
|
-
browseNext(continuationPoint: Buffer, releaseContinuationPoints: boolean, callback: ResponseCallback<BrowseResult>): void;
|
|
120
|
-
browseNext(continuationPoints: Buffer[], releaseContinuationPoints: boolean, callback: ResponseCallback<BrowseResult[]>): void;
|
|
121
|
-
browseNext(continuationPoint: Buffer, releaseContinuationPoints: boolean): Promise<BrowseResult>;
|
|
122
|
-
browseNext(continuationPoints: Buffer[], releaseContinuationPoints: boolean): Promise<BrowseResult[]>;
|
|
123
|
-
}
|
|
124
|
-
export interface ClientSessionTranslateBrowsePathService {
|
|
125
|
-
translateBrowsePath(browsesPath: BrowsePath[], callback: ResponseCallback<BrowsePathResult[]>): void;
|
|
126
|
-
translateBrowsePath(browsePath: BrowsePath, callback: ResponseCallback<BrowsePathResult>): void;
|
|
127
|
-
translateBrowsePath(browsePath: BrowsePath): Promise<BrowsePathResult>;
|
|
128
|
-
translateBrowsePath(browsePaths: BrowsePath[]): Promise<BrowsePathResult[]>;
|
|
129
|
-
}
|
|
130
|
-
export interface ClientSessionQueryService {
|
|
131
|
-
queryFirst(queryFirstRequest: QueryFirstRequestLike): Promise<QueryFirstResponse>;
|
|
132
|
-
queryFirst(queryFirstRequest: QueryFirstRequestLike, callback: ResponseCallback<QueryFirstResponse>): void;
|
|
133
|
-
}
|
|
134
|
-
export interface ClientSessionCallService {
|
|
135
|
-
/**
|
|
136
|
-
*
|
|
137
|
-
* @method call
|
|
138
|
-
*
|
|
139
|
-
* @param methodToCall {CallMethodRequest} the call method request
|
|
140
|
-
* @param callback
|
|
141
|
-
*
|
|
142
|
-
* @example :
|
|
143
|
-
*
|
|
144
|
-
* ```javascript
|
|
145
|
-
* const methodToCall = {
|
|
146
|
-
* objectId: "ns=2;i=12",
|
|
147
|
-
* methodId: "ns=2;i=13",
|
|
148
|
-
* inputArguments: [
|
|
149
|
-
* new Variant({...}),
|
|
150
|
-
* new Variant({...}),
|
|
151
|
-
* ]
|
|
152
|
-
* }
|
|
153
|
-
* session.call(methodToCall,function(err,callResult) {
|
|
154
|
-
* if (!err) {
|
|
155
|
-
* console.log(" statusCode = ",callResult.statusCode);
|
|
156
|
-
* console.log(" inputArgumentResults[0] = ",callResult.inputArgumentResults[0].toString());
|
|
157
|
-
* console.log(" inputArgumentResults[1] = ",callResult.inputArgumentResults[1].toString());
|
|
158
|
-
* console.log(" outputArgument[0] = ",callResult.outputArgument[0].toString()); // array of variant
|
|
159
|
-
* }
|
|
160
|
-
* });
|
|
161
|
-
* ```
|
|
162
|
-
*
|
|
163
|
-
* @method call
|
|
164
|
-
*
|
|
165
|
-
* @param methodsToCall {CallMethodRequest[]} the call method request array
|
|
166
|
-
* @param callback
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
* @example :
|
|
170
|
-
*
|
|
171
|
-
* ```javascript
|
|
172
|
-
* const methodsToCall = [ {
|
|
173
|
-
* objectId: "ns=2;i=12",
|
|
174
|
-
* methodId: "ns=2;i=13",
|
|
175
|
-
* inputArguments: [
|
|
176
|
-
* new Variant({...}),
|
|
177
|
-
* new Variant({...}),
|
|
178
|
-
* ]
|
|
179
|
-
* }];
|
|
180
|
-
* session.call(methodsToCall,function(err,callResults) {
|
|
181
|
-
* if (!err) {
|
|
182
|
-
* const callResult = callResults[0];
|
|
183
|
-
* console.log(" statusCode = ",rep.statusCode);
|
|
184
|
-
* console.log(" inputArgumentResults[0] = ",callResult.inputArgumentResults[0].toString());
|
|
185
|
-
* console.log(" inputArgumentResults[1] = ",callResult.inputArgumentResults[1].toString());
|
|
186
|
-
* console.log(" outputArgument[0] = ",callResult.outputArgument[0].toString()); // array of variant
|
|
187
|
-
* }
|
|
188
|
-
* });
|
|
189
|
-
* ```
|
|
190
|
-
*/
|
|
191
|
-
call(methodToCall: CallMethodRequestLike, callback: (err: Error | null, result?: CallMethodResult) => void): void;
|
|
192
|
-
call(methodsToCall: CallMethodRequestLike[], callback: (err: Error | null, results?: CallMethodResult[]) => void): void;
|
|
193
|
-
call(methodToCall: CallMethodRequestLike): Promise<CallMethodResult>;
|
|
194
|
-
call(methodsToCall: CallMethodRequestLike[]): Promise<CallMethodResult[]>;
|
|
195
|
-
getArgumentDefinition(methodId: MethodId): Promise<ArgumentDefinition>;
|
|
196
|
-
getArgumentDefinition(methodId: MethodId, callback: (err: Error | null, args?: ArgumentDefinition) => void): void;
|
|
197
|
-
}
|
|
198
|
-
export interface ClientSessionRegisterService {
|
|
199
|
-
registerNodes(nodesToRegister: NodeIdLike[]): Promise<NodeId[]>;
|
|
200
|
-
registerNodes(nodesToRegister: NodeIdLike[], callback: (err: Error | null, registeredNodeIds?: NodeId[]) => void): void;
|
|
201
|
-
unregisterNodes(nodesToRegister: NodeIdLike[]): Promise<void>;
|
|
202
|
-
unregisterNodes(nodesToRegister: NodeIdLike[], callback: (err?: Error) => void): void;
|
|
203
|
-
}
|
|
204
|
-
export interface ClientSessionReadService {
|
|
205
|
-
read(nodeToRead: ReadValueIdOptions, maxAge: number, callback: ResponseCallback<DataValue>): void;
|
|
206
|
-
read(nodesToRead: ReadValueIdOptions[], maxAge: number, callback: ResponseCallback<DataValue[]>): void;
|
|
207
|
-
read(nodeToRead: ReadValueIdOptions, callback: ResponseCallback<DataValue>): void;
|
|
208
|
-
read(nodesToRead: ReadValueIdOptions[], callback: ResponseCallback<DataValue[]>): void;
|
|
209
|
-
read(nodeToRead: ReadValueIdOptions, maxAge?: number): Promise<DataValue>;
|
|
210
|
-
read(nodesToRead: ReadValueIdOptions[], maxAge?: number): Promise<DataValue[]>;
|
|
211
|
-
/**
|
|
212
|
-
* @deprecated
|
|
213
|
-
*/
|
|
214
|
-
readVariableValue(nodeId: NodeIdLike, callback: ResponseCallback<DataValue>): void;
|
|
215
|
-
/**
|
|
216
|
-
* @deprecated
|
|
217
|
-
*/
|
|
218
|
-
readVariableValue(nodeId: NodeIdLike): Promise<DataValue>;
|
|
219
|
-
/**
|
|
220
|
-
* @deprecated
|
|
221
|
-
*/
|
|
222
|
-
readVariableValue(nodeIds: NodeIdLike[], callback: ResponseCallback<DataValue[]>): void;
|
|
223
|
-
/**
|
|
224
|
-
* @deprecated
|
|
225
|
-
*/
|
|
226
|
-
readVariableValue(nodeIds: NodeIdLike[]): Promise<DataValue[]>;
|
|
227
|
-
}
|
|
228
|
-
export interface ClientSessionWriteService {
|
|
229
|
-
write(nodeToWrite: WriteValueOptions, callback: ResponseCallback<StatusCode>): void;
|
|
230
|
-
write(nodesToWrite: WriteValueOptions[], callback: ResponseCallback<StatusCode[]>): void;
|
|
231
|
-
write(nodesToWrite: WriteValueOptions[]): Promise<StatusCode[]>;
|
|
232
|
-
write(nodeToWrite: WriteValueOptions): Promise<StatusCode>;
|
|
233
|
-
/**
|
|
234
|
-
* @deprecated
|
|
235
|
-
*/
|
|
236
|
-
writeSingleNode(nodeToWrite: NodeIdLike, value: Variant): Promise<StatusCode>;
|
|
237
|
-
/**
|
|
238
|
-
* @deprecated
|
|
239
|
-
*/
|
|
240
|
-
writeSingleNode(nodeToWrite: NodeIdLike, value: Variant, callback: ResponseCallback<StatusCode>): void;
|
|
241
|
-
}
|
|
242
|
-
export interface ClientSessionRawSubscriptionService {
|
|
243
|
-
/**
|
|
244
|
-
* @method createSubscription
|
|
245
|
-
* @async
|
|
246
|
-
*
|
|
247
|
-
* @example
|
|
248
|
-
*
|
|
249
|
-
* ```ts
|
|
250
|
-
* const options = {
|
|
251
|
-
* requestedPublishingInterval: 1000,
|
|
252
|
-
* requestedLifetimeCount: 2000,
|
|
253
|
-
* requestedMaxKeepAliveCount: 10,
|
|
254
|
-
* maxNotificationsPerPublish: 1000,
|
|
255
|
-
* publishingEnabled: true,
|
|
256
|
-
* priority: 128
|
|
257
|
-
* };
|
|
258
|
-
* const response = await session.createSubscription(options);
|
|
259
|
-
* ```
|
|
260
|
-
*/
|
|
261
|
-
createSubscription(options: CreateSubscriptionRequestLike, callback: ResponseCallback<CreateSubscriptionResponse>): void;
|
|
262
|
-
createSubscription(options: CreateSubscriptionRequestLike): Promise<CreateSubscriptionResponse>;
|
|
263
|
-
setMonitoringMode(options: SetMonitoringModeRequestLike, callback: ResponseCallback<SetMonitoringModeResponse>): void;
|
|
264
|
-
setMonitoringMode(options: SetMonitoringModeRequestLike): Promise<SetMonitoringModeResponse>;
|
|
265
|
-
createMonitoredItems(options: CreateMonitoredItemsRequestLike, callback: ResponseCallback<CreateMonitoredItemsResponse>): void;
|
|
266
|
-
createMonitoredItems(options: CreateMonitoredItemsRequestLike): Promise<CreateMonitoredItemsResponse>;
|
|
267
|
-
modifySubscription(options: ModifySubscriptionRequestLike, callback: ResponseCallback<ModifySubscriptionResponse>): void;
|
|
268
|
-
modifySubscription(options: ModifySubscriptionRequestLike): Promise<ModifySubscriptionResponse>;
|
|
269
|
-
transferSubscriptions(options: TransferSubscriptionsRequestLike, callback?: ResponseCallback<TransferSubscriptionsResponse>): void;
|
|
270
|
-
transferSubscriptions(options: TransferSubscriptionsRequestLike): Promise<TransferSubscriptionsResponse>;
|
|
271
|
-
deleteSubscriptions(options: DeleteSubscriptionsRequestLike, callback?: ResponseCallback<DeleteSubscriptionsResponse>): void;
|
|
272
|
-
deleteSubscriptions(options: DeleteSubscriptionsRequestLike): Promise<DeleteSubscriptionsResponse>;
|
|
273
|
-
/**
|
|
274
|
-
*
|
|
275
|
-
* @method modifyMonitoredItems
|
|
276
|
-
* @async
|
|
277
|
-
*/
|
|
278
|
-
modifyMonitoredItems(options: ModifyMonitoredItemsRequestLike, callback?: ResponseCallback<ModifyMonitoredItemsResponse>): void;
|
|
279
|
-
modifyMonitoredItems(options: ModifyMonitoredItemsRequestLike): Promise<ModifyMonitoredItemsResponse>;
|
|
280
|
-
getMonitoredItems(subscriptionId: SubscriptionId): Promise<MonitoredItemData>;
|
|
281
|
-
getMonitoredItems(subscriptionId: SubscriptionId, callback: ResponseCallback<MonitoredItemData>): void;
|
|
282
|
-
deleteMonitoredItems(request: DeleteMonitoredItemsRequestLike, callback: Callback<DeleteMonitoredItemsResponse>): void;
|
|
283
|
-
deleteMonitoredItems(request: DeleteMonitoredItemsRequestLike): Promise<DeleteMonitoredItemsResponse>;
|
|
284
|
-
setTriggering(request: SetTriggeringRequestOptions): Promise<SetTriggeringResponse>;
|
|
285
|
-
setTriggering(request: SetTriggeringRequestOptions, callback: ResponseCallback<SetTriggeringResponse>): void;
|
|
286
|
-
}
|
|
287
|
-
export interface ClientSessionSubscriptionService {
|
|
288
|
-
createSubscription2(createSubscriptionRequest: CreateSubscriptionRequestLike): Promise<ClientSubscription>;
|
|
289
|
-
createSubscription2(createSubscriptionRequest: CreateSubscriptionRequestLike, callback: ResponseCallback<ClientSubscription>): void;
|
|
290
|
-
}
|
|
291
|
-
export interface ClientSessionChangeUser extends IBasicSessionChangeUser {
|
|
292
|
-
}
|
|
293
|
-
export interface HistoryReadValueIdOptions2 extends HistoryReadValueIdOptions {
|
|
294
|
-
nodeId: NodeIdLike;
|
|
295
|
-
}
|
|
296
|
-
export interface ExtraReadHistoryValueParameters {
|
|
297
|
-
numValuesPerNode?: number;
|
|
298
|
-
returnBounds?: boolean;
|
|
299
|
-
isReadModified?: boolean;
|
|
300
|
-
timestampsToReturn?: TimestampsToReturn;
|
|
301
|
-
}
|
|
302
|
-
export interface ClientSessionReadHistoryService {
|
|
303
|
-
readHistoryValue(nodesToRead: NodeIdLike[] | HistoryReadValueIdOptions2[], start: DateTime, end: DateTime, callback: (err: Error | null, results?: HistoryReadResult[]) => void): void;
|
|
304
|
-
readHistoryValue(nodesToRead: NodeIdLike[] | HistoryReadValueIdOptions2[], start: DateTime, end: DateTime, options: ExtraReadHistoryValueParameters | undefined, callback: (err: Error | null, results?: HistoryReadResult[]) => void): void;
|
|
305
|
-
readHistoryValue(nodesToRead: NodeIdLike[] | HistoryReadValueIdOptions2[], start: DateTime, end: DateTime, options?: ExtraReadHistoryValueParameters): Promise<HistoryReadResult[]>;
|
|
306
|
-
readHistoryValue(nodeToRead: NodeIdLike | HistoryReadValueIdOptions2, start: DateTime, end: DateTime, callback: (err: Error | null, result?: HistoryReadResult) => void): void;
|
|
307
|
-
readHistoryValue(nodeToRead: NodeIdLike | HistoryReadValueIdOptions2, start: DateTime, end: DateTime, options: ExtraReadHistoryValueParameters | undefined, callback: (err: Error | null, result?: HistoryReadResult) => void): void;
|
|
308
|
-
readHistoryValue(nodeToRead: NodeIdLike | HistoryReadValueIdOptions2, start: DateTime, end: DateTime, options?: ExtraReadHistoryValueParameters): Promise<HistoryReadResult>;
|
|
309
|
-
/**
|
|
310
|
-
* @method readAggregateValue
|
|
311
|
-
* @async
|
|
312
|
-
*
|
|
313
|
-
* @example
|
|
314
|
-
*
|
|
315
|
-
* ```javascript
|
|
316
|
-
* // es5
|
|
317
|
-
* session.readAggregateValue(
|
|
318
|
-
* {nodeId: "ns=5;s=Simulation Examples.Functions.Sine1" },
|
|
319
|
-
* new Date("2015-06-10T09:00:00.000Z"),
|
|
320
|
-
* new Date("2015-06-10T09:01:00.000Z"),
|
|
321
|
-
* AggregateFunction.Average, 3600000, (err,dataValues) => {
|
|
322
|
-
*
|
|
323
|
-
* });
|
|
324
|
-
* ```
|
|
325
|
-
*
|
|
326
|
-
* ```javascript
|
|
327
|
-
* // es6
|
|
328
|
-
* const dataValues = await session.readAggregateValue(
|
|
329
|
-
* { nodeId: "ns=5;s=Simulation Examples.Functions.Sine1" },
|
|
330
|
-
* new Date("2015-06-10T09:00:00.000Z"),
|
|
331
|
-
* new Date("2015-06-10T09:01:00.000Z"),
|
|
332
|
-
* AggregateFunction.Average, 3600000);
|
|
333
|
-
* ```
|
|
334
|
-
* @param nodes the read value id
|
|
335
|
-
* @param startTime the start time in UTC format
|
|
336
|
-
* @param endTime the end time in UTC format
|
|
337
|
-
* @param aggregateFn
|
|
338
|
-
* @param processingInterval in milliseconds
|
|
339
|
-
* @param callback
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
* aggregateConfiguration contains additional parameters
|
|
343
|
-
*
|
|
344
|
-
* - The TreatUncertainAsBad Variable indicates how the Server treats data returned with a
|
|
345
|
-
* StatusCode severity Uncertain with respect to Aggregate calculations. A value of True
|
|
346
|
-
* indicates the Server considers the severity equivalent to Bad, a value of False indicates
|
|
347
|
-
* the Server considers the severity equivalent to Good, unless the Aggregate definition says
|
|
348
|
-
* otherwise. The default value is True. Note that the value is still treated as Uncertain when
|
|
349
|
-
* the StatusCode for the result is calculated.
|
|
350
|
-
*
|
|
351
|
-
* - The PercentDataBad Variable indicates the minimum percentage of Bad data in a given interval
|
|
352
|
-
* required for the StatusCode for the given interval for processed data request to be set to Bad.
|
|
353
|
-
* (Uncertain is treated as defined above.) Refer to 5.4.3 for details on using this Variable when
|
|
354
|
-
* assigning StatusCodes. For details on which Aggregates use the PercentDataBad Variable, see the
|
|
355
|
-
* definition of each Aggregate. The default value is 100.
|
|
356
|
-
*
|
|
357
|
-
* - The PercentDataGood Variable indicates the minimum percentage of Good data in a given interval
|
|
358
|
-
* required for the StatusCode for the given interval for the processed data requests to be set to
|
|
359
|
-
* Good. Refer to 5.4.3 for details on using this Variable when assigning StatusCodes. For details
|
|
360
|
-
* on which Aggregates use the PercentDataGood Variable, see the definition of each Aggregate.
|
|
361
|
-
* The default value is 100.
|
|
362
|
-
*
|
|
363
|
-
* - The PercentDataGood and PercentDataBad shall follow the following relationship
|
|
364
|
-
* PercentDataGood ≥ (100 – PercentDataBad).
|
|
365
|
-
* If they are equal the result of the PercentDataGood calculation is used. If the values
|
|
366
|
-
* entered for PercentDataGood and PercentDataBad do not result in a valid calculation
|
|
367
|
-
* (e.g. Bad = 80; Good = 0) the result will have a StatusCode of Bad_AggregateInvalidInputs
|
|
368
|
-
* The StatusCode Bad_AggregateInvalidInputs will be returned if the value of PercentDataGood
|
|
369
|
-
* or PercentDataBad exceed 100.
|
|
370
|
-
*
|
|
371
|
-
* - The UseSlopedExtrapolation Variable indicates how the Server interpolates data when no boundary
|
|
372
|
-
* value exists (i.e. extrapolating into the future from the last known value). A value of False
|
|
373
|
-
* indicates that the Server will use a SteppedExtrapolation format, and hold the last known value
|
|
374
|
-
* constant. A value of True indicates the Server will project the value using UseSlopedExtrapolation
|
|
375
|
-
* mode. The default value is False. For SimpleBounds this value is ignored.
|
|
376
|
-
*
|
|
377
|
-
*/
|
|
378
|
-
readAggregateValue(nodesToRead: HistoryReadValueIdOptions[], startTime: DateTime, endTime: DateTime, aggregateFn: AggregateFunction[], processingInterval: number, callback: Callback<HistoryReadResult[]>): void;
|
|
379
|
-
readAggregateValue(nodesToRead: HistoryReadValueIdOptions[], startTime: DateTime, endTime: DateTime, aggregateFn: AggregateFunction[], processingInterval: number): Promise<HistoryReadResult[]>;
|
|
380
|
-
readAggregateValue(nodeToRead: HistoryReadValueIdOptions, startTime: DateTime, endTime: DateTime, aggregateFn: AggregateFunction, processingInterval: number, callback: Callback<HistoryReadResult>): void;
|
|
381
|
-
readAggregateValue(nodeToRead: HistoryReadValueIdOptions, startTime: DateTime, endTime: DateTime, aggregateFn: AggregateFunction, processingInterval: number): Promise<HistoryReadResult>;
|
|
382
|
-
readAggregateValue(nodesToRead: HistoryReadValueIdOptions[], startTime: DateTime, endTime: DateTime, aggregateFn: AggregateFunction[], processingInterval: number, aggregateConfiguration: AggregateConfigurationOptions, callback: Callback<HistoryReadResult[]>): void;
|
|
383
|
-
readAggregateValue(nodesToRead: HistoryReadValueIdOptions[], startTime: DateTime, endTime: DateTime, aggregateFn: AggregateFunction[], processingInterval: number, aggregateConfiguration: AggregateConfigurationOptions): Promise<HistoryReadResult[]>;
|
|
384
|
-
readAggregateValue(nodeToRead: HistoryReadValueIdOptions, startTime: DateTime, endTime: DateTime, aggregateFn: AggregateFunction, processingInterval: number, aggregateConfiguration: AggregateConfigurationOptions, callback: Callback<HistoryReadResult>): void;
|
|
385
|
-
readAggregateValue(nodeToRead: HistoryReadValueIdOptions, startTime: DateTime, endTime: DateTime, aggregateFn: AggregateFunction, processingInterval: number, aggregateConfiguration: AggregateConfigurationOptions): Promise<HistoryReadResult>;
|
|
386
|
-
historyRead(request: HistoryReadRequest, callback: Callback<HistoryReadResponse>): void;
|
|
387
|
-
historyRead(request: HistoryReadRequest): Promise<HistoryReadResponse>;
|
|
388
|
-
}
|
|
389
|
-
export interface ClientSessionDataTypeService {
|
|
390
|
-
/**
|
|
391
|
-
* retrieve the built-in DataType of a Variable, from its DataType attribute.
|
|
392
|
-
*
|
|
393
|
-
*
|
|
394
|
-
* this method is useful to determine which DataType to use when constructing a Variant
|
|
395
|
-
* @param nodeId - the node id of the variable to query
|
|
396
|
-
* @async
|
|
397
|
-
*
|
|
398
|
-
*
|
|
399
|
-
* @example
|
|
400
|
-
*
|
|
401
|
-
* ```javascript
|
|
402
|
-
* const session = ...; // ClientSession
|
|
403
|
-
* const nodeId = opcua.VariableIds.Server_ServerStatus_CurrentTime;
|
|
404
|
-
* session.getBuiltInDataType(nodeId,function(err,dataType) {
|
|
405
|
-
* assert(dataType === opcua.DataType.DateTime);
|
|
406
|
-
* });
|
|
407
|
-
* // or
|
|
408
|
-
* nodeId = opcua.coerceNodeId("ns=2;s=Static_Scalar_ImagePNG");
|
|
409
|
-
* const dataType: await session.getBuiltInDataType(nodeId);
|
|
410
|
-
* assert(dataType === opcua.DataType.ByteString);
|
|
411
|
-
* ```
|
|
412
|
-
*/
|
|
413
|
-
getBuiltInDataType(nodeId: NodeId): Promise<DataType>;
|
|
414
|
-
getBuiltInDataType(nodeId: NodeId, callback: (err: Error | null, dataType?: DataType) => void): void;
|
|
415
|
-
}
|
|
416
|
-
export interface ClientSessionNamespaceService {
|
|
417
|
-
getNamespaceIndex(namespaceUri: string): number;
|
|
418
|
-
readNamespaceArray(): Promise<string[]>;
|
|
419
|
-
readNamespaceArray(callback: (err: Error | null, namespaceArray?: string[]) => void): void;
|
|
420
|
-
}
|
|
421
|
-
export interface ClientSessionExtensionObjectService {
|
|
422
|
-
constructExtensionObject(dataType: NodeId, pojo: Record<string, unknown>): Promise<ExtensionObject>;
|
|
423
|
-
/**
|
|
424
|
-
* @private
|
|
425
|
-
*/
|
|
426
|
-
extractNamespaceDataType(): Promise<ExtraDataTypeManager>;
|
|
427
|
-
}
|
|
428
|
-
export interface ClientSessionConditionService {
|
|
429
|
-
disableCondition(): void;
|
|
430
|
-
enableCondition(): void;
|
|
431
|
-
/**
|
|
432
|
-
* helper to add a comment to a condition
|
|
433
|
-
*
|
|
434
|
-
* The AddComment Method is used to apply a comment to a specific state of a Condition instance.
|
|
435
|
-
*
|
|
436
|
-
* Normally, the NodeId of the object instance as the ObjectId is passed to the Call Service.
|
|
437
|
-
*
|
|
438
|
-
* However, some Servers do not expose Condition instances in the AddressSpace. Therefore all Servers
|
|
439
|
-
* shall also allow Clients to call the AddComment Method by specifying ConditionId as the ObjectId.
|
|
440
|
-
*
|
|
441
|
-
* The Method cannot be called with an ObjectId of the ConditionType Node.
|
|
442
|
-
*
|
|
443
|
-
* ### Notes:
|
|
444
|
-
* * Comments are added to Event occurrences identified via an EventId. EventIds where the related EventType
|
|
445
|
-
* is not a ConditionType (or subtype of it) and thus does not support Comments are rejected.
|
|
446
|
-
* * A ConditionEvent – where the Comment Variable contains this text – will be sent for the identified
|
|
447
|
-
* state. If a comment is added to a previous state (i.e. a state for which the Server has created a
|
|
448
|
-
* branch), the BranchId and all Condition values of this branch will be reported/.
|
|
449
|
-
*
|
|
450
|
-
*/
|
|
451
|
-
addCommentCondition(conditionId: NodeIdLike, eventId: Buffer, comment: LocalizedTextLike, callback: Callback<StatusCode>): void;
|
|
452
|
-
addCommentCondition(conditionId: NodeIdLike, eventId: Buffer, comment: LocalizedTextLike): Promise<StatusCode>;
|
|
453
|
-
/**
|
|
454
|
-
* helper to confirm a condition
|
|
455
|
-
*
|
|
456
|
-
* >> from Spec 1.03 Part 9 : page 27
|
|
457
|
-
* The Confirm Method is used to confirm an Event Notifications for a Condition instance state
|
|
458
|
-
* where ConfirmedState is FALSE.
|
|
459
|
-
*
|
|
460
|
-
* Normally, the NodeId of the object instance as the ObjectId is passed to the Call Service.
|
|
461
|
-
*
|
|
462
|
-
* However, some Servers do not expose Condition instances in the AddressSpace.
|
|
463
|
-
*
|
|
464
|
-
* Therefore all Servers shall also allow Clients to call the Confirm Method by specifying ConditionId
|
|
465
|
-
* as the ObjectId.
|
|
466
|
-
*
|
|
467
|
-
* The Method cannot be called with an ObjectId of the AcknowledgeableConditionType Node.
|
|
468
|
-
* @param conditionId
|
|
469
|
-
* @param eventId
|
|
470
|
-
* @param comment
|
|
471
|
-
* @param callback
|
|
472
|
-
*/
|
|
473
|
-
confirmCondition(conditionId: NodeIdLike, eventId: Buffer, comment: LocalizedTextLike, callback: Callback<StatusCode>): void;
|
|
474
|
-
confirmCondition(conditionId: NodeIdLike, eventId: Buffer, comment: LocalizedTextLike): Promise<StatusCode>;
|
|
475
|
-
/**
|
|
476
|
-
* helper to acknowledge a condition
|
|
477
|
-
*
|
|
478
|
-
* >>> from Spec 1.03 Part 9 : page 27
|
|
479
|
-
*
|
|
480
|
-
* The Acknowledge Method is used to acknowledge an Event Notification for a Condition
|
|
481
|
-
* instance state where AckedState is false.
|
|
482
|
-
*
|
|
483
|
-
* Normally, the NodeId of the object instance as the ObjectId is passed to the Call Service.
|
|
484
|
-
*
|
|
485
|
-
* However, some Servers do not expose Condition instances in the AddressSpace.
|
|
486
|
-
*
|
|
487
|
-
* Therefore all Servers shall also allow Clients to call the Acknowledge Method by specifying ConditionId
|
|
488
|
-
* as the ObjectId.
|
|
489
|
-
*
|
|
490
|
-
* The Method cannot be called with an ObjectId of the AcknowledgeableConditionType Node.
|
|
491
|
-
*
|
|
492
|
-
* A Condition instance may be an Object that appears in the Server Address Space. If this is
|
|
493
|
-
* the case the ConditionId is the NodeId for the Object.
|
|
494
|
-
*
|
|
495
|
-
* The EventId identifies a specific Event Notification where a state to be acknowledged was
|
|
496
|
-
* reported.
|
|
497
|
-
*
|
|
498
|
-
* Acknowledgement and the optional comment will be applied to the state identified
|
|
499
|
-
* with the EventId. If the comment field is NULL (both locale and text are empty) it will be
|
|
500
|
-
* ignored and any existing comments will remain unchanged. If the comment is to be reset, an
|
|
501
|
-
* empty text with a locale shall be provided.
|
|
502
|
-
*
|
|
503
|
-
* A valid EventId will result in an Event Notification where AckedState/Id is set to TRUE and the
|
|
504
|
-
* Comment Property contains the text of the optional comment argument. If a previous state is
|
|
505
|
-
* acknowledged, the BranchId and all Condition values of this branch will be reported.
|
|
506
|
-
*
|
|
507
|
-
* @param conditionId
|
|
508
|
-
* @param eventId
|
|
509
|
-
* @param comment
|
|
510
|
-
* @param callback
|
|
511
|
-
*/
|
|
512
|
-
acknowledgeCondition(conditionId: NodeId, eventId: Buffer, comment: LocalizedTextLike, callback: Callback<StatusCode>): void;
|
|
513
|
-
acknowledgeCondition(conditionId: NodeId, eventId: Buffer, comment: LocalizedTextLike): Promise<StatusCode>;
|
|
514
|
-
/**
|
|
515
|
-
* @method findMethodId
|
|
516
|
-
*
|
|
517
|
-
* @param nodeId the nodeId of the parent Object
|
|
518
|
-
* @param methodName the method name
|
|
519
|
-
* @param callback
|
|
520
|
-
*/
|
|
521
|
-
findMethodId(nodeId: NodeIdLike, methodName: string, callback: ResponseCallback<NodeId>): void;
|
|
522
|
-
findMethodId(nodeId: NodeIdLike, methodName: string): Promise<NodeId>;
|
|
523
|
-
}
|
|
524
|
-
export interface ClientSessionPublishService {
|
|
525
|
-
publish(options: PublishRequest, callback: ResponseCallback<PublishResponse>): void;
|
|
526
|
-
republish(options: RepublishRequest, callback: ResponseCallback<RepublishResponse>): void;
|
|
527
|
-
}
|
|
528
|
-
export interface ClientSession extends ClientSessionTranslateBrowsePathService, ClientSessionQueryService, ClientSessionBrowseService, ClientSessionSubscriptionService, ClientSessionCallService, ClientSessionRegisterService, ClientSessionReadService, ClientSessionReadHistoryService, ClientSessionConditionService, ClientSessionExtensionObjectService, ClientSessionNamespaceService, ClientSessionDataTypeService, ClientSessionChangeUser, IBasicSession {
|
|
529
|
-
}
|
package/dist/client_session.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @module node-opcua-client
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ExtensionObject = exports.ExtraDataTypeManager = void 0;
|
|
7
|
-
var node_opcua_client_dynamic_extension_object_1 = require("node-opcua-client-dynamic-extension-object");
|
|
8
|
-
Object.defineProperty(exports, "ExtraDataTypeManager", { enumerable: true, get: function () { return node_opcua_client_dynamic_extension_object_1.ExtraDataTypeManager; } });
|
|
9
|
-
var node_opcua_extension_object_1 = require("node-opcua-extension-object");
|
|
10
|
-
Object.defineProperty(exports, "ExtensionObject", { enumerable: true, get: function () { return node_opcua_extension_object_1.ExtensionObject; } });
|
|
11
|
-
//# sourceMappingURL=client_session.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client_session.js","sourceRoot":"","sources":["../source/client_session.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAoEH,yGAAkF;AAAzE,kJAAA,oBAAoB,OAAA;AAE7B,2EAA8D;AAArD,8HAAA,eAAe,OAAA"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/**
|
|
3
|
-
* @module node-opcua-client
|
|
4
|
-
*/
|
|
5
|
-
import { EventEmitter } from "events";
|
|
6
|
-
import { ServerState } from "node-opcua-common";
|
|
7
|
-
import { ClientSessionImpl } from "./private/client_session_impl";
|
|
8
|
-
export interface ClientSessionKeepAliveManagerEvents {
|
|
9
|
-
on(event: "keepalive", eventHandler: (lastKnownServerState: ServerState, count: number) => void): this;
|
|
10
|
-
on(event: "failure", eventHandler: () => void): this;
|
|
11
|
-
}
|
|
12
|
-
export declare class ClientSessionKeepAliveManager extends EventEmitter implements ClientSessionKeepAliveManagerEvents {
|
|
13
|
-
private readonly session;
|
|
14
|
-
private timerId?;
|
|
15
|
-
private pingTimeout;
|
|
16
|
-
private lastKnownState?;
|
|
17
|
-
private checkInterval;
|
|
18
|
-
private transactionInProgress;
|
|
19
|
-
count: number;
|
|
20
|
-
constructor(session: ClientSessionImpl);
|
|
21
|
-
start(): void;
|
|
22
|
-
stop(): void;
|
|
23
|
-
private ping_server;
|
|
24
|
-
/**
|
|
25
|
-
* @method ping_server
|
|
26
|
-
* @internal
|
|
27
|
-
* when a session is opened on a server, the client shall send request on a regular basis otherwise the server
|
|
28
|
-
* session object might time out.
|
|
29
|
-
* start_ping make sure that ping_server is called on a regular basis to prevent session to timeout.
|
|
30
|
-
*
|
|
31
|
-
* @param callback
|
|
32
|
-
*/
|
|
33
|
-
private _ping_server;
|
|
34
|
-
}
|