Modules | Data Structures | Defines | Typedefs | Functions
Datatypes

Detailed Description

The built-in datatypes. The remaining datatypes are autogenerated from XML descriptions as they are all enums or structures made up of the built-in datatypes.

All datatypes have similar functions with a common postfix. DO NOT CALL THESE FUNCTIONS WITH NULL-POINTERS IF IT IS NOT EXPLICITLY PERMITTED.

Modules

 Binary Encoding
 

Functions for binary en- and decoding of built-in datatypes as defined in the standard. The encoding of the remaining datatypes is autogenerated from XML descriptions.


 Autogenerated ua_transport Types
 

Data structures that are autogenerated from an XML-Schema.


 Autogenerated ua_types Types
 

Data structures that are autogenerated from an XML-Schema.


Data Structures

struct  UA_String
 A sequence of Unicode characters. More...
struct  UA_Guid
 A 16 byte value that can be used as a globally unique identifier. More...
struct  UA_NodeId
 An identifier for a node in the address space of an OPC UA Server. More...
union  UA_NodeId.identifier
struct  UA_ExpandedNodeId
 A NodeId that allows the namespace URI to be specified instead of an index. More...
struct  UA_QualifiedName
 A name qualified by a namespace. More...
struct  UA_LocalizedText
 Human readable text with an optional locale identifier. More...
struct  UA_ExtensionObject
 A structure that contains an application specific data type that may not be recognized by the receiver. More...
struct  UA_NumericRange
 NumericRanges are used select a subset in a (multidimensional) variant array. NumericRange has no official type structure in the standard. Officially, it only exists as an encoded string, such as "1:2,0:3,5". The colon separates min/max index and the comma separates dimensions. A single value indicates a range with a single element (min==max). More...
struct  UA_Variant
 Variants store (arrays of) any data type. Either they provide a pointer to the data in memory, or functions from which the data can be accessed. Variants are replaced together with the data they store (exception: use a data source). More...
struct  UA_DataValue
 A data value with an associated status code and timestamps. More...
struct  UA_DiagnosticInfo
 A structure that contains detailed error and diagnostic information associated with a StatusCode. More...
struct  UA_DateTimeStruct
struct  UA_DataTypeMember
struct  UA_DataType

Defines

#define UA_TRUE   true
#define UA_FALSE   false
#define UA_SBYTE_MAX   127
#define UA_SBYTE_MIN   -128
#define UA_BYTE_MAX   256
#define UA_BYTE_MIN   0
#define UA_INT16_MAX   32767
#define UA_INT16_MIN   -32768
#define UA_UINT16_MAX   65535
#define UA_UINT16_MIN   0
#define UA_INT32_MAX   2147483647
#define UA_INT32_MIN   -2147483648
#define UA_UINT32_MAX   4294967295
#define UA_UINT32_MIN   0
#define UA_INT64_MAX   9223372036854775807
#define UA_INT64_MIN   -9223372036854775808
#define UA_UINT64_MAX   = 18446744073709551615
#define UA_UINT64_MIN   = 0
#define UA_TYPE_HANDLING_FUNCTIONS(TYPE)
#define UA_DateTime_new   UA_Int64_new
#define UA_DateTime_init   UA_Int64_init
#define UA_DateTime_delete   UA_Int64_delete
#define UA_DateTime_deleteMembers   UA_Int64_deleteMembers
#define UA_DateTime_copy   UA_Int64_copy
#define UA_ByteString_new   UA_String_new
#define UA_ByteString_init   UA_String_init
#define UA_ByteString_delete   UA_String_delete
#define UA_ByteString_deleteMembers   UA_String_deleteMembers
#define UA_ByteString_copy   UA_String_copy
#define UA_XmlElement_new   UA_String_new
#define UA_XmlElement_init   UA_String_init
#define UA_XmlElement_delete   UA_String_delete
#define UA_XmlElement_deleteMembers   UA_String_deleteMembers
#define UA_XmlElement_copy   UA_String_copy
#define UA_StatusCode_new(p)   UA_Int32_new((UA_Int32*)p)
#define UA_StatusCode_init(p)   UA_Int32_init((UA_Int32*)p)
#define UA_StatusCode_delete(p)   UA_Int32_delete((UA_Int32*)p)
#define UA_StatusCode_deleteMembers(p)   UA_Int32_deleteMembers((UA_Int32*)p)
#define UA_StatusCode_copy(p)   UA_Int32_copy((UA_Int32*)p)
#define UA_STRING_ALLOC(CHARS)   UA_String_fromChars(CHARS)
#define UA_STRING(CHARS)   (UA_String) {strlen(CHARS), (UA_Byte*)CHARS }
#define UA_STRING_NULL   (UA_String) {-1, (UA_Byte*)0 }
#define UA_BYTESTRING_NULL   (UA_ByteString) {-1, (UA_Byte*)0 }
#define UA_ByteString_equal(string1, string2)   UA_String_equal((const UA_String*) string1, (const UA_String*)string2)
#define UA_NODEID_NUMERIC(NS_INDEX, NUMERICID)   UA_NodeId_fromInteger(NS_INDEX, NUMERICID)
#define UA_NODEID_STRING(NS_INDEX, CHARS)   UA_NodeId_fromCharString(NS_INDEX, CHARS)
#define UA_NODEID_STRING_ALLOC(NS_INDEX, CHARS)   UA_NodeId_fromCharStringCopy(NS_INDEX, CHARS)
#define UA_NODEID_GUID(NS_INDEX, GUID)   UA_NodeId_fromGuid(NS_INDEX, GUID)
#define UA_NODEID_BYTESTRING(NS_INDEX, CHARS)   UA_NodeId_fromCharByteString(NS_INDEX, CHARS)
#define UA_NODEID_BYTESTRING_ALLOC(NS_INDEX, CHARS)   UA_NodeId_fromCharStringCopy(NS_INDEX, CHARS)
#define UA_NODEID_NULL   UA_NODEID_NUMERIC(0,0)
#define UA_EXPANDEDNODEID_NUMERIC(NS_INDEX, NUMERICID)
#define UA_QUALIFIEDNAME(NS_INDEX, CHARS)
#define UA_QUALIFIEDNAME_ALLOC(NS_INDEX, CHARS)
#define UA_LOCALIZEDTEXT(LOCALE, TEXT)
#define UA_LOCALIZEDTEXT_ALLOC(LOCALE, TEXT)
#define UA_MAX_TYPE_MEMBERS   13
#define UA_BITFIELD(SIZE)   : SIZE
#define UA_IS_BUILTIN(ID)   (ID <= UA_TYPES_DIAGNOSTICINFO)
#define MAX_ARRAY_SIZE   104857600

