NodeId Class
Defined in:
Module: opcua.datamodel
packages\node-opcua-nodeid\src\nodeid.js:387
Construct a node ID
Constructor
NodeId
(
String
-
identifierType
-
value
-
namespace
Parameters:
-
identifierType
NodeIdType- the nodeID type
-
value
Number | String | GUID | Buffer- the node id value. The type of Value depends on identifierType.
-
namespace
Number- the index of the related namespace (optional , default value = 0 )
Returns:
String:
Example:
var nodeId = new NodeId(NodeIdType.NUMERIC,123,1);
Methods
isEmpty
()
Boolean
Returns:
Boolean:
true if the NodeId is null or empty
toJSON
()
String
convert nodeId to a JSON string. same as {@link NodeId#toString }
Returns:
String:
toString
(
String
-
[options.addressSpace]
get the string representation of the nodeID.
Parameters:
-
[options.addressSpace]
AddressSpace optional
Returns:
String:
Example:
var nodeid = new NodeId(NodeIdType.NUMERIC, 123,1);
console.log(nodeid.toString());
>"ns=1;i=123"