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