node-opcua-client-proxy 2.97.0 → 2.98.1

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.
@@ -1,262 +1,262 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UAProxyManager = void 0;
4
- const async = require("async");
5
- const node_opcua_assert_1 = require("node-opcua-assert");
6
- const node_opcua_data_model_1 = require("node-opcua-data-model");
7
- const node_opcua_nodeid_1 = require("node-opcua-nodeid");
8
- const node_opcua_data_value_1 = require("node-opcua-data-value");
9
- const node_opcua_status_code_1 = require("node-opcua-status-code");
10
- const object_explorer_1 = require("./object_explorer");
11
- const proxy_1 = require("./proxy");
12
- const proxy_object_1 = require("./proxy_object");
13
- const state_machine_proxy_1 = require("./state_machine_proxy");
14
- function getObject(proxyManager, nodeId, options, callback) {
15
- const session = proxyManager.session;
16
- nodeId = (0, node_opcua_nodeid_1.coerceNodeId)(nodeId);
17
- if (nodeId.isEmpty()) {
18
- setImmediate(() => {
19
- callback(new Error(" Invalid empty node in getObject"));
20
- });
21
- return;
22
- }
23
- const nodesToRead = [
24
- {
25
- attributeId: node_opcua_data_model_1.AttributeIds.BrowseName,
26
- nodeId
27
- },
28
- {
29
- attributeId: node_opcua_data_model_1.AttributeIds.Description,
30
- nodeId
31
- },
32
- {
33
- attributeId: node_opcua_data_model_1.AttributeIds.NodeClass,
34
- nodeId
35
- }
36
- ];
37
- function read_accessLevels(clientObject, callback) {
38
- const nodesToRead = [
39
- {
40
- attributeId: node_opcua_data_model_1.AttributeIds.Value,
41
- nodeId
42
- },
43
- {
44
- attributeId: node_opcua_data_model_1.AttributeIds.UserAccessLevel,
45
- nodeId
46
- },
47
- {
48
- attributeId: node_opcua_data_model_1.AttributeIds.AccessLevel,
49
- nodeId
50
- }
51
- ];
52
- session.read(nodesToRead, (err, dataValues) => {
53
- if (err) {
54
- return callback(err);
55
- }
56
- dataValues = dataValues || [];
57
- if (dataValues[0].statusCode.isGood()) {
58
- clientObject.dataValue = dataValues[0].value;
59
- }
60
- if (dataValues[1].statusCode.isGood()) {
61
- clientObject.userAccessLevel = (0, node_opcua_data_model_1.coerceAccessLevelFlag)(dataValues[1].value.value);
62
- }
63
- if (dataValues[2].statusCode.isGood()) {
64
- clientObject.accessLevel = (0, node_opcua_data_model_1.coerceAccessLevelFlag)(dataValues[2].value.value);
65
- }
66
- callback(err);
67
- });
68
- }
69
- let clientObject;
70
- async.series([
71
- (callback) => {
72
- // readAttributes like browseName and references
73
- session.read(nodesToRead, (err, dataValues) => {
74
- if (!err) {
75
- dataValues = dataValues;
76
- if (dataValues[0].statusCode.equals(node_opcua_status_code_1.StatusCodes.BadNodeIdUnknown)) {
77
- // xx console.log(" INVALID NODE ", nodeId.toString());
78
- return callback(new Error("Invalid Node " + nodeId.toString()));
79
- }
80
- clientObject = new proxy_object_1.ProxyObject(proxyManager, nodeId);
81
- /// x console.log("xxxx ,s",results.map(function(a){ return a.toString();}));
82
- clientObject.browseName = dataValues[0].value.value;
83
- clientObject.description = dataValues[1].value ? dataValues[1].value.value : "";
84
- clientObject.nodeClass = dataValues[2].value.value;
85
- // xx console.log("xxx nodeClass = ",clientObject.nodeClass.toString());
86
- if (clientObject.nodeClass === node_opcua_data_model_1.NodeClass.Variable) {
87
- return read_accessLevels(clientObject, callback);
88
- }
89
- }
90
- callback(err);
91
- });
92
- },
93
- (callback) => {
94
- // install monitored item
95
- if (clientObject.nodeClass === node_opcua_data_model_1.NodeClass.Variable) {
96
- /*console.log(
97
- "xxxx -> monitoring",
98
- clientObject.nodeId.toString(),
99
- clientObject.nodeClass.toString(),
100
- clientObject.browseName.toString()
101
- );
102
- */
103
- return proxyManager._monitor_value(clientObject, callback);
104
- }
105
- callback();
106
- },
107
- (callback) => {
108
- (0, object_explorer_1.readUAStructure)(proxyManager, clientObject, callback);
109
- }
110
- //
111
- ], (err) => {
112
- // istanbul ignore next
113
- if (err) {
114
- return callback(err);
115
- }
116
- callback(null, clientObject);
117
- });
118
- }
119
- // tslint:disable-next-line: max-classes-per-file
120
- class UAProxyManager {
121
- constructor(session) {
122
- this.session = session;
123
- this._map = {};
124
- // create a subscription
125
- }
126
- start(...args) {
127
- const callback = args[0];
128
- const createSubscriptionRequest = {
129
- maxNotificationsPerPublish: 1000,
130
- priority: 10,
131
- publishingEnabled: true,
132
- requestedLifetimeCount: 6000,
133
- requestedMaxKeepAliveCount: 100,
134
- requestedPublishingInterval: 100
135
- };
136
- this.session.createSubscription2(createSubscriptionRequest, (err, subscription) => {
137
- if (err) {
138
- return callback(err);
139
- }
140
- this.subscription = subscription;
141
- this.subscription.on("terminated", () => {
142
- this.subscription = undefined;
143
- });
144
- callback();
145
- });
146
- }
147
- stop(...args) {
148
- const callback = args[0];
149
- if (this.subscription) {
150
- this.subscription.terminate(() => {
151
- this.subscription = undefined;
152
- callback();
153
- });
154
- }
155
- else {
156
- callback(new Error("UAProxyManager already stopped ?"));
157
- }
158
- }
159
- getObject(...args) {
160
- const nodeId = args[0];
161
- const callback = args[1];
162
- let options = {};
163
- setImmediate(() => {
164
- options = options || {};
165
- options.depth = options.depth || 1;
166
- const key = nodeId.toString();
167
- // the object already exist in the map ?
168
- if (Object.prototype.hasOwnProperty.call(this._map, key)) {
169
- return callback(null, this._map[key]);
170
- }
171
- getObject(this, nodeId, options, (err, obj) => {
172
- if (!err) {
173
- this._map[key] = obj;
174
- }
175
- callback(err, obj);
176
- });
177
- });
178
- }
179
- _monitor_value(proxyObject, callback) {
180
- if (!this.subscription) {
181
- // debugLog("cannot monitor _monitor_value: no subscription");
182
- // some server do not provide subscription support, do not treat this as an error.
183
- return callback(); // new Error("No subscription"));
184
- }
185
- const itemToMonitor = {
186
- // ReadValueId
187
- attributeId: node_opcua_data_model_1.AttributeIds.Value,
188
- nodeId: proxyObject.nodeId
189
- };
190
- const monitoringParameters = {
191
- // MonitoringParameters
192
- discardOldest: true,
193
- queueSize: 10,
194
- samplingInterval: 0 /* event-based */
195
- };
196
- const requestedParameters = node_opcua_data_value_1.TimestampsToReturn.Both;
197
- this.subscription.monitor(itemToMonitor, monitoringParameters, requestedParameters, (err, monitoredItem) => {
198
- Object.defineProperty(proxyObject, "__monitoredItem", { value: monitoredItem, enumerable: false });
199
- proxyObject.__monitoredItem.on("changed", (dataValue) => {
200
- proxyObject.dataValue = dataValue;
201
- proxyObject.emit("value_changed", dataValue);
202
- });
203
- proxyObject.__monitoredItem.on("err", (err) => {
204
- var _a;
205
- // tslint:disable-next-line: no-console
206
- console.log("Proxy: cannot monitor variable ", (_a = itemToMonitor.nodeId) === null || _a === void 0 ? void 0 : _a.toString(), err.message);
207
- });
208
- callback(err);
209
- });
210
- }
211
- _monitor_execution_flag(proxyObject, callback) {
212
- // note : proxyObject must wrap a method
213
- (0, node_opcua_assert_1.assert)(proxyObject.nodeId instanceof node_opcua_nodeid_1.NodeId);
214
- if (!this.subscription) {
215
- // some server do not provide subscription support, do not treat this as an error.
216
- return callback(); // new Error("No subscription"));
217
- }
218
- const itemToMonitor = {
219
- // ReadValueId
220
- attributeId: node_opcua_data_model_1.AttributeIds.Executable,
221
- nodeId: proxyObject.nodeId
222
- };
223
- const monitoringParameters = {
224
- // MonitoringParameters
225
- discardOldest: true,
226
- queueSize: 10,
227
- samplingInterval: 0 /* event-based */
228
- };
229
- const requestedParameters = node_opcua_data_value_1.TimestampsToReturn.Neither;
230
- this.subscription.monitor(itemToMonitor, monitoringParameters, requestedParameters, (err, monitoredItem) => {
231
- Object.defineProperty(proxyObject, "__monitoredItem_execution_flag", {
232
- value: monitoredItem,
233
- enumerable: false
234
- });
235
- proxyObject.__monitoredItem_execution_flag.on("changed", (dataValue) => {
236
- proxyObject.executableFlag = dataValue.value.value;
237
- });
238
- callback(err);
239
- });
240
- }
241
- getStateMachineType(nodeId, callback) {
242
- if (typeof nodeId === "string") {
243
- const org_nodeId = nodeId;
244
- nodeId = (0, proxy_1.makeRefId)(nodeId);
245
- }
246
- this.getObject(nodeId, (err, obj) => {
247
- // read fromState and toState Reference on
248
- let stateMachineType;
249
- if (!err) {
250
- stateMachineType = new state_machine_proxy_1.ProxyStateMachineType(obj);
251
- }
252
- callback(err, stateMachineType);
253
- });
254
- }
255
- }
256
- exports.UAProxyManager = UAProxyManager;
257
- // tslint:disable-next-line:no-var-requires
258
- const thenify = require("thenify");
259
- UAProxyManager.prototype.start = thenify.withCallback(UAProxyManager.prototype.start);
260
- UAProxyManager.prototype.stop = thenify.withCallback(UAProxyManager.prototype.stop);
261
- UAProxyManager.prototype.getObject = thenify.withCallback(UAProxyManager.prototype.getObject);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UAProxyManager = void 0;
4
+ const async = require("async");
5
+ const node_opcua_assert_1 = require("node-opcua-assert");
6
+ const node_opcua_data_model_1 = require("node-opcua-data-model");
7
+ const node_opcua_nodeid_1 = require("node-opcua-nodeid");
8
+ const node_opcua_data_value_1 = require("node-opcua-data-value");
9
+ const node_opcua_status_code_1 = require("node-opcua-status-code");
10
+ const object_explorer_1 = require("./object_explorer");
11
+ const proxy_1 = require("./proxy");
12
+ const proxy_object_1 = require("./proxy_object");
13
+ const state_machine_proxy_1 = require("./state_machine_proxy");
14
+ function getObject(proxyManager, nodeId, options, callback) {
15
+ const session = proxyManager.session;
16
+ nodeId = (0, node_opcua_nodeid_1.coerceNodeId)(nodeId);
17
+ if (nodeId.isEmpty()) {
18
+ setImmediate(() => {
19
+ callback(new Error(" Invalid empty node in getObject"));
20
+ });
21
+ return;
22
+ }
23
+ const nodesToRead = [
24
+ {
25
+ attributeId: node_opcua_data_model_1.AttributeIds.BrowseName,
26
+ nodeId
27
+ },
28
+ {
29
+ attributeId: node_opcua_data_model_1.AttributeIds.Description,
30
+ nodeId
31
+ },
32
+ {
33
+ attributeId: node_opcua_data_model_1.AttributeIds.NodeClass,
34
+ nodeId
35
+ }
36
+ ];
37
+ function read_accessLevels(clientObject, callback) {
38
+ const nodesToRead = [
39
+ {
40
+ attributeId: node_opcua_data_model_1.AttributeIds.Value,
41
+ nodeId
42
+ },
43
+ {
44
+ attributeId: node_opcua_data_model_1.AttributeIds.UserAccessLevel,
45
+ nodeId
46
+ },
47
+ {
48
+ attributeId: node_opcua_data_model_1.AttributeIds.AccessLevel,
49
+ nodeId
50
+ }
51
+ ];
52
+ session.read(nodesToRead, (err, dataValues) => {
53
+ if (err) {
54
+ return callback(err);
55
+ }
56
+ dataValues = dataValues || [];
57
+ if (dataValues[0].statusCode.isGood()) {
58
+ clientObject.dataValue = dataValues[0].value;
59
+ }
60
+ if (dataValues[1].statusCode.isGood()) {
61
+ clientObject.userAccessLevel = (0, node_opcua_data_model_1.coerceAccessLevelFlag)(dataValues[1].value.value);
62
+ }
63
+ if (dataValues[2].statusCode.isGood()) {
64
+ clientObject.accessLevel = (0, node_opcua_data_model_1.coerceAccessLevelFlag)(dataValues[2].value.value);
65
+ }
66
+ callback(err);
67
+ });
68
+ }
69
+ let clientObject;
70
+ async.series([
71
+ (callback) => {
72
+ // readAttributes like browseName and references
73
+ session.read(nodesToRead, (err, dataValues) => {
74
+ if (!err) {
75
+ dataValues = dataValues;
76
+ if (dataValues[0].statusCode.equals(node_opcua_status_code_1.StatusCodes.BadNodeIdUnknown)) {
77
+ // xx console.log(" INVALID NODE ", nodeId.toString());
78
+ return callback(new Error("Invalid Node " + nodeId.toString()));
79
+ }
80
+ clientObject = new proxy_object_1.ProxyObject(proxyManager, nodeId);
81
+ /// x console.log("xxxx ,s",results.map(function(a){ return a.toString();}));
82
+ clientObject.browseName = dataValues[0].value.value;
83
+ clientObject.description = dataValues[1].value ? dataValues[1].value.value : "";
84
+ clientObject.nodeClass = dataValues[2].value.value;
85
+ // xx console.log("xxx nodeClass = ",clientObject.nodeClass.toString());
86
+ if (clientObject.nodeClass === node_opcua_data_model_1.NodeClass.Variable) {
87
+ return read_accessLevels(clientObject, callback);
88
+ }
89
+ }
90
+ callback(err);
91
+ });
92
+ },
93
+ (callback) => {
94
+ // install monitored item
95
+ if (clientObject.nodeClass === node_opcua_data_model_1.NodeClass.Variable) {
96
+ /*console.log(
97
+ "xxxx -> monitoring",
98
+ clientObject.nodeId.toString(),
99
+ clientObject.nodeClass.toString(),
100
+ clientObject.browseName.toString()
101
+ );
102
+ */
103
+ return proxyManager._monitor_value(clientObject, callback);
104
+ }
105
+ callback();
106
+ },
107
+ (callback) => {
108
+ (0, object_explorer_1.readUAStructure)(proxyManager, clientObject, callback);
109
+ }
110
+ //
111
+ ], (err) => {
112
+ // istanbul ignore next
113
+ if (err) {
114
+ return callback(err);
115
+ }
116
+ callback(null, clientObject);
117
+ });
118
+ }
119
+ // tslint:disable-next-line: max-classes-per-file
120
+ class UAProxyManager {
121
+ constructor(session) {
122
+ this.session = session;
123
+ this._map = {};
124
+ // create a subscription
125
+ }
126
+ start(...args) {
127
+ const callback = args[0];
128
+ const createSubscriptionRequest = {
129
+ maxNotificationsPerPublish: 1000,
130
+ priority: 10,
131
+ publishingEnabled: true,
132
+ requestedLifetimeCount: 6000,
133
+ requestedMaxKeepAliveCount: 100,
134
+ requestedPublishingInterval: 100
135
+ };
136
+ this.session.createSubscription2(createSubscriptionRequest, (err, subscription) => {
137
+ if (err) {
138
+ return callback(err);
139
+ }
140
+ this.subscription = subscription;
141
+ this.subscription.on("terminated", () => {
142
+ this.subscription = undefined;
143
+ });
144
+ callback();
145
+ });
146
+ }
147
+ stop(...args) {
148
+ const callback = args[0];
149
+ if (this.subscription) {
150
+ this.subscription.terminate(() => {
151
+ this.subscription = undefined;
152
+ callback();
153
+ });
154
+ }
155
+ else {
156
+ callback(new Error("UAProxyManager already stopped ?"));
157
+ }
158
+ }
159
+ getObject(...args) {
160
+ const nodeId = args[0];
161
+ const callback = args[1];
162
+ let options = {};
163
+ setImmediate(() => {
164
+ options = options || {};
165
+ options.depth = options.depth || 1;
166
+ const key = nodeId.toString();
167
+ // the object already exist in the map ?
168
+ if (Object.prototype.hasOwnProperty.call(this._map, key)) {
169
+ return callback(null, this._map[key]);
170
+ }
171
+ getObject(this, nodeId, options, (err, obj) => {
172
+ if (!err) {
173
+ this._map[key] = obj;
174
+ }
175
+ callback(err, obj);
176
+ });
177
+ });
178
+ }
179
+ _monitor_value(proxyObject, callback) {
180
+ if (!this.subscription) {
181
+ // debugLog("cannot monitor _monitor_value: no subscription");
182
+ // some server do not provide subscription support, do not treat this as an error.
183
+ return callback(); // new Error("No subscription"));
184
+ }
185
+ const itemToMonitor = {
186
+ // ReadValueId
187
+ attributeId: node_opcua_data_model_1.AttributeIds.Value,
188
+ nodeId: proxyObject.nodeId
189
+ };
190
+ const monitoringParameters = {
191
+ // MonitoringParameters
192
+ discardOldest: true,
193
+ queueSize: 10,
194
+ samplingInterval: 0 /* event-based */
195
+ };
196
+ const requestedParameters = node_opcua_data_value_1.TimestampsToReturn.Both;
197
+ this.subscription.monitor(itemToMonitor, monitoringParameters, requestedParameters, (err, monitoredItem) => {
198
+ Object.defineProperty(proxyObject, "__monitoredItem", { value: monitoredItem, enumerable: false });
199
+ proxyObject.__monitoredItem.on("changed", (dataValue) => {
200
+ proxyObject.dataValue = dataValue;
201
+ proxyObject.emit("value_changed", dataValue);
202
+ });
203
+ proxyObject.__monitoredItem.on("err", (err) => {
204
+ var _a;
205
+ // tslint:disable-next-line: no-console
206
+ console.log("Proxy: cannot monitor variable ", (_a = itemToMonitor.nodeId) === null || _a === void 0 ? void 0 : _a.toString(), err.message);
207
+ });
208
+ callback(err);
209
+ });
210
+ }
211
+ _monitor_execution_flag(proxyObject, callback) {
212
+ // note : proxyObject must wrap a method
213
+ (0, node_opcua_assert_1.assert)(proxyObject.nodeId instanceof node_opcua_nodeid_1.NodeId);
214
+ if (!this.subscription) {
215
+ // some server do not provide subscription support, do not treat this as an error.
216
+ return callback(); // new Error("No subscription"));
217
+ }
218
+ const itemToMonitor = {
219
+ // ReadValueId
220
+ attributeId: node_opcua_data_model_1.AttributeIds.Executable,
221
+ nodeId: proxyObject.nodeId
222
+ };
223
+ const monitoringParameters = {
224
+ // MonitoringParameters
225
+ discardOldest: true,
226
+ queueSize: 10,
227
+ samplingInterval: 0 /* event-based */
228
+ };
229
+ const requestedParameters = node_opcua_data_value_1.TimestampsToReturn.Neither;
230
+ this.subscription.monitor(itemToMonitor, monitoringParameters, requestedParameters, (err, monitoredItem) => {
231
+ Object.defineProperty(proxyObject, "__monitoredItem_execution_flag", {
232
+ value: monitoredItem,
233
+ enumerable: false
234
+ });
235
+ proxyObject.__monitoredItem_execution_flag.on("changed", (dataValue) => {
236
+ proxyObject.executableFlag = dataValue.value.value;
237
+ });
238
+ callback(err);
239
+ });
240
+ }
241
+ getStateMachineType(nodeId, callback) {
242
+ if (typeof nodeId === "string") {
243
+ const org_nodeId = nodeId;
244
+ nodeId = (0, proxy_1.makeRefId)(nodeId);
245
+ }
246
+ this.getObject(nodeId, (err, obj) => {
247
+ // read fromState and toState Reference on
248
+ let stateMachineType;
249
+ if (!err) {
250
+ stateMachineType = new state_machine_proxy_1.ProxyStateMachineType(obj);
251
+ }
252
+ callback(err, stateMachineType);
253
+ });
254
+ }
255
+ }
256
+ exports.UAProxyManager = UAProxyManager;
257
+ // tslint:disable-next-line:no-var-requires
258
+ const thenify = require("thenify");
259
+ UAProxyManager.prototype.start = thenify.withCallback(UAProxyManager.prototype.start);
260
+ UAProxyManager.prototype.stop = thenify.withCallback(UAProxyManager.prototype.stop);
261
+ UAProxyManager.prototype.getObject = thenify.withCallback(UAProxyManager.prototype.getObject);
262
262
  //# sourceMappingURL=proxy_manager.js.map