Typedefs

typedef bool UA_Boolean
 A two-state logical value (true or false).
typedef int8_t UA_SByte
 An integer value between -129 and 127.
typedef uint8_t UA_Byte
 An integer value between 0 and 256.
typedef int16_t UA_Int16
 An integer value between -32 768 and 32 767.
typedef uint16_t UA_UInt16
 An integer value between 0 and 65 535.
typedef int32_t UA_Int32
 An integer value between -2 147 483 648 and 2 147 483 647.
typedef uint32_t UA_UInt32
 An integer value between 0 and 429 4967 295.
typedef int64_t UA_Int64
 An integer value between -10 223 372 036 854 775 808 and 9 223 372 036 854 775 807.
typedef uint64_t UA_UInt64
 An integer value between 0 and 18 446 744 073 709 551 615.
typedef float UA_Float
 An IEEE single precision (32 bit) floating point value.
typedef double UA_Double
 An IEEE double precision (64 bit) floating point value.
typedef UA_Int64 UA_DateTime
 An instance in time. A DateTime value is encoded as a 64-bit signed integer which represents the number of 100 nanosecond intervals since January 1, 1601 (UTC).
typedef UA_String UA_ByteString
 A sequence of octets.
typedef UA_String UA_XmlElement
 An XML element.
typedef enum UA_StatusCode UA_StatusCode
 A numeric identifier for a error or condition that is associated with a value or an operation.

Functions

