ANSI C UA Server SDK  1.6.0.341
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
UaBaseUtilities

Functions

OpcUa_Void UaBase_SetDefaultNamespace (OpcUa_Int16 NsIdx)
 Sets the default namespace index for the convenience functions. More...
 
OpcUa_Int16 UaBase_GetDefaultNamespace ()
 Returns the default namespace. More...
 
OpcUa_Void UaBase_CreateStringNodeId (OpcUa_NodeId *pNodeId, const char *szNodeId)
 Creates a string NodeId with the default namespace. More...
 
OpcUa_Void UaBase_CreateStringNodeIdEx (OpcUa_NodeId *pNodeId, const char *szNodeId, OpcUa_UInt16 NsIdx)
 Creates a string NodeId with the given string and namespace index. More...
 
OpcUa_Void UaBase_CreateNumericNodeId (OpcUa_NodeId *pNodeId, OpcUa_UInt32 id)
 Creates a numeric NodeId with the default namespace. More...
 
OpcUa_Void UaBase_CreateNumericNodeIdEx (OpcUa_NodeId *pNodeId, OpcUa_UInt32 id, OpcUa_UInt16 NsIdx)
 Creates a numeric NodeId with the given id and namespace index. More...
 
OpcUa_Void UaBase_CreateLocalizedText (OpcUa_LocalizedText *pText, const char *pszLocale, const char *pszText)
 Creates an optimized LocalizedText by attaching string constants. More...
 
OpcUa_Void UaBase_CreateQualifiedName (OpcUa_QualifiedName *pName, const char *pszName)
 Creates an optimized QualifiedName by attaching string constants. More...
 
OpcUa_Void UaBase_CreateQualifiedNameEx (OpcUa_QualifiedName *pName, const char *pszName, OpcUa_UInt16 NsIdx)
 Creates an optimized QualifiedName by attaching string constants. More...
 
OpcUa_StatusCode OpcUa_Variant_SetBoolean (OpcUa_Variant *pVariant, OpcUa_Boolean value)
 Initializes a variant with a boolean value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetSByte (OpcUa_Variant *pVariant, OpcUa_SByte value)
 Initializes a variant with a SByte value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetByte (OpcUa_Variant *pVariant, OpcUa_Byte value)
 Initializes a variant with a Byte value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetInt16 (OpcUa_Variant *pVariant, OpcUa_Int16 value)
 Initializes a variant with a Int16 value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetUInt16 (OpcUa_Variant *pVariant, OpcUa_UInt16 value)
 Initializes a variant with a UInt16 value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetInt32 (OpcUa_Variant *pVariant, OpcUa_Int32 value)
 Initializes a variant with a Int32 value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetUInt32 (OpcUa_Variant *pVariant, OpcUa_UInt32 value)
 Initializes a variant with a UInt32 value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetInt64 (OpcUa_Variant *pVariant, OpcUa_Int64 value)
 Initializes a variant with a Int64 value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetUInt64 (OpcUa_Variant *pVariant, OpcUa_UInt64 value)
 Initializes a variant with a UInt64 value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetFloat (OpcUa_Variant *pVariant, OpcUa_Float value)
 Initializes a variant with a Float value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetDouble (OpcUa_Variant *pVariant, OpcUa_Double value)
 Initializes a variant with a Double value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetString (OpcUa_Variant *pVariant, const OpcUa_String *pValue)
 Initializes a variant with a String value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetDateTime (OpcUa_Variant *pVariant, OpcUa_DateTime value)
 Initializes a variant with a DateTime value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetGuid (OpcUa_Variant *pVariant, OpcUa_Guid *pValue)
 Initializes a variant with a Guid value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetByteString (OpcUa_Variant *pVariant, const OpcUa_ByteString *pValue)
 Initializes a variant with a ByteString value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetXmlElement (OpcUa_Variant *pVariant, const OpcUa_XmlElement *pValue)
 Initializes a variant with an XmlElement value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetNodeId (OpcUa_Variant *pVariant, const OpcUa_NodeId *pValue)
 Initializes a variant with a NodeId value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetExpandedNodeId (OpcUa_Variant *pVariant, const OpcUa_ExpandedNodeId *pValue)
 Initializes a variant with a ExpandedNodeId value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetStatusCode (OpcUa_Variant *pVariant, OpcUa_StatusCode value)
 Initializes a variant with a StatusCode value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetQualifiedName (OpcUa_Variant *pVariant, const OpcUa_QualifiedName *pValue)
 Initializes a variant with a QualifiedName value. More...
 
OpcUa_StatusCode OpcUa_Variant_SetLocalizedText (OpcUa_Variant *pVariant, const OpcUa_LocalizedText *pValue)
 Initializes a variant with a LocalizedText value. More...
 
