OPC UA (CVOpcUa.dll) 14.0
OpcUa NodeId Functions

Functions

CVOPCNODEID CreateCVOPCNodeId (TCVOpc_NS0_NodeId NodeId)
 Creates an OPCUA NodeId given the #TCVOpc_NS0_NodeId enumeration type. More...
 
CVOPCNODEID CreateCVOPCNodeIdByteString (cvbuint16_t NamespaceIndex, cvbuint8_t *Identifier, size_t Length)
 Creates an OPCUA NodeId with an Opaque Value (ByteString) identifier which is set as C string. More...
 
CVOPCNODEID CreateCVOPCNodeIdGUID (cvbuint16_t NamespaceIndex, cvbguid_t Identifier)
 Creates an OPCUA NodeId with a GUID identifier which is set as GUID. More...
 
CVOPCNODEID CreateCVOPCNodeIdNumeric (cvbuint16_t NamespaceIndex, cvbuint32_t Identifier)
 Creates an OPCUA NodeId with a numeric identifier which is set as uint32. More...
 
CVOPCNODEID CreateCVOPCNodeIdString (cvbuint16_t NamespaceIndex, const char *Identifier)
 Creates an OPCUA NodeId with a string identifier which is set as C string. More...
 
CVOPCNODEID CreateCVOPCNodeIdStringW (cvbuint16_t NamespaceIndex, const wchar_t *Identifier)
 Creates an OPCUA NodeId with a string identifier which is set as wide C string. More...
 
cvbres_t CVOPCGetNamespaceIndex (CVOPCNODEID NodeId, cvbuint16_t &NamespaceIndex)
 Gets the namespace index of the OPCUA NodeId as a cvbuint16_t. More...
 
cvbres_t CVOPCGetNodeIdExpandedText (CVOPCNODEID NodeId, char *Identifier, size_t &IdSize)
 Gets the string representation of a OPCUA NodeId including namespace and type. More...
 
cvbres_t CVOPCIdType (CVOPCNODEID NodeId, TCVOPCNodeIdType &NodeIdType)
 Gets the type of OPCUA NodeId. More...
 
cvbres_t CVOPCNodeIdAsByteString (CVOPCNODEID NodeId, cvbuint8_t *Identifier, size_t &IdSize)
 Gets the Id of the OPCUA NodeId as an C string if the identifier is opaque (byte string). More...
 
cvbres_t CVOPCNodeIdAsGUID (CVOPCNODEID NodeId, cvbguid_t &Identifier)
 Gets the Id of the OPCUA NodeId as an cvbguid_t if the identifier is GUID. More...
 
cvbres_t CVOPCNodeIdAsInteger (CVOPCNODEID NodeId, cvbuint32_t &Value)
 Gets the Id of the OPCUA NodeId as a cvbuint32_t if the identifier is numeric. More...
 
cvbres_t CVOPCNodeIdAsString (CVOPCNODEID NodeId, char *Identifier, size_t &IdSize)
 Gets the Id of the OPCUA NodeId as an C string if the identifier is string. More...
 
cvbres_t CVOPCNodeIdAsStringW (CVOPCNODEID NodeId, wchar_t *Identifier, size_t &IdSize)
 Gets the Id of the OPCUA NodeId as a wide C string if the identifier is string. More...
 
cvbres_t CVOpcSetNIDExpandedText (CVOPCNODEID NodeId, const char *Identifier)
 Sets the string representation of a OPCUA NodeId including namespace and type. More...
 
cvbbool_t IsCVOPCNodeId (CVOPCNODEID NodeId)
 Tries to check whether given NodeId object is a valid OPCUA NodeId object. More...
 

Detailed Description

Functions to create and access OPCUA NodeId objects and its attributes.

Function Documentation

◆ CreateCVOPCNodeId()

CVOPCNODEID CreateCVOPCNodeId ( TCVOpc_NS0_NodeId  NodeId)

