node-opcua-address-space-base 2.64.0 → 2.64.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.
Files changed (47) hide show
  1. package/dist/address_space.d.ts +167 -167
  2. package/dist/address_space.js +2 -2
  3. package/dist/base_node.d.ts +186 -186
  4. package/dist/base_node.js +3 -3
  5. package/dist/bind_variable.d.ts +52 -52
  6. package/dist/bind_variable.js +2 -2
  7. package/dist/clone_options.d.ts +43 -43
  8. package/dist/clone_options.js +18 -18
  9. package/dist/continuation_point.d.ts +2 -2
  10. package/dist/continuation_point.js +2 -2
  11. package/dist/index.d.ts +21 -21
  12. package/dist/index.js +33 -33
  13. package/dist/instantiate_options.d.ts +80 -80
  14. package/dist/instantiate_options.js +2 -2
  15. package/dist/modelling_rule_type.d.ts +1 -1
  16. package/dist/modelling_rule_type.js +2 -2
  17. package/dist/namespace.d.ts +279 -279
  18. package/dist/namespace.js +2 -2
  19. package/dist/session_context.d.ts +51 -51
  20. package/dist/session_context.js +2 -2
  21. package/dist/ua_data_type.d.ts +32 -32
  22. package/dist/ua_data_type.js +2 -2
  23. package/dist/ua_dynamic_variable_array.d.ts +12 -12
  24. package/dist/ua_dynamic_variable_array.js +2 -2
  25. package/dist/ua_event_type.d.ts +21 -21
  26. package/dist/ua_event_type.js +2 -2
  27. package/dist/ua_method.d.ts +41 -41
  28. package/dist/ua_method.js +4 -4
  29. package/dist/ua_object.d.ts +124 -124
  30. package/dist/ua_object.js +2 -2
  31. package/dist/ua_object_type.d.ts +27 -27
  32. package/dist/ua_object_type.js +2 -2
  33. package/dist/ua_property.d.ts +16 -16
  34. package/dist/ua_property.js +2 -2
  35. package/dist/ua_reference.d.ts +12 -12
  36. package/dist/ua_reference.js +2 -2
  37. package/dist/ua_reference_type.d.ts +18 -18
  38. package/dist/ua_reference_type.js +3 -3
  39. package/dist/ua_variable.d.ts +278 -278
  40. package/dist/ua_variable.js +2 -2
  41. package/dist/ua_variable_t.d.ts +15 -15
  42. package/dist/ua_variable_t.js +2 -2
  43. package/dist/ua_variable_type.d.ts +39 -39
  44. package/dist/ua_variable_type.js +3 -3
  45. package/dist/ua_view.d.ts +5 -5
  46. package/dist/ua_view.js +2 -2
  47. package/package.json +82 -82
