APIs

Show:

Construct a node ID

Constructor

NodeId

(
  • identifierType
  • value
  • namespace
)
String

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:

const nodeId = new NodeId(NodeIdType.NUMERIC,123,1);
        

Item Index

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

(
  • [options.addressSpace]
)
String

get the string representation of the nodeID.

Parameters:

Returns:

String:

Example:

const nodeid = new NodeId(NodeIdType.NUMERIC, 123,1);
                    console.log(nodeid.toString());
                    
>"ns=1;i=123"