Converts a string to a NodeId object.
In OPC UA, every entity in the address space is a unique node.
Each node has a NodeId object, which is has 3 properties:
Property |
|
NamespaceIndex |
The namespace index as a number. Default is 0. |
IdentifierType |
The data type of the identifier. Default is string |
Identifier |
The identifier for a node. |
Following Identifier types are supported:
IdentifierType |
character |
number |
i |
string |
s |
globally unique identifier (GUID) |
g |
opaque value (ByteString) |
b |
To convert a string to a NodeId object you have to use following format:
ns=<NamespaceIndex>;<IdentifierType>=<Identifier>
Examples:
ns=2;s=MyTemperature // namespace index 2, string identifier
i=2045 // namespace index 0, numeric identifier
G.OPCItems.AddItem('ns=0;i=2256'); // NodeId with IdentifierType i = number and NamespaceIndex = 0 (default)
G.OPCItems.AddItem('ns=5;s=Random1'); // NodeId with IdentifierType s = string (default) and NamespaceIndex = 5
Kassl GmbH Copyright © 2023. All rights reserved.
|