APIs

Show:

An ExpandedNodeId extends the NodeId structure.

An ExpandedNodeId extends the NodeId structure by allowing the NamespaceUri to be explicitly specified instead of using the NamespaceIndex. The NamespaceUri is optional. If it is specified then the NamespaceIndex inside the NodeId shall be ignored.

The ExpandedNodeId is encoded by first encoding a NodeId as described in Clause 5 .2.2.9 and then encoding NamespaceUri as a String.

An instance of an ExpandedNodeId may still use the NamespaceIndex instead of the NamespaceUri. In this case, the NamespaceUri is not encoded in the stream. The presence of the NamespaceUri in the stream is indicated by setting the NamespaceUri flag in the encoding format byte for the NodeId.

If the NamespaceUri is present then the encoder shall encode the NamespaceIndex as 0 in the stream when the NodeId portion is encoded. The unused NamespaceIndex is included in the stream for consistency,

An ExpandedNodeId may also have a ServerIndex which is encoded as a UInt32 after the NamespaceUri. The ServerIndex flag in the NodeId encoding byte indicates whether the ServerIndex is present in the stream. The ServerIndex is omitted if it is equal to zero.

Constructor

ExpandedNodeId

(
  • identifierType
  • value
  • namespace
  • namespaceUri
  • serverIndex
)

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 )
  • namespaceUri String | Null
    • NamespaceUri
  • serverIndex UInteger32 | Null
    • the server Index

Methods

isEmpty

() Boolean

Returns:

Boolean: true if the NodeId is null or empty

isValidGuid A valid Guid XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX

(
  • guid
)
Boolean

Provided by the opcua.miscellaneous module.

Defined in packages\node-opcua-guid\src\guid.js:5

Parameters:

  • guid String

Returns:

Boolean:

return true if the string is a valid GUID.

makeExpandedNodeId

(
  • value
  • [namespace=0]
)
ExpandedNodeId

Parameters:

Returns:

toJSON

() String

convert nodeId to a JSON string. same as {@link NodeId#toString }

Returns:

String:

toString

() String

Returns:

String:

Properties

namespace

Number