UA_Boolean UA_EXPORTUA_Boolean_new (void)
void UA_EXPORT UA_Boolean_init (UA_Boolean *p)
void UA_EXPORT UA_Boolean_delete (UA_Boolean *p)
void UA_EXPORT UA_Boolean_deleteMembers (UA_Boolean *p)
UA_StatusCode UA_EXPORT UA_Boolean_copy (const UA_Boolean *src, UA_Boolean *dst)
UA_SByte UA_EXPORTUA_SByte_new (void)
void UA_EXPORT UA_SByte_init (UA_SByte *p)
void UA_EXPORT UA_SByte_delete (UA_SByte *p)
void UA_EXPORT UA_SByte_deleteMembers (UA_SByte *p)
UA_StatusCode UA_EXPORT UA_SByte_copy (const UA_SByte *src, UA_SByte *dst)
UA_Byte UA_EXPORTUA_Byte_new (void)
void UA_EXPORT UA_Byte_init (UA_Byte *p)
void UA_EXPORT UA_Byte_delete (UA_Byte *p)
void UA_EXPORT UA_Byte_deleteMembers (UA_Byte *p)
UA_StatusCode UA_EXPORT UA_Byte_copy (const UA_Byte *src, UA_Byte *dst)
UA_Int16 UA_EXPORTUA_Int16_new (void)
void UA_EXPORT UA_Int16_init (UA_Int16 *p)
void UA_EXPORT UA_Int16_delete (UA_Int16 *p)
void UA_EXPORT UA_Int16_deleteMembers (UA_Int16 *p)
UA_StatusCode UA_EXPORT UA_Int16_copy (const UA_Int16 *src, UA_Int16 *dst)
UA_UInt16 UA_EXPORTUA_UInt16_new (void)
void UA_EXPORT UA_UInt16_init (UA_UInt16 *p)
void UA_EXPORT UA_UInt16_delete (UA_UInt16 *p)
void UA_EXPORT UA_UInt16_deleteMembers (UA_UInt16 *p)
UA_StatusCode UA_EXPORT UA_UInt16_copy (const UA_UInt16 *src, UA_UInt16 *dst)
UA_Int32 UA_EXPORTUA_Int32_new (void)
void UA_EXPORT UA_Int32_init (UA_Int32 *p)
void UA_EXPORT UA_Int32_delete (UA_Int32 *p)
void UA_EXPORT UA_Int32_deleteMembers (UA_Int32 *p)
UA_StatusCode UA_EXPORT UA_Int32_copy (const UA_Int32 *src, UA_Int32 *dst)
UA_UInt32 UA_EXPORTUA_UInt32_new (void)
void UA_EXPORT UA_UInt32_init (UA_UInt32 *p)
void UA_EXPORT UA_UInt32_delete (UA_UInt32 *p)
void UA_EXPORT UA_UInt32_deleteMembers (UA_UInt32 *p)
UA_StatusCode UA_EXPORT UA_UInt32_copy (const UA_UInt32 *src, UA_UInt32 *dst)
UA_Int64 UA_EXPORTUA_Int64_new (void)
void UA_EXPORT UA_Int64_init (UA_Int64 *p)
void UA_EXPORT UA_Int64_delete (UA_Int64 *p)
void UA_EXPORT UA_Int64_deleteMembers (UA_Int64 *p)
UA_StatusCode UA_EXPORT UA_Int64_copy (const UA_Int64 *src, UA_Int64 *dst)
UA_UInt64 UA_EXPORTUA_UInt64_new (void)
void UA_EXPORT UA_UInt64_init (UA_UInt64 *p)
void UA_EXPORT UA_UInt64_delete (UA_UInt64 *p)
void UA_EXPORT UA_UInt64_deleteMembers (UA_UInt64 *p)
UA_StatusCode UA_EXPORT UA_UInt64_copy (const UA_UInt64 *src, UA_UInt64 *dst)
UA_Float UA_EXPORTUA_Float_new (void)
void UA_EXPORT UA_Float_init (UA_Float *p)
void UA_EXPORT UA_Float_delete (UA_Float *p)
void UA_EXPORT UA_Float_deleteMembers (UA_Float *p)
UA_StatusCode UA_EXPORT UA_Float_copy (const UA_Float *src, UA_Float *dst)
UA_Double UA_EXPORTUA_Double_new (void)
void UA_EXPORT UA_Double_init (UA_Double *p)
void UA_EXPORT UA_Double_delete (UA_Double *p)
void UA_EXPORT UA_Double_deleteMembers (UA_Double *p)
UA_StatusCode UA_EXPORT UA_Double_copy (const UA_Double *src, UA_Double *dst)
UA_String UA_EXPORTUA_String_new (void)
void UA_EXPORT UA_String_init (UA_String *p)
void UA_EXPORT UA_String_delete (UA_String *p)
void UA_EXPORT UA_String_deleteMembers (UA_String *p)
UA_StatusCode UA_EXPORT UA_String_copy (const UA_String *src, UA_String *dst)
UA_Guid UA_EXPORTUA_Guid_new (void)
void UA_EXPORT UA_Guid_init (UA_Guid *p)
void UA_EXPORT UA_Guid_delete (UA_Guid *p)
void UA_EXPORT UA_Guid_deleteMembers (UA_Guid *p)
UA_StatusCode UA_EXPORT UA_Guid_copy (const UA_Guid *src, UA_Guid *dst)
UA_NodeId UA_EXPORTUA_NodeId_new (void)
void UA_EXPORT UA_NodeId_init (UA_NodeId *p)
void UA_EXPORT UA_NodeId_delete (UA_NodeId *p)
void UA_EXPORT UA_NodeId_deleteMembers (UA_NodeId *p)
UA_StatusCode UA_EXPORT UA_NodeId_copy (const UA_NodeId *src, UA_NodeId *dst)
UA_ExpandedNodeId UA_EXPORTUA_ExpandedNodeId_new (void)
void UA_EXPORT UA_ExpandedNodeId_init (UA_ExpandedNodeId *p)
void UA_EXPORT UA_ExpandedNodeId_delete (UA_ExpandedNodeId *p)
void UA_EXPORT UA_ExpandedNodeId_deleteMembers (UA_ExpandedNodeId *p)
UA_StatusCode UA_EXPORT UA_ExpandedNodeId_copy (const UA_ExpandedNodeId *src, UA_ExpandedNodeId *dst)
UA_QualifiedName UA_EXPORTUA_QualifiedName_new (void)
void UA_EXPORT UA_QualifiedName_init (UA_QualifiedName *p)
void UA_EXPORT UA_QualifiedName_delete (UA_QualifiedName *p)
void UA_EXPORT UA_QualifiedName_deleteMembers (UA_QualifiedName *p)
UA_StatusCode UA_EXPORT UA_QualifiedName_copy (const UA_QualifiedName *src, UA_QualifiedName *dst)
UA_LocalizedText UA_EXPORTUA_LocalizedText_new (void)
void UA_EXPORT UA_LocalizedText_init (UA_LocalizedText *p)
void UA_EXPORT UA_LocalizedText_delete (UA_LocalizedText *p)
void UA_EXPORT UA_LocalizedText_deleteMembers (UA_LocalizedText *p)
UA_StatusCode UA_EXPORT UA_LocalizedText_copy (const UA_LocalizedText *src, UA_LocalizedText *dst)
UA_ExtensionObject UA_EXPORTUA_ExtensionObject_new (void)
void UA_EXPORT UA_ExtensionObject_init (UA_ExtensionObject *p)
void UA_EXPORT UA_ExtensionObject_delete (UA_ExtensionObject *p)
void UA_EXPORT UA_ExtensionObject_deleteMembers (UA_ExtensionObject *p)
UA_StatusCode UA_EXPORT UA_ExtensionObject_copy (const UA_ExtensionObject *src, UA_ExtensionObject *dst)
UA_DataValue UA_EXPORTUA_DataValue_new (void)
void UA_EXPORT UA_DataValue_init (UA_DataValue *p)
void UA_EXPORT UA_DataValue_delete (UA_DataValue *p)
void UA_EXPORT UA_DataValue_deleteMembers (UA_DataValue *p)
UA_StatusCode UA_EXPORT UA_DataValue_copy (const UA_DataValue *src, UA_DataValue *dst)
UA_Variant UA_EXPORTUA_Variant_new (void)
void UA_EXPORT UA_Variant_init (UA_Variant *p)
void UA_EXPORT UA_Variant_delete (UA_Variant *p)
void UA_EXPORT UA_Variant_deleteMembers (UA_Variant *p)
UA_StatusCode UA_EXPORT UA_Variant_copy (const UA_Variant *src, UA_Variant *dst)
UA_DiagnosticInfo UA_EXPORTUA_DiagnosticInfo_new (void)
void UA_EXPORT UA_DiagnosticInfo_init (UA_DiagnosticInfo *p)
void UA_EXPORT UA_DiagnosticInfo_delete (UA_DiagnosticInfo *p)
void UA_EXPORT UA_DiagnosticInfo_deleteMembers (UA_DiagnosticInfo *p)
UA_StatusCode UA_EXPORT UA_DiagnosticInfo_copy (const UA_DiagnosticInfo *src, UA_DiagnosticInfo *dst)
UA_String UA_EXPORT UA_String_fromChars (char const src[])
UA_StatusCode UA_EXPORT UA_String_copyprintf (char const fmt[], UA_String *dst,...)
UA_Boolean UA_EXPORT UA_String_equal (const UA_String *string1, const UA_String *string2)
UA_Boolean UA_EXPORT UA_String_equalchars (const UA_String *string1, char *charString)
UA_DateTime UA_EXPORT UA_DateTime_now (void)
UA_DateTimeStruct UA_EXPORT UA_DateTime_toStruct (UA_DateTime time)
UA_StatusCode UA_EXPORT UA_DateTime_toString (UA_DateTime time, UA_String *timeString)
UA_Boolean UA_EXPORT UA_Guid_equal (const UA_Guid *g1, const UA_Guid *g2)
UA_Guid UA_EXPORT UA_Guid_random (UA_UInt32 *seed)
UA_StatusCode UA_EXPORT UA_ByteString_newMembers (UA_ByteString *p, UA_Int32 length)
UA_Boolean UA_EXPORT UA_NodeId_equal (const UA_NodeId *n1, const UA_NodeId *n2)
UA_Boolean UA_EXPORT UA_NodeId_isNull (const UA_NodeId *p)
UA_NodeId UA_EXPORT UA_NodeId_fromInteger (UA_UInt16 nsIndex, UA_Int32 identifier)
UA_NodeId UA_EXPORT UA_NodeId_fromCharString (UA_UInt16 nsIndex, char identifier[])
UA_NodeId UA_EXPORT UA_NodeId_fromCharStringCopy (UA_UInt16 nsIndex, char const identifier[])
UA_NodeId UA_EXPORT UA_NodeId_fromString (UA_UInt16 nsIndex, UA_String identifier)
UA_NodeId UA_EXPORT UA_NodeId_fromStringCopy (UA_UInt16 nsIndex, UA_String identifier)
UA_NodeId UA_EXPORT UA_NodeId_fromGuid (UA_UInt16 nsIndex, UA_Guid identifier)
UA_NodeId UA_EXPORT UA_NodeId_fromCharByteString (UA_UInt16 nsIndex, char identifier[])
UA_NodeId UA_EXPORT UA_NodeId_fromCharByteStringCopy (UA_UInt16 nsIndex, char const identifier[])
UA_NodeId UA_EXPORT UA_NodeId_fromByteString (UA_UInt16 nsIndex, UA_ByteString identifier)
UA_NodeId UA_EXPORT UA_NodeId_fromByteStringCopy (UA_UInt16 nsIndex, UA_ByteString identifier)
UA_Boolean UA_EXPORT UA_ExpandedNodeId_isNull (const UA_ExpandedNodeId *p)
UA_Boolean UA_EXPORT UA_Variant_isScalar (const UA_Variant *v)
UA_StatusCode UA_EXPORT UA_Variant_setScalar (UA_Variant *v, void *p, const UA_DataType *type)
UA_StatusCode UA_EXPORT UA_Variant_setScalarCopy (UA_Variant *v, const void *p, const UA_DataType *type)
UA_StatusCode UA_EXPORT UA_Variant_setArray (UA_Variant *v, void *array, UA_Int32 noElements, const UA_DataType *type)
UA_StatusCode UA_EXPORT UA_Variant_setArrayCopy (UA_Variant *v, const void *array, UA_Int32 noElements, const UA_DataType *type)
UA_StatusCode UA_EXPORT UA_Variant_copyRange (const UA_Variant *src, UA_Variant *dst, UA_NumericRange range)
UA_StatusCode UA_EXPORT UA_Variant_setRange (UA_Variant *v, void *dataArray, UA_Int32 dataArraySize, const UA_NumericRange range)
UA_StatusCode UA_EXPORT UA_Variant_setRangeCopy (UA_Variant *v, const void *dataArray, UA_Int32 dataArraySize, const UA_NumericRange range)
void UA_EXPORTUA_new (const UA_DataType *dataType)
void UA_EXPORT UA_init (void *p, const UA_DataType *dataType)
UA_StatusCode UA_EXPORT UA_copy (const void *src, void *dst, const UA_DataType *dataType)
void UA_EXPORT UA_deleteMembers (void *p, const UA_DataType *dataType)
void UA_EXPORT UA_delete (void *p, const UA_DataType *dataType)
void UA_EXPORTUA_Array_new (const UA_DataType *dataType, UA_Int32 noElements)
UA_StatusCode UA_EXPORT UA_Array_copy (const void *src, void **dst, const UA_DataType *dataType, UA_Int32 noElements)
void UA_EXPORT UA_Array_delete (void *p, const UA_DataType *dataType, UA_Int32 noElements)