@@ -1,6 +1,6 @@
1
- import { NodeId } from "node-opcua-nodeid";
2
- import { ProxyBaseNode } from "./proxy_base_node";
3
- import { UAProxyManager } from "./proxy_manager";
4
- export declare class ProxyObject extends ProxyBaseNode {
5
- constructor(proxyManager: UAProxyManager, nodeId: NodeId);
6
- }
1
+ import { NodeId } from "node-opcua-nodeid";
2
+ import { ProxyBaseNode } from "./proxy_base_node";
3
+ import { UAProxyManager } from "./proxy_manager";
4
+ export declare class ProxyObject extends ProxyBaseNode {
5
+ constructor(proxyManager: UAProxyManager, nodeId: NodeId);
6
+ }
@@ -1,15 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProxyObject = void 0;
4
- /**
5
- * @module node-opcua-client-proxy
6
- */
7
- const node_opcua_data_model_1 = require("node-opcua-data-model");
8
- const proxy_base_node_1 = require("./proxy_base_node");
9
- class ProxyObject extends proxy_base_node_1.ProxyBaseNode {
10
- constructor(proxyManager, nodeId) {
11
- super(proxyManager, nodeId, node_opcua_data_model_1.NodeClass.Object);
12
- }
13
- }
14
- exports.ProxyObject = ProxyObject;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProxyObject = void 0;
4
+ /**
5
+ * @module node-opcua-client-proxy
6
+ */
7
+ const node_opcua_data_model_1 = require("node-opcua-data-model");
8
+ const proxy_base_node_1 = require("./proxy_base_node");
9
+ class ProxyObject extends proxy_base_node_1.ProxyBaseNode {
10
+ constructor(proxyManager, nodeId) {
11
+ super(proxyManager, nodeId, node_opcua_data_model_1.NodeClass.Object);
12
+ }
13
+ }
14
+ exports.ProxyObject = ProxyObject;
15
15
  //# sourceMappingURL=proxy_object.js.map
