Nodeid

This page lists docstrings of functions used to create NodeIds.

Low level interface

Open62541.UA_NODEIDFunction
UA_NODEID(s::AbstractString)::Ptr{UA_NodeId}
UA_NODEID(s::Ptr{UA_String})::Ptr{UA_NodeId}

creates a UA_NodeId object by parsing s.

Example:

UA_NODEID("ns=1;i=1234") #generates UA_NodeId with numeric identifier
UA_NODEID("ns=1;s=test") #generates UA_NodeId with string identifier
source
Open62541.UA_NODEID_BYTESTRING_ALLOCFunction
UA_NODEID_BYTESTRING_ALLOC(nsIndex::Integer, identifier::AbstractString)::Ptr{UA_NodeId}
UA_NODEID_BYTESTRING_ALLOC(nsIndex::Integer, identifier::Ptr{UA_ByteString})::Ptr{UA_NodeId}

creates a UA_NodeId object with namespace index nsIndex and bytestring identifier identifier (which can be a string or UA_ByteString).

Memory is allocated by C and needs to be cleaned up using UA_NodeId_delete(x::Ptr{UA_NodeId}) after the object is not used anymore.

source
Open62541.UA_NODEID_GUIDFunction
UA_NODEID_GUID(nsIndex::Integer, identifier::AbstractString)::Ptr{UA_NodeId}
UA_NODEID_GUID(nsIndex::Integer, identifier::Ptr{UA_Guid})::Ptr{UA_NodeId}

creates a UA_NodeId object by with namespace index nsIndex and an identifier identifier based on a globally unique id (UA_Guid) that can be supplied as a string (which will be parsed) or as a valid Ptr{UA_Guid}.

Memory is allocated by C and needs to be cleaned up using UA_NodeId_delete(x::Ptr{UA_NodeId}) after the object is not used anymore.

source
Open62541.UA_NODEID_NUMERICFunction
UA_NODEID_NUMERIC(nsIndex::Integer, identifier::Integer)::Ptr{UA_NodeId}

creates a UA_NodeId object with namespace index nsIndex and numerical identifier identifier. Memory is allocated by C and needs to be cleaned up using UA_NodeId_delete(x::Ptr{UA_NodeId}) after the object is not used anymore.

source
Open62541.UA_NODEID_STRINGFunction
UA_NODEID_STRING(nsIndex::Integer, identifier::AbstractString)::Ptr{UA_NodeId}
UA_NODEID_STRING(nsIndex::Integer, identifier::Ptr{UA_String})::Ptr{UA_NodeId}

creates a UA_NodeId object by with namespace index nsIndex and string identifier identifier.

Memory is allocated by C and needs to be cleaned up using UA_NodeId_delete(x::Ptr{UA_NodeId}) after the object is not used anymore.

source
Open62541.UA_NODEID_STRING_ALLOCFunction
UA_NODEID_STRING_ALLOC(nsIndex::Integer, identifier::AbstractString)::Ptr{UA_NodeId}
UA_NODEID_STRING_ALLOC(nsIndex::Integer, identifier::Ptr{UA_String})::Ptr{UA_NodeId}

creates a UA_NodeId object with namespace index nsIndex and string identifier identifier.

Memory is allocated by C and needs to be cleaned up using UA_NodeId_delete(x::Ptr{UA_NodeId}) after the object is not used anymore.

source

High level interface

Open62541.JUA_NodeIdType
JUA_NodeId

creates a JUA_NodeId object - the equivalent of a UA_NodeId, but with memory managed by Julia rather than C.

The following methods are defined:

JUA_NodeId()

creates a JUA_NodeId with namespaceIndex = 0, numeric identifierType and identifier = 0

JUA_NodeId(s::AbstractString)

creates a JUA_NodeId based on String s that is parsed into the relevant properties.

JUA_NodeId(nsIndex::Integer, identifier::Integer)

creates a JUA_NodeId with namespace index nsIndex and numerical identifier identifier.

JUA_NodeId(nsIndex::Integer, identifier::AbstractString)

creates a JUA_NodeId with namespace index nsIndex and string identifier identifier.

JUA_NodeId(nsIndex::Integer, identifier::JUA_Guid)

creates a JUA_NodeId with namespace index nsIndex and global unique id identifier identifier.