OpcUa_StatusCode UaBase_Structure_To_ExtensionObject (OpcUa_EncodeableType *a_pEncodeableType, OpcUa_UInt16 a_namespaceIndex, OpcUa_Void *a_pValue, OpcUa_ExtensionObject *a_pExtensionObject)
 Serialize a structure into an ExtensionObject. More...
 
OpcUa_StatusCode UaBase_Structure_From_ExtensionObject (OpcUa_EncodeableType *a_pEncodeableType, OpcUa_ExtensionObject *a_pExtensionObject, OpcUa_Void *a_pValue)
 Deserialize an ExtensionObject into a structure. More...
 

Detailed Description

Function Documentation

OpcUa_StatusCode OpcUa_Variant_SetBoolean ( OpcUa_Variant pVariant,
OpcUa_Boolean  value 
)

Initializes a variant with a boolean value.

This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetByte ( OpcUa_Variant pVariant,
OpcUa_Byte  value 
)

Initializes a variant with a Byte value.

This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetByteString ( OpcUa_Variant pVariant,
const OpcUa_ByteString pValue 
)

Initializes a variant with a ByteString value.

This function makes a deep copy of the ByteString. This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetDateTime ( OpcUa_Variant pVariant,
OpcUa_DateTime  value 
)

Initializes a variant with a DateTime value.

This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetDouble ( OpcUa_Variant pVariant,
OpcUa_Double  value 
)

Initializes a variant with a Double value.

This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetExpandedNodeId ( OpcUa_Variant pVariant,
const OpcUa_ExpandedNodeId pValue 
)

Initializes a variant with a ExpandedNodeId value.

This function makes a deep copy of the ExpandedNodeId. This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetFloat ( OpcUa_Variant pVariant,
OpcUa_Float  value 
)

Initializes a variant with a Float value.

This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetGuid ( OpcUa_Variant pVariant,
OpcUa_Guid pValue 
)

Initializes a variant with a Guid value.

This function takes ownership of the given Guid, it does not copy it. So you must not free the Guid after calling this function. This way you can write code like:

1 OpcUa_Variant_SetGuid(&value, OpcUa_Guid_Create(0));

This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetInt16 ( OpcUa_Variant pVariant,
OpcUa_Int16  value 
)

Initializes a variant with a Int16 value.

This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetInt32 ( OpcUa_Variant pVariant,
OpcUa_Int32  value 
)

Initializes a variant with a Int32 value.

This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetInt64 ( OpcUa_Variant pVariant,
OpcUa_Int64  value 
)

Initializes a variant with a Int64 value.

This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetLocalizedText ( OpcUa_Variant pVariant,
const OpcUa_LocalizedText pValue 
)

Initializes a variant with a LocalizedText value.

This function makes a deep copy of the LocalizedText. This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetNodeId ( OpcUa_Variant pVariant,
const OpcUa_NodeId pValue 
)

Initializes a variant with a NodeId value.

This function makes a deep copy of the NodeId. This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetQualifiedName ( OpcUa_Variant pVariant,
const OpcUa_QualifiedName pValue 
)

Initializes a variant with a QualifiedName value.

This function makes a deep copy of the QualifiedName. This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetSByte ( OpcUa_Variant pVariant,
OpcUa_SByte  value 
)

Initializes a variant with a SByte value.

This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetStatusCode ( OpcUa_Variant pVariant,
OpcUa_StatusCode  value 
)

Initializes a variant with a StatusCode value.

This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetString ( OpcUa_Variant pVariant,
const OpcUa_String pValue 
)

Initializes a variant with a String value.

This function makes a deep copy of the String. This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetUInt16 ( OpcUa_Variant pVariant,
OpcUa_UInt16  value 
)

Initializes a variant with a UInt16 value.

This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetUInt32 ( OpcUa_Variant pVariant,
OpcUa_UInt32  value 
)

Initializes a variant with a UInt32 value.

This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetUInt64 ( OpcUa_Variant pVariant,
OpcUa_UInt64  value 
)

Initializes a variant with a UInt64 value.

This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_StatusCode OpcUa_Variant_SetXmlElement ( OpcUa_Variant pVariant,
const OpcUa_XmlElement pValue 
)

Initializes a variant with an XmlElement value.

This function makes a deep copy of the XmlElement. This function intializes the variant structure (it does not clear it). Then it sets the correct datatype and assigns the value.

This function was introduced in V1.3.0.

OpcUa_Void UaBase_CreateLocalizedText ( OpcUa_LocalizedText pText,
const char *  pszLocale,
const char *  pszText 
)

Creates an optimized LocalizedText by attaching string constants.

