Variant Class
Extends BaseUAObject
Defined in:
Module: opcua.datamodel
packages\node-opcua-variant\src\variant.js:15
Constructor
Variant
(
-
options
Parameters:
-
options
Object-
[dataType= 0]
DataType optionalthe variant type.
-
[arrayType= 0]
VariantArrayType optional -
[value= null]
Any optional -
[dimensions= null]
UInt32 optionalthe matrix dimensions
-
Item Index
Methods
- addSubscriber add a subscriber to the WatchDog. This method modifies the subscriber be adding a new method to it called 'keepAlive' The subscriber must also provide a "watchdogReset". watchdogReset will be called if the subscriber failed to call keepAlive withing the timeout period.
- binaryStoreSize
- check_flag
- clone deep clone a variant
- decode
- decode_debug
- encodeMessage
- getObjectClassName
- isValid
- normalize_require_file
- set_flag
- toString
Properties
Methods
addSubscriber
add a subscriber to the WatchDog.
This method modifies the subscriber be adding a
new method to it called 'keepAlive'
The subscriber must also provide a "watchdogReset". watchdogReset will be called
if the subscriber failed to call keepAlive withing the timeout period.
(
Number
-
subscriber
-
timeout
add a subscriber to the WatchDog.
Parameters:
-
subscriber
Object -
timeout
Object
Returns:
Number:
binaryStoreSize
()
Number
Calculate the required size to store this object in a binary stream.
Returns:
Number:
check_flag
(
Boolean
-
value
-
mask
check if a set of bits are set in the values
Parameters:
-
value
Object -
mask
Object
Returns:
Boolean:
clone
deep clone a variant
()
exports.Variant
Returns:
exports.Variant:
decode
(
-
stream
-
[option]
decode the object from a binary stream
Parameters:
-
stream
BinaryStream -
[option]
Object optional
decode_debug
()
encodeMessage
()
getObjectClassName
(
String
-
obj
Parameters:
-
obj
Object
Returns:
String:
isValid
()
Boolean
verify that all object attributes values are valid according to schema
Returns:
Boolean:
normalize_require_file
(
-
baseFolder
-
full_path_to_file
Parameters:
-
baseFolder
Object -
full_path_to_file
Object
Example:
: normalize_require_file("/home/bob/folder1/","/home/bob/folder1/folder2/toto.js").should.eql("./folder2/toto");
set_flag
(
Number
-
value
-
mask
set a flag
Parameters:
-
value
Object -
mask
Object
Returns:
Number:
toString
()
String
Returns:
String:
Properties
arrayType
VariantArrayType
Default: 0
dataType
DataType
the variant type.
Default: 0
dimensions
UInt32
the matrix dimensions
Default: null
subscriberCount
Number
returns the number of subscribers using the WatchDog object.
value
Any
Default: null