@@ -1,14 +1,14 @@
1
- /**
2
- * @module node-opcua-client-proxy
3
- */
4
- import { NodeId } from "node-opcua-nodeid";
5
- import { ProxyNode } from "./proxy_transition";
6
- export declare class ProxyState {
7
- private _node;
8
- constructor(proxyNode: ProxyNode);
9
- get browseName(): string;
10
- get stateNumber(): string;
11
- get nodeId(): NodeId;
12
- toString(): string;
13
- }
14
- export declare function makeProxyState(node: ProxyNode): ProxyState;
1
+ /**
2
+ * @module node-opcua-client-proxy
3
+ */
4
+ import { NodeId } from "node-opcua-nodeid";
5
+ import { ProxyNode } from "./proxy_transition";
6
+ export declare class ProxyState {
7
+ private _node;
8
+ constructor(proxyNode: ProxyNode);
9
+ get browseName(): string;
10
+ get stateNumber(): string;
11
+ get nodeId(): NodeId;
12
+ toString(): string;
13
+ }
14
+ export declare function makeProxyState(node: ProxyNode): ProxyState;
@@ -1,28 +1,28 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeProxyState = exports.ProxyState = void 0;
4
- class ProxyState {
5
- constructor(proxyNode) {
6
- this._node = proxyNode;
7
- }
8
- get browseName() {
9
- return this._node.browseName.toString();
10
- }
11
- get stateNumber() {
12
- // note stateNumber has no real dataValue
13
- return this._node.stateNumber.nodeId.value.toString();
14
- }
15
- get nodeId() {
16
- // note stateNumber has no real dataValue
17
- return this._node.nodeId;
18
- }
19
- toString() {
20
- return "state " + this.browseName + " stateNumber :" + this.stateNumber.toString();
21
- }
22
- }
23
- exports.ProxyState = ProxyState;
24
- function makeProxyState(node) {
25
- return new ProxyState(node);
26
- }
27
- exports.makeProxyState = makeProxyState;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeProxyState = exports.ProxyState = void 0;
4
+ class ProxyState {
5
+ constructor(proxyNode) {
6
+ this._node = proxyNode;
7
+ }
8
+ get browseName() {
9
+ return this._node.browseName.toString();
10
+ }
11
+ get stateNumber() {
12
+ // note stateNumber has no real dataValue
13
+ return this._node.stateNumber.nodeId.value.toString();
14
+ }
15
+ get nodeId() {
16
+ // note stateNumber has no real dataValue
17
+ return this._node.nodeId;
18
+ }
19
+ toString() {
20
+ return "state " + this.browseName + " stateNumber :" + this.stateNumber.toString();
21
+ }
22
+ }
23
+ exports.ProxyState = ProxyState;
24
+ function makeProxyState(node) {
25
+ return new ProxyState(node);
26
+ }
27
+ exports.makeProxyState = makeProxyState;
28
28
  //# sourceMappingURL=proxy_state.js.map