open62541 1.3.12
Open source implementation of OPC UA
|
#include <open62541/config.h>
#include <string.h>
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <inttypes.h>
#include <alloca.h>
Go to the source code of this file.
Macros | |
#define | UA_THREAD_LOCAL |
#define | UA_alloca(SIZE) alloca(SIZE) |
#define | UA_STACKARRAY(TYPE, NAME, SIZE) |
#define | UA_assert(ignore) do {} while(0) |
#define | UA_STATIC_ASSERT(cond, msg) typedef char static_assertion_##msg[(cond)?1:-1] |
#define | endif |
#define | UA_THREADSAFE |
#define | inline |
#define | UA_LIKELY(x) x |
#define | UA_UNLIKELY(x) x |
#define | UA_FUNC_ATTR_PURE |
#define | UA_FUNC_ATTR_CONST |
#define | UA_FORMAT(X, Y) |
#define | UA_DEPRECATED |
#define | UA_INTERNAL_DEPRECATED |
#define | UA_INTERNAL_FUNC_ATTR_WARN_UNUSED_RESULT |
#define | UA_LITTLE_ENDIAN 0 |
#define | UA_BINARY_OVERLAYABLE_INTEGER 0 |
#define | UA_FLOAT_IEEE754 0 |
#define | UA_FLOAT_LITTLE_ENDIAN 0 |
#define | UA_BINARY_OVERLAYABLE_FLOAT 0 |
#define | UA_atomic_sync() |
#define UA_THREAD_LOCAL |
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 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) Copyright 2017 (c) Stefan Profanter, fortiss GmbH Copyright 2018 (c) Jose Cabral, fortiss GmbH Include stdint.h and stdbool.h or workaround for older Visual Studios Include inttypes.h or workaround for older Visual Studios
Definition at line 81 of file architecture_definitions.h.
#define UA_alloca | ( | SIZE | ) | alloca(SIZE) |
Stack-allocation of memory.
Use C99 variable-length arrays if possible. Otherwise revert to alloca. Note that alloca is not supported on some plattforms.
Definition at line 110 of file architecture_definitions.h.
#define UA_STACKARRAY | ( | TYPE, | |
NAME, | |||
SIZE ) |
Definition at line 112 of file architecture_definitions.h.
#define UA_assert | ( | ignore | ) | do {} while(0) |
Definition at line 123 of file architecture_definitions.h.
Outputs an error message at compile time if the assert fails.
Example usage: UA_STATIC_ASSERT(sizeof(long)==7, use_another_compiler_luke) See: https://stackoverflow.com/a/4815532/869402
Definition at line 145 of file architecture_definitions.h.
#define endif |
#define UA_THREADSAFE |
Definition at line 173 of file architecture_definitions.h.
#define inline |
Definition at line 179 of file architecture_definitions.h.
#define UA_LIKELY | ( | x | ) | x |
Definition at line 198 of file architecture_definitions.h.
#define UA_UNLIKELY | ( | x | ) | x |
Definition at line 199 of file architecture_definitions.h.
#define UA_FUNC_ATTR_PURE |
Definition at line 218 of file architecture_definitions.h.
#define UA_FUNC_ATTR_CONST |
Definition at line 219 of file architecture_definitions.h.
#define UA_FORMAT | ( | X, | |
Y ) |
Definition at line 221 of file architecture_definitions.h.
#define UA_DEPRECATED |
Definition at line 229 of file architecture_definitions.h.
#define UA_INTERNAL_DEPRECATED |
Definition at line 238 of file architecture_definitions.h.
#define UA_INTERNAL_FUNC_ATTR_WARN_UNUSED_RESULT |
Definition at line 245 of file architecture_definitions.h.
#define UA_LITTLE_ENDIAN 0 |
Definition at line 287 of file architecture_definitions.h.
#define UA_BINARY_OVERLAYABLE_INTEGER 0 |
Can the integers be memcpy'd onto the network buffer? Add additional checks here.
Some platforms (e.g. QNX) have sizeof(bool) > 1. Manually disable overlayed integer encoding if that is the case.
Definition at line 297 of file architecture_definitions.h.
#define UA_FLOAT_IEEE754 0 |
Definition at line 313 of file architecture_definitions.h.
#define UA_FLOAT_LITTLE_ENDIAN 0 |
Wikipedia says (https://en.wikipedia.org/wiki/Endianness): Although the ubiquitous x86 processors of today use little-endian storage for all types of data (integer, floating point, BCD), there are a number of hardware architectures where floating-point numbers are represented in big-endian form while integers are represented in little-endian form.
Definition at line 334 of file architecture_definitions.h.
#define UA_BINARY_OVERLAYABLE_FLOAT 0 |
Only if the floating points are litle-endian and in IEEE 754 format can we memcpy directly onto the network buffer.
Definition at line 342 of file architecture_definitions.h.
#define UA_atomic_sync | ( | ) |
Atomic operations that synchronize across processor cores (for multithreading). Only the inline-functions defined next are used. Replace with architecture-specific operations if necessary.
Definition at line 357 of file architecture_definitions.h.