Data Structure Documentation

struct UA_String

A sequence of Unicode characters.

Data Fields
UA_Byte * data
UA_Int32 length
struct UA_Guid

A 16 byte value that can be used as a globally unique identifier.

Data Fields
UA_UInt32 data1
UA_UInt16 data2
UA_UInt16 data3
UA_Byte data4
union UA_NodeId.identifier
Data Fields
UA_ByteString byteString
UA_Guid guid
UA_UInt32 numeric
UA_String string
struct UA_ExpandedNodeId

A NodeId that allows the namespace URI to be specified instead of an index.

Data Fields
UA_String namespaceUri
UA_NodeId nodeId
UA_UInt32 serverIndex
struct UA_QualifiedName

A name qualified by a namespace.

Data Fields
UA_String name
UA_UInt16 namespaceIndex
struct UA_LocalizedText

Human readable text with an optional locale identifier.

Data Fields
UA_String locale
UA_String text
struct UA_NumericRange

NumericRanges are used select a subset in a (multidimensional) variant array. NumericRange has no official type structure in the standard. Officially, it only exists as an encoded string, such as "1:2,0:3,5". The colon separates min/max index and the comma separates dimensions. A single value indicates a range with a single element (min==max).

Data Fields
struct UA_NumericRangeDimension * dimensions
UA_Int32 dimensionsSize
struct UA_DataValue

