CVB++ 14.0
NodeID Class Reference

An OPCUA NodeID object. NodeIDs provide a unique identifier for OPCUA nodes, i.e. they help with node creation, addition to servers, retrieving from servers etc.. More...

#include <cvb/opcua/node_id.hpp>

Public Member Functions

std::uint16_t NamespaceIndex () const
 Returns namespace index. More...
 
std::string ExpandedText () const
 Returns expanded text of the node id. More...
 
NodeIDType Type () const
 Returns type of the node id. More...
 
template<typename T >
Identifier () const
 Returns the id of the node id. For determining the type of the id, see OpcUa::NodeID::Type(). More...
 
void * Handle () const noexcept
 Return the C-API handle. More...
 
template<>
String Identifier () const
 Returns id of the node id. This is the specialization for string identifier. More...
 

Static Public Member Functions

static NodeIDPtr Create (Namespace0NodeID id)
 Creates an id based on a predefined Namespace0 node id. More...
 
static NodeIDPtr Create (std::uint16_t namespaceIndex, std::uint32_t identifier)
 Creates an id based on a namespace id and an identifier. More...
 
static NodeIDPtr Create (std::uint16_t namespaceIndex, const Cvb::String &identifier)
 Creates a NodeID based on a namespace index and an identifier. More...
 

Detailed Description

An OPCUA NodeID object. NodeIDs provide a unique identifier for OPCUA nodes, i.e. they help with node creation, addition to servers, retrieving from servers etc..

Note
OPCUA nodes are available for different datatypes (i.e. nodes identified by indices or strings) (for details refer to:
https://opcfoundation.org/developer-tools/specifications-unified-architecture/part-3-address-space-model/ and
https://opcfoundation.org/developer-tools/specifications-unified-architecture/part-3-address-space-model/)

Member Function Documentation

◆ Create() [1/3]

static NodeIDPtr Create ( Namespace0NodeID  id)
inlinestatic

Creates an id based on a predefined Namespace0 node id.

Parameters
[in]idNamespace0 node id.
Returns
the node id.
Exceptions
Anyexception derived from std::exception including CvbException and OpcUaException.
Examples
OpcUa/BareboneClient, OpcUa/BareboneServer, and OpcUa/ServerClientInteraction.

◆ Create() [2/3]

static NodeIDPtr Create ( std::uint16_t  namespaceIndex,
const Cvb::String identifier 
)
inlinestatic

Creates a NodeID based on a namespace index and an identifier.

Parameters
[in]namespaceIndexnamespace index for the node id.
[in]identifierIdentifier.
Returns
the node id.
Exceptions
Anyexception derived from std::exception including CvbException and OpcUaException.

◆ Create() [3/3]

static NodeIDPtr Create ( std::uint16_t  namespaceIndex,
std::uint32_t  identifier 
)
inlinestatic

Creates an id based on a namespace id and an identifier.

Parameters
[in]namespaceIndexnamespace index for the node id.
[in]identifierIdentifier.
Returns
the node id.
Exceptions
Anyexception derived from std::exception including CvbException and OpcUaException.

◆ ExpandedText()

std::string ExpandedText ( ) const
inline

Returns expanded text of the node id.

Note
Expanded text are the properties of the node id concatinated as a string.
Returns
Expanded text.
Exceptions
Anyexception derived from std::exception including CvbException and OpcUaException.

◆ Handle()

void * Handle ( ) const
inlinenoexcept

Return the C-API handle.

Returns
C-API handle

◆ Identifier() [1/2]

T Identifier ( ) const
inline

Returns the id of the node id. For determining the type of the id, see OpcUa::NodeID::Type().

Returns
The id.
Exceptions
Anyexception derived from std::exception including CvbException and OpcUaException.

◆ Identifier() [2/2]

String Identifier ( ) const
inline

Returns id of the node id. This is the specialization for string identifier.

Returns
The id.
Exceptions
Anyexception derived from std::exception including CvbException and OpcUaException.

◆ NamespaceIndex()

std::uint16_t NamespaceIndex ( ) const
inline

Returns namespace index.

Returns
Namespace index.
Exceptions
Anyexception derived from std::exception including CvbException and OpcUaException.

◆ Type()

NodeIDType Type ( ) const
inline

Returns type of the node id.

Returns
Type.
Exceptions
Anyexception derived from std::exception including CvbException and OpcUaException.