@@ -1,278 +1,278 @@
1
- import { AttributeIds, CallbackT, PreciseClock, StatusCode, StatusCodeCallback, UInt32 } from "node-opcua-basic-types";
2
- import { NodeClass, QualifiedNameLike } from "node-opcua-data-model";
3
- import { NodeId } from "node-opcua-nodeid";
4
- import { DataValue } from "node-opcua-data-value";
5
- import { ExtensionObject } from "node-opcua-extension-object";
6
- import { NumericRange } from "node-opcua-numeric-range";
7
- import { WriteValueOptions, HistoryReadDetails, HistoryReadResult, ReadRawModifiedDetails, ReadEventDetails, ReadProcessedDetails, ReadAtTimeDetails } from "node-opcua-types";
8
- import { VariantLike } from "node-opcua-variant";
9
- import { CloneOptions, CloneFilter, CloneExtraInfo } from "./clone_options";
10
- import { BaseNode, IPropertyAndComponentHolder } from "./base_node";
11
- import { ISessionContext, ContinuationData } from "./session_context";
12
- import { UADataType } from "./ua_data_type";
13
- import { UAVariableType } from "./ua_variable_type";
14
- import { BindVariableOptions } from "./bind_variable";
15
- export interface IVariableHistorian {
16
- /**
17
- * push a new value into the history for this variable
18
- * the method should take a very small amount of time and not
19
- * directly write to the underlying database
20
- * @param newDataValue
21
- */
22
- push(newDataValue: DataValue): Promise<void>;
23
- /**
24
- * Extract a series of dataValue from the History database for this value
25
- * @param historyReadRawModifiedDetails
26
- * @param maxNumberToExtract
27
- * @param isReversed
28
- * @param reverseDataValue
29
- * @param callback
30
- */
31
- extractDataValues(historyReadRawModifiedDetails: ReadRawModifiedDetails, maxNumberToExtract: number, isReversed: boolean, reverseDataValue: boolean, callback: (err: Error | null, dataValue?: DataValue[]) => void): void;
32
- }
33
- export interface IVariableHistorianOptions {
34
- maxOnlineValues?: number;
35
- historian?: IVariableHistorian;
36
- }
37
- export declare type IHistoricalDataNodeOptions = IVariableHistorianOptions | {
38
- historian: IVariableHistorian;
39
- };
40
- export interface VariableAttributes {
41
- dataType: NodeId;
42
- valueRank: number;
43
- minimumSamplingInterval: number;
44
- }
45
- export interface EnumValue2 {
46
- name: string;
47
- value: number;
48
- }
49
- export interface UAVariable extends BaseNode, VariableAttributes, IPropertyAndComponentHolder {
50
- readonly nodeClass: NodeClass.Variable;
51
- readonly parent: BaseNode | null;
52
- readonly dataTypeObj: UADataType;
53
- semantic_version: number;
54
- $extensionObject?: any;
55
- get typeDefinitionObj(): UAVariableType;
56
- get typeDefinition(): NodeId;
57
- dataType: NodeId;
58
- /**
59
- * The **AccessLevel Attribute** is used to indicate how the Value of a Variable can be accessed
60
- * (read/write) and if it contains current and/or historic data.
61
- *
62
- * The AccessLevel does not take any user access rights into account, i.e. although the Variable is
63
- * writable this may be restricted to a certain user / user group.
64
- *
65
- * The {{link:AccessLevelType}}
66
- */
67
- accessLevel: number;
68
- /**
69
- * The UserAccessLevel Attribute is used to indicate how the Value of a Variable can be accessed
70
- * (read/write) and if it contains current or historic data taking user access rights into account.
71
- *
72
- * The AccessLevelType is defined in 8.57.
73
- */
74
- userAccessLevel?: number;
75
- /**
76
- * This Attribute indicates whether the Value Attribute of the Variable is an array and how many dimensions
77
- * the array has.
78
- * It may have the following values:
79
- *
80
- * * n > 1 : the Value is an array with the specified number of dimensions.
81
- * * OneDimension (1): The value is an array with one dimension.
82
- * * OneOrMoreDimensions (0): The value is an array with one or more dimensions.
83
- * * Scalar (-1): The value is not an array.
84
- * * Any (-2): The value can be a scalar or an array with any number of dimensions.
85
- * * ScalarOrOneDimension (-3): The value can be a scalar or a one dimensional array.
86
- *
87
- * NOTE:
88
- * * All DataTypes are considered to be scalar, even if they have array-like semantics like ByteString and String.
89
- */
90
- valueRank: number;
91
- /**
92
- * The MinimumSamplingInterval Attribute indicates how 'current' the Value of the Variable will
93
- * be kept.
94
- *
95
- * It specifies (in milliseconds) how fast the Server can reasonably sample the value
96
- * for changes (see Part 4 for a detailed description of sampling interval).
97
- *
98
- * A MinimumSamplingInterval of 0 indicates that the Server is to monitor the item continuously.
99
- *
100
- * A MinimumSamplingInterval of -1 means indeterminate.
101
- */
102
- minimumSamplingInterval: number;
103
- /**
104
- * This Attribute specifies the length of each dimension for an array value.
105
- *
106
- * - The Attribute is intended to describe the capability of the Variable, not the current size.
107
- * - The number of elements shall be equal to the value of the `valueRank` Attribute.
108
- * - Shall be null if `valueRank` <=0.
109
- * - A value of 0 for an individual dimension indicates that the dimension has a variable length.
110
- *
111
- * **example**
112
- *
113
- *
114
- * For example, if a Variable is defined by the following javascript array with 346 Int32 elements:
115
- *
116
- * `const myArray = new Array(346).fill(0);`
117
- *
118
- * then:
119
- * * `DataType` would point to an `Int32`
120
- * * the Variable's `valueRank` has the value 1 and,
121
- * * the `arrayDimensions` is an array with one entry having the value 346.
122
- *
123
- * ```javascript
124
- * {
125
- * dataType: "Int32",
126
- * valueRank: 1,
127
- * arrayDimensions: [346]
128
- * }
129
- * ```
130
- *
131
- *
132
- * **Note**: the maximum length of an array transferred on the wire is 2147483647 (max Int32)
133
- * and a multidimensional array is encoded as a one dimensional array.
134
- *
135
- */
136
- arrayDimensions: UInt32[] | null;
137
- /**
138
- * The `historizing` attribute indicates whether the server is actively collecting data for the
139
- * history of the variable.
140
- *
141
- * This differs from the `accessLevel` Attribute which identifies if the variable has any historical data.
142
- *
143
- * A value of **true** indicates that the server is actively collecting data.
144
- *
145
- * A value of **false** indicates the server is not actively collecting data.
146
- *
147
- * Default value is **false**.
148
- */
149
- historizing: boolean;
150
- /**
151
- * returns true if the `accessLevel` flag allows the variable to be readable in the specified context.
152
- * @param context
153
- */
154
- isReadable(context: ISessionContext): boolean;
155
- /**
156
- * returns true if the `userAccessLevel` flag allows the variable to be readable in the specified context.
157
- * @param context
158
- */
159
- isUserReadable(context: ISessionContext): boolean;
160
- /**
161
- * returns true if the `accessLevel` flag allows the variable to be writeable in the specified context.
162
- * @param context
163
- */
164
- isWritable(context: ISessionContext): boolean;
165
- /**
166
- * returns true if the `userAccessLevel` flag allows the variable to be writeable in the specified context.
167
- * @param context
168
- */
169
- isUserWritable(context: ISessionContext): boolean;
170
- /***
171
- * from OPC.UA.Spec 1.02 part 4
172
- * 5.10.2.4 StatusCodes
173
- * Table 51 defines values for the operation level statusCode contained in the DataValue structure of
174
- * each values element. Common StatusCodes are defined in Table 166.
175
- *
176
- * **Read Operation Level Result Codes**
177
- *
178
- * |Symbolic Id | Description|
179
- * |----------------------------|----------------------------------------|
180
- * |BadNodeIdInvalid | The syntax of the node id is not valid.|
181
- * |BadNodeIdUnknown | The node id refers to a node that does not exist in the server address space.|
182
- * |BadAttributeIdInvalid | BadAttributeIdInvalid The attribute is not supported for the specified node.|
183
- * |BadIndexRangeInvalid | The syntax of the index range parameter is invalid.|
184
- * |BadIndexRangeNoData | No data exists within the range of indexes specified.|
185
- * |BadDataEncodingInvalid | The data encoding is invalid. This result is used if no dataEncoding can be applied because an Attribute other than Value was requested or the DataType of the Value Attribute is not a subtype of the Structure DataType. |
186
- * |BadDataEncodingUnsupported | The server does not support the requested data encoding for the node. This result is used if a dataEncoding can be applied but the passed data encoding is not known to the Server.|
187
- * |BadNotReadable | The access level does not allow reading or subscribing to the Node.|
188
- * |BadUserAccessDenied | User does not have permission to perform the requested operation. (table 165)|
189
- * | BadSecurityModeInsufficient | The operation is not permitted over the current secure channel. |
190
- * | BadInsufficientPrivileges | The user does not have enough privileges to perform the requested operation.
191
- */
192
- readValue(context?: ISessionContext | null, indexRange?: NumericRange, dataEncoding?: QualifiedNameLike | null): DataValue;
193
- readValueAsync(context: ISessionContext | null): Promise<DataValue>;
194
- readValueAsync(context: ISessionContext | null, callback: CallbackT<DataValue>): void;
195
- isEnumeration(): boolean;
196
- isExtensionObject(): boolean;
197
- /**
198
- *
199
- */
200
- readEnumValue(): EnumValue2;
201
- /**
202
- *
203
- * @precondition UAVariable must have a dataType deriving from "Enumeration"
204
- */
205
- writeEnumValue(value: string | number): void;
206
- readAttribute(context: ISessionContext | null, attributeId: AttributeIds, indexRange?: NumericRange, dataEncoding?: QualifiedNameLike | null): DataValue;
207
- setValueFromSource(value: VariantLike, statusCode?: StatusCode, sourceTimestamp?: Date): void;
208
- writeValue(context: ISessionContext, dataValue: DataValue, indexRange: string | NumericRange | null, callback: StatusCodeCallback): void;
209
- writeValue(context: ISessionContext, dataValue: DataValue, callback: StatusCodeCallback): void;
210
- writeValue(context: ISessionContext, dataValue: DataValue, indexRange?: string | NumericRange | null): Promise<StatusCode>;
211
- asyncRefresh(oldestDate: Date, callback: CallbackT<DataValue>): void;
212
- asyncRefresh(oldestDate: Date): Promise<DataValue>;
213
- /**
214
- * write a variable attribute (callback version)
215
- * @param context
216
- * @param writeValue
217
- * @param callback
218
- *
219
- * **example**
220
- *
221
- * ```javascript
222
- * const writeValue = {
223
- * attributeId: AttributeIds.Value,
224
- * dataValue: new DataValue({
225
- * statusCode: StatusCodes.Good,
226
- * sourceTimestamp: new Date(),
227
- * value: new Variant({ dataType: DataType.Double, value: 3.14 })
228
- * }),
229
- * nodeId
230
- * };
231
- * myVariable.writeAttribute(context,writeValue,(err, statusCode) => {
232
- * if (err) { console.log("Write has failed"); return; }
233
- * console.log("write statusCode = ",statusCode.toString());
234
- * });
235
- * ```
236
- *
237
- */
238
- writeAttribute(context: ISessionContext | null, writeValue: WriteValueOptions, callback: StatusCodeCallback): void;
239
- /**
240
- * write a variable attribute (async/await version)
241
- * @param context
242
- * @param writeValue
243
- *
244
- *
245
- * **example**
246
- *
247
- * ```javascript
248
- * try {
249
- * const writeValue = {
250
- * attributeId: AttributeIds.Value,
251
- * dataValue: new DataValue({
252
- * statusCode: StatusCodes.Good,
253
- * sourceTimestamp: new Date(),
254
- * value: new Variant({ dataType: DataType.Double, value: 3.14 })
255
- * }),
256
- * nodeId
257
- * };
258
- * const statusCode = await myVariable.writeAttribute(context,writeValue);
259
- * } catch(err) {
260
- * console.log("Write has failed");
261
- * return;
262
- * }
263
- * console.log("write statusCode = ", statusCode.toString());
264
- * ```
265
- *
266
- */
267
- writeAttribute(context: ISessionContext | null, writeValue: WriteValueOptions): Promise<StatusCode>;
268
- touchValue(updateNow?: PreciseClock): void;
269
- bindVariable(options?: BindVariableOptions, overwrite?: boolean): void;
270
- bindExtensionObject(optionalExtensionObject?: ExtensionObject): ExtensionObject | null;
271
- historyRead(context: ISessionContext, historyReadDetails: HistoryReadDetails | ReadRawModifiedDetails | ReadEventDetails | ReadProcessedDetails | ReadAtTimeDetails, indexRange: NumericRange | null, dataEncoding: QualifiedNameLike | null, continuationData: ContinuationData): Promise<HistoryReadResult>;
272
- historyRead(context: ISessionContext, historyReadDetails: HistoryReadDetails | ReadRawModifiedDetails | ReadEventDetails | ReadProcessedDetails | ReadAtTimeDetails, indexRange: NumericRange | null, dataEncoding: QualifiedNameLike | null, continuationData: ContinuationData, callback: CallbackT<HistoryReadResult>): void;
273
- clone(options: CloneOptions, optionalFilter?: CloneFilter, extraInfo?: CloneExtraInfo): UAVariable;
274
- on(eventName: "semantic_changed", eventHandler: () => void): this;
275
- on(eventName: "value_changed", eventHandler: (dataValue: DataValue) => void): this;
276
- once(eventName: "semantic_changed", eventHandler: () => void): this;
277
- once(eventName: "value_changed", eventHandler: (dataValue: DataValue) => void): this;
278
- }
1
+ import { AttributeIds, CallbackT, PreciseClock, StatusCode, StatusCodeCallback, UInt32 } from "node-opcua-basic-types";
2
+ import { NodeClass, QualifiedNameLike } from "node-opcua-data-model";
3
+ import { NodeId } from "node-opcua-nodeid";
4
+ import { DataValue } from "node-opcua-data-value";
5
+ import { ExtensionObject } from "node-opcua-extension-object";
6
+ import { NumericRange } from "node-opcua-numeric-range";
7
+ import { WriteValueOptions, HistoryReadDetails, HistoryReadResult, ReadRawModifiedDetails, ReadEventDetails, ReadProcessedDetails, ReadAtTimeDetails } from "node-opcua-types";
8
+ import { VariantLike } from "node-opcua-variant";
9
+ import { CloneOptions, CloneFilter, CloneExtraInfo } from "./clone_options";
10
+ import { BaseNode, IPropertyAndComponentHolder } from "./base_node";
11
+ import { ISessionContext, ContinuationData } from "./session_context";
12
+ import { UADataType } from "./ua_data_type";
13
+ import { UAVariableType } from "./ua_variable_type";
14
+ import { BindVariableOptions } from "./bind_variable";
15
+ export interface IVariableHistorian {
16
+ /**
17
+ * push a new value into the history for this variable
18
+ * the method should take a very small amount of time and not
19
+ * directly write to the underlying database
20
+ * @param newDataValue
21
+ */
22
+ push(newDataValue: DataValue): Promise<void>;
23
+ /**
24
+ * Extract a series of dataValue from the History database for this value
25
+ * @param historyReadRawModifiedDetails
26
+ * @param maxNumberToExtract
27
+ * @param isReversed
28
+ * @param reverseDataValue
29
+ * @param callback
30
+ */
31
+ extractDataValues(historyReadRawModifiedDetails: ReadRawModifiedDetails, maxNumberToExtract: number, isReversed: boolean, reverseDataValue: boolean, callback: (err: Error | null, dataValue?: DataValue[]) => void): void;
32
+ }
33
+ export interface IVariableHistorianOptions {
34
+ maxOnlineValues?: number;
35
+ historian?: IVariableHistorian;
36
+ }
37
+ export declare type IHistoricalDataNodeOptions = IVariableHistorianOptions | {
38
+ historian: IVariableHistorian;
39
+ };
40
+ export interface VariableAttributes {
41
+ dataType: NodeId;
42
+ valueRank: number;
43
+ minimumSamplingInterval: number;
44
+ }
45
+ export interface EnumValue2 {
46
+ name: string;
47
+ value: number;
48
+ }
49
+ export interface UAVariable extends BaseNode, VariableAttributes, IPropertyAndComponentHolder {
50
+ readonly nodeClass: NodeClass.Variable;
51
+ readonly parent: BaseNode | null;
52
+ readonly dataTypeObj: UADataType;
53
+ semantic_version: number;
54
+ $extensionObject?: any;
55
+ get typeDefinitionObj(): UAVariableType;
56
+ get typeDefinition(): NodeId;
57
+ dataType: NodeId;
58
+ /**
59
+ * The **AccessLevel Attribute** is used to indicate how the Value of a Variable can be accessed
60
+ * (read/write) and if it contains current and/or historic data.
61
+ *
62
+ * The AccessLevel does not take any user access rights into account, i.e. although the Variable is
63
+ * writable this may be restricted to a certain user / user group.
64
+ *
65
+ * The {{link:AccessLevelType}}
66
+ */
67
+ accessLevel: number;
68
+ /**
69
+ * The UserAccessLevel Attribute is used to indicate how the Value of a Variable can be accessed
70
+ * (read/write) and if it contains current or historic data taking user access rights into account.
71
+ *
72
+ * The AccessLevelType is defined in 8.57.
73
+ */
74
+ userAccessLevel?: number;
75
+ /**
76
+ * This Attribute indicates whether the Value Attribute of the Variable is an array and how many dimensions
77
+ * the array has.
78
+ * It may have the following values:
79
+ *
80
+ * * n > 1 : the Value is an array with the specified number of dimensions.
81
+ * * OneDimension (1): The value is an array with one dimension.
82
+ * * OneOrMoreDimensions (0): The value is an array with one or more dimensions.
83
+ * * Scalar (-1): The value is not an array.
84
+ * * Any (-2): The value can be a scalar or an array with any number of dimensions.
85
+ * * ScalarOrOneDimension (-3): The value can be a scalar or a one dimensional array.
86
+ *
87
+ * NOTE:
88
+ * * All DataTypes are considered to be scalar, even if they have array-like semantics like ByteString and String.
89
+ */
90
+ valueRank: number;
91
+ /**
92
+ * The MinimumSamplingInterval Attribute indicates how 'current' the Value of the Variable will
93
+ * be kept.
94
+ *
95
+ * It specifies (in milliseconds) how fast the Server can reasonably sample the value
96
+ * for changes (see Part 4 for a detailed description of sampling interval).
97
+ *
98
+ * A MinimumSamplingInterval of 0 indicates that the Server is to monitor the item continuously.
99
+ *
100
+ * A MinimumSamplingInterval of -1 means indeterminate.
101
+ */
102
+ minimumSamplingInterval: number;
103
+ /**
104
+ * This Attribute specifies the length of each dimension for an array value.
105
+ *
106
+ * - The Attribute is intended to describe the capability of the Variable, not the current size.
107
+ * - The number of elements shall be equal to the value of the `valueRank` Attribute.
108
+ * - Shall be null if `valueRank` <=0.
109
+ * - A value of 0 for an individual dimension indicates that the dimension has a variable length.
110
+ *
111
+ * **example**
112
+ *
113
+ *
114
+ * For example, if a Variable is defined by the following javascript array with 346 Int32 elements:
115
+ *
116
+ * `const myArray = new Array(346).fill(0);`
117
+ *
118
+ * then:
119
+ * * `DataType` would point to an `Int32`
120
+ * * the Variable's `valueRank` has the value 1 and,
121
+ * * the `arrayDimensions` is an array with one entry having the value 346.
122
+ *
123
+ * ```javascript
124
+ * {
125
+ * dataType: "Int32",
126
+ * valueRank: 1,
127
+ * arrayDimensions: [346]
128
+ * }
129
+ * ```
130
+ *
131
+ *
132
+ * **Note**: the maximum length of an array transferred on the wire is 2147483647 (max Int32)
133
+ * and a multidimensional array is encoded as a one dimensional array.
134
+ *
135
+ */
136
+ arrayDimensions: UInt32[] | null;
137
+ /**
138
+ * The `historizing` attribute indicates whether the server is actively collecting data for the
139
+ * history of the variable.
140
+ *
141
+ * This differs from the `accessLevel` Attribute which identifies if the variable has any historical data.
142
+ *
143
+ * A value of **true** indicates that the server is actively collecting data.
144
+ *
145
+ * A value of **false** indicates the server is not actively collecting data.
146
+ *
147
+ * Default value is **false**.
148
+ */
149
+ historizing: boolean;
150
+ /**
151
+ * returns true if the `accessLevel` flag allows the variable to be readable in the specified context.
152
+ * @param context
153
+ */
154
+ isReadable(context: ISessionContext): boolean;
155
+ /**
156
+ * returns true if the `userAccessLevel` flag allows the variable to be readable in the specified context.
157
+ * @param context
158
+ */
159
+ isUserReadable(context: ISessionContext): boolean;
160
+ /**
161
+ * returns true if the `accessLevel` flag allows the variable to be writeable in the specified context.
162
+ * @param context
163
+ */
164
+ isWritable(context: ISessionContext): boolean;
165
+ /**
166
+ * returns true if the `userAccessLevel` flag allows the variable to be writeable in the specified context.
167
+ * @param context
168
+ */
169
+ isUserWritable(context: ISessionContext): boolean;
170
+ /***
171
+ * from OPC.UA.Spec 1.02 part 4
172
+ * 5.10.2.4 StatusCodes
173
+ * Table 51 defines values for the operation level statusCode contained in the DataValue structure of
174
+ * each values element. Common StatusCodes are defined in Table 166.
175
+ *
176
+ * **Read Operation Level Result Codes**
177
+ *
178
+ * |Symbolic Id | Description|
179
+ * |----------------------------|----------------------------------------|
180
+ * |BadNodeIdInvalid | The syntax of the node id is not valid.|
181
+ * |BadNodeIdUnknown | The node id refers to a node that does not exist in the server address space.|
182
+ * |BadAttributeIdInvalid | BadAttributeIdInvalid The attribute is not supported for the specified node.|
183
+ * |BadIndexRangeInvalid | The syntax of the index range parameter is invalid.|
184
+ * |BadIndexRangeNoData | No data exists within the range of indexes specified.|
185
+ * |BadDataEncodingInvalid | The data encoding is invalid. This result is used if no dataEncoding can be applied because an Attribute other than Value was requested or the DataType of the Value Attribute is not a subtype of the Structure DataType. |
186
+ * |BadDataEncodingUnsupported | The server does not support the requested data encoding for the node. This result is used if a dataEncoding can be applied but the passed data encoding is not known to the Server.|
187
+ * |BadNotReadable | The access level does not allow reading or subscribing to the Node.|
188
+ * |BadUserAccessDenied | User does not have permission to perform the requested operation. (table 165)|
189
+ * | BadSecurityModeInsufficient | The operation is not permitted over the current secure channel. |
190
+ * | BadInsufficientPrivileges | The user does not have enough privileges to perform the requested operation.
191
+ */
192
+ readValue(context?: ISessionContext | null, indexRange?: NumericRange, dataEncoding?: QualifiedNameLike | null): DataValue;
193
+ readValueAsync(context: ISessionContext | null): Promise<DataValue>;
194
+ readValueAsync(context: ISessionContext | null, callback: CallbackT<DataValue>): void;
195
+ isEnumeration(): boolean;
196
+ isExtensionObject(): boolean;
197
+ /**
198
+ *
199
+ */
200
+ readEnumValue(): EnumValue2;
201
+ /**
202
+ *
203
+ * @precondition UAVariable must have a dataType deriving from "Enumeration"
204
+ */
205
+ writeEnumValue(value: string | number): void;
206
+ readAttribute(context: ISessionContext | null, attributeId: AttributeIds, indexRange?: NumericRange, dataEncoding?: QualifiedNameLike | null): DataValue;
207
+ setValueFromSource(value: VariantLike, statusCode?: StatusCode, sourceTimestamp?: Date): void;
208
+ writeValue(context: ISessionContext, dataValue: DataValue, indexRange: string | NumericRange | null, callback: StatusCodeCallback): void;
209
+ writeValue(context: ISessionContext, dataValue: DataValue, callback: StatusCodeCallback): void;
210
+ writeValue(context: ISessionContext, dataValue: DataValue, indexRange?: string | NumericRange | null): Promise<StatusCode>;
211
+ asyncRefresh(oldestDate: Date, callback: CallbackT<DataValue>): void;
212
+ asyncRefresh(oldestDate: Date): Promise<DataValue>;
213
+ /**
214
+ * write a variable attribute (callback version)
215
+ * @param context
216
+ * @param writeValue
217
+ * @param callback
218
+ *
219
+ * **example**
220
+ *
221
+ * ```javascript
222
+ * const writeValue = {
223
+ * attributeId: AttributeIds.Value,
224
+ * dataValue: new DataValue({
225
+ * statusCode: StatusCodes.Good,
226
+ * sourceTimestamp: new Date(),
227
+ * value: new Variant({ dataType: DataType.Double, value: 3.14 })
228
+ * }),
229
+ * nodeId
230
+ * };
231
+ * myVariable.writeAttribute(context,writeValue,(err, statusCode) => {
232
+ * if (err) { console.log("Write has failed"); return; }
233
+ * console.log("write statusCode = ",statusCode.toString());
234
+ * });
235
+ * ```
236
+ *
237
+ */
238
+ writeAttribute(context: ISessionContext | null, writeValue: WriteValueOptions, callback: StatusCodeCallback): void;
239
+ /**
240
+ * write a variable attribute (async/await version)
241
+ * @param context
242
+ * @param writeValue
243
+ *
244
+ *
245
+ * **example**
246
+ *
247
+ * ```javascript
248
+ * try {
249
+ * const writeValue = {
250
+ * attributeId: AttributeIds.Value,
251
+ * dataValue: new DataValue({
252
+ * statusCode: StatusCodes.Good,
253
+ * sourceTimestamp: new Date(),
254
+ * value: new Variant({ dataType: DataType.Double, value: 3.14 })
255
+ * }),
256
+ * nodeId
257
+ * };
258
+ * const statusCode = await myVariable.writeAttribute(context,writeValue);
259
+ * } catch(err) {
260
+ * console.log("Write has failed");
261
+ * return;
262
+ * }
263
+ * console.log("write statusCode = ", statusCode.toString());
264
+ * ```
265
+ *
266
+ */
267
+ writeAttribute(context: ISessionContext | null, writeValue: WriteValueOptions): Promise<StatusCode>;
268
+ touchValue(updateNow?: PreciseClock): void;
269
+ bindVariable(options?: BindVariableOptions, overwrite?: boolean): void;
270
+ bindExtensionObject(optionalExtensionObject?: ExtensionObject): ExtensionObject | null;
271
+ historyRead(context: ISessionContext, historyReadDetails: HistoryReadDetails | ReadRawModifiedDetails | ReadEventDetails | ReadProcessedDetails | ReadAtTimeDetails, indexRange: NumericRange | null, dataEncoding: QualifiedNameLike | null, continuationData: ContinuationData): Promise<HistoryReadResult>;
272
+ historyRead(context: ISessionContext, historyReadDetails: HistoryReadDetails | ReadRawModifiedDetails | ReadEventDetails | ReadProcessedDetails | ReadAtTimeDetails, indexRange: NumericRange | null, dataEncoding: QualifiedNameLike | null, continuationData: ContinuationData, callback: CallbackT<HistoryReadResult>): void;
273
+ clone(options: CloneOptions, optionalFilter?: CloneFilter, extraInfo?: CloneExtraInfo): UAVariable;
274
+ on(eventName: "semantic_changed", eventHandler: () => void): this;
275
+ on(eventName: "value_changed", eventHandler: (dataValue: DataValue) => void): this;
276
+ once(eventName: "semantic_changed", eventHandler: () => void): this;
277
+ once(eventName: "value_changed", eventHandler: (dataValue: DataValue) => void): this;
278
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=ua_variable.js.map
@@ -1,15 +1,15 @@
1
- import { QualifiedNameLike } from "node-opcua-data-model";
2
- import { DataValueT } from "node-opcua-data-value";
3
- import { NumericRange } from "node-opcua-numeric-range";
4
- import { CallbackT, StatusCode, StatusCodeCallback } from "node-opcua-status-code";
5
- import { DataType } from "node-opcua-variant";
6
- import { ISessionContext } from "./session_context";
7
- import { UAVariable } from "./ua_variable";
8
- export interface UAVariableT<T, DT extends DataType> extends UAVariable {
9
- readValue(context?: ISessionContext | null, indexRange?: NumericRange, dataEncoding?: QualifiedNameLike | null): DataValueT<T, DT>;
10
- readValueAsync(context: ISessionContext | null): Promise<DataValueT<T, DT>>;
11
- readValueAsync(context: ISessionContext | null, callback: CallbackT<DataValueT<T, DT>>): void;
12
- writeValue(context: ISessionContext, dataValue: DataValueT<T, DT>, indexRange: NumericRange | null, callback: StatusCodeCallback): void;
13
- writeValue(context: ISessionContext, dataValue: DataValueT<T, DT>, callback: StatusCodeCallback): void;
14
- writeValue(context: ISessionContext, dataValue: DataValueT<T, DT>, indexRange?: NumericRange | null): Promise<StatusCode>;
15
- }
1
+ import { QualifiedNameLike } from "node-opcua-data-model";
2
+ import { DataValueT } from "node-opcua-data-value";
3
+ import { NumericRange } from "node-opcua-numeric-range";
4
+ import { CallbackT, StatusCode, StatusCodeCallback } from "node-opcua-status-code";
5
+ import { DataType } from "node-opcua-variant";
6
+ import { ISessionContext } from "./session_context";
7
+ import { UAVariable } from "./ua_variable";
8
+ export interface UAVariableT<T, DT extends DataType> extends UAVariable {
9
+ readValue(context?: ISessionContext | null, indexRange?: NumericRange, dataEncoding?: QualifiedNameLike | null): DataValueT<T, DT>;
10
+ readValueAsync(context: ISessionContext | null): Promise<DataValueT<T, DT>>;
11
+ readValueAsync(context: ISessionContext | null, callback: CallbackT<DataValueT<T, DT>>): void;
12
+ writeValue(context: ISessionContext, dataValue: DataValueT<T, DT>, indexRange: NumericRange | null, callback: StatusCodeCallback): void;
13
+ writeValue(context: ISessionContext, dataValue: DataValueT<T, DT>, callback: StatusCodeCallback): void;
14
+ writeValue(context: ISessionContext, dataValue: DataValueT<T, DT>, indexRange?: NumericRange | null): Promise<StatusCode>;
15
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=ua_variable_t.js.map