A data value with an associated status code and timestamps.

Data Fields
UA_Boolean hasServerPicoseconds: 1
UA_Boolean hasServerTimestamp: 1
UA_Boolean hasSourcePicoseconds: 1
UA_Boolean hasSourceTimestamp: 1
UA_Boolean hasStatus: 1
UA_Boolean hasValue: 1
UA_Int16 serverPicoseconds
UA_DateTime serverTimestamp
UA_Int16 sourcePicoseconds
UA_DateTime sourceTimestamp
UA_StatusCode status
UA_Variant value
struct UA_DiagnosticInfo

A structure that contains detailed error and diagnostic information associated with a StatusCode.

Data Fields
UA_String additionalInfo
UA_Boolean hasAdditionalInfo: 1
UA_Boolean hasInnerDiagnosticInfo: 1
UA_Boolean hasInnerStatusCode: 1
UA_Boolean hasLocale: 1
UA_Boolean hasLocalizedText: 1
UA_Boolean hasNamespaceUri: 1
UA_Boolean hasSymbolicId: 1
struct UA_DiagnosticInfo * innerDiagnosticInfo
UA_StatusCode innerStatusCode
UA_Int32 locale
UA_Int32 localizedText
UA_Int32 namespaceUri
UA_Int32 symbolicId
struct UA_DateTimeStruct
Data Fields
UA_Int16 day
UA_Int16 hour
UA_Int16 microSec
UA_Int16 milliSec
UA_Int16 min
UA_Int16 month
UA_Int16 nanoSec
UA_Int16 sec
UA_Int16 year
struct UA_DataTypeMember
Data Fields
UA_Boolean isArray: 1 The member is an array of the given type.
UA_UInt16 memberTypeIndex: 9 Index of the member in the datatypetable.
UA_Boolean namespaceZero: 1 The type of the member is defined in namespace zero. In this implementation, types from custom namespace may contain members from the same namespace or ns0 only.
UA_Byte padding: 5 How much padding is there before this member element? For arrays this is split into 2 bytes padding before the length index (max 4 bytes) and 3 bytes padding before the pointer (max 8 bytes)
struct UA_DataType
Data Fields
UA_Boolean fixedSize: 1 The type (and its members) contains no pointers.
UA_DataTypeMember members
UA_Byte membersSize How many members does the type have?
ptrdiff_t memSize: 16 Size of the struct in memory.
UA_Boolean namespaceZero: 1 The type is defined in namespace zero.
UA_NodeId typeId The nodeid of the type.
UA_UInt16 typeIndex: 13 Index of the type in the datatypetable.
UA_Boolean zeroCopyable: 1 Can the type be copied directly off the stream?

