open62541 1.4.15
Open source implementation of OPC UA
Loading...
Searching...
No Matches
Data Structures | Macros
config.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <inttypes.h>
#include <float.h>
#include <string.h>
#include <stdlib.h>
#include <alloca.h>
#include <assert.h>
#include <pthread.h>

Go to the source code of this file.

Data Structures

struct  UA_Lock
 

Macros

#define UA_OPEN62541_VER_MAJOR   1
 
#define UA_OPEN62541_VER_MINOR   4
 
#define UA_OPEN62541_VER_PATCH   15
 
#define UA_OPEN62541_VER_LABEL   "-undefined" /* Release candidate label, etc. */
 
#define UA_OPEN62541_VER_COMMIT   "unknown-commit"
 
#define UA_OPEN62541_VERSION   "v1.4.15-undefined"
 
#define UA_ARCHITECTURE_POSIX
 
#define UA_LOGLEVEL   100
 
#define UA_ENABLE_METHODCALLS
 
#define UA_ENABLE_NODEMANAGEMENT
 
#define UA_ENABLE_SUBSCRIPTIONS
 
#define UA_ENABLE_PUBSUB
 
#define UA_ENABLE_PUBSUB_INFORMATIONMODEL
 
#define UA_ENABLE_DA
 
#define UA_ENABLE_DIAGNOSTICS
 
#define UA_ENABLE_HISTORIZING
 
#define UA_ENABLE_PARSING
 
#define UA_ENABLE_SUBSCRIPTIONS_EVENTS
 
#define UA_ENABLE_JSON_ENCODING
 
#define UA_MULTITHREADING   100
 
#define UA_ENABLE_STATUSCODE_DESCRIPTIONS
 
#define UA_ENABLE_TYPEDESCRIPTION
 
#define UA_ENABLE_NODESET_COMPILER_DESCRIPTIONS
 
#define UA_ENABLE_DISCOVERY
 
#define UA_ENABLE_DISCOVERY_SEMAPHORE
 
#define UA_GENERATED_NAMESPACE_ZERO
 
#define UA_DEBUG
 
#define _UA_BEGIN_DECLS
 
#define _UA_END_DECLS
 
#define _XOPEN_SOURCE   600
 
#define _DEFAULT_SOURCE
 
#define _BSD_SOURCE
 
#define _GNU_SOURCE
 
#define UA_HAS_GETIFADDR   1
 
#define inline
 
#define UA_INLINABLE(decl, impl)   static decl impl
 
#define UA_THREAD_LOCAL
 
#define UA_free   free
 
#define UA_malloc   malloc
 
#define UA_calloc   calloc
 
#define UA_realloc   realloc
 
#define UA_alloca(SIZE)   alloca(SIZE)
 
#define UA_STACKARRAY(TYPE, NAME, SIZE)
 
#define UA_assert(ignore)   assert(ignore)
 
#define UA_STATIC_ASSERT(cond, msg)   typedef char static_assertion_##msg[(cond)?1:-1]
 
#define endif
 
#define UA_THREADSAFE
 
#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
 

Macro Definition Documentation

◆ _BSD_SOURCE

#define _BSD_SOURCE

On older systems we need to define _BSD_SOURCE.

_DEFAULT_SOURCE is an alias for that.

Definition at line 129 of file config.h.

◆ _DEFAULT_SOURCE

#define _DEFAULT_SOURCE

Definition at line 123 of file config.h.

◆ _GNU_SOURCE

#define _GNU_SOURCE

Define _GNU_SOURCE to get functions like poll.

Comment this out to only use standard POSIX definitions.

Definition at line 135 of file config.h.

◆ _UA_BEGIN_DECLS

#define _UA_BEGIN_DECLS

#undef UA_DEBUG_DUMP_PKGS

#undef UA_DEBUG_FILE_LINE_INFO Options for Tests #undef UA_ENABLE_ALLOW_REUSEADDR #undef UA_DYNAMIC_LINKING Shortcuts for extern "C" declarations

Definition at line 100 of file config.h.

◆ _UA_END_DECLS

#define _UA_END_DECLS

Definition at line 107 of file config.h.

◆ _XOPEN_SOURCE

#define _XOPEN_SOURCE   600

Definition at line 120 of file config.h.

◆ endif

#define endif

◆ inline

#define inline

Definition at line 153 of file config.h.

◆ UA_alloca

#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 261 of file config.h.

◆ UA_ARCHITECTURE_POSIX

#define UA_ARCHITECTURE_POSIX

#undef UA_ARCHITECTURE_WIN32

Definition at line 19 of file config.h.