The given strings are attached to the localized text and must not be freed as this would create a dangling pointer.

This function was introduced in V1.3.0.

Parameters
pTextThe localized text to initialize.
pszLocaleThe string constant to use for the locale.
pszTextThe string constant to use for the text.
OpcUa_Void UaBase_CreateNumericNodeId ( OpcUa_NodeId pNodeId,
OpcUa_UInt32  id 
)

Creates a numeric NodeId with the default namespace.

This function was introduced in V1.3.0.

Parameters
pNodeIdNodeId to initialze.
idNumeric identifier for NodeId.
OpcUa_Void UaBase_CreateNumericNodeIdEx ( OpcUa_NodeId pNodeId,
OpcUa_UInt32  id,
OpcUa_UInt16  NsIdx 
)

Creates a numeric NodeId with the given id and namespace index.

This function was introduced in V1.3.0.

Parameters
pNodeIdNodeId to initialze.
idNumeric identifier for NodeId.
NsIdxThe namespace index to use.
OpcUa_Void UaBase_CreateQualifiedName ( OpcUa_QualifiedName pName,
const char *  pszName 
)

Creates an optimized QualifiedName by attaching string constants.

The default namespace is used as a namespace index.

See also
UaBase_SetDefaultNamespace
UaBase_CreateQualifiedNameEx The given strings are attached to the localized text and must not be freed as this would create a dangling pointer.

This function was introduced in V1.3.0.

Parameters
pNameThe qualified name to initialize.
pszNameThe string constant to use.
OpcUa_Void UaBase_CreateQualifiedNameEx ( OpcUa_QualifiedName pName,
const char *  pszName,
OpcUa_UInt16  NsIdx 
)

Creates an optimized QualifiedName by attaching string constants.

The given strings are attached to the localized text and must not be freed as this would create a dangling pointer.

This function was introduced in V1.3.0.

Parameters
pNameThe qualified name to initialize.
pszNameThe string constant to use.
NsIdxThe namespace index to use.
OpcUa_Void UaBase_CreateStringNodeId ( OpcUa_NodeId pNodeId,
const char *  szNodeId 
)

Creates a string NodeId with the default namespace.

This function attaches read only to the given string constant. This is intended for creating NodeIds from string constants in generated code. The given string constant must not be freed as this would create a dangling pointer.

This function was introduced in V1.3.0.

Parameters
pNodeIdNodeId to initialze.
szNodeIdString constant for NodeId.
OpcUa_Void UaBase_CreateStringNodeIdEx ( OpcUa_NodeId pNodeId,
const char *  szNodeId,
OpcUa_UInt16  NsIdx 
)

Creates a string NodeId with the given string and namespace index.

This function attaches read only to the given string constant. This is intended for creating NodeIds from string constants in generated code. The given string constant must not be freed as this would create a dangling pointer.

This function was introduced in V1.3.0.

Parameters
pNodeIdNodeId to initialze.
szNodeIdString constant for NodeId.
NsIdxThe namespace index to use.
OpcUa_Int16 UaBase_GetDefaultNamespace ( )

Returns the default namespace.

This function was introduced in V1.3.0.

See also
UaBase_SetDefaultNamespace
OpcUa_Void UaBase_SetDefaultNamespace ( OpcUa_Int16  NsIdx)

Sets the default namespace index for the convenience functions.

The default namespace is used by these convenience functions:

  • UaBase_CreateStringNodeId
  • UaBase_CreateNumericNodeId
  • UaBase_CreateQualifiedName

This function was introduced in V1.3.0.

OpcUa_StatusCode UaBase_Structure_From_ExtensionObject ( OpcUa_EncodeableType *  a_pEncodeableType,
OpcUa_ExtensionObject a_pExtensionObject,
OpcUa_Void *  a_pValue 
)

Deserialize an ExtensionObject into a structure.

Parameters
a_pEncodeableTypeThe EncodeableType that describes the structure.
a_pExtensionObjectThe ExtensionObject to deserialize.
a_pValuePointer to the structure into which the ExtensionObject will be deserialized.
OpcUa_StatusCode UaBase_Structure_To_ExtensionObject ( OpcUa_EncodeableType *  a_pEncodeableType,
OpcUa_UInt16  a_namespaceIndex,
OpcUa_Void *  a_pValue,
OpcUa_ExtensionObject a_pExtensionObject 
)

Serialize a structure into an ExtensionObject.

Parameters
a_pEncodeableTypeThe EncodeableType that describes the structure.
a_namespaceIndexThe namespace index the EncodeableType belongs to.
a_pValuePointer to the structure.
a_pExtensionObjectThe ExtensionObject into which the structure will be serialized.