Define Documentation

#define MAX_ARRAY_SIZE   104857600
#define UA_BITFIELD (   SIZE)    : SIZE
#define UA_BYTE_MAX   256
#define UA_BYTE_MIN   0
#define UA_ByteString_equal (   string1,
  string2 
)    UA_String_equal((const UA_String*) string1, (const UA_String*)string2)
#define UA_BYTESTRING_NULL   (UA_ByteString) {-1, (UA_Byte*)0 }
#define UA_EXPANDEDNODEID_NUMERIC (   NS_INDEX,
  NUMERICID 
)
Value:
(UA_ExpandedNodeId) {            \
        .nodeId = {.namespaceIndex = NS_INDEX, .identifierType = UA_NODEIDTYPE_NUMERIC, \
                   .identifier.numeric = NUMERICID },                                   \
        .serverIndex = 0, .namespaceUri = {.data = (UA_Byte*)0, .length = -1} }
#define UA_FALSE   false
#define UA_INT16_MAX   32767
#define UA_INT16_MIN   -32768
#define UA_INT32_MAX   2147483647
#define UA_INT32_MIN   -2147483648
#define UA_INT64_MAX   9223372036854775807
#define UA_INT64_MIN   -9223372036854775808
#define UA_IS_BUILTIN (   ID)    (ID <= UA_TYPES_DIAGNOSTICINFO)
#define UA_LOCALIZEDTEXT (   LOCALE,
  TEXT 
)
Value:
(const UA_LocalizedText) {       \
        .locale = UA_STRING(LOCALE), .text = UA_STRING(TEXT) }
#define UA_LOCALIZEDTEXT_ALLOC (   LOCALE,
  TEXT 
)
Value:
(UA_LocalizedText) {       \
        .locale = UA_STRING_ALLOC(LOCALE), .text = UA_STRING_ALLOC(TEXT) }
#define UA_MAX_TYPE_MEMBERS   13
#define UA_NODEID_BYTESTRING (   NS_INDEX,
  CHARS 
)    UA_NodeId_fromCharByteString(NS_INDEX, CHARS)
#define UA_NODEID_BYTESTRING_ALLOC (   NS_INDEX,
  CHARS 
)    UA_NodeId_fromCharStringCopy(NS_INDEX, CHARS)
#define UA_NODEID_GUID (   NS_INDEX,
  GUID 
)    UA_NodeId_fromGuid(NS_INDEX, GUID)
#define UA_NODEID_NULL   UA_NODEID_NUMERIC(0,0)
#define UA_NODEID_NUMERIC (   NS_INDEX,
  NUMERICID 
)    UA_NodeId_fromInteger(NS_INDEX, NUMERICID)
#define UA_NODEID_STRING (   NS_INDEX,
  CHARS 
)    UA_NodeId_fromCharString(NS_INDEX, CHARS)
#define UA_NODEID_STRING_ALLOC (   NS_INDEX,
  CHARS 
)    UA_NodeId_fromCharStringCopy(NS_INDEX, CHARS)
#define UA_QUALIFIEDNAME (   NS_INDEX,
  CHARS 
)
Value:
(const UA_QualifiedName) {    \
        .namespaceIndex = NS_INDEX, .name = UA_STRING(CHARS) }
#define UA_QUALIFIEDNAME_ALLOC (   NS_INDEX,
  CHARS 
)
Value:
(UA_QualifiedName) {    \
        .namespaceIndex = NS_INDEX, .name = UA_STRING_ALLOC(CHARS) }
#define UA_SBYTE_MAX   127
#define UA_SBYTE_MIN   -128
#define UA_StatusCode_copy (   p)    UA_Int32_copy((UA_Int32*)p)
#define UA_StatusCode_delete (   p)    UA_Int32_delete((UA_Int32*)p)
#define UA_StatusCode_init (   p)    UA_Int32_init((UA_Int32*)p)
#define UA_StatusCode_new (   p)    UA_Int32_new((UA_Int32*)p)
#define UA_STRING (   CHARS)    (UA_String) {strlen(CHARS), (UA_Byte*)CHARS }
#define UA_STRING_ALLOC (   CHARS)    UA_String_fromChars(CHARS)
#define UA_STRING_NULL   (UA_String) {-1, (UA_Byte*)0 }
#define UA_TRUE   true
#define UA_TYPE_HANDLING_FUNCTIONS (   TYPE)
Value:
TYPE UA_EXPORT * TYPE##_new(void);                               \
    void UA_EXPORT TYPE##_init(TYPE * p);                            \
    void UA_EXPORT TYPE##_delete(TYPE * p);                          \
    void UA_EXPORT TYPE##_deleteMembers(TYPE * p);                   \
    UA_StatusCode UA_EXPORT TYPE##_copy(const TYPE *src, TYPE *dst);
