open62541 1.4.15
Open source implementation of OPC UA
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
types.h File Reference
#include <open62541/config.h>
#include <open62541/common.h>
#include <open62541/statuscodes.h>
#include <open62541/types_generated.h>
#include <open62541/types_generated_handling.h>

Go to the source code of this file.

Data Structures

struct  UA_String
 
struct  UA_DateTimeStruct
 
struct  UA_Guid
 
struct  UA_NodeId
 
struct  UA_ExpandedNodeId
 
struct  UA_QualifiedName
 
struct  UA_LocalizedText
 
struct  UA_NumericRangeDimension
 
struct  UA_NumericRange
 
struct  UA_Variant
 
struct  UA_ExtensionObject
 
struct  UA_DataValue
 
struct  UA_DiagnosticInfo
 
struct  UA_DataTypeMember
 
struct  UA_DataType
 
struct  UA_DataTypeArray
 
struct  UA_DecodeBinaryOptions
 

Macros

#define UA_TRUE   true UA_INTERNAL_DEPRECATED
 
#define UA_FALSE   false UA_INTERNAL_DEPRECATED
 
#define UA_SBYTE_MIN   (-128)
 
#define UA_SBYTE_MAX   127
 
#define UA_BYTE_MIN   0
 
#define UA_BYTE_MAX   255
 
#define UA_INT16_MIN   (-32768)
 
#define UA_INT16_MAX   32767
 
#define UA_UINT16_MIN   0
 
#define UA_UINT16_MAX   65535
 
#define UA_INT32_MIN   ((int32_t)-2147483648LL)
 
#define UA_INT32_MAX   2147483647L
 
#define UA_UINT32_MIN   0
 
#define UA_UINT32_MAX   4294967295UL
 
#define UA_INT64_MAX   (int64_t)9223372036854775807LL
 
#define UA_INT64_MIN   ((int64_t)-UA_INT64_MAX-1LL)
 
#define UA_UINT64_MIN   0
 
#define UA_UINT64_MAX   (uint64_t)18446744073709551615ULL
 
#define UA_FLOAT_MIN   FLT_MIN
 
#define UA_FLOAT_MAX   FLT_MAX
 
#define UA_DOUBLE_MIN   DBL_MIN
 
#define UA_DOUBLE_MAX   DBL_MAX
 
#define UA_STRING_ALLOC(CHARS)   UA_String_fromChars(CHARS)
 
#define UA_STRING_STATIC(CHARS)   {sizeof(CHARS)-1, (UA_Byte*)CHARS}
 
#define UA_DATETIME_USEC   10LL
 
#define UA_DATETIME_MSEC   (UA_DATETIME_USEC * 1000LL)
 
#define UA_DATETIME_SEC   (UA_DATETIME_MSEC * 1000LL)
 
#define UA_DATETIME_UNIX_EPOCH   (11644473600LL * UA_DATETIME_SEC)
 
#define UA_BYTESTRING(chars)   UA_STRING(chars)
 
#define UA_BYTESTRING_ALLOC(chars)   UA_STRING_ALLOC(chars)
 
#define UA_EMPTY_ARRAY_SENTINEL   ((void*)0x01)
 
#define UA_DATATYPEKINDS   31
 
#define UA_deleteMembers(p, type)   UA_clear(p, type)
 
#define UA_TYPENAME(name)   name,
 

Typedefs

typedef int8_t UA_SByte
 
typedef uint8_t UA_Byte
 
typedef int16_t UA_Int16
 
typedef uint16_t UA_UInt16
 
typedef int32_t UA_Int32
 
typedef uint32_t UA_UInt32
 
typedef int64_t UA_Int64
 
typedef uint64_t UA_UInt64
 
typedef float UA_Float
 
typedef double UA_Double
 
typedef uint32_t UA_StatusCode
 
typedef struct UA_DateTimeStruct UA_DateTimeStruct
 
typedef UA_String UA_ByteString
 
typedef UA_String UA_XmlElement
 
typedef struct UA_DataType UA_DataType
 
typedef struct UA_DiagnosticInfo UA_DiagnosticInfo
 
typedef struct UA_DataTypeArray UA_DataTypeArray
 

Enumerations

enum  UA_NodeIdType
 
enum  UA_VariantStorageType
 
enum  UA_ExtensionObjectEncoding
 
enum  UA_DataTypeKind
 

Functions

