convert nodeId to a JSON string. same as NodeId.toString
Optional
options: { Optional
namespaceget the string representation of the nodeID.
Optional
options: { Optional
address{AddressSpace}
Optional
namespaceby default, toString will return the "ns=" representation
const nodeid = new NodeId(NodeIdType.NUMERIC, 123,1);
console.log(nodeid.toString());
>"ns=1;i=123"
toString can also be used to make the nsu= version of the nodeid.
const namespaceArray = ["http://opcfoundation.com/UA/","http://mynamespace2"];
const nodeid = new NodeId(NodeIdType.STRING, "Hello",1);
console.log(nodeid.toString({namespaceArray}));
>"nsu=http://mynamespace;i=123"
passing an addressSpace to the toString options will decorate the nodeId with the BrowseName of the node.
const addressSpace = getAddressSpace();
const nodeid = new NodeId(NodeIdType.NUMERIC, 123,1);
console.log(nodeid.toString({addressSpace}));
>"nsu=http://mynamespace;i=123 (MyBrowseName)"
NodeId
specialization for numeric nodeIds.