130#define UA_MIN(A, B) ((A) > (B) ? (B) : (A))
134#define UA_MAX(A, B) ((A) > (B) ? (A) : (B))
138#ifdef UA_ENABLE_PARSING
144#define UA_PRINTF_GUID_FORMAT "%08" PRIx32 "-%04" PRIx16 "-%04" PRIx16 \
145 "-%02" PRIx8 "%02" PRIx8 "-%02" PRIx8 "%02" PRIx8 "%02" PRIx8 "%02" PRIx8 "%02" PRIx8 "%02" PRIx8
146#define UA_PRINTF_GUID_DATA(GUID) (GUID).data1, (GUID).data2, (GUID).data3, \
147 (GUID).data4[0], (GUID).data4[1], (GUID).data4[2], (GUID).data4[3], \
148 (GUID).data4[4], (GUID).data4[5], (GUID).data4[6], (GUID).data4[7]
150#define UA_PRINTF_STRING_FORMAT "\"%.*s\""
151#define UA_PRINTF_STRING_DATA(STRING) (int)(STRING).length, (STRING).data
158UA_constantTimeEqual(
const void *ptr1,
const void *ptr2,
size_t length) {
162 for(
size_t i = 0; i < length; ++i) {
#define _UA_BEGIN_DECLS
#undef UA_DEBUG_DUMP_PKGS
_UA_BEGIN_DECLS typedef bool UA_Boolean
This Source Code Form is subject to the terms of the Mozilla Public License, v.
UA_EXPORT const UA_Variant * UA_KeyValueMap_getQualified(UA_KeyValuePair *map, size_t mapSize, const UA_QualifiedName *key)
Returns a pointer into underlying array or NULL if the key is not found.
UA_EXPORT const UA_Variant * UA_KeyValueMap_getScalar(UA_KeyValuePair *map, size_t mapSize, const char *key, const UA_DataType *type)
Returns NULL if the value for the key is not defined or not of the right datatype and scalar/array.
UA_EXPORT UA_StatusCode UA_KeyValueMap_set(UA_KeyValuePair **map, size_t *mapSize, const char *key, const UA_Variant *value)
Simplified version that assumes the key is in namespace 0.
UA_StatusCode UA_parseEndpointUrlEthernet(const UA_String *endpointUrl, UA_String *target, UA_UInt16 *vid, UA_Byte *pcp)
Split the given endpoint url into hostname, vid and pcp.
void(* UA_ServerCallback)(UA_Server *server, void *data)
UA_StatusCode UA_parseEndpointUrl(const UA_String *endpointUrl, UA_String *outHostname, UA_UInt16 *outPort, UA_String *outPath)
Split the given endpoint url into hostname, port and path.
UA_EXPORT void UA_KeyValueMap_deleteQualified(UA_KeyValuePair **map, size_t *mapSize, const UA_QualifiedName *key)
Remove a single entry.
UA_EXPORT const UA_Variant * UA_KeyValueMap_getArray(UA_KeyValuePair *map, size_t mapSize, const char *key, const UA_DataType *type)
size_t UA_readNumberWithBase(const UA_Byte *buf, size_t buflen, UA_UInt32 *number, UA_Byte base)
Same as UA_ReadNumber but with a base parameter.
UA_TimerPolicy
Timer policy to handle cycle misses.
@ UA_TIMER_HANDLE_CYCLEMISS_WITH_CURRENTTIME
@ UA_TIMER_HANDLE_CYCLEMISS_WITH_BASETIME
UA_EXPORT UA_StatusCode UA_KeyValueMap_setQualified(UA_KeyValuePair **map, size_t *mapSize, const UA_QualifiedName *key, const UA_Variant *value)
Makes a copy of the value.
UA_EXPORT const UA_Variant * UA_KeyValueMap_get(UA_KeyValuePair *map, size_t mapSize, const char *key)
Simplified version that assumes the key is in namespace 0.
size_t UA_readNumber(const UA_Byte *buf, size_t buflen, UA_UInt32 *number)
Convert given byte string to a positive number.
UA_EXPORT void UA_KeyValueMap_delete(UA_KeyValuePair **map, size_t *mapSize, const char *key)
Simplified version that assumes the key is in namespace 0.