S2OPC OPCUA Toolkit
|
Contains the configuration constants used by S2OPC common library. Those constants could be modified for specific use. More...
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include "sopc_protocol_constants.h"
Go to the source code of this file.
Data Structures | |
struct | SOPC_Common_EncodingConstants |
Configuration structure of message and types encoding limits. More... | |
Macros | |
#define | SOPC_DEFAULT_TCP_UA_MAX_BUFFER_SIZE UINT16_MAX |
Maximum chunk buffer size used (must be >= SOPC_TCP_UA_MIN_BUFFER_SIZE) | |
#define | SOPC_DEFAULT_RECEIVE_MAX_NB_CHUNKS 5 |
Maximum number of chunks received accepted for 1 message, 0 means no limit. Note: if 0 is chosen SOPC_RECEIVE_MAX_MESSAGE_LENGTH definition shall be changed not to use it and shall not be 0. | |
#define | SOPC_DEFAULT_RECEIVE_MAX_MESSAGE_LENGTH SOPC_DEFAULT_TCP_UA_MAX_BUFFER_SIZE* SOPC_DEFAULT_RECEIVE_MAX_NB_CHUNKS |
Maximum message length accepted in reception (must be >= SOPC_TCP_UA_MAX_BUFFER_SIZE), 0 means no limit. Note: if 0 is chosen SOPC_RECEIVE_MAX_NB_CHUNKS shall not be 0. | |
#define | SOPC_DEFAULT_SEND_MAX_NB_CHUNKS 12 |
Maximum number of chunks sent for 1 message, 0 means no limit. Note: if 0 is chosen SOPC_SEND_MAX_MESSAGE_LENGTH definition shall be changed not to use it and shall not be 0. | |
#define | SOPC_DEFAULT_SEND_MAX_MESSAGE_LENGTH SOPC_DEFAULT_TCP_UA_MAX_BUFFER_SIZE* SOPC_DEFAULT_SEND_MAX_NB_CHUNKS |
Maximum message length sent (must be >= SOPC_TCP_UA_MAX_BUFFER_SIZE), 0 means no limit. Note: if 0 is chosen SOPC_SEND_MAX_NB_CHUNKS shall not be 0. | |
#define | SOPC_DEFAULT_MAX_STRING_LENGTH UINT16_MAX |
Maximum ByteString/String/XmlElement length in bytes used. | |
#define | SOPC_DEFAULT_MAX_ARRAY_LENGTH 1000000 |
Maximum array length that could be stored in a variant. | |
#define | SOPC_DEFAULT_MAX_DIAG_INFO_NESTED_LEVEL 100 |
Maximum levels of nested diagnostic information structure Note: OPC UA specification v1.03 part 6 §5.2.2.12 indicates "Decoders shall support at least 100 nesting levels ...". | |
#define | SOPC_DEFAULT_MAX_STRUCT_NESTED_LEVEL 50 |
Maximum levels of nested structs, excluding Diagnostic Information which is handled by SOPC_DEFAULT_MAX_DIAG_INFO_NESTED_LEVEL. | |
#define | SOPC_MAX_NB_ELEMENTS_ASYNC_QUEUE 5000 |
#define | SOPC_MAX_NB_ELEMENTS_ASYNC_QUEUE_WARNING_ONLY true |
#define | SOPC_LOG_MAX_USER_LINE_LENGTH 512 |
Maximum length of a User-defined log line. | |
#define | SOPC_HAS_FILESYSTEM true |
Indicates whether the host has a file system. | |
#define | SOPC_MAX_TIMERS UINT8_MAX /* TODO: avoid static maximum (see monitoredItems Id creation) */ |
Maximum number of timers. | |
#define | SOPC_CONSOLE_PRINTF printf |
define host-specific console print function If no console is provided or log wants to be omitted, the following can be used: | |
#define | SOPC_IS_LITTLE_ENDIAN 1 |
Define Endianness. | |
#define | SOPC_IS_DOUBLE_MIDDLE_ENDIAN 0 |
Define Double Middle-endian option (Used on some old ARM CPUs) In that case, the double are little-endian but with 4-bytes words reversed. If Set to 1, it overrides SOPC_IS_LITTLE_ENDIAN for double encoding, whatever its value. | |
Typedefs | |
typedef struct SOPC_Common_EncodingConstants | SOPC_Common_EncodingConstants |
Configuration structure of message and types encoding limits. | |
Functions | |
SOPC_Common_EncodingConstants | SOPC_Common_GetDefaultEncodingConstants (void) |
Get the default encoding constants (contains values below by default) | |
bool | SOPC_Common_SetEncodingConstants (SOPC_Common_EncodingConstants config) |
Set the encodings constants with current structure value. It shall be done before initialization and cannot be called twice. | |
bool | SOPC_Common_EncodingConstantsGetInitialized (void) |
Retrieve the S2OPC encoding constants "initialized" state. | |
const SOPC_Common_EncodingConstants * | SOPC_Internal_Common_GetEncodingConstants (void) |
bool | SOPC_Internal_Common_Constants_RuntimeCheck (void) |
Contains the configuration constants used by S2OPC common library. Those constants could be modified for specific use.
#define SOPC_DEFAULT_TCP_UA_MAX_BUFFER_SIZE UINT16_MAX |
Maximum chunk buffer size used (must be >= SOPC_TCP_UA_MIN_BUFFER_SIZE)
#define SOPC_DEFAULT_RECEIVE_MAX_NB_CHUNKS 5 |
Maximum number of chunks received accepted for 1 message, 0 means no limit. Note: if 0 is chosen SOPC_RECEIVE_MAX_MESSAGE_LENGTH definition shall be changed not to use it and shall not be 0.
#define SOPC_DEFAULT_RECEIVE_MAX_MESSAGE_LENGTH SOPC_DEFAULT_TCP_UA_MAX_BUFFER_SIZE* SOPC_DEFAULT_RECEIVE_MAX_NB_CHUNKS |
Maximum message length accepted in reception (must be >= SOPC_TCP_UA_MAX_BUFFER_SIZE), 0 means no limit. Note: if 0 is chosen SOPC_RECEIVE_MAX_NB_CHUNKS shall not be 0.
#define SOPC_DEFAULT_SEND_MAX_NB_CHUNKS 12 |
Maximum number of chunks sent for 1 message, 0 means no limit. Note: if 0 is chosen SOPC_SEND_MAX_MESSAGE_LENGTH definition shall be changed not to use it and shall not be 0.
#define SOPC_DEFAULT_SEND_MAX_MESSAGE_LENGTH SOPC_DEFAULT_TCP_UA_MAX_BUFFER_SIZE* SOPC_DEFAULT_SEND_MAX_NB_CHUNKS |
Maximum message length sent (must be >= SOPC_TCP_UA_MAX_BUFFER_SIZE), 0 means no limit. Note: if 0 is chosen SOPC_SEND_MAX_NB_CHUNKS shall not be 0.
#define SOPC_DEFAULT_MAX_STRING_LENGTH UINT16_MAX |
Maximum ByteString/String/XmlElement length in bytes used.
#define SOPC_DEFAULT_MAX_ARRAY_LENGTH 1000000 |
Maximum array length that could be stored in a variant.
#define SOPC_DEFAULT_MAX_DIAG_INFO_NESTED_LEVEL 100 |
Maximum levels of nested diagnostic information structure Note: OPC UA specification v1.03 part 6 §5.2.2.12 indicates "Decoders shall support at least 100 nesting levels ...".
#define SOPC_DEFAULT_MAX_STRUCT_NESTED_LEVEL 50 |
Maximum levels of nested structs, excluding Diagnostic Information which is handled by SOPC_DEFAULT_MAX_DIAG_INFO_NESTED_LEVEL.
#define SOPC_MAX_NB_ELEMENTS_ASYNC_QUEUE 5000 |
#define SOPC_MAX_NB_ELEMENTS_ASYNC_QUEUE_WARNING_ONLY true |
#define SOPC_LOG_MAX_USER_LINE_LENGTH 512 |
Maximum length of a User-defined log line.
#define SOPC_HAS_FILESYSTEM true |
Indicates whether the host has a file system.
#define SOPC_MAX_TIMERS UINT8_MAX /* TODO: avoid static maximum (see monitoredItems Id creation) */ |
Maximum number of timers.
#define SOPC_CONSOLE_PRINTF printf |
define host-specific console print function If no console is provided or log wants to be omitted, the following can be used:
#define SOPC_IS_LITTLE_ENDIAN 1 |
Define Endianness.
#define SOPC_IS_DOUBLE_MIDDLE_ENDIAN 0 |
Define Double Middle-endian option (Used on some old ARM CPUs) In that case, the double are little-endian but with 4-bytes words reversed. If Set to 1, it overrides SOPC_IS_LITTLE_ENDIAN for double encoding, whatever its value.
typedef struct SOPC_Common_EncodingConstants SOPC_Common_EncodingConstants |
Configuration structure of message and types encoding limits.
SOPC_Common_EncodingConstants SOPC_Common_GetDefaultEncodingConstants | ( | void | ) |
Get the default encoding constants (contains values below by default)
bool SOPC_Common_SetEncodingConstants | ( | SOPC_Common_EncodingConstants | config | ) |
Set the encodings constants with current structure value. It shall be done before initialization and cannot be called twice.
config | The new encoding constants structure to be configured. It should be a modified version of SOPC_Common_GetDefaultEncodingConstants(). |
bool SOPC_Common_EncodingConstantsGetInitialized | ( | void | ) |
Retrieve the S2OPC encoding constants "initialized" state.
const SOPC_Common_EncodingConstants * SOPC_Internal_Common_GetEncodingConstants | ( | void | ) |
bool SOPC_Internal_Common_Constants_RuntimeCheck | ( | void | ) |