#define UA_UINT16_MAX   65535
#define UA_UINT16_MIN   0
#define UA_UINT32_MAX   4294967295
#define UA_UINT32_MIN   0
#define UA_UINT64_MAX   = 18446744073709551615
#define UA_UINT64_MIN   = 0

Typedef Documentation

typedef bool UA_Boolean

A two-state logical value (true or false).

typedef uint8_t UA_Byte

An integer value between 0 and 256.

A sequence of octets.

An instance in time. A DateTime value is encoded as a 64-bit signed integer which represents the number of 100 nanosecond intervals since January 1, 1601 (UTC).

typedef double UA_Double

An IEEE double precision (64 bit) floating point value.

typedef float UA_Float

An IEEE single precision (32 bit) floating point value.

typedef int16_t UA_Int16

An integer value between -32 768 and 32 767.

typedef int32_t UA_Int32

An integer value between -2 147 483 648 and 2 147 483 647.

typedef int64_t UA_Int64

An integer value between -10 223 372 036 854 775 808 and 9 223 372 036 854 775 807.

typedef int8_t UA_SByte

An integer value between -129 and 127.

A numeric identifier for a error or condition that is associated with a value or an operation.

typedef uint16_t UA_UInt16

An integer value between 0 and 65 535.

typedef uint32_t UA_UInt32

An integer value between 0 and 429 4967 295.

typedef uint64_t UA_UInt64

An integer value between 0 and 18 446 744 073 709 551 615.

An XML element.


Function Documentation

UA_StatusCode UA_EXPORT UA_Array_copy ( const void *  src,
void **  dst,
const UA_DataType dataType,
UA_Int32  noElements 
)

Allocates and copies an array. dst is set to (void*)0 if not enough memory is available.

Parameters:
srcThe memory location of the souce array
dstThe memory location where the pointer to the destination array is written
dataTypeThe datatype of the array members
noElementsThe size of the array
Returns:
Indicates whether the operation succeeded or returns an error code
void UA_EXPORT UA_Array_delete ( void *  p,
const UA_DataType dataType,
UA_Int32  noElements 
)

Deletes an array.

Parameters:
srcThe memory location of the array
dataTypeThe datatype of the array members
noElementsThe size of the array
void UA_EXPORT* UA_Array_new ( const UA_DataType dataType,
UA_Int32  noElements 
)

Allocates and initializes an array of variables of a specific type

Parameters:
dataTypeThe datatype description
Returns:
Returns the memory location of the variable or (void*)0 if no memory could be allocated
UA_StatusCode UA_EXPORT UA_Byte_copy ( const UA_Byte src,
UA_Byte dst 
)

Allocates memory of size length for the bytestring. The content is not set to zero.

UA_StatusCode UA_EXPORT UA_copy ( const void *  src,
void *  dst,
const UA_DataType dataType 
)

Copies the content of two variables. If copying fails (e.g. because no memory was available for an array), then dst is emptied and initialized to prevent memory leaks.

Parameters:
srcThe memory location of the source variable
dstThe memory location of the destination variable
dataTypeThe datatype description
Returns:
Indicates whether the operation succeeded or returns an error code

Returns the current time

void UA_EXPORT UA_delete ( void *  p,
const UA_DataType dataType 
)

Deletes (frees) a variable and all of its content.

Parameters:
pThe memory location of the variable
dataTypeThe datatype description of the variable
void UA_EXPORT UA_deleteMembers ( void *  p,
const UA_DataType dataType 
)

Deletes the dynamically assigned content of a variable (e.g. a member-array). Afterwards, the variable can be safely deleted without causing memory leaks. But the variable is not initialized and may contain old data that is not memory-relevant.

Parameters:
pThe memory location of the variable
dataTypeThe datatype description of the variable
UA_StatusCode UA_EXPORT UA_Float_copy ( const UA_Float src,
UA_Float dst 
)
UA_StatusCode UA_EXPORT UA_Guid_copy ( const UA_Guid src,
UA_Guid dst 
)
UA_Boolean UA_EXPORT UA_Guid_equal ( const UA_Guid g1,
const UA_Guid g2 
)

Compares two guids

Returns a randomly generated guid. Do not use for security-critical entropy!

void UA_EXPORT UA_init ( void *  p,
const UA_DataType dataType 
)

Initializes a variable to default values

Parameters:
pThe memory location of the variable
dataTypeThe datatype description
UA_StatusCode UA_EXPORT UA_Int16_copy ( const UA_Int16 src,
UA_Int16 dst 
)
UA_StatusCode UA_EXPORT UA_Int32_copy ( const UA_Int32 src,
UA_Int32 dst 
)
UA_StatusCode UA_EXPORT UA_Int64_copy ( const UA_Int64 src,
UA_Int64 dst 
)
void UA_EXPORT* UA_new ( const UA_DataType dataType)