◆ UA_assert

#define UA_assert (   ignore)    assert(ignore)

Definition at line 272 of file config.h.

◆ UA_BINARY_OVERLAYABLE_FLOAT

#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 576 of file config.h.

◆ UA_BINARY_OVERLAYABLE_INTEGER

#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 530 of file config.h.

◆ UA_calloc

#define UA_calloc   calloc

Definition at line 244 of file config.h.

◆ UA_DEBUG

#define UA_DEBUG

#undef UA_GENERATED_NAMESPACE_ZERO_FULL

#undef UA_ENABLE_PUBSUB_MONITORING #undef UA_ENABLE_PUBSUB_BUFMALLOC #undef UA_ENABLE_PUBSUB_SKS Options for Debugging

Definition at line 85 of file config.h.

◆ UA_DEPRECATED

#define UA_DEPRECATED

Definition at line 462 of file config.h.

◆ UA_ENABLE_DA

#define UA_ENABLE_DA

Definition at line 43 of file config.h.

◆ UA_ENABLE_DIAGNOSTICS

#define UA_ENABLE_DIAGNOSTICS

Definition at line 44 of file config.h.

◆ UA_ENABLE_DISCOVERY

#define UA_ENABLE_DISCOVERY

#undef UA_ENABLE_DETERMINISTIC_RNG

Definition at line 73 of file config.h.

◆ UA_ENABLE_DISCOVERY_SEMAPHORE

#define UA_ENABLE_DISCOVERY_SEMAPHORE

#undef UA_ENABLE_DISCOVERY_MULTICAST

#undef UA_ENABLE_QUERY #undef UA_ENABLE_MALLOC_SINGLETON

Definition at line 77 of file config.h.

◆ UA_ENABLE_HISTORIZING

#define UA_ENABLE_HISTORIZING

Definition at line 45 of file config.h.

◆ UA_ENABLE_JSON_ENCODING

#define UA_ENABLE_JSON_ENCODING

Definition at line 48 of file config.h.

◆ UA_ENABLE_METHODCALLS

#define UA_ENABLE_METHODCALLS

#undef UA_ENABLE_AMALGAMATION

Definition at line 36 of file config.h.

◆ UA_ENABLE_NODEMANAGEMENT

#define UA_ENABLE_NODEMANAGEMENT

Definition at line 37 of file config.h.

◆ UA_ENABLE_NODESET_COMPILER_DESCRIPTIONS

#define UA_ENABLE_NODESET_COMPILER_DESCRIPTIONS

#undef UA_ENABLE_INLINABLE_EXPORT

Definition at line 71 of file config.h.

◆ UA_ENABLE_PARSING

#define UA_ENABLE_PARSING

Definition at line 46 of file config.h.

◆ UA_ENABLE_PUBSUB

#define UA_ENABLE_PUBSUB

Definition at line 39 of file config.h.

◆ UA_ENABLE_PUBSUB_INFORMATIONMODEL

#define UA_ENABLE_PUBSUB_INFORMATIONMODEL

#undef UA_ENABLE_PUBSUB_ENCRYPTION

#undef UA_ENABLE_PUBSUB_FILE_CONFIG

Definition at line 42 of file config.h.

◆ UA_ENABLE_STATUSCODE_DESCRIPTIONS

#define UA_ENABLE_STATUSCODE_DESCRIPTIONS

Advanced Options.

Definition at line 68 of file config.h.

◆ UA_ENABLE_SUBSCRIPTIONS

#define UA_ENABLE_SUBSCRIPTIONS

Definition at line 38 of file config.h.

◆ UA_ENABLE_SUBSCRIPTIONS_EVENTS

#define UA_ENABLE_SUBSCRIPTIONS_EVENTS

Definition at line 47 of file config.h.

◆ UA_ENABLE_TYPEDESCRIPTION

#define UA_ENABLE_TYPEDESCRIPTION

Definition at line 69 of file config.h.

◆ UA_FLOAT_IEEE754

#define UA_FLOAT_IEEE754   0

Definition at line 547 of file config.h.

◆ UA_FLOAT_LITTLE_ENDIAN

#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 568 of file config.h.

◆ UA_FORMAT

#define UA_FORMAT (   X,
 
)

Definition at line 454 of file config.h.

◆ UA_free

#define UA_free   free

Definition at line 242 of file config.h.

◆ UA_FUNC_ATTR_CONST

#define UA_FUNC_ATTR_CONST

Definition at line 452 of file config.h.

◆ UA_FUNC_ATTR_PURE

#define UA_FUNC_ATTR_PURE