Creates an OPCUA NodeId given the #TCVOpc_NS0_NodeId enumeration type.

Note
#TCVOpc_NS0_NodeId covers most of the OPUA Nodes that are part of the NameSpace 0. The created NodeId will always have a numeric identifier which is regulated in namespace 0.
Attention
Release the returned variableType handle with ReleaseObject if not needed anymore.
Returns
  • #OPCNID NodeId with a numeric identifier;nullptr on error (Use CVOPCGetLastErrorString function for a human readable error description).

◆ CreateCVOPCNodeIdByteString()

CVOPCNODEID CreateCVOPCNodeIdByteString ( cvbuint16_t  NamespaceIndex,
cvbuint8_t *  Identifier,
size_t  Length 
)

Creates an OPCUA NodeId with an Opaque Value (ByteString) identifier which is set as C string.

Attention
Release the returned variableType handle with ReleaseObject if not needed anymore.
Parameters
[in]NamespaceIndexIndex that defines namespace where the NodeId should belong to.
[in]IdThe Id of the NodeId object represented as C string. This string must be 0 terminated.
[in]lengthThe length of the ByteString Identifier (base 64) in bytes.
Returns
  • #OPCNID NodeId with a string identifier;nullptr on error (Use CVOPCGetLastErrorString function for a human readable error description).

◆ CreateCVOPCNodeIdGUID()

CVOPCNODEID CreateCVOPCNodeIdGUID ( cvbuint16_t  NamespaceIndex,
cvbguid_t  Identifier 
)

Creates an OPCUA NodeId with a GUID identifier which is set as GUID.

Attention
Release the returned variableType handle with ReleaseObject if not needed anymore.
Parameters
[in]NamespaceIndexIndex that defines namespace where the NodeId should belong to.
[in]IdThe Id of the NodeId object represented as GUID.
Returns
  • #OPCNID NodeId with a string identifier;nullptr on error (Use CVOPCGetLastErrorString function for a human readable error description).

◆ CreateCVOPCNodeIdNumeric()

CVOPCNODEID CreateCVOPCNodeIdNumeric ( cvbuint16_t  NamespaceIndex,
cvbuint32_t  Identifier 
)

Creates an OPCUA NodeId with a numeric identifier which is set as uint32.

Attention
Release the returned variableType handle with ReleaseObject if not needed anymore.
Parameters
[in]NamespaceIndexIndex that defines namespace where the NodeId should belong to.
[in]IdThe Id of the NodeId object represented as uint32.
Returns
  • #OPCNID NodeId with an numeric identifier;nullptr on error (Use CVOPCGetLastErrorString function for a human readable error description).

◆ CreateCVOPCNodeIdString()

CVOPCNODEID CreateCVOPCNodeIdString ( cvbuint16_t  NamespaceIndex,
const char *  Identifier 
)

Creates an OPCUA NodeId with a string identifier which is set as C string.

Attention
Release the returned variableType handle with ReleaseObject if not needed anymore.
Parameters
[in]NamespaceIndexIndex that defines namespace where the NodeId should belong to.
[in]IdThe Id of the NodeId object represented as string. This String must be 0 terminated.
Returns
  • #OPCNID NodeId with a string identifier;nullptr on error (Use CVOPCGetLastErrorString function for a human readable error description).

◆ CreateCVOPCNodeIdStringW()

CVOPCNODEID CreateCVOPCNodeIdStringW ( cvbuint16_t  NamespaceIndex,
const wchar_t *  Identifier 
)

Creates an OPCUA NodeId with a string identifier which is set as wide C string.

Attention
Release the returned variableType handle with ReleaseObject if not needed anymore.
Parameters
[in]NamespaceIndexIndex that defines namespace where the NodeId should belong to.
[in]IdThe Id of the NodeId object represented as wide string. This wide string must be 0 terminated.
Returns
  • #OPCNID NodeId with a string identifier;nullptr on error (Use CVOPCGetLastErrorString function for a human readable error description).