JUA_NodeId(nptr::Ptr{UA_NodeId})

creates a JUA_NodeId based on the pointer nptr. This is a fallback method that can be used to pass UA_NodeIds generated via the low level interface to the higher level functions. Note that memory management remains on the C side when using this method, i.e., nptr needs to be manually cleaned up with UA_NodeId_delete(nptr) after the object is not needed anymore. It is up to the user to ensure this.

Examples:

j = JUA_NodeId()
j = JUA_NodeId("ns=1;i=1234")
j = JUA_NodeId("ns=1;s=example")
j = JUA_NodeId(1, 1234)
j = JUA_NodeId(1, "example")
j = JUA_NodeId(1, JUA_Guid("C496578A-0DFE-4B8F-870A-745238C6AEAE"))
source
Open62541.JUA_ExpandedNodeIdType
JUA_NodeId

creates a JUA_ExpandedNodeId object - the equivalent of a UA_ExpandedNodeId, but with memory managed by Julia rather than C.

See also: OPC Foundation Website

The following methods are defined:

JUA_ExpandedNodeId()

creates a JUA_ExpandedNodeId with all fields equal to null.

JUA_ExpandedNodeId(s::Union{AbstractString, JUA_String, Ptr{UA_String}})

creates a JUA_ExpandedNodeId based on String s that is parsed into the relevant properties.

JUA_ExpandedNodeId(nsIndex::Integer, identifier::Integer)

creates a JUA_ExpandedNodeId with namespace index nsIndex, numeric NodeId identifier identifier, serverIndex = 0 and empty nameSpaceUri.

JUA_ExpandedNodeId(nsIndex::Integer, identifier::Union{AbstractString, JUA_String, Ptr{UA_String}})

creates a JUA_ExpandedNodeId with namespace index nsIndex, string NodeId identifier identifier, serverIndex = 0 and empty nameSpaceUri.

JUA_ExpandedNodeId(nodeId::Union{Ptr{UA_NodeId}, JUA_NodeId})

creates a JUA_ExpandedNodeId with empty namespaceUri, serverIndex = 0 and the content of nodeId in the nodeId field.

JUA_ExpandedNodeId(identifier::Integer, ns_uri::AbstractString, server_ind::Integer) 

creates a JUA_ExpandedNodeId with namespace index nsIndex and global unique id identifier identifier for the Nodeid, as well as serverIndex = 0 and empty namespaceUri.

JUA_ExpandedNodeId(identifier::Union{Ptr{UA_String}, AbstractString, JUA_String}, ns_uri::AbstractString, server_ind::Integer) 

creates a JUA_ExpandedNodeId with a string identifier for the nodeid, namespacUri ns_uri and server index server_ind.

JUA_ExpandedNodeId(guid::Union{Ptr{UA_Guid}, JUA_Guid}, ns_uri::AbstractString, server_ind::Integer) 

creates a JUA_ExpandedNodeId with its nodeid having the global unique identifier guid, namespaceUri ns_uri and server index server_ind.

JUA_ExpandedNodeId(nodeid::Union{Ptr{UA_NodeId}, JUA_NodeId}, ns_uri::AbstractString, server_ind::Integer)

creates a JUA_ExpandedNodeId from the JUANodeId nodeid, namespaceUri `nsuriand server indexserver_ind`.

JUA_ExpandedNodeId(nptr::Ptr{UA_ExpandedNodeId})

creates a JUA_ExpandedNodeId based on the pointer nptr. This is a fallback method that can be used to pass UA_NodeIds generated via the low level interface to the higher level functions. Note that memory management remains on the C side when using this method, i.e., nptr needs to be manually cleaned up with UA_ExpandedNodeId_delete(nptr) after the object is not needed anymore. It is up to the user to ensure this.

Examples:

j = JUA_ExpandedNodeId()
j = JUA_ExpandedNodeId("ns=1;i=1234")
j = JUA_ExpandedNodeId("ns=1;s=example")
j = JUA_ExpandedNodeId(1, 1234)
j = JUA_ExpandedNodeId(1, "example")
j = JUA_ExpandedNodeId(1, JUA_Guid("C496578A-0DFE-4B8F-870A-745238C6AEAE"))
source