UA_EXPORT const char * UA_StatusCode_name (UA_StatusCode code)
 
 UA_INLINABLE (UA_Boolean UA_StatusCode_isBad(UA_StatusCode code), { return((code > > 30) >=0x02);}) UA_INLINABLE(UA_Boolean UA_StatusCode_isUncertain(UA_StatusCode code)
 
 UA_INLINABLE (UA_Boolean UA_StatusCode_isGood(UA_StatusCode code), { return((code > > 30)==0x00);}) UA_INLINABLE(UA_Boolean UA_StatusCode_isEqualTop(UA_StatusCode s1
 
UA_String UA_String_fromChars (const char *src)
 
UA_Boolean UA_String_isEmpty (const UA_String *s)
 
 UA_INLINABLE (UA_String UA_STRING(char *chars), { UA_String s;memset(&s, 0, sizeof(s));if(!chars) return s;s.length=strlen(chars);s.data=(UA_Byte *) chars;return s;}) typedef int64_t UA_DateTime
 
UA_DateTime UA_DateTime_now (void)
 
UA_Int64 UA_DateTime_localTimeUtcOffset (void)
 
UA_DateTime UA_DateTime_nowMonotonic (void)
 
UA_DateTimeStruct UA_DateTime_toStruct (UA_DateTime t)
 
UA_DateTime UA_DateTime_fromStruct (UA_DateTimeStruct ts)
 
 UA_INLINABLE (UA_Int64 UA_DateTime_toUnixTime(UA_DateTime date), { return(date -(11644473600LL *((10LL *1000LL) *1000LL)))/((10LL *1000LL) *1000LL) ;}) UA_INLINABLE(UA_DateTime UA_DateTime_fromUnixTime(UA_Int64 unixDate)
 
UA_StatusCode UA_Guid_print (const UA_Guid *guid, UA_String *output)
 
UA_StatusCode UA_ByteString_allocBuffer (UA_ByteString *bs, size_t length)
 
UA_StatusCode UA_ByteString_toBase64 (const UA_ByteString *bs, UA_String *output)
 
UA_StatusCode UA_ByteString_fromBase64 (UA_ByteString *bs, const UA_String *input)
 
UA_UInt32 UA_ByteString_hash (UA_UInt32 initialHashValue, const UA_Byte *data, size_t size)
 
UA_Boolean UA_NodeId_isNull (const UA_NodeId *p)
 
UA_StatusCode UA_NodeId_print (const UA_NodeId *id, UA_String *output)
 
 UA_INLINABLE (UA_NodeId UA_NODEID_NUMERIC(UA_UInt16 nsIndex, UA_UInt32 identifier), { UA_NodeId id;memset(&id, 0, sizeof(UA_NodeId));id.namespaceIndex=nsIndex;id.identifierType=UA_NODEIDTYPE_NUMERIC;id.identifier.numeric=identifier;return id;}) UA_INLINABLE(UA_NodeId UA_NODEID_STRING(UA_UInt16 nsIndex
 
char memset & id (UA_NodeId)
 
 UA_INLINABLE (UA_NodeId UA_NODEID_STRING_ALLOC(UA_UInt16 nsIndex, const char *chars), { UA_NodeId id;memset(&id, 0, sizeof(UA_NodeId));id.namespaceIndex=nsIndex;id.identifierType=UA_NODEIDTYPE_STRING;id.identifier.string=UA_String_fromChars(chars);return id;}) UA_INLINABLE(UA_NodeId UA_NODEID_GUID(UA_UInt16 nsIndex
 
 UA_INLINABLE (UA_NodeId UA_NODEID_BYTESTRING(UA_UInt16 nsIndex, char *chars), { UA_NodeId id;memset(&id, 0, sizeof(UA_NodeId));id.namespaceIndex=nsIndex;id.identifierType=UA_NODEIDTYPE_BYTESTRING;id.identifier.byteString=UA_STRING(chars);return id;}) UA_INLINABLE(UA_NodeId UA_NODEID_BYTESTRING_ALLOC(UA_UInt16 nsIndex
 
UA_Order UA_NodeId_order (const UA_NodeId *n1, const UA_NodeId *n2)
 
UA_UInt32 UA_NodeId_hash (const UA_NodeId *n)
 
UA_StatusCode UA_ExpandedNodeId_print (const UA_ExpandedNodeId *id, UA_String *output)
 
 UA_INLINABLE (UA_ExpandedNodeId UA_EXPANDEDNODEID_NUMERIC(UA_UInt16 nsIndex, UA_UInt32 identifier), { UA_ExpandedNodeId id;id.nodeId=UA_NODEID_NUMERIC(nsIndex, identifier);id.serverIndex=0;id.namespaceUri=UA_STRING_NULL;return id;}) UA_INLINABLE(UA_ExpandedNodeId UA_EXPANDEDNODEID_STRING(UA_UInt16 nsIndex
 
 UA_INLINABLE (UA_ExpandedNodeId UA_EXPANDEDNODEID_STRING_ALLOC(UA_UInt16 nsIndex, const char *chars), { UA_ExpandedNodeId id;id.nodeId=UA_NODEID_STRING_ALLOC(nsIndex, chars);id.serverIndex=0;id.namespaceUri=UA_STRING_NULL;return id;}) UA_INLINABLE(UA_ExpandedNodeId UA_EXPANDEDNODEID_STRING_GUID(UA_UInt16 nsIndex
 
 UA_INLINABLE (UA_ExpandedNodeId UA_EXPANDEDNODEID_BYTESTRING(UA_UInt16 nsIndex, char *chars), { UA_ExpandedNodeId id;id.nodeId=UA_NODEID_BYTESTRING(nsIndex, chars);id.serverIndex=0;id.namespaceUri=UA_STRING_NULL;return id;}) UA_INLINABLE(UA_ExpandedNodeId UA_EXPANDEDNODEID_BYTESTRING_ALLOC(UA_UInt16 nsIndex
 
 UA_INLINABLE (UA_ExpandedNodeId UA_EXPANDEDNODEID_NODEID(UA_NodeId nodeId), { UA_ExpandedNodeId id;memset(&id, 0, sizeof(UA_ExpandedNodeId));id.nodeId=nodeId;return id;}) UA_Boolean UA_ExpandedNodeId_isLocal(const UA_ExpandedNodeId *n)
 
UA_Order UA_ExpandedNodeId_order (const UA_ExpandedNodeId *n1, const UA_ExpandedNodeId *n2)
 
UA_UInt32 UA_ExpandedNodeId_hash (const UA_ExpandedNodeId *n)
 
 UA_INLINABLE (UA_Boolean UA_QualifiedName_isNull(const UA_QualifiedName *q), { return(q->namespaceIndex==0 &&q->name.length==0);}) UA_UInt32 UA_QualifiedName_hash(const UA_QualifiedName *q)
 
 UA_INLINABLE (UA_QualifiedName UA_QUALIFIEDNAME(UA_UInt16 nsIndex, char *chars), { UA_QualifiedName qn;qn.namespaceIndex=nsIndex;qn.name=UA_STRING(chars);return qn;}) UA_INLINABLE(UA_QualifiedName UA_QUALIFIEDNAME_ALLOC(UA_UInt16 nsIndex
 
 UA_INLINABLE (UA_LocalizedText UA_LOCALIZEDTEXT(char *locale, char *text), { UA_LocalizedText lt;lt.locale=UA_STRING(locale);lt.text=UA_STRING(text);return lt;}) UA_INLINABLE(UA_LocalizedText UA_LOCALIZEDTEXT_ALLOC(const char *locale
 
UA_StatusCode UA_NumericRange_parse (UA_NumericRange *range, const UA_String str)
 
 UA_INLINABLE (UA_NumericRange UA_NUMERICRANGE(const char *s), { UA_NumericRange nr;memset(&nr, 0, sizeof(nr));UA_NumericRange_parse(&nr, UA_STRING((char *)(uintptr_t) s));return nr;}) struct UA_DataType
 
 UA_INLINABLE (UA_Boolean UA_Variant_isEmpty(const UA_Variant *v), { return v->type==NULL;}) UA_INLINABLE(UA_Boolean UA_Variant_isScalar(const UA_Variant *v)
 
 UA_INLINABLE (UA_Boolean UA_Variant_hasScalarType(const UA_Variant *v, const UA_DataType *type), { return UA_Variant_isScalar(v) &&type==v->type;}) UA_INLINABLE(UA_Boolean UA_Variant_hasArrayType(const UA_Variant *v
 
const UA_DataType void UA_Variant_setScalar (UA_Variant *v, void *p, const UA_DataType *type)
 
UA_StatusCode UA_Variant_setScalarCopy (UA_Variant *v, const void *p, const UA_DataType *type)
 
void UA_Variant_setArray (UA_Variant *v, void *array, size_t arraySize, const UA_DataType *type)
 
UA_StatusCode UA_Variant_setArrayCopy (UA_Variant *v, const void *array, size_t arraySize, const UA_DataType *type)
 
UA_StatusCode UA_Variant_copyRange (const UA_Variant *src, UA_Variant *dst, const UA_NumericRange range)
 
UA_StatusCode UA_Variant_setRange (UA_Variant *v, void *array, size_t arraySize, const UA_NumericRange range)
 
UA_StatusCode UA_Variant_setRangeCopy (UA_Variant *v, const void *array, size_t arraySize, const UA_NumericRange range)
 
void UA_ExtensionObject_setValue (UA_ExtensionObject *eo, void *p, const UA_DataType *type)
 
void UA_ExtensionObject_setValueNoDelete (UA_ExtensionObject *eo, void *p, const UA_DataType *type)
 
UA_StatusCode UA_ExtensionObject_setValueCopy (UA_ExtensionObject *eo, void *p, const UA_DataType *type)
 
UA_StatusCode UA_DataValue_copyVariantRange (const UA_DataValue *src, UA_DataValue *dst, const UA_NumericRange range)
 
UA_Boolean UA_DataType_getStructMember (const UA_DataType *type, const char *memberName, size_t *outOffset, const UA_DataType **outMemberType, UA_Boolean *outIsArray)
 
UA_Boolean UA_DataType_isNumeric (const UA_DataType *type)
 
const UA_DataTypeUA_findDataType (const UA_NodeId *typeId)
 
const UA_DataTypeUA_findDataTypeWithCustom (const UA_NodeId *typeId, const UA_DataTypeArray *customTypes)
 
void * UA_new (const UA_DataType *type)
 
 UA_INLINABLE (void UA_init(void *p, const UA_DataType *type), { memset(p, 0, type->memSize);}) UA_StatusCode UA_copy(const void *src
 
void UA_clear (void *p, const UA_DataType *type)
 
void UA_delete (void *p, const UA_DataType *type)
 
UA_Order UA_order (const void *p1, const void *p2, const UA_DataType *type)
 
 UA_INLINABLE (UA_Boolean UA_equal(const void *p1, const void *p2, const UA_DataType *type), { return(UA_order(p1, p2, type)==UA_ORDER_EQ);}) UA_EXPORT size_t UA_calcSizeBinary(const void *p
 
UA_EXPORT UA_StatusCode UA_encodeBinary (const void *p, const UA_DataType *type, UA_ByteString *outBuf)
 
UA_EXPORT UA_StatusCode UA_decodeBinary (const UA_ByteString *inBuf, void *p, const UA_DataType *type, const UA_DecodeBinaryOptions *options)
 
void * UA_Array_new (size_t size, const UA_DataType *type)
 
UA_StatusCode UA_Array_copy (const void *src, size_t size, void **dst, const UA_DataType *type)
 
UA_StatusCode UA_Array_resize (void **p, size_t *size, size_t newSize, const UA_DataType *type)
 
UA_StatusCode UA_Array_append (void **p, size_t *size, void *newElem, const UA_DataType *type)
 
UA_StatusCode UA_Array_appendCopy (void **p, size_t *size, const void *newElem, const UA_DataType *type)
 
void UA_Array_delete (void *p, size_t size, const UA_DataType *type)
 

Variables

_UA_BEGIN_DECLS typedef bool UA_Boolean
 
UA_StatusCode s2
 
UA_EXPORT const UA_String UA_STRING_NULL
 
UA_EXPORT const UA_Guid UA_GUID_NULL
 
UA_EXPORT const UA_ByteString UA_BYTESTRING_NULL
 
UA_EXPORT const UA_NodeId UA_NODEID_NULL
 
char * chars
 
id namespaceIndex = nsIndex
 
id identifierType = UA_NODEIDTYPE_STRING
 
id identifier string = UA_STRING(chars)
 
return id
 
UA_Guid guid = guid
 
id identifier byteString = UA_String_fromChars( chars )
 
UA_EXPORT const UA_ExpandedNodeId UA_EXPANDEDNODEID_NULL
 
char id nodeId = UA_NODEID_STRING(nsIndex, chars)
 
id serverIndex = 0
 
id namespaceUri = UA_STRING_NULL
 
qn name = UA_String_fromChars( chars )
 
return qn
 
const char * text = UA_String_fromChars( text )
 
const char lt locale = UA_String_fromChars( locale )
 
return lt
 
const UA_DataTypetype
 
void * dst
 

Macro Definition Documentation

◆ UA_BYTE_MAX

#define UA_BYTE_MAX   255

Definition at line 39 of file types.h.

◆ UA_BYTE_MIN

#define UA_BYTE_MIN   0

Definition at line 38 of file types.h.

◆ UA_BYTESTRING

#define UA_BYTESTRING (   chars)    UA_STRING(chars)

Definition at line 256 of file types.h.

◆ UA_BYTESTRING_ALLOC

#define UA_BYTESTRING_ALLOC (   chars)    UA_STRING_ALLOC(chars)

Definition at line 257 of file types.h.

◆ UA_DATATYPEKINDS

#define UA_DATATYPEKINDS   31

The DataType "kind" is an internal type classification.

It is used to dispatch handling to the correct routines.

Definition at line 824 of file types.h.

◆ UA_DATETIME_MSEC

#define UA_DATETIME_MSEC   (UA_DATETIME_USEC * 1000LL)

Definition at line 155 of file types.h.

◆ UA_DATETIME_SEC

#define UA_DATETIME_SEC   (UA_DATETIME_MSEC * 1000LL)

Definition at line 156 of file types.h.

◆ UA_DATETIME_UNIX_EPOCH

#define UA_DATETIME_UNIX_EPOCH   (11644473600LL * UA_DATETIME_SEC)

The C99 standard (7.23.1) says: "The range and precision of times representable in clock_t and time_t are implementation-defined.

" On most systems, time_t is a 4 or 8 byte integer counting seconds since the UTC Unix epoch. The following methods are used for conversion. Datetime of 1 Jan 1970 00:00

Definition at line 190 of file types.h.

◆ UA_DATETIME_USEC

#define UA_DATETIME_USEC   10LL

Multiples to convert durations to DateTime.

Definition at line 154 of file types.h.

◆ UA_deleteMembers

#define UA_deleteMembers (   p,
  type 
)    UA_clear(p, type)

Definition at line 959 of file types.h.

◆ UA_DOUBLE_MAX

#define UA_DOUBLE_MAX   DBL_MAX

Definition at line 79 of file types.h.

◆ UA_DOUBLE_MIN

#define UA_DOUBLE_MIN   DBL_MIN

Definition at line 78 of file types.h.

◆ UA_EMPTY_ARRAY_SENTINEL

#define UA_EMPTY_ARRAY_SENTINEL   ((void*)0x01)

Definition at line 570 of file types.h.

◆ UA_FALSE

#define UA_FALSE   false UA_INTERNAL_DEPRECATED

Definition at line 29 of file types.h.

◆ UA_FLOAT_MAX

#define UA_FLOAT_MAX   FLT_MAX

Definition at line 74 of file types.h.

◆ UA_FLOAT_MIN

#define UA_FLOAT_MIN   FLT_MIN

Definition at line 73 of file types.h.

◆ UA_INT16_MAX

#define UA_INT16_MAX   32767

Definition at line 44 of file types.h.

◆ UA_INT16_MIN

#define UA_INT16_MIN   (-32768)

Definition at line 43 of file types.h.

◆ UA_INT32_MAX

#define UA_INT32_MAX   2147483647L

Definition at line 54 of file types.h.

◆ UA_INT32_MIN

#define UA_INT32_MIN   ((int32_t)-2147483648LL)

Definition at line 53 of file types.h.

◆ UA_INT64_MAX

#define UA_INT64_MAX   (int64_t)9223372036854775807LL

Definition at line 63 of file types.h.

◆ UA_INT64_MIN

#define UA_INT64_MIN   ((int64_t)-UA_INT64_MAX-1LL)

Definition at line 64 of file types.h.

◆ UA_SBYTE_MAX

#define UA_SBYTE_MAX   127

Definition at line 34 of file types.h.

◆ UA_SBYTE_MIN

#define UA_SBYTE_MIN   (-128)

Definition at line 33 of file types.h.

◆ UA_STRING_ALLOC

#define UA_STRING_ALLOC (   CHARS)    UA_String_fromChars(CHARS)

◆ UA_STRING_STATIC

#define UA_STRING_STATIC (   CHARS)    {sizeof(CHARS)-1, (UA_Byte*)CHARS}

◆ UA_TRUE

#define UA_TRUE   true UA_INTERNAL_DEPRECATED

Definition at line 28 of file types.h.

◆ UA_TYPENAME

#define UA_TYPENAME (   name)    name,

stop-doc-generation

Helper used to exclude type names in the definition of UA_DataType structures if the feature is disabled.

Definition at line 1238 of file types.h.

◆ UA_UINT16_MAX

#define UA_UINT16_MAX   65535

Definition at line 49 of file types.h.

◆ UA_UINT16_MIN

#define UA_UINT16_MIN   0

Definition at line 48 of file types.h.

◆ UA_UINT32_MAX

#define UA_UINT32_MAX   4294967295UL

Definition at line 59 of file types.h.

◆ UA_UINT32_MIN

#define UA_UINT32_MIN   0

Definition at line 58 of file types.h.

◆ UA_UINT64_MAX

#define UA_UINT64_MAX   (uint64_t)18446744073709551615ULL

Definition at line 69 of file types.h.

◆ UA_UINT64_MIN

#define UA_UINT64_MIN   0

Definition at line 68 of file types.h.

Typedef Documentation

◆ UA_Byte

typedef uint8_t UA_Byte

Definition at line 37 of file types.h.

◆ UA_ByteString

Parse the humand-readable Guid format.

Definition at line 237 of file types.h.

◆ UA_DataType

typedef struct UA_DataType UA_DataType

Definition at line 568 of file types.h.

◆ UA_DataTypeArray

Datatype arrays with custom type definitions can be added in a linked list to the client or server configuration.

◆ UA_DateTimeStruct

Represents a Datetime as a structure.

◆ UA_DiagnosticInfo

◆ UA_Double

typedef double UA_Double

Definition at line 77 of file types.h.

◆ UA_Float

typedef float UA_Float

Definition at line 72 of file types.h.

◆ UA_Int16

typedef int16_t UA_Int16

Definition at line 42 of file types.h.

◆ UA_Int32

typedef int32_t UA_Int32

Definition at line 52 of file types.h.

◆ UA_Int64

typedef int64_t UA_Int64

Definition at line 62 of file types.h.

◆ UA_SByte

typedef int8_t UA_SByte

Definition at line 32 of file types.h.

◆ UA_StatusCode

typedef uint32_t UA_StatusCode

Definition at line 82 of file types.h.

◆ UA_UInt16

typedef uint16_t UA_UInt16

Definition at line 47 of file types.h.

◆ UA_UInt32

typedef uint32_t UA_UInt32

Definition at line 57 of file types.h.

◆ UA_UInt64

typedef uint64_t UA_UInt64

Definition at line 67 of file types.h.

◆ UA_XmlElement

Definition at line 265 of file types.h.

Enumeration Type Documentation

◆ UA_DataTypeKind

Enumerator
UA_DATATYPEKIND_BOOLEAN 
UA_DATATYPEKIND_SBYTE 
UA_DATATYPEKIND_BYTE 
UA_DATATYPEKIND_INT16 
UA_DATATYPEKIND_UINT16 
UA_DATATYPEKIND_INT32 
UA_DATATYPEKIND_UINT32 
UA_DATATYPEKIND_INT64 
UA_DATATYPEKIND_UINT64 
UA_DATATYPEKIND_FLOAT 
UA_DATATYPEKIND_DOUBLE 
UA_DATATYPEKIND_STRING 
UA_DATATYPEKIND_DATETIME 
UA_DATATYPEKIND_GUID 
UA_DATATYPEKIND_BYTESTRING 
UA_DATATYPEKIND_XMLELEMENT 
UA_DATATYPEKIND_NODEID 
UA_DATATYPEKIND_EXPANDEDNODEID 
UA_DATATYPEKIND_STATUSCODE 
UA_DATATYPEKIND_QUALIFIEDNAME 
UA_DATATYPEKIND_LOCALIZEDTEXT 
UA_DATATYPEKIND_EXTENSIONOBJECT 
UA_DATATYPEKIND_DATAVALUE 
UA_DATATYPEKIND_VARIANT 
UA_DATATYPEKIND_DIAGNOSTICINFO 
UA_DATATYPEKIND_DECIMAL 
UA_DATATYPEKIND_ENUM 
UA_DATATYPEKIND_STRUCTURE 
UA_DATATYPEKIND_OPTSTRUCT 
UA_DATATYPEKIND_UNION 
UA_DATATYPEKIND_BITFIELDCLUSTER 

Definition at line 825 of file types.h.

◆ UA_ExtensionObjectEncoding

Enumerator
UA_EXTENSIONOBJECT_ENCODED_NOBODY 
UA_EXTENSIONOBJECT_ENCODED_BYTESTRING 
UA_EXTENSIONOBJECT_ENCODED_XML 
UA_EXTENSIONOBJECT_DECODED 
UA_EXTENSIONOBJECT_DECODED_NODELETE 

Definition at line 710 of file types.h.

◆ UA_NodeIdType

Enumerator
UA_NODEIDTYPE_NUMERIC 
UA_NODEIDTYPE_STRING 
UA_NODEIDTYPE_GUID 
UA_NODEIDTYPE_BYTESTRING 

Definition at line 268 of file types.h.

◆ UA_VariantStorageType

Enumerator
UA_VARIANT_DATA 
UA_VARIANT_DATA_NODELETE 

Definition at line 572 of file types.h.

Function Documentation

◆ id()

char memset & id ( UA_NodeId  )

◆ UA_Array_append()

UA_StatusCode UA_Array_append ( void **  p,
size_t *  size,
void *  newElem,
const UA_DataType type 
)

Append the given element at the end of the array.

The content is moved (shallow copy) and the original memory is _init'ed if appending is successful.

Parameters
pDouble pointer to the array memory. Can be overwritten by the result of a realloc.
sizeThe current size of the array. Overwritten in case of success.
newElemThe element to be appended. The memory is reset upon success.
typeThe datatype of the array members
Returns
Returns UA_STATUSCODE_GOOD or UA_STATUSCODE_BADOUTOFMEMORY. The original array is left untouched in the failure case.

◆ UA_Array_appendCopy()

UA_StatusCode UA_Array_appendCopy ( void **  p,
size_t *  size,
const void *  newElem,
const UA_DataType type 
)

Append a copy of the given element at the end of the array.

Parameters
pDouble pointer to the array memory. Can be overwritten by the result of a realloc.
sizeThe current size of the array. Overwritten in case of success.
newElemThe element to be appended.
typeThe datatype of the array members
Returns
Returns UA_STATUSCODE_GOOD or UA_STATUSCODE_BADOUTOFMEMORY. The original array is left untouched in the failure case.

◆ UA_Array_copy()

UA_StatusCode UA_Array_copy ( const void *  src,
size_t  size,
void **  dst,
const UA_DataType type 
)

Allocates and copies an array.

Parameters
srcThe memory location of the source array
sizeThe size of the array
dstThe location of the pointer to the new array
typeThe datatype of the array members
Returns
Returns UA_STATUSCODE_GOOD or UA_STATUSCODE_BADOUTOFMEMORY

◆ UA_Array_delete()

void UA_Array_delete ( void *  p,
size_t  size,
const UA_DataType type 
)

Deletes an array.

Parameters
pThe memory location of the array
sizeThe size of the array
typeThe datatype of the array members

◆ UA_Array_new()

void * UA_Array_new ( size_t  size,
const UA_DataType type 
)

Allocates and initializes an array of variables of a specific type.

Parameters
sizeThe requested array length
typeThe datatype description
Returns
Returns the memory location of the variable or NULL if no memory could be allocated

◆ UA_Array_resize()

UA_StatusCode UA_Array_resize ( void **  p,
size_t *  size,
size_t  newSize,
const UA_DataType type 
)

Resizes (and reallocates) an array.

The last entries are initialized to zero if the array length is increased. If the array length is decreased, the last entries are removed if the size is decreased.

Parameters
pDouble pointer to the array memory. Can be overwritten by the result of a realloc.
sizeThe current size of the array. Overwritten in case of success.
newSizeThe new size of the array
typeThe datatype of the array members
Returns
Returns UA_STATUSCODE_GOOD or UA_STATUSCODE_BADOUTOFMEMORY. The original array is left untouched in the failure case.

◆ UA_ByteString_allocBuffer()

UA_StatusCode UA_ByteString_allocBuffer ( UA_ByteString bs,
size_t  length 
)

Allocates memory of size length for the bytestring.

The content is not set to zero.

◆ UA_ByteString_fromBase64()

UA_StatusCode UA_ByteString_fromBase64 ( UA_ByteString bs,
const UA_String input 
)

Parse a ByteString from a base64 representation.

◆ UA_ByteString_hash()

UA_UInt32 UA_ByteString_hash ( UA_UInt32  initialHashValue,
const UA_Byte data,
size_t  size 
)

Returns a non-cryptographic hash of a bytestring.

◆ UA_ByteString_toBase64()

UA_StatusCode UA_ByteString_toBase64 ( const UA_ByteString bs,
UA_String output 
)

Converts a ByteString to the corresponding base64 representation.

◆ UA_clear()

void UA_clear ( void *  p,
const UA_DataType type 
)

Deletes the dynamically allocated content of a variable (e.g.

resets all arrays to undefined arrays). 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
typeThe datatype description of the variable

◆ UA_DataType_getStructMember()

UA_Boolean UA_DataType_getStructMember ( const UA_DataType type,
const char *  memberName,
size_t *  outOffset,
const UA_DataType **  outMemberType,
UA_Boolean outIsArray 
)

Returns the offset and type of a structure member.

The return value is false if the member was not found.

If the member is an array, the offset points to the (size_t) length field. (The array pointer comes after the length field without any padding.)

◆ UA_DataType_isNumeric()

UA_Boolean UA_DataType_isNumeric ( const UA_DataType type)

Test if the data type is a numeric builtin data type (via the typeKind field of UA_DataType).

This includes integers and floating point numbers. Not included are Boolean, DateTime, StatusCode and Enums.

◆ UA_DataValue_copyVariantRange()

UA_StatusCode UA_DataValue_copyVariantRange ( const UA_DataValue src,
UA_DataValue dst,
const UA_NumericRange  range 
)

Copy the DataValue, but use only a subset of the (multidimensional) array of of the variant of the source DataValue.

Returns an error code if the variant of the DataValue is not an array or if the indicated range does not fit.

Parameters
srcThe source DataValue
dstThe target DataValue
rangeThe range of the variant of the DataValue to copy
Returns
Returns UA_STATUSCODE_GOOD or an error code

◆ UA_DateTime_fromStruct()

UA_DateTime UA_DateTime_fromStruct ( UA_DateTimeStruct  ts)

◆ UA_DateTime_localTimeUtcOffset()

UA_Int64 UA_DateTime_localTimeUtcOffset ( void  )

Offset between local time and UTC time.

◆ UA_DateTime_now()

UA_DateTime UA_DateTime_now ( void  )

The current time in UTC time.

◆ UA_DateTime_nowMonotonic()

UA_DateTime UA_DateTime_nowMonotonic ( void  )

CPU clock invariant to system time changes.

Use only to measure durations, not absolute time.

◆ UA_DateTime_toStruct()

UA_DateTimeStruct UA_DateTime_toStruct ( UA_DateTime  t)

◆ UA_decodeBinary()

UA_EXPORT UA_StatusCode UA_decodeBinary ( const UA_ByteString inBuf,
void *  p,
const UA_DataType type,
const UA_DecodeBinaryOptions options 
)

Decodes a data structure from the input buffer in the binary format.

It is assumed that p points to valid memory (not necessarily zeroed out). The options can be NULL and will be disregarded in that case.

◆ UA_delete()

void UA_delete ( void *  p,
const UA_DataType type 
)

Frees a variable and all of its content.

Parameters
pThe memory location of the variable
typeThe datatype description of the variable

◆ UA_encodeBinary()

UA_EXPORT UA_StatusCode UA_encodeBinary ( const void *  p,
const UA_DataType type,
UA_ByteString outBuf 
)

Encodes a data-structure in the binary format.

If outBuf has a length of zero, a buffer of the required size is allocated. Otherwise, encoding into the existing outBuf is attempted (and may fail if the buffer is too small).

◆ UA_ExpandedNodeId_hash()

UA_UInt32 UA_ExpandedNodeId_hash ( const UA_ExpandedNodeId n)

Returns a non-cryptographic hash for ExpandedNodeId.

The hash of an ExpandedNodeId is identical to the hash of the embedded (simple) NodeId if the ServerIndex is zero and no NamespaceUri is set.

◆ UA_ExpandedNodeId_order()

UA_Order UA_ExpandedNodeId_order ( const UA_ExpandedNodeId n1,
const UA_ExpandedNodeId n2 
)

Total ordering of ExpandedNodeId.

◆ UA_ExpandedNodeId_print()

UA_StatusCode UA_ExpandedNodeId_print ( const UA_ExpandedNodeId id,
UA_String output 
)

Print the ExpandedNodeId in the humand-readable format defined in Part 6, 5.3.1.11:

svr=<serverindex>;ns=<namespaceindex>;<type>=

or svr=<serverindex>;nsu=<uri>;<type>=

The definitions for svr, ns and nsu is omitted if zero / the empty string.

The method can either use a pre-allocated string buffer or allocates memory internally if called with an empty output string.

◆ UA_ExtensionObject_setValue()

void UA_ExtensionObject_setValue ( UA_ExtensionObject eo,
void *  p,
const UA_DataType type 
)

Initialize the ExtensionObject and set the "decoded" value to the given pointer.

The value will be deleted when the ExtensionObject is cleared.

◆ UA_ExtensionObject_setValueCopy()

UA_StatusCode UA_ExtensionObject_setValueCopy ( UA_ExtensionObject eo,
void *  p,
const UA_DataType type 
)

Initialize the ExtensionObject and set the "decoded" value to a fresh copy of the given value pointer.

The value will be deleted when the ExtensionObject is cleared.

◆ UA_ExtensionObject_setValueNoDelete()

void UA_ExtensionObject_setValueNoDelete ( UA_ExtensionObject eo,
void *  p,
const UA_DataType type 
)

Initialize the ExtensionObject and set the "decoded" value to the given pointer.

The value will not be deleted when the ExtensionObject is cleared.

◆ UA_findDataType()

const UA_DataType * UA_findDataType ( const UA_NodeId typeId)

Returns the data type description for the type's identifier or NULL if no matching data type was found.

◆ UA_findDataTypeWithCustom()

const UA_DataType * UA_findDataTypeWithCustom ( const UA_NodeId typeId,
const UA_DataTypeArray customTypes 
)

◆ UA_Guid_print()

UA_StatusCode UA_Guid_print ( const UA_Guid guid,
UA_String output 
)

Print a Guid in the human-readable format defined in Part 6, 5.1.3.

Format: C496578A-0DFE-4B8F-870A-745238C6AEAE | | | | | | 0 8 13 18 23 36

This allocates memory if the output argument is an empty string. Tries to use the given buffer otherwise.

◆ UA_INLINABLE() [1/19]

UA_INLINABLE ( UA_Boolean   UA_equalconst void *p1, const void *p2, const UA_DataType *type,
{ return(UA_order(p1, p2, type)==UA_ORDER_EQ);}   
) const

Compare if two values have identical content.

Returns the number of bytes the value p takes in binary encoding. Returns zero if an error occurs.

◆ UA_INLINABLE() [2/19]

UA_INLINABLE ( UA_Boolean   UA_QualifiedName_isNullconst UA_QualifiedName *q,
{ return(q->namespaceIndex==0 &&q->name.length==0);}   
) const

Returns a non-cryptographic hash for QualifiedName.

◆ UA_INLINABLE() [3/19]

UA_INLINABLE ( UA_Boolean   UA_StatusCode_isBadUA_StatusCode code,
{ return((code > > 30) >=0x02);}   
)

Extracts the severity from a StatusCode.

See Part 4, Section 7.34 for details.

◆ UA_INLINABLE() [4/19]

UA_INLINABLE ( UA_Boolean   UA_StatusCode_isGoodUA_StatusCode code,
{ return((code > > 30)==0x00);}   
)

Compares the top 16 bits of two StatusCodes for equality.

This should only be used when processing user-defined StatusCodes e.g when processing a ReadResponse. As a convention, the lower bits of StatusCodes should not be used internally, meaning can compare them without the use of this function.

◆ UA_INLINABLE() [5/19]

UA_INLINABLE ( UA_Boolean   UA_Variant_hasScalarTypeconst UA_Variant *v, const UA_DataType *type,
{ return UA_Variant_isScalar(v) &&type==v->type;}   
) const

Returns true if the variant contains a scalar value of the given type.

Parameters
vThe variant
typeThe data type
Returns
Does the variant contain a scalar value of the given type Returns true if the variant contains an array of the given type.
Parameters
vThe variant
typeThe data type
Returns
Does the variant contain an array of the given type

◆ UA_INLINABLE() [6/19]

UA_INLINABLE ( UA_Boolean   UA_Variant_isEmptyconst UA_Variant *v,
{ return v->type==NULL;}   
) const

Returns true if the variant has no value defined (contains neither an array nor a scalar value).

Parameters
vThe variant
Returns
Is the variant empty 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_INLINABLE() [7/19]

UA_INLINABLE ( UA_ExpandedNodeId   UA_EXPANDEDNODEID_BYTESTRINGUA_UInt16 nsIndex, char *chars,
{ UA_ExpandedNodeId id;id.nodeId=UA_NODEID_BYTESTRING(nsIndex, chars);id.serverIndex=0;id.namespaceUri=UA_STRING_NULL;return id;}   
)

◆ UA_INLINABLE() [8/19]

UA_INLINABLE ( UA_ExpandedNodeId   UA_EXPANDEDNODEID_NODEIDUA_NodeId nodeId,
{ UA_ExpandedNodeId id;memset(&id, 0, sizeof(UA_ExpandedNodeId));id.nodeId=nodeId;return id;}   
) const

Does the ExpandedNodeId point to a local node? That is, are namespaceUri and serverIndex empty?

◆ UA_INLINABLE() [9/19]

UA_INLINABLE ( UA_ExpandedNodeId   UA_EXPANDEDNODEID_NUMERICUA_UInt16 nsIndex, UA_UInt32 identifier,
{ UA_ExpandedNodeId id;id.nodeId=UA_NODEID_NUMERIC(nsIndex, identifier);id.serverIndex=0;id.namespaceUri=UA_STRING_NULL;return id;}   
)

Parse the human-readable NodeId format.

Attention! String and ByteString NodeIds have their identifier malloc'ed and need to be cleaned up.

◆ UA_INLINABLE() [10/19]

UA_INLINABLE ( UA_ExpandedNodeId   UA_EXPANDEDNODEID_STRING_ALLOCUA_UInt16 nsIndex, const char *chars,
{ UA_ExpandedNodeId id;id.nodeId=UA_NODEID_STRING_ALLOC(nsIndex, chars);id.serverIndex=0;id.namespaceUri=UA_STRING_NULL;return id;}   
)

◆ UA_INLINABLE() [11/19]

UA_INLINABLE ( UA_Int64   UA_DateTime_toUnixTimeUA_DateTime date,
{ return(date -(11644473600LL *((10LL *1000LL) *1000LL)))/((10LL *1000LL) *1000LL) ;}   
)

◆ UA_INLINABLE() [12/19]

UA_INLINABLE ( UA_LocalizedText   UA_LOCALIZEDTEXTchar *locale, char *text,
{ UA_LocalizedText lt;lt.locale=UA_STRING(locale);lt.text=UA_STRING(text);return lt;}   
) const

◆ UA_INLINABLE() [13/19]

UA_INLINABLE ( UA_NodeId   UA_NODEID_BYTESTRINGUA_UInt16 nsIndex, char *chars,
{ UA_NodeId id;memset(&id, 0, sizeof(UA_NodeId));id.namespaceIndex=nsIndex;id.identifierType=UA_NODEIDTYPE_BYTESTRING;id.identifier.byteString=UA_STRING(chars);return id;}   
)

◆ UA_INLINABLE() [14/19]

UA_INLINABLE ( UA_NodeId   UA_NODEID_NUMERICUA_UInt16 nsIndex, UA_UInt32 identifier,
{ UA_NodeId id;memset(&id, 0, sizeof(UA_NodeId));id.namespaceIndex=nsIndex;id.identifierType=UA_NODEIDTYPE_NUMERIC;id.identifier.numeric=identifier;return id;}   
)

Parse the human-readable NodeId format.

Attention! String and ByteString NodeIds have their identifier malloc'ed and need to be cleaned up.

◆ UA_INLINABLE() [15/19]

UA_INLINABLE ( UA_NodeId   UA_NODEID_STRING_ALLOCUA_UInt16 nsIndex, const char *chars,
{ UA_NodeId id;memset(&id, 0, sizeof(UA_NodeId));id.namespaceIndex=nsIndex;id.identifierType=UA_NODEIDTYPE_STRING;id.identifier.string=UA_String_fromChars(chars);return id;}   
)

◆ UA_INLINABLE() [16/19]

UA_INLINABLE ( UA_NumericRange   UA_NUMERICRANGEconst char *s,
{ UA_NumericRange nr;memset(&nr, 0, sizeof(nr));UA_NumericRange_parse(&nr, UA_STRING((char *)(uintptr_t) s));return nr;}   
)

Forward declaration.

See the section on Generic Type Handling

◆ UA_INLINABLE() [17/19]

UA_INLINABLE ( UA_QualifiedName   UA_QUALIFIEDNAMEUA_UInt16 nsIndex, char *chars,
{ UA_QualifiedName qn;qn.namespaceIndex=nsIndex;qn.name=UA_STRING(chars);return qn;}   
)

◆ UA_INLINABLE() [18/19]

UA_INLINABLE ( UA_String   UA_STRINGchar *chars,
{ UA_String s;memset(&s, 0, sizeof(s));if(!chars) return s;s.length=strlen(chars);s.data=(UA_Byte *) chars;return s;}   
)

Define strings at compile time (in ROM)

◆ UA_INLINABLE() [19/19]

UA_INLINABLE ( void   UA_initvoid *p, const UA_DataType *type,
{ memset(p, 0, type->memSize);}   
) const

Initializes a variable to default values.

Parameters
pThe memory location of the variable
typeThe datatype description 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.
srcThe memory location of the source variable
dstThe memory location of the destination variable
typeThe datatype description
Returns
Indicates whether the operation succeeded or returns an error code

◆ UA_new()

void * UA_new ( const UA_DataType type)

Allocates and initializes a variable of type dataType.

Parameters
typeThe datatype description
Returns
Returns the memory location of the variable or NULL if no memory could be allocated

◆ UA_NodeId_hash()

UA_UInt32 UA_NodeId_hash ( const UA_NodeId n)

Returns a non-cryptographic hash for NodeId.

◆ UA_NodeId_isNull()

UA_Boolean UA_NodeId_isNull ( const UA_NodeId p)

◆ UA_NodeId_order()

UA_Order UA_NodeId_order ( const UA_NodeId n1,
const UA_NodeId n2 
)

Total ordering of NodeId.

◆ UA_NodeId_print()

UA_StatusCode UA_NodeId_print ( const UA_NodeId id,
UA_String output 
)

Print the NodeId in the human-readable format defined in Part 6, 5.3.1.10.

Examples: UA_NODEID("i=13") UA_NODEID("ns=10;i=1") UA_NODEID("ns=10;s=Hello:World") UA_NODEID("g=09087e75-8e5e-499b-954f-f2a9603db28a") UA_NODEID("ns=1;b=b3BlbjYyNTQxIQ==") // base64

The method can either use a pre-allocated string buffer or allocates memory internally if called with an empty output string.

◆ UA_NumericRange_parse()

UA_StatusCode UA_NumericRange_parse ( UA_NumericRange range,
const UA_String  str 
)

Referenced by UA_INLINABLE().

◆ UA_order()

UA_Order UA_order ( const void *  p1,
const void *  p2,
const UA_DataType type 
)

Pretty-print the value from the datatype.

The output is pretty-printed JSON5. Note that this format is non-standard and should not be sent over the network. It can however be read by our own JSON decoding.

Parameters
pThe memory location of the variable
typeThe datatype description of the variable
outputA string that is used for the pretty-printed output. If the memory for string is already allocated, we try to use the existing string (the length is adjusted). If the string is empty, memory is allocated for it.
Returns
Indicates whether the operation succeeded Compare two values and return their order.

For numerical types (including StatusCodes and Enums), their natural order is used. NaN is the "smallest" value for floating point values. Different bit representations of NaN are considered identical.

All other types have some absolute ordering so that a < b, b < c -> a < c.

The ordering of arrays (also strings) is in "shortlex": A shorter array is always smaller than a longer array. Otherwise the first different element defines the order.

When members of different types are permitted (in Variants and ExtensionObjects), the memory address in the "UA_DataType*" pointer determines which variable is smaller.

Parameters
p1The memory location of the first value
p2The memory location of the first value
typeThe datatype description of both values

Referenced by UA_INLINABLE().

◆ UA_StatusCode_name()

UA_EXPORT const char * UA_StatusCode_name ( UA_StatusCode  code)

Returns the human-readable name of the StatusCode.

If no matching StatusCode is found, a default string for "Unknown" is returned. This feature might be disabled to create a smaller binary with the UA_ENABLE_STATUSCODE_DESCRIPTIONS build-flag. Then the function returns an empty string for every StatusCode.

◆ UA_String_fromChars()

UA_String UA_String_fromChars ( const char *  src)

Copies the content on the heap.

Returns a null-string when alloc fails

◆ UA_String_isEmpty()

UA_Boolean UA_String_isEmpty ( const UA_String s)

◆ UA_Variant_copyRange()

UA_StatusCode UA_Variant_copyRange ( const UA_Variant src,
UA_Variant dst,
const UA_NumericRange  range 
)

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.

Parameters
srcThe source variant
dstThe target variant
rangeThe range of the copied data
Returns
Returns UA_STATUSCODE_GOOD or an error code

◆ UA_Variant_setArray()

void UA_Variant_setArray ( UA_Variant v,
void *  array,
size_t  arraySize,
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
arraySizeThe size of the array
typeThe datatype of the array

◆ UA_Variant_setArrayCopy()

UA_StatusCode UA_Variant_setArrayCopy ( UA_Variant v,
const void *  array,
size_t  arraySize,
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
arraySizeThe size of the array
typeThe datatype of the array
Returns
Indicates whether the operation succeeded or returns an error code

◆ UA_Variant_setRange()

UA_StatusCode UA_Variant_setRange ( UA_Variant v,
void *  array,
size_t  arraySize,
const UA_NumericRange  range 
)

Insert a range of data into an existing variant.

The data array cannot be reused afterwards if it contains types without a fixed size (e.g. strings) since the members are moved into the variant and take on its lifecycle.

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
Returns UA_STATUSCODE_GOOD or an error code

◆ UA_Variant_setRangeCopy()

UA_StatusCode UA_Variant_setRangeCopy ( UA_Variant v,
const void *  array,
size_t  arraySize,
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
Returns UA_STATUSCODE_GOOD or an error code

◆ UA_Variant_setScalar()

const UA_DataType void 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

◆ UA_Variant_setScalarCopy()

UA_StatusCode 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

Variable Documentation

◆ byteString

id identifier byteString = UA_String_fromChars( chars )

Definition at line 382 of file types.h.

◆ chars

const char * chars

◆ dst

void* dst

Definition at line 948 of file types.h.

◆ guid

UA_Guid guid = guid

Definition at line 356 of file types.h.

◆ id

return id

◆ identifierType

id identifierType = UA_NODEIDTYPE_STRING

Definition at line 339 of file types.h.

◆ locale

const char lt locale = UA_String_fromChars( locale )

Definition at line 538 of file types.h.

Referenced by UA_INLINABLE().

◆ lt

return lt

Definition at line 540 of file types.h.

Referenced by UA_INLINABLE().

◆ name

Definition at line 517 of file types.h.

◆ namespaceIndex

const char qn namespaceIndex = nsIndex

Definition at line 338 of file types.h.

◆ namespaceUri

id namespaceUri = UA_STRING_NULL

Definition at line 441 of file types.h.

◆ nodeId

const char id nodeId = UA_NODEID_STRING(nsIndex, chars)

Definition at line 440 of file types.h.

Referenced by UA_INLINABLE().

◆ qn

return qn

Definition at line 518 of file types.h.

Referenced by UA_INLINABLE().

◆ s2

Definition at line 114 of file types.h.

◆ serverIndex

id serverIndex = 0

Definition at line 441 of file types.h.

◆ string

id identifier string = UA_STRING(chars)

Definition at line 340 of file types.h.

◆ text

lt text = UA_String_fromChars( text )

Definition at line 536 of file types.h.

Referenced by UA_INLINABLE().

◆ type

const UA_DataType * type

Definition at line 626 of file types.h.

Referenced by UA_INLINABLE(), UA_INLINABLE(), and UA_INLINABLE().

◆ UA_Boolean

_UA_BEGIN_DECLS typedef bool UA_Boolean

This Source Code Form is subject to the terms of the Mozilla Public License, v.

2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Copyright 2014 (c) Leon Urbas Copyright 2014, 2016-2017 (c) Florian Palm Copyright 2014-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) Copyright 2015-2016 (c) Sten GrĂ¼ner Copyright 2015-2016 (c) Chris Iatrou Copyright 2015 (c) Nick Goossens Copyright 2015-2016 (c) Oleksiy Vasylyev Copyright 2017 (c) Stefan Profanter, fortiss GmbH Copyright 2017 (c) Thomas Stalder, Blue Time Concept SA Copyright 2023 (c) Fraunhofer IOSB (Author: Andreas Ebner)

Definition at line 27 of file types.h.

Referenced by hasReference().

◆ UA_BYTESTRING_NULL

UA_EXPORT const UA_ByteString UA_BYTESTRING_NULL
extern

◆ UA_EXPANDEDNODEID_NULL

UA_EXPORT const UA_ExpandedNodeId UA_EXPANDEDNODEID_NULL
extern

◆ UA_GUID_NULL

UA_EXPORT const UA_Guid UA_GUID_NULL
extern

◆ UA_NODEID_NULL

UA_EXPORT const UA_NodeId UA_NODEID_NULL
extern

Referenced by getTypeDefinitionId().

◆ UA_STRING_NULL

UA_EXPORT const UA_String UA_STRING_NULL
extern