Definition at line 451 of file config.h.

◆ UA_GENERATED_NAMESPACE_ZERO

#define UA_GENERATED_NAMESPACE_ZERO

Definition at line 78 of file config.h.

◆ UA_HAS_GETIFADDR

#define UA_HAS_GETIFADDR   1

Definition at line 138 of file config.h.

◆ UA_INLINABLE

#define UA_INLINABLE (   decl ,
  impl 
)    static decl impl

An inlinable method is typically defined as "static inline".

Some applications, such as language bindings with a C FFI (foreign function interface), can however not work with static inline methods. These can set the global UA_ENABLE_INLINABLE_EXPORT macro which causes all inlinable methods to be exported as a regular public API method.

Note that UA_ENABLE_INLINABLE_EXPORT has a negative impact for both size and performance of the library.

Definition at line 169 of file config.h.

◆ UA_INTERNAL_DEPRECATED

#define UA_INTERNAL_DEPRECATED

Definition at line 471 of file config.h.

◆ UA_INTERNAL_FUNC_ATTR_WARN_UNUSED_RESULT

#define UA_INTERNAL_FUNC_ATTR_WARN_UNUSED_RESULT

Definition at line 478 of file config.h.

◆ UA_LIKELY

#define UA_LIKELY (   x)    x

Definition at line 431 of file config.h.

◆ UA_LITTLE_ENDIAN

#define UA_LITTLE_ENDIAN   0

Definition at line 520 of file config.h.

◆ UA_LOGLEVEL

#define UA_LOGLEVEL   100

Select default architecture if none is selected.

Definition at line 32 of file config.h.

◆ UA_malloc

#define UA_malloc   malloc

Definition at line 243 of file config.h.

◆ UA_MULTITHREADING

#define UA_MULTITHREADING   100

#undef UA_ENABLE_XML_ENCODING

#undef UA_ENABLE_MQTT #undef UA_ENABLE_NODESET_INJECTOR #undef UA_INFORMATION_MODEL_AUTOLOAD #undef UA_ENABLE_ENCRYPTION_MBEDTLS #undef UA_ENABLE_CERT_REJECTED_DIR #undef UA_ENABLE_TPM2_SECURITY #undef UA_ENABLE_ENCRYPTION_OPENSSL #undef UA_ENABLE_ENCRYPTION_LIBRESSL #undef UA_ENABLE_SUBSCRIPTIONS_ALARMS_CONDITIONS Multithreading #undef UA_ENABLE_IMMUTABLE_NODES

Definition at line 65 of file config.h.

◆ UA_OPEN62541_VER_COMMIT

#define UA_OPEN62541_VER_COMMIT   "unknown-commit"

Definition at line 13 of file config.h.

◆ UA_OPEN62541_VER_LABEL

#define UA_OPEN62541_VER_LABEL   "-undefined" /* Release candidate label, etc. */

Definition at line 12 of file config.h.

◆ UA_OPEN62541_VER_MAJOR

#define UA_OPEN62541_VER_MAJOR   1

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/.

Definition at line 9 of file config.h.

◆ UA_OPEN62541_VER_MINOR

#define UA_OPEN62541_VER_MINOR   4

Definition at line 10 of file config.h.

◆ UA_OPEN62541_VER_PATCH

#define UA_OPEN62541_VER_PATCH   15

Definition at line 11 of file config.h.

◆ UA_OPEN62541_VERSION

#define UA_OPEN62541_VERSION   "v1.4.15-undefined"

Definition at line 14 of file config.h.

◆ UA_realloc

#define UA_realloc   realloc

Definition at line 245 of file config.h.

◆ UA_STACKARRAY

#define UA_STACKARRAY (   TYPE,
  NAME,
  SIZE 
)
Value:
/* cppcheck-suppress allocaCalled */ \
TYPE *(NAME) = (TYPE*)UA_alloca(sizeof(TYPE) * (SIZE))
#define UA_alloca(SIZE)
Stack-allocation of memory.
Definition config.h:261

Definition at line 263 of file config.h.

◆ UA_STATIC_ASSERT

#define UA_STATIC_ASSERT (   cond,
  msg 
)    typedef char static_assertion_##msg[(cond)?1:-1]

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 296 of file config.h.

◆ UA_THREAD_LOCAL

#define UA_THREAD_LOCAL

Definition at line 181 of file config.h.

◆ UA_THREADSAFE

#define UA_THREADSAFE

Definition at line 413 of file config.h.

◆ UA_UNLIKELY

#define UA_UNLIKELY (   x)    x

Definition at line 432 of file config.h.