Allocates and initializes a variable of type dataType

Parameters:
dataTypeThe datatype description
Returns:
Returns the memory location of the variable or (void*)0 if no memory is available
UA_Boolean UA_EXPORT UA_NodeId_equal ( const UA_NodeId n1,
const UA_NodeId n2 
)

Compares two nodeids

UA_NodeId UA_EXPORT UA_NodeId_fromCharByteString ( UA_UInt16  nsIndex,
char  identifier[] 
)
UA_NodeId UA_EXPORT UA_NodeId_fromCharByteStringCopy ( UA_UInt16  nsIndex,
char const  identifier[] 
)
UA_NodeId UA_EXPORT UA_NodeId_fromCharString ( UA_UInt16  nsIndex,
char  identifier[] 
)
UA_NodeId UA_EXPORT UA_NodeId_fromCharStringCopy ( UA_UInt16  nsIndex,
char const  identifier[] 
)
UA_NodeId UA_EXPORT UA_NodeId_fromGuid ( UA_UInt16  nsIndex,
UA_Guid  identifier 
)

Is the nodeid a null-nodeid?

UA_StatusCode UA_EXPORT UA_SByte_copy ( const UA_SByte src,
UA_SByte dst 
)
UA_StatusCode UA_EXPORT UA_String_copyprintf ( char const  fmt[],
UA_String dst,
  ... 
)

Printf a char-array into a UA_String. Memory for the string data is allocated.

UA_Boolean UA_EXPORT UA_String_equal ( const UA_String string1,
const UA_String string2 
)

Compares two strings

UA_Boolean UA_EXPORT UA_String_equalchars ( const UA_String string1,
char *  charString 
)

Compares an UA String with a char array

UA_String UA_EXPORT UA_String_fromChars ( char const  src[])

Copy a (zero terminated) char-array into a UA_String. Memory for the string data is allocated. If the memory cannot be allocated, a null-string is returned.

Copy the variant, but use only a subset of the (multidimensional) array into a variant. Returns an error code if the variant is not an array or if the indicated range does not fit.

Returns true if the variant contains a scalar value. Note that empty variants contain an array of length -1 (undefined).

Parameters:
vThe variant
Returns:
Does the variant contain a scalar value.
UA_StatusCode UA_EXPORT UA_Variant_setArray ( UA_Variant v,
void *  array,
UA_Int32  noElements,
const UA_DataType type 
)

Set the variant to an array that already resides in memory. The array takes on the lifecycle of the variant and is deleted with it.

Parameters:
vThe variant
arrayA pointer to the array data
noElementsThe size of the array
typeThe datatype of the array
Returns:
Indicates whether the operation succeeded or returns an error code
UA_StatusCode UA_EXPORT UA_Variant_setArrayCopy ( UA_Variant v,
const void *  array,
UA_Int32  noElements,
const UA_DataType type 
)

Set the variant to an array that is copied from an existing array.

Parameters:
vThe variant
arrayA pointer to the array data
noElementsThe size of the array
typeThe datatype of the array
Returns:
Indicates whether the operation succeeded or returns an error code
UA_StatusCode UA_EXPORT UA_Variant_setRange ( UA_Variant v,
void *  dataArray,
UA_Int32  dataArraySize,
const UA_NumericRange  range 
)

Insert a range of data into an existing variant. The data array can't be reused afterwards if it contains types without a fixed size (e.g. strings) since they take on the lifetime of the variant.

Parameters:
vThe variant
dataArrayThe data array. The type must match the variant
dataarraySizeThe length of the data array. This is checked to match the range size.
rangeThe range of where the new data is inserted
Returns:
Indicates whether the operation succeeded or returns an error code
UA_StatusCode UA_EXPORT UA_Variant_setRangeCopy ( UA_Variant v,
const void *  dataArray,
UA_Int32  dataArraySize,
const UA_NumericRange  range 
)

Deep-copy a range of data into an existing variant.

Parameters:
vThe variant
dataArrayThe data array. The type must match the variant
dataarraySizeThe length of the data array. This is checked to match the range size.
rangeThe range of where the new data is inserted
Returns:
Indicates whether the operation succeeded or returns an error code
UA_StatusCode UA_EXPORT UA_Variant_setScalar ( UA_Variant v,
void *  p,
const UA_DataType type 
)

Set the variant to a scalar value that already resides in memory. The value takes on the lifecycle of the variant and is deleted with it.

Parameters:
vThe variant
pA pointer to the value data
typeThe datatype of the value in question
Returns:
Indicates whether the operation succeeded or returns an error code
UA_StatusCode UA_EXPORT UA_Variant_setScalarCopy ( UA_Variant v,
const void *  p,
const UA_DataType type 
)

Set the variant to a scalar value that is copied from an existing variable.

Parameters:
vThe variant
pA pointer to the value data
typeThe datatype of the value
Returns:
Indicates whether the operation succeeded or returns an error code