◆ CVOPCGetNamespaceIndex()

cvbres_t CVOPCGetNamespaceIndex ( CVOPCNODEID  NodeId,
cvbuint16_t &  NamespaceIndex 
)

Gets the namespace index of the OPCUA NodeId as a cvbuint16_t.

Parameters
[in]NodeIdOPCUA NodeId handle.
[out]NamespaceIndexIndex referring to the namespace of the OPCUA Server the NodeId belongs to.
Returns
  • #CVC_ERROR (#CVC_E_OK) on success.
  • #CVC_ERROR (#CVC_E_WRONGOBJECT) if NodeId is not a valid OPCUA NodeId object or OPCUA Node object.
  • Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).

◆ CVOPCGetNodeIdExpandedText()

cvbres_t CVOPCGetNodeIdExpandedText ( CVOPCNODEID  NodeId,
char *  Identifier,
size_t &  IdSize 
)

Gets the string representation of a OPCUA NodeId including namespace and type.

Parameters
[in]OPCNIDOPCUA NodeId handle.
[out]IdentifierWide C string to be filled with requested string representation (expanded) nodeId; noNULL for size inquiry (see ValueSize).
[in,out]ValueSizeGives the buffer size of Value or receives the minimal needed size (including the terminating zero in either case) if Value is NULL.///
Returns
  • #CVC_ERROR (#CVC_E_OK) on success.
  • #CVC_ERROR (#CVC_E_WRONGOBJECT) if NodeId is not a valid OPCUA NodeId object or OPCUA Node object.
  • Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).

◆ CVOPCIdType()

cvbres_t CVOPCIdType ( CVOPCNODEID  NodeId,
TCVOPCNodeIdType &  NodeIdType 
)

Gets the type of OPCUA NodeId.

Attention
Always use initialized variables and initialize unused handles with nullptr.
Parameters
[in]OPCNIDOPCUA NodeId handle.
[out]NodeIdTypeType of the NodeId and its identifier.
Returns
  • #CVC_ERROR (#CVC_E_OK) on success.
  • #CVC_ERROR (#CVC_E_WRONGOBJECT) if NodeId is not a valid OPCUA NodeId object or OPCUA Node object.
  • Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).

◆ CVOPCNodeIdAsByteString()

cvbres_t CVOPCNodeIdAsByteString ( CVOPCNODEID  NodeId,
cvbuint8_t *  Identifier,
size_t &  IdSize 
)

Gets the Id of the OPCUA NodeId as an C string if the identifier is opaque (byte string).

Note
Will return an error code if the identifier of the NodeId is not opaque (byte string).
Parameters
[in]OPCNIDOPCUA NodeId handle.
[out]IdentifierC string to be filled with requested value; NULL for size inquiry (see ValueSize).
[in,out]ValueSizeGives the buffer size of Value or receives the minimal needed size (including the terminating zero in either case) if Value is NULL.///
Returns
  • #CVC_ERROR (#CVC_E_OK) on success.
  • #CVC_ERROR (#CVC_E_WRONGOBJECT) if NodeId is not a valid OPCUA NodeId object or OPCUA Node object.
  • Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).

Todo check if struct is empty

◆ CVOPCNodeIdAsGUID()

cvbres_t CVOPCNodeIdAsGUID ( CVOPCNODEID  NodeId,
cvbguid_t &  Identifier 
)

Gets the Id of the OPCUA NodeId as an cvbguid_t if the identifier is GUID.

Note
Will return an error code if the identifier of the NodeId is not GUID.
Parameters
[in]OPCNIDOPCUA NodeId handle.
[out]IdentifierC string to be filled with requested value; NULL for size inquiry (see ValueSize).
[in,out]ValueSizeGives the buffer size of Value or receives the minimal needed size (including the terminating zero in either case) if Value is NULL.///
Returns
  • #CVC_ERROR (#CVC_E_OK) on success.
  • #CVC_ERROR (#CVC_E_WRONGOBJECT) if NodeId is not a valid OPCUA NodeId object or OPCUA Node object.
  • Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).

