node-opcua-client 2.166.0 → 2.167.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/dist/alarms_and_conditions/client_alarm_tools.d.ts +1 -1
- package/dist/alarms_and_conditions/client_alarm_tools.js +2 -2
- package/dist/alarms_and_conditions/client_alarm_tools.js.map +1 -1
- package/dist/alarms_and_conditions/client_tools.d.ts +3 -0
- package/dist/alarms_and_conditions/client_tools.js +2 -2
- package/dist/alarms_and_conditions/client_tools.js.map +1 -1
- package/dist/client_base.d.ts +47 -40
- package/dist/client_base.js +5 -6
- package/dist/client_base.js.map +1 -1
- package/dist/client_monitored_item.d.ts +7 -7
- package/dist/client_monitored_item.js.map +1 -1
- package/dist/client_monitored_item_base.d.ts +12 -13
- package/dist/client_monitored_item_group.d.ts +5 -5
- package/dist/client_monitored_item_toolbox.d.ts +6 -7
- package/dist/client_monitored_item_toolbox.js.map +1 -1
- package/dist/client_session.d.ts +19 -23
- package/dist/client_session.js.map +1 -1
- package/dist/client_session_keepalive_manager.d.ts +1 -1
- package/dist/client_session_keepalive_manager.js +6 -6
- package/dist/client_session_keepalive_manager.js.map +1 -1
- package/dist/client_subscription.d.ts +11 -12
- package/dist/client_subscription.js.map +1 -1
- package/dist/client_utils.d.ts +3 -3
- package/dist/client_utils.js.map +1 -1
- package/dist/common.d.ts +12 -12
- package/dist/index.d.ts +26 -27
- package/dist/index.js +65 -66
- package/dist/index.js.map +1 -1
- package/dist/opcua_client.d.ts +17 -19
- package/dist/opcua_client.js.map +1 -1
- package/dist/private/client_base_impl.d.ts +19 -18
- package/dist/private/client_base_impl.js +140 -119
- package/dist/private/client_base_impl.js.map +1 -1
- package/dist/private/client_monitored_item_group_impl.d.ts +4 -5
- package/dist/private/client_monitored_item_group_impl.js +1 -1
- package/dist/private/client_monitored_item_group_impl.js.map +1 -1
- package/dist/private/client_monitored_item_impl.d.ts +9 -10
- package/dist/private/client_monitored_item_impl.js.map +1 -1
- package/dist/private/client_publish_engine.d.ts +3 -3
- package/dist/private/client_publish_engine.js +6 -7
- package/dist/private/client_publish_engine.js.map +1 -1
- package/dist/private/client_session_impl.d.ts +24 -25
- package/dist/private/client_session_impl.js +14 -10
- package/dist/private/client_session_impl.js.map +1 -1
- package/dist/private/client_subscription_impl.d.ts +10 -11
- package/dist/private/client_subscription_impl.js +12 -11
- package/dist/private/client_subscription_impl.js.map +1 -1
- package/dist/private/i_private_client.d.ts +7 -7
- package/dist/private/opcua_client_impl.d.ts +12 -9
- package/dist/private/opcua_client_impl.js +58 -48
- package/dist/private/opcua_client_impl.js.map +1 -1
- package/dist/private/performance.js.map +1 -1
- package/dist/private/reconnection/client_publish_engine_reconnection.d.ts +1 -1
- package/dist/private/reconnection/client_publish_engine_reconnection.js +4 -2
- package/dist/private/reconnection/client_publish_engine_reconnection.js.map +1 -1
- package/dist/private/reconnection/client_reconnection.d.ts +1 -1
- package/dist/private/reconnection/client_subscription_reconnection.d.ts +1 -1
- package/dist/private/reconnection/client_subscription_reconnection.js +2 -2
- package/dist/private/reconnection/client_subscription_reconnection.js.map +1 -1
- package/dist/private/reconnection/reconnection.d.ts +3 -3
- package/dist/private/reconnection/reconnection.js +1 -1
- package/dist/private/reconnection/reconnection.js.map +1 -1
- package/dist/tools/findservers.d.ts +7 -2
- package/dist/tools/findservers.js +41 -53
- package/dist/tools/findservers.js.map +1 -1
- package/dist/tools/read_history_server_capabilities.d.ts +1 -1
- package/dist/tools/read_history_server_capabilities.js +9 -8
- package/dist/tools/read_history_server_capabilities.js.map +1 -1
- package/dist/user_identity_info.d.ts +1 -1
- package/dist/verify.js.map +1 -1
- package/package.json +41 -40
- package/source/alarms_and_conditions/client_alarm_tools.ts +14 -8
- package/source/alarms_and_conditions/client_tools.ts +7 -6
- package/source/client_base.ts +93 -79
- package/source/client_monitored_item.ts +7 -8
- package/source/client_monitored_item_base.ts +12 -14
- package/source/client_monitored_item_group.ts +5 -5
- package/source/client_monitored_item_toolbox.ts +13 -14
- package/source/client_session.ts +37 -40
- package/source/client_session_keepalive_manager.ts +7 -10
- package/source/client_subscription.ts +11 -12
- package/source/client_utils.ts +6 -6
- package/source/common.ts +12 -12
- package/source/index.ts +44 -40
- package/source/opcua_client.ts +24 -23
- package/source/private/client_base_impl.ts +276 -186
- package/source/private/client_monitored_item_group_impl.ts +10 -14
- package/source/private/client_monitored_item_impl.ts +17 -17
- package/source/private/client_publish_engine.ts +11 -12
- package/source/private/client_session_impl.ts +85 -82
- package/source/private/client_subscription_impl.ts +42 -41
- package/source/private/i_private_client.ts +8 -8
- package/source/private/opcua_client_impl.ts +118 -97
- package/source/private/performance.ts +2 -3
- package/source/private/reconnection/client_publish_engine_reconnection.ts +16 -15
- package/source/private/reconnection/client_reconnection.ts +1 -1
- package/source/private/reconnection/client_subscription_reconnection.ts +16 -13
- package/source/private/reconnection/reconnection.ts +130 -33
- package/source/tools/findservers.ts +43 -62
- package/source/tools/read_history_server_capabilities.ts +20 -22
- package/source/user_identity_info.ts +5 -5
- package/source/verify.ts +25 -25
|
@@ -3,25 +3,24 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// tslint:disable:unified-signatures
|
|
6
|
-
import { EventEmitter } from "events";
|
|
7
|
-
import { Byte, Double, UInt32 } from "node-opcua-basic-types";
|
|
6
|
+
import type { EventEmitter } from "events";
|
|
7
|
+
import type { Byte, Double, UInt32 } from "node-opcua-basic-types";
|
|
8
8
|
|
|
9
|
-
import { DiagnosticInfo } from "node-opcua-data-model";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
9
|
+
import type { DiagnosticInfo } from "node-opcua-data-model";
|
|
10
|
+
import type { IBasicSubscription } from "node-opcua-pseudo-session";
|
|
11
|
+
import type { ReadValueIdOptions, TimestampsToReturn } from "node-opcua-service-read";
|
|
12
|
+
import type {
|
|
13
13
|
MonitoringMode,
|
|
14
14
|
MonitoringParametersOptions,
|
|
15
15
|
NotificationMessage,
|
|
16
16
|
SetTriggeringResponse
|
|
17
17
|
} from "node-opcua-service-subscription";
|
|
18
|
-
import { Callback, StatusCode } from "node-opcua-status-code";
|
|
19
|
-
import { ErrorCallback } from "node-opcua-status-code";
|
|
18
|
+
import type { Callback, ErrorCallback, StatusCode } from "node-opcua-status-code";
|
|
20
19
|
|
|
21
|
-
import { ClientMonitoredItem } from "./client_monitored_item";
|
|
22
|
-
import { ClientMonitoredItemBase } from "./client_monitored_item_base";
|
|
23
|
-
import { ClientMonitoredItemGroup } from "./client_monitored_item_group";
|
|
24
|
-
import { ClientSession, MonitoredItemData, SubscriptionId } from "./client_session";
|
|
20
|
+
import type { ClientMonitoredItem } from "./client_monitored_item";
|
|
21
|
+
import type { ClientMonitoredItemBase } from "./client_monitored_item_base";
|
|
22
|
+
import type { ClientMonitoredItemGroup } from "./client_monitored_item_group";
|
|
23
|
+
import type { ClientSession, MonitoredItemData, SubscriptionId } from "./client_session";
|
|
25
24
|
|
|
26
25
|
export interface ClientSubscriptionOptions {
|
|
27
26
|
requestedPublishingInterval?: number;
|
package/source/client_utils.ts
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { AttributeIds } from "node-opcua-data-model";
|
|
6
|
-
import { DataValue } from "node-opcua-data-value";
|
|
7
|
-
import { NodeIdLike, resolveNodeId } from "node-opcua-nodeid";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
6
|
+
import type { DataValue } from "node-opcua-data-value";
|
|
7
|
+
import { type NodeIdLike, resolveNodeId } from "node-opcua-nodeid";
|
|
8
|
+
import type { IBasicSessionReadAsyncMultiple, IBasicSessionTranslateBrowsePathAsyncMultiple } from "node-opcua-pseudo-session";
|
|
9
|
+
import type { ReadValueIdOptions } from "node-opcua-service-read";
|
|
10
|
+
import { BrowsePath, type BrowsePathResult } from "node-opcua-service-translate-browse-path";
|
|
11
|
+
import type { Variant } from "node-opcua-variant";
|
|
12
12
|
|
|
13
13
|
const hasPropertyRefId = resolveNodeId("HasProperty");
|
|
14
14
|
|
package/source/common.ts
CHANGED
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
* @module node-opcua-client
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { BrowseNextRequest, BrowseNextResponse, BrowseRequest, BrowseResponse } from "node-opcua-service-browse";
|
|
6
|
-
import { CallRequest, CallResponse } from "node-opcua-service-call";
|
|
7
|
-
import {
|
|
5
|
+
import type { BrowseNextRequest, BrowseNextResponse, BrowseRequest, BrowseResponse } from "node-opcua-service-browse";
|
|
6
|
+
import type { CallRequest, CallResponse } from "node-opcua-service-call";
|
|
7
|
+
import type {
|
|
8
8
|
FindServersOnNetworkRequest,
|
|
9
9
|
FindServersOnNetworkResponse,
|
|
10
10
|
FindServersRequest,
|
|
11
11
|
FindServersResponse
|
|
12
12
|
} from "node-opcua-service-discovery";
|
|
13
|
-
import { GetEndpointsRequest, GetEndpointsResponse } from "node-opcua-service-endpoints";
|
|
14
|
-
import { HistoryReadRequest, HistoryReadResponse } from "node-opcua-service-history";
|
|
15
|
-
import { QueryFirstRequest, QueryFirstResponse, QueryNextRequest, QueryNextResponse } from "node-opcua-service-query";
|
|
16
|
-
import { ReadRequest, ReadResponse } from "node-opcua-service-read";
|
|
17
|
-
import {
|
|
13
|
+
import type { GetEndpointsRequest, GetEndpointsResponse } from "node-opcua-service-endpoints";
|
|
14
|
+
import type { HistoryReadRequest, HistoryReadResponse } from "node-opcua-service-history";
|
|
15
|
+
import type { QueryFirstRequest, QueryFirstResponse, QueryNextRequest, QueryNextResponse } from "node-opcua-service-query";
|
|
16
|
+
import type { ReadRequest, ReadResponse } from "node-opcua-service-read";
|
|
17
|
+
import type {
|
|
18
18
|
RegisterNodesRequest,
|
|
19
19
|
RegisterNodesResponse,
|
|
20
20
|
UnregisterNodesRequest,
|
|
21
21
|
UnregisterNodesResponse
|
|
22
22
|
} from "node-opcua-service-register-node";
|
|
23
|
-
import {
|
|
23
|
+
import type {
|
|
24
24
|
ActivateSessionRequest,
|
|
25
25
|
ActivateSessionResponse,
|
|
26
26
|
CloseSessionRequest,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
CreateSessionRequest,
|
|
29
29
|
CreateSessionResponse
|
|
30
30
|
} from "node-opcua-service-session";
|
|
31
|
-
import {
|
|
31
|
+
import type {
|
|
32
32
|
CreateMonitoredItemsRequest,
|
|
33
33
|
CreateMonitoredItemsResponse,
|
|
34
34
|
CreateSubscriptionRequest,
|
|
@@ -52,11 +52,11 @@ import {
|
|
|
52
52
|
TransferSubscriptionsRequest,
|
|
53
53
|
TransferSubscriptionsResponse
|
|
54
54
|
} from "node-opcua-service-subscription";
|
|
55
|
-
import {
|
|
55
|
+
import type {
|
|
56
56
|
TranslateBrowsePathsToNodeIdsRequest,
|
|
57
57
|
TranslateBrowsePathsToNodeIdsResponse
|
|
58
58
|
} from "node-opcua-service-translate-browse-path";
|
|
59
|
-
import { WriteRequest, WriteResponse } from "node-opcua-service-write";
|
|
59
|
+
import type { WriteRequest, WriteResponse } from "node-opcua-service-write";
|
|
60
60
|
|
|
61
61
|
export type Request =
|
|
62
62
|
| CreateSessionRequest
|
package/source/index.ts
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
10
10
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
|
11
11
|
* subject to the following conditions:
|
|
12
|
-
*
|
|
12
|
+
*
|
|
13
13
|
* The above copyright notice and this permission notice shall be included in all
|
|
14
14
|
* copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
15
|
+
*
|
|
16
16
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
17
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
18
18
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
@@ -20,31 +20,28 @@
|
|
|
20
20
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
21
21
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
22
22
|
*/
|
|
23
|
+
|
|
24
|
+
export * from "node-opcua-alarm-condition";
|
|
25
|
+
export { assert } from "node-opcua-assert";
|
|
26
|
+
export { ServerState, ServiceCounterDataType } from "node-opcua-common";
|
|
27
|
+
export { ClientSecureChannelLayer, ConnectionStrategyOptions, SecurityPolicy } from "node-opcua-secure-channel";
|
|
28
|
+
export * from "node-opcua-utils";
|
|
29
|
+
export * from "./alarms_and_conditions/client_alarm_tools";
|
|
30
|
+
export * from "./alarms_and_conditions/client_tools";
|
|
31
|
+
export * from "./alarms_and_conditions/client_tools";
|
|
23
32
|
export * from "./client_base";
|
|
24
|
-
export * from "./opcua_client";
|
|
25
|
-
export * from "./client_session";
|
|
26
|
-
export * from "./client_subscription";
|
|
27
|
-
export * from "./client_monitored_item_base";
|
|
28
33
|
export * from "./client_monitored_item";
|
|
34
|
+
export * from "./client_monitored_item_base";
|
|
29
35
|
export * from "./client_monitored_item_group";
|
|
30
|
-
export * from "./
|
|
36
|
+
export * from "./client_session";
|
|
37
|
+
export * from "./client_subscription";
|
|
38
|
+
export * from "./client_utils";
|
|
39
|
+
export * from "./opcua_client";
|
|
40
|
+
export { ClientSidePublishEngine } from "./private/client_publish_engine";
|
|
31
41
|
export * from "./tools/findservers";
|
|
32
42
|
export * from "./tools/read_history_server_capabilities";
|
|
33
|
-
export * from "./client_utils";
|
|
34
|
-
export * from "./verify";
|
|
35
43
|
export * from "./user_identity_info";
|
|
36
|
-
export * from "./
|
|
37
|
-
export * from "./alarms_and_conditions/client_tools";
|
|
38
|
-
export * from "node-opcua-alarm-condition";
|
|
39
|
-
|
|
40
|
-
export { assert } from "node-opcua-assert";
|
|
41
|
-
export * from "node-opcua-utils";
|
|
42
|
-
|
|
43
|
-
export { ClientSidePublishEngine } from "./private/client_publish_engine";
|
|
44
|
-
|
|
45
|
-
export { ServerState, ServiceCounterDataType } from "node-opcua-common";
|
|
46
|
-
|
|
47
|
-
export { SecurityPolicy, ClientSecureChannelLayer, ConnectionStrategyOptions } from "node-opcua-secure-channel";
|
|
44
|
+
export * from "./verify";
|
|
48
45
|
|
|
49
46
|
import * as utils1 from "node-opcua-utils";
|
|
50
47
|
export const utils = utils1;
|
|
@@ -52,33 +49,42 @@ export const utils = utils1;
|
|
|
52
49
|
import * as crypto_util1 from "node-opcua-crypto/web";
|
|
53
50
|
export const crypto_utils = crypto_util1;
|
|
54
51
|
|
|
55
|
-
export
|
|
56
|
-
|
|
52
|
+
export * from "node-opcua-client-dynamic-extension-object";
|
|
53
|
+
export { makeApplicationUrn } from "node-opcua-common";
|
|
54
|
+
export * from "node-opcua-constants";
|
|
55
|
+
export * from "node-opcua-data-model";
|
|
56
|
+
export * from "node-opcua-data-value";
|
|
57
|
+
export {
|
|
58
|
+
checkDebugFlag,
|
|
59
|
+
hexDump,
|
|
60
|
+
LogLevel,
|
|
61
|
+
make_debugLog,
|
|
62
|
+
make_warningLog,
|
|
63
|
+
setDebugLogger,
|
|
64
|
+
setErrorLogger,
|
|
65
|
+
setLogLevel,
|
|
66
|
+
setWarningLogger
|
|
67
|
+
} from "node-opcua-debug";
|
|
57
68
|
///
|
|
58
69
|
export {
|
|
59
|
-
|
|
60
|
-
resolveNodeId,
|
|
61
|
-
makeNodeId,
|
|
70
|
+
coerceExpandedNodeId,
|
|
62
71
|
coerceNodeId,
|
|
63
|
-
sameNodeId,
|
|
64
72
|
ExpandedNodeId,
|
|
65
73
|
makeExpandedNodeId,
|
|
74
|
+
makeNodeId,
|
|
75
|
+
NodeId,
|
|
66
76
|
NodeIdLike,
|
|
67
|
-
|
|
77
|
+
resolveNodeId,
|
|
78
|
+
sameNodeId
|
|
68
79
|
} from "node-opcua-nodeid";
|
|
69
|
-
export
|
|
70
|
-
export * from "node-opcua-variant";
|
|
71
|
-
export * from "node-opcua-data-value";
|
|
72
|
-
export * from "node-opcua-data-model";
|
|
73
|
-
export * from "node-opcua-constants";
|
|
80
|
+
export * from "node-opcua-pseudo-session";
|
|
74
81
|
export * from "node-opcua-secure-channel";
|
|
75
|
-
export { makeApplicationUrn } from "node-opcua-common";
|
|
76
|
-
|
|
77
|
-
export * from "node-opcua-service-endpoints";
|
|
78
82
|
export * from "node-opcua-service-browse";
|
|
79
83
|
export * from "node-opcua-service-call";
|
|
80
84
|
export * from "node-opcua-service-discovery";
|
|
81
85
|
export * from "node-opcua-service-endpoints";
|
|
86
|
+
export * from "node-opcua-service-endpoints";
|
|
87
|
+
export * from "node-opcua-service-filter";
|
|
82
88
|
export * from "node-opcua-service-history";
|
|
83
89
|
export * from "node-opcua-service-query";
|
|
84
90
|
export * from "node-opcua-service-read";
|
|
@@ -87,8 +93,6 @@ export * from "node-opcua-service-session";
|
|
|
87
93
|
export * from "node-opcua-service-subscription";
|
|
88
94
|
export * from "node-opcua-service-translate-browse-path";
|
|
89
95
|
export * from "node-opcua-service-write";
|
|
90
|
-
export
|
|
91
|
-
export * from "node-opcua-pseudo-session";
|
|
92
|
-
export * from "node-opcua-client-dynamic-extension-object";
|
|
96
|
+
export { ErrorCallback, StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
93
97
|
export { DataTypeDefinition } from "node-opcua-types";
|
|
94
|
-
export
|
|
98
|
+
export * from "node-opcua-variant";
|
package/source/opcua_client.ts
CHANGED
|
@@ -2,16 +2,21 @@
|
|
|
2
2
|
* @module node-opcua-client
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
import type { DataTypeExtractStrategy } from "node-opcua-client-dynamic-extension-object";
|
|
6
|
+
import type { ResponseCallback } from "node-opcua-pseudo-session";
|
|
7
|
+
import type { ApplicationDescription, EndpointDescription } from "node-opcua-service-endpoints";
|
|
8
|
+
import type { CallbackT, ErrorCallback, StatusCode } from "node-opcua-status-code";
|
|
9
|
+
import type {
|
|
10
|
+
FindServersRequestLike,
|
|
11
|
+
GetEndpointsOptions,
|
|
12
|
+
OPCUAClientBase,
|
|
13
|
+
OPCUAClientBaseEvents,
|
|
14
|
+
OPCUAClientBaseOptions
|
|
15
|
+
} from "./client_base";
|
|
16
|
+
import type { ClientSession } from "./client_session";
|
|
17
|
+
import type { ClientSubscription, ClientSubscriptionOptions } from "./client_subscription";
|
|
12
18
|
import { OPCUAClientImpl } from "./private/opcua_client_impl";
|
|
13
|
-
import { UserIdentityInfo } from "./user_identity_info";
|
|
14
|
-
import { DataTypeExtractStrategy } from "node-opcua-client-dynamic-extension-object";
|
|
19
|
+
import type { UserIdentityInfo } from "./user_identity_info";
|
|
15
20
|
|
|
16
21
|
export interface OPCUAClientOptions extends OPCUAClientBaseOptions {
|
|
17
22
|
/**
|
|
@@ -45,10 +50,18 @@ export interface OPCUAClientOptions extends OPCUAClientBaseOptions {
|
|
|
45
50
|
* default value : "Auto" : the client will attempt to extract DataTypeDefinition using the most efficient strategy
|
|
46
51
|
*/
|
|
47
52
|
dataTypeExtractStrategy?: DataTypeExtractStrategy;
|
|
53
|
+
}
|
|
48
54
|
|
|
55
|
+
export interface EndpointWithUserIdentity {
|
|
56
|
+
endpointUrl: string;
|
|
57
|
+
userIdentity: UserIdentityInfo;
|
|
49
58
|
}
|
|
59
|
+
export type WithSessionFunc = (session: ClientSession) => Promise<void>;
|
|
60
|
+
export type WithSessionFuncP<T> = (session: ClientSession) => Promise<T>;
|
|
61
|
+
export type WithSubscriptionFunc = (session: ClientSession, subscription: ClientSubscription) => Promise<void>;
|
|
62
|
+
export type WithSubscriptionFuncP<T> = (session: ClientSession, subscription: ClientSubscription) => Promise<T>;
|
|
50
63
|
|
|
51
|
-
export interface OPCUAClient extends OPCUAClientBase {
|
|
64
|
+
export interface OPCUAClient<Events extends OPCUAClientBaseEvents = OPCUAClientBaseEvents> extends OPCUAClientBase<Events> {
|
|
52
65
|
connect(endpointUrl: string): Promise<void>;
|
|
53
66
|
connect(endpointUrl: string, callback: ErrorCallback): void;
|
|
54
67
|
|
|
@@ -93,18 +106,7 @@ export interface OPCUAClient extends OPCUAClientBase {
|
|
|
93
106
|
|
|
94
107
|
// @private
|
|
95
108
|
createDefaultCertificate(): Promise<void>;
|
|
96
|
-
}
|
|
97
109
|
|
|
98
|
-
export interface EndpointWithUserIdentity {
|
|
99
|
-
endpointUrl: string;
|
|
100
|
-
userIdentity: UserIdentityInfo;
|
|
101
|
-
}
|
|
102
|
-
export type WithSessionFunc = (session: ClientSession) => Promise<void>;
|
|
103
|
-
export type WithSessionFuncP<T> = (session: ClientSession) => Promise<T>;
|
|
104
|
-
export type WithSubscriptionFunc = (session: ClientSession, subscription: ClientSubscription) => Promise<void>;
|
|
105
|
-
export type WithSubscriptionFuncP<T> = (session: ClientSession, subscription: ClientSubscription) => Promise<T>;
|
|
106
|
-
|
|
107
|
-
export interface OPCUAClient {
|
|
108
110
|
/**
|
|
109
111
|
*
|
|
110
112
|
* @param endpointUrl
|
|
@@ -112,7 +114,6 @@ export interface OPCUAClient {
|
|
|
112
114
|
*/
|
|
113
115
|
withSessionAsync<T>(endpointUrl: string | EndpointWithUserIdentity, inner_func: WithSessionFuncP<T>): Promise<T>;
|
|
114
116
|
|
|
115
|
-
|
|
116
117
|
/**
|
|
117
118
|
*
|
|
118
119
|
* @param endpointUrl
|
|
@@ -128,7 +129,7 @@ export interface OPCUAClient {
|
|
|
128
129
|
|
|
129
130
|
export class OPCUAClient {
|
|
130
131
|
public static create(options: OPCUAClientOptions): OPCUAClient {
|
|
131
|
-
return new OPCUAClientImpl(options);
|
|
132
|
+
return new OPCUAClientImpl(options) as unknown as OPCUAClient;
|
|
132
133
|
}
|
|
133
134
|
public static async createSession(
|
|
134
135
|
endpointUrl: string,
|