node-opcua-server 2.71.0 → 2.72.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base_server.d.ts +110 -110
- package/dist/base_server.js +473 -473
- package/dist/factory.d.ts +12 -12
- package/dist/factory.js +23 -23
- package/dist/history_server_capabilities.d.ts +35 -35
- package/dist/history_server_capabilities.js +43 -43
- package/dist/i_channel_data.d.ts +13 -13
- package/dist/i_channel_data.js +2 -2
- package/dist/i_register_server_manager.d.ts +16 -16
- package/dist/i_register_server_manager.js +2 -2
- package/dist/i_server_side_publish_engine.d.ts +36 -36
- package/dist/i_server_side_publish_engine.js +49 -49
- package/dist/i_socket_data.d.ts +11 -11
- package/dist/i_socket_data.js +2 -2
- package/dist/index.d.ts +15 -15
- package/dist/index.js +31 -31
- package/dist/monitored_item.d.ts +177 -177
- package/dist/monitored_item.js +998 -998
- package/dist/node_sampler.d.ts +3 -3
- package/dist/node_sampler.js +75 -75
- package/dist/opcua_server.d.ts +650 -647
- package/dist/opcua_server.js +2392 -2385
- package/dist/opcua_server.js.map +1 -1
- package/dist/queue.d.ts +11 -11
- package/dist/queue.js +71 -71
- package/dist/register_server_manager.d.ts +96 -96
- package/dist/register_server_manager.js +584 -584
- package/dist/register_server_manager_hidden.d.ts +17 -17
- package/dist/register_server_manager_hidden.js +27 -27
- package/dist/register_server_manager_mdns_only.d.ts +22 -22
- package/dist/register_server_manager_mdns_only.js +55 -55
- package/dist/server_capabilities.d.ts +148 -61
- package/dist/server_capabilities.js +91 -108
- package/dist/server_capabilities.js.map +1 -1
- package/dist/server_end_point.d.ts +183 -183
- package/dist/server_end_point.js +817 -816
- package/dist/server_end_point.js.map +1 -1
- package/dist/server_engine.d.ts +317 -316
- package/dist/server_engine.js +1716 -1688
- package/dist/server_engine.js.map +1 -1
- package/dist/server_publish_engine.d.ts +112 -112
- package/dist/server_publish_engine.js +530 -530
- package/dist/server_publish_engine_for_orphan_subscriptions.d.ts +16 -16
- package/dist/server_publish_engine_for_orphan_subscriptions.js +49 -49
- package/dist/server_session.d.ts +181 -181
- package/dist/server_session.js +738 -738
- package/dist/server_session.js.map +1 -1
- package/dist/server_subscription.d.ts +415 -395
- package/dist/server_subscription.js +1334 -1316
- package/dist/server_subscription.js.map +1 -1
- package/dist/sessions_compatible_for_transfer.d.ts +2 -2
- package/dist/sessions_compatible_for_transfer.js +36 -36
- package/dist/user_manager.d.ts +32 -32
- package/dist/user_manager.js +74 -74
- package/dist/user_manager_ua.d.ts +3 -3
- package/dist/user_manager_ua.js +39 -39
- package/dist/validate_filter.d.ts +5 -5
- package/dist/validate_filter.js +60 -60
- package/package.json +34 -34
- package/source/opcua_server.ts +27 -16
- package/source/server_capabilities.ts +178 -91
- package/source/server_end_point.ts +9 -8
- package/source/server_engine.ts +30 -1
- package/source/server_session.ts +1 -0
- package/source/server_subscription.ts +46 -5
package/dist/monitored_item.d.ts
CHANGED
|
@@ -1,177 +1,177 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/**
|
|
4
|
-
* @module node-opcua-server
|
|
5
|
-
*/
|
|
6
|
-
import { EventEmitter } from "events";
|
|
7
|
-
import { BaseNode, SessionContext } from "node-opcua-address-space";
|
|
8
|
-
import { UInt32 } from "node-opcua-basic-types";
|
|
9
|
-
import { NodeClass, QualifiedNameOptions } from "node-opcua-data-model";
|
|
10
|
-
import { AttributeIds } from "node-opcua-data-model";
|
|
11
|
-
import { DataValue } from "node-opcua-data-value";
|
|
12
|
-
import { ExtensionObject } from "node-opcua-extension-object";
|
|
13
|
-
import { NodeId } from "node-opcua-nodeid";
|
|
14
|
-
import { NumericRange } from "node-opcua-numeric-range";
|
|
15
|
-
import { ObjectRegistry } from "node-opcua-object-registry";
|
|
16
|
-
import { TimestampsToReturn } from "node-opcua-service-read";
|
|
17
|
-
import { MonitoredItemModifyResult, MonitoredItemNotification, MonitoringMode, MonitoringParameters } from "node-opcua-service-subscription";
|
|
18
|
-
import { StatusCode } from "node-opcua-status-code";
|
|
19
|
-
import { EventFieldList, MonitoringFilter, ReadValueIdOptions, SubscriptionDiagnosticsDataType } from "node-opcua-types";
|
|
20
|
-
export declare type QueueItem = MonitoredItemNotification | EventFieldList;
|
|
21
|
-
export interface MonitoredItemOptions extends MonitoringParameters {
|
|
22
|
-
monitoringMode: MonitoringMode;
|
|
23
|
-
/**
|
|
24
|
-
* the monitoredItem Id assigned by the server to this monitoredItem.
|
|
25
|
-
*/
|
|
26
|
-
monitoredItemId: number;
|
|
27
|
-
itemToMonitor?: ReadValueIdOptions;
|
|
28
|
-
timestampsToReturn?: TimestampsToReturn;
|
|
29
|
-
filter: ExtensionObject | null;
|
|
30
|
-
/**
|
|
31
|
-
* if discardOldest === true, older items are removed from the queue when queue overflows
|
|
32
|
-
*/
|
|
33
|
-
discardOldest: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* the size of the queue.
|
|
36
|
-
*/
|
|
37
|
-
queueSize: number;
|
|
38
|
-
/**
|
|
39
|
-
* the monitored item sampling interval ..
|
|
40
|
-
*/
|
|
41
|
-
samplingInterval: number;
|
|
42
|
-
/**
|
|
43
|
-
* the client handle
|
|
44
|
-
*/
|
|
45
|
-
clientHandle: number;
|
|
46
|
-
}
|
|
47
|
-
export interface BaseNode2 extends EventEmitter {
|
|
48
|
-
nodeId: NodeId;
|
|
49
|
-
browseName: QualifiedNameOptions;
|
|
50
|
-
nodeClass: NodeClass;
|
|
51
|
-
dataType: NodeId;
|
|
52
|
-
addressSpace: any;
|
|
53
|
-
readAttribute(context: SessionContext | null, attributeId: AttributeIds): DataValue;
|
|
54
|
-
}
|
|
55
|
-
declare type TimerKey = NodeJS.Timer;
|
|
56
|
-
export interface ISubscription {
|
|
57
|
-
$session?: any;
|
|
58
|
-
subscriptionDiagnostics: SubscriptionDiagnosticsDataType;
|
|
59
|
-
getMonitoredItem(monitoredItemId: number): MonitoredItem | null;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* a server side monitored item
|
|
63
|
-
*
|
|
64
|
-
* - Once created, the MonitoredItem will raised an "samplingEvent" event every "samplingInterval" millisecond
|
|
65
|
-
* until {{#crossLink "MonitoredItem/terminate:method"}}{{/crossLink}} is called.
|
|
66
|
-
*
|
|
67
|
-
* - It is up to the event receiver to call {{#crossLink "MonitoredItem/recordValue:method"}}{{/crossLink}}.
|
|
68
|
-
*
|
|
69
|
-
*/
|
|
70
|
-
export declare class MonitoredItem extends EventEmitter {
|
|
71
|
-
get node(): BaseNode | null;
|
|
72
|
-
set node(someNode: BaseNode | null);
|
|
73
|
-
static registry: ObjectRegistry;
|
|
74
|
-
static minimumSamplingInterval: number;
|
|
75
|
-
static defaultSamplingInterval: number;
|
|
76
|
-
static maximumSamplingInterval: number;
|
|
77
|
-
samplingInterval: number;
|
|
78
|
-
monitoredItemId: number;
|
|
79
|
-
overflow: boolean;
|
|
80
|
-
oldDataValue?: DataValue;
|
|
81
|
-
monitoringMode: MonitoringMode;
|
|
82
|
-
timestampsToReturn: TimestampsToReturn;
|
|
83
|
-
itemToMonitor: any;
|
|
84
|
-
filter: MonitoringFilter | null;
|
|
85
|
-
discardOldest: boolean;
|
|
86
|
-
queueSize: number;
|
|
87
|
-
clientHandle: UInt32;
|
|
88
|
-
$subscription?: ISubscription;
|
|
89
|
-
_samplingId?: TimerKey | string;
|
|
90
|
-
samplingFunc: ((this: MonitoredItem, value: DataValue, callback: (err: Error | null, dataValue?: DataValue) => void) => void) | null;
|
|
91
|
-
private _node;
|
|
92
|
-
private queue;
|
|
93
|
-
private _semantic_version;
|
|
94
|
-
private _is_sampling;
|
|
95
|
-
private _on_opcua_event_received_callback;
|
|
96
|
-
private _attribute_changed_callback;
|
|
97
|
-
private _value_changed_callback;
|
|
98
|
-
private _semantic_changed_callback;
|
|
99
|
-
private _on_node_disposed_listener;
|
|
100
|
-
private _linkedItems?;
|
|
101
|
-
private _triggeredNotifications?;
|
|
102
|
-
constructor(options: MonitoredItemOptions);
|
|
103
|
-
setNode(node: BaseNode): void;
|
|
104
|
-
setMonitoringMode(monitoringMode: MonitoringMode): void;
|
|
105
|
-
/**
|
|
106
|
-
* Terminate the MonitoredItem.
|
|
107
|
-
* @method terminate
|
|
108
|
-
*
|
|
109
|
-
* This will stop the internal sampling timer.
|
|
110
|
-
*/
|
|
111
|
-
terminate(): void;
|
|
112
|
-
dispose(): void;
|
|
113
|
-
get isSampling(): boolean;
|
|
114
|
-
toString(): string;
|
|
115
|
-
/**
|
|
116
|
-
* @param dataValue the whole dataValue
|
|
117
|
-
* @param skipChangeTest indicates whether recordValue should not check that dataValue is really
|
|
118
|
-
* different from previous one, ( by checking timestamps but also variant value)
|
|
119
|
-
* @private
|
|
120
|
-
*
|
|
121
|
-
* Notes:
|
|
122
|
-
* - recordValue can only be called within timer event
|
|
123
|
-
* - for performance reason, dataValue may be a shared value with the underlying node,
|
|
124
|
-
* therefore recordValue must clone the dataValue to make sure it retains a snapshot
|
|
125
|
-
* of the contain at the time recordValue was called.
|
|
126
|
-
*
|
|
127
|
-
*/
|
|
128
|
-
recordValue(dataValue: DataValue, skipChangeTest: boolean, indexRange?: NumericRange): void;
|
|
129
|
-
hasLinkItem(linkedMonitoredItemId: number): boolean;
|
|
130
|
-
addLinkItem(linkedMonitoredItemId: number): StatusCode;
|
|
131
|
-
removeLinkItem(linkedMonitoredItemId: number): StatusCode;
|
|
132
|
-
/**
|
|
133
|
-
* @internals
|
|
134
|
-
*/
|
|
135
|
-
private triggerLinkedItems;
|
|
136
|
-
get hasMonitoredItemNotifications(): boolean;
|
|
137
|
-
/**
|
|
138
|
-
* @internals
|
|
139
|
-
*/
|
|
140
|
-
private trigger;
|
|
141
|
-
extractMonitoredItemNotifications(bForce?: boolean): QueueItem[];
|
|
142
|
-
modify(timestampsToReturn: TimestampsToReturn, monitoringParameters: MonitoringParameters): MonitoredItemModifyResult;
|
|
143
|
-
resendInitialValues(): Promise<void>;
|
|
144
|
-
/**
|
|
145
|
-
* @method _on_sampling_timer
|
|
146
|
-
* @private
|
|
147
|
-
* request
|
|
148
|
-
*
|
|
149
|
-
*/
|
|
150
|
-
private _on_sampling_timer;
|
|
151
|
-
private _stop_sampling;
|
|
152
|
-
private _on_value_changed;
|
|
153
|
-
private _on_semantic_changed;
|
|
154
|
-
private _on_opcua_event;
|
|
155
|
-
private _getSession;
|
|
156
|
-
private _start_sampling;
|
|
157
|
-
private __start_sampling;
|
|
158
|
-
private _set_parameters;
|
|
159
|
-
private _setOverflowBit;
|
|
160
|
-
private _enqueue_notification;
|
|
161
|
-
private _makeDataChangeNotification;
|
|
162
|
-
/**
|
|
163
|
-
* @method _enqueue_value
|
|
164
|
-
* @param dataValue {DataValue} the dataValue to enqueue
|
|
165
|
-
* @private
|
|
166
|
-
*/
|
|
167
|
-
private _enqueue_value;
|
|
168
|
-
private _makeEventFieldList;
|
|
169
|
-
private _enqueue_event;
|
|
170
|
-
private _empty_queue;
|
|
171
|
-
private _clear_timer;
|
|
172
|
-
private _set_timer;
|
|
173
|
-
private _adjust_queue_to_match_new_queue_size;
|
|
174
|
-
private _adjust_sampling;
|
|
175
|
-
private _on_node_disposed;
|
|
176
|
-
}
|
|
177
|
-
export {};
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
/**
|
|
4
|
+
* @module node-opcua-server
|
|
5
|
+
*/
|
|
6
|
+
import { EventEmitter } from "events";
|
|
7
|
+
import { BaseNode, SessionContext } from "node-opcua-address-space";
|
|
8
|
+
import { UInt32 } from "node-opcua-basic-types";
|
|
9
|
+
import { NodeClass, QualifiedNameOptions } from "node-opcua-data-model";
|
|
10
|
+
import { AttributeIds } from "node-opcua-data-model";
|
|
11
|
+
import { DataValue } from "node-opcua-data-value";
|
|
12
|
+
import { ExtensionObject } from "node-opcua-extension-object";
|
|
13
|
+
import { NodeId } from "node-opcua-nodeid";
|
|
14
|
+
import { NumericRange } from "node-opcua-numeric-range";
|
|
15
|
+
import { ObjectRegistry } from "node-opcua-object-registry";
|
|
16
|
+
import { TimestampsToReturn } from "node-opcua-service-read";
|
|
17
|
+
import { MonitoredItemModifyResult, MonitoredItemNotification, MonitoringMode, MonitoringParameters } from "node-opcua-service-subscription";
|
|
18
|
+
import { StatusCode } from "node-opcua-status-code";
|
|
19
|
+
import { EventFieldList, MonitoringFilter, ReadValueIdOptions, SubscriptionDiagnosticsDataType } from "node-opcua-types";
|
|
20
|
+
export declare type QueueItem = MonitoredItemNotification | EventFieldList;
|
|
21
|
+
export interface MonitoredItemOptions extends MonitoringParameters {
|
|
22
|
+
monitoringMode: MonitoringMode;
|
|
23
|
+
/**
|
|
24
|
+
* the monitoredItem Id assigned by the server to this monitoredItem.
|
|
25
|
+
*/
|
|
26
|
+
monitoredItemId: number;
|
|
27
|
+
itemToMonitor?: ReadValueIdOptions;
|
|
28
|
+
timestampsToReturn?: TimestampsToReturn;
|
|
29
|
+
filter: ExtensionObject | null;
|
|
30
|
+
/**
|
|
31
|
+
* if discardOldest === true, older items are removed from the queue when queue overflows
|
|
32
|
+
*/
|
|
33
|
+
discardOldest: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* the size of the queue.
|
|
36
|
+
*/
|
|
37
|
+
queueSize: number;
|
|
38
|
+
/**
|
|
39
|
+
* the monitored item sampling interval ..
|
|
40
|
+
*/
|
|
41
|
+
samplingInterval: number;
|
|
42
|
+
/**
|
|
43
|
+
* the client handle
|
|
44
|
+
*/
|
|
45
|
+
clientHandle: number;
|
|
46
|
+
}
|
|
47
|
+
export interface BaseNode2 extends EventEmitter {
|
|
48
|
+
nodeId: NodeId;
|
|
49
|
+
browseName: QualifiedNameOptions;
|
|
50
|
+
nodeClass: NodeClass;
|
|
51
|
+
dataType: NodeId;
|
|
52
|
+
addressSpace: any;
|
|
53
|
+
readAttribute(context: SessionContext | null, attributeId: AttributeIds): DataValue;
|
|
54
|
+
}
|
|
55
|
+
declare type TimerKey = NodeJS.Timer;
|
|
56
|
+
export interface ISubscription {
|
|
57
|
+
$session?: any;
|
|
58
|
+
subscriptionDiagnostics: SubscriptionDiagnosticsDataType;
|
|
59
|
+
getMonitoredItem(monitoredItemId: number): MonitoredItem | null;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* a server side monitored item
|
|
63
|
+
*
|
|
64
|
+
* - Once created, the MonitoredItem will raised an "samplingEvent" event every "samplingInterval" millisecond
|
|
65
|
+
* until {{#crossLink "MonitoredItem/terminate:method"}}{{/crossLink}} is called.
|
|
66
|
+
*
|
|
67
|
+
* - It is up to the event receiver to call {{#crossLink "MonitoredItem/recordValue:method"}}{{/crossLink}}.
|
|
68
|
+
*
|
|
69
|
+
*/
|
|
70
|
+
export declare class MonitoredItem extends EventEmitter {
|
|
71
|
+
get node(): BaseNode | null;
|
|
72
|
+
set node(someNode: BaseNode | null);
|
|
73
|
+
static registry: ObjectRegistry;
|
|
74
|
+
static minimumSamplingInterval: number;
|
|
75
|
+
static defaultSamplingInterval: number;
|
|
76
|
+
static maximumSamplingInterval: number;
|
|
77
|
+
samplingInterval: number;
|
|
78
|
+
monitoredItemId: number;
|
|
79
|
+
overflow: boolean;
|
|
80
|
+
oldDataValue?: DataValue;
|
|
81
|
+
monitoringMode: MonitoringMode;
|
|
82
|
+
timestampsToReturn: TimestampsToReturn;
|
|
83
|
+
itemToMonitor: any;
|
|
84
|
+
filter: MonitoringFilter | null;
|
|
85
|
+
discardOldest: boolean;
|
|
86
|
+
queueSize: number;
|
|
87
|
+
clientHandle: UInt32;
|
|
88
|
+
$subscription?: ISubscription;
|
|
89
|
+
_samplingId?: TimerKey | string;
|
|
90
|
+
samplingFunc: ((this: MonitoredItem, value: DataValue, callback: (err: Error | null, dataValue?: DataValue) => void) => void) | null;
|
|
91
|
+
private _node;
|
|
92
|
+
private queue;
|
|
93
|
+
private _semantic_version;
|
|
94
|
+
private _is_sampling;
|
|
95
|
+
private _on_opcua_event_received_callback;
|
|
96
|
+
private _attribute_changed_callback;
|
|
97
|
+
private _value_changed_callback;
|
|
98
|
+
private _semantic_changed_callback;
|
|
99
|
+
private _on_node_disposed_listener;
|
|
100
|
+
private _linkedItems?;
|
|
101
|
+
private _triggeredNotifications?;
|
|
102
|
+
constructor(options: MonitoredItemOptions);
|
|
103
|
+
setNode(node: BaseNode): void;
|
|
104
|
+
setMonitoringMode(monitoringMode: MonitoringMode): void;
|
|
105
|
+
/**
|
|
106
|
+
* Terminate the MonitoredItem.
|
|
107
|
+
* @method terminate
|
|
108
|
+
*
|
|
109
|
+
* This will stop the internal sampling timer.
|
|
110
|
+
*/
|
|
111
|
+
terminate(): void;
|
|
112
|
+
dispose(): void;
|
|
113
|
+
get isSampling(): boolean;
|
|
114
|
+
toString(): string;
|
|
115
|
+
/**
|
|
116
|
+
* @param dataValue the whole dataValue
|
|
117
|
+
* @param skipChangeTest indicates whether recordValue should not check that dataValue is really
|
|
118
|
+
* different from previous one, ( by checking timestamps but also variant value)
|
|
119
|
+
* @private
|
|
120
|
+
*
|
|
121
|
+
* Notes:
|
|
122
|
+
* - recordValue can only be called within timer event
|
|
123
|
+
* - for performance reason, dataValue may be a shared value with the underlying node,
|
|
124
|
+
* therefore recordValue must clone the dataValue to make sure it retains a snapshot
|
|
125
|
+
* of the contain at the time recordValue was called.
|
|
126
|
+
*
|
|
127
|
+
*/
|
|
128
|
+
recordValue(dataValue: DataValue, skipChangeTest: boolean, indexRange?: NumericRange): void;
|
|
129
|
+
hasLinkItem(linkedMonitoredItemId: number): boolean;
|
|
130
|
+
addLinkItem(linkedMonitoredItemId: number): StatusCode;
|
|
131
|
+
removeLinkItem(linkedMonitoredItemId: number): StatusCode;
|
|
132
|
+
/**
|
|
133
|
+
* @internals
|
|
134
|
+
*/
|
|
135
|
+
private triggerLinkedItems;
|
|
136
|
+
get hasMonitoredItemNotifications(): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* @internals
|
|
139
|
+
*/
|
|
140
|
+
private trigger;
|
|
141
|
+
extractMonitoredItemNotifications(bForce?: boolean): QueueItem[];
|
|
142
|
+
modify(timestampsToReturn: TimestampsToReturn, monitoringParameters: MonitoringParameters): MonitoredItemModifyResult;
|
|
143
|
+
resendInitialValues(): Promise<void>;
|
|
144
|
+
/**
|
|
145
|
+
* @method _on_sampling_timer
|
|
146
|
+
* @private
|
|
147
|
+
* request
|
|
148
|
+
*
|
|
149
|
+
*/
|
|
150
|
+
private _on_sampling_timer;
|
|
151
|
+
private _stop_sampling;
|
|
152
|
+
private _on_value_changed;
|
|
153
|
+
private _on_semantic_changed;
|
|
154
|
+
private _on_opcua_event;
|
|
155
|
+
private _getSession;
|
|
156
|
+
private _start_sampling;
|
|
157
|
+
private __start_sampling;
|
|
158
|
+
private _set_parameters;
|
|
159
|
+
private _setOverflowBit;
|
|
160
|
+
private _enqueue_notification;
|
|
161
|
+
private _makeDataChangeNotification;
|
|
162
|
+
/**
|
|
163
|
+
* @method _enqueue_value
|
|
164
|
+
* @param dataValue {DataValue} the dataValue to enqueue
|
|
165
|
+
* @private
|
|
166
|
+
*/
|
|
167
|
+
private _enqueue_value;
|
|
168
|
+
private _makeEventFieldList;
|
|
169
|
+
private _enqueue_event;
|
|
170
|
+
private _empty_queue;
|
|
171
|
+
private _clear_timer;
|
|
172
|
+
private _set_timer;
|
|
173
|
+
private _adjust_queue_to_match_new_queue_size;
|
|
174
|
+
private _adjust_sampling;
|
|
175
|
+
private _on_node_disposed;
|
|
176
|
+
}
|
|
177
|
+
export {};
|