Skip to content

Configuration#

libaes70 provides a series of compile-time options which can be used to customize the behavior of the library. They are intended either to configure the library itself (e.g. log levels, etc.) or to enable or disable optimizations.

Configuration options#

AES70_NO_EXCEPTIONS#

When defined, the libaes70 will neither use nor support exception handling. Enable this when writing software for embedded platforms or other environments where code must be compiled without exceptions.

AES70_BUFFER_USE_MALLOC#

Use malloc(), realloc() and free() for managing aes70 network buffers. This is generally recommended and may be required on platforms where std::allocator will terminate when exceptions are disabled and an allocation fails.

AES70_LOG_LEVEL#

Can be used to configure the log level for log messages generated by libaes70. See Logging for more details.

AES70_DEBUG#

Enabled runtime debugging and asserts. This is generally not a good idea in production builds.

AES70_DISABLE_EV1 or AES70_DISABLE_EV2#

Disables EV1 or EV2 support.

AES70_STATIC_HTTP_USE_*#

The following options can be used to determine which http library is used by the static_http module:

  • AES70_STATIC_HTTP_USE_PICOHTTPPARSER enables usage of picohttpparser.
  • AES70_STATIC_HTTP_USE_LLHTTP enables usage of llhttp.
  • AES70_STATIC_HTTP_USE_HTTP_PARSER is deprecated and enables usage of http-parser.

Optimizations options#

AES70_ALLOW_ONLY_SIMPLE_SUBSCRIPTIONS#

Only allow simple subscriptions, i.e. subscriptions with a fixed caller method. This is usually fine when using standard controller libraries or controller software to control your device.

Enabling this can reduce the memory used by connections significantly.

AES70_OPTIMIZE_SINGLE_DEVICE#

This option assumes that the program only uses a single aes70 device. As a result objects in the device will store the device pointer in a static variable. This setting can reduce the memory usage of device objects.

AES70_SHORT_OBJECT_NUMBERS#

This option enabled the object number to be stored as a 16 bit integer. This can reduce the memory footprint of device objects. This can only be used in devices which never create more than 65535 - 4096 objects. In general, this can safely be used for devices built using the static_device support.