Todo check if struct is empty

◆ CVOPCNodeIdAsInteger()

cvbres_t CVOPCNodeIdAsInteger ( CVOPCNODEID  NodeId,
cvbuint32_t &  Value 
)

Gets the Id of the OPCUA NodeId as a cvbuint32_t if the identifier is numeric.

Note
Will return an error code if the identifier of the NodeId is not numeric.
Parameters
[in]OPCNIDOPCUA NodeId handle.
[out]IdentifierReference to variable in which the current value of the numeric identifier for the given NodeId is written.
Returns
  • #CVC_ERROR (#CVC_E_OK) on success.
  • #CVC_ERROR (#CVC_E_WRONGOBJECT) if NodeId is not a valid OPCUA NodeId object or OPCUA Node object.
  • Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).

◆ CVOPCNodeIdAsString()

cvbres_t CVOPCNodeIdAsString ( CVOPCNODEID  NodeId,
char *  Identifier,
size_t &  IdSize 
)

Gets the Id of the OPCUA NodeId as an C string if the identifier is string.

Note
Will return an error code if the identifier of the NodeId is not string.
Parameters
[in]OPCNIDOPCUA NodeId handle.
[out]IdentifierC string to be filled with requested value; NULL for size inquiry (see ValueSize).
[in,out]ValueSizeGives the buffer size of Value or receives the minimal needed size (including the terminating zero in either case) if Value is NULL.///
Returns
  • #CVC_ERROR (#CVC_E_OK) on success.
  • #CVC_ERROR (#CVC_E_WRONGOBJECT) if NodeId is not a valid OPCUA NodeId object or OPCUA Node object.
  • Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).

Todo check if struct is empty

◆ CVOPCNodeIdAsStringW()

cvbres_t CVOPCNodeIdAsStringW ( CVOPCNODEID  NodeId,
wchar_t *  Identifier,
size_t &  IdSize 
)

Gets the Id of the OPCUA NodeId as a wide C string if the identifier is string.

Parameters
[in]OPCNIDOPCUA NodeId handle.
[out]IdentifierWide C string to be filled with requested value; NULL for size inquiry (see ValueSize).
[in,out]ValueSizeGives the buffer size of Value or receives the minimal needed size (including the terminating zero in either case) if Value is NULL.///
Returns
  • #CVC_ERROR (#CVC_E_OK) on success.
  • #CVC_ERROR (#CVC_E_WRONGOBJECT) if NodeId is not a valid OPCUA NodeId object or OPCUA Node object.
  • Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).

Todo check if struct is empty

◆ CVOpcSetNIDExpandedText()

cvbres_t CVOpcSetNIDExpandedText ( CVOPCNODEID  NodeId,
const char *  Identifier 
)

Sets the string representation of a OPCUA NodeId including namespace and type.

Parameters
[in]OPCNIDOPCUA NodeId handle.
[out]IdNew OPCUA nodeId that uses the string representation (expanded). This string must be 0 terminated.
Returns
  • #CVC_ERROR (#CVC_E_OK) on success.
  • #CVC_ERROR (#CVC_E_WRONGOBJECT) if NodeId is not a valid OPCUA NodeId object or OPCUA Node object.
  • Smaller than zero on error (Use CVOPCGetLastErrorString function for a human readable error description).

◆ IsCVOPCNodeId()

cvbbool_t IsCVOPCNodeId ( CVOPCNODEID  NodeId)

Tries to check whether given NodeId object is a valid OPCUA NodeId object.

Attention
Always use initialized variables and initialize unused handles with nullptr.
Parameters
[in]NodeIdhandle to check
Returns
TRUE if it is a valid NodeId object, FALSE otherwise.