Common CMX functions. More...
#include <stdint.h>
Defines | |
#define | CMX_FALSE 0 |
Boolean false value. | |
#define | CMX_TRUE 1 |
Boolean true value. | |
#define | CMX_SHM_TAG "CMX_1 \0" |
The CMX tag is written in the first 8 bytes of a shared memory objects. | |
#define | CMX_SHM_TAG_LEN 8 |
Length of the CMX Version Tag. | |
#define | CMX_NAME_SZ 64 |
Size of identifiers. | |
#define | CMX_SHM_PAYLOAD_SZ 115 |
Number of bytes in a single payload slot. | |
#define | CMX_SHM_MAX_STRING_SZ 64400 |
CMX_SHM_PAYLOAD_SZ A string single is maximum 560 slots long. Thats means maximum 64,4kB: 115 Bytes/Slot * 560 Slots = 64400 Bytes This value is limited by the uint16_t size counter in cmx_shm_value_string. | |
#define | CMX_NUMBER_OF_VALUES 0x4fff |
Number of values. | |
#define | CMX_STRING_END_INDEX 0xffff |
Magic end-marking index value for strings. | |
Enumerations | |
enum | cmx_cmx_error { E_CMX_SUCCESS = 0, E_CMX_OPERATION_FAILED = -1, E_CMX_INVALID_HANDLE = -2, E_CMX_TYPE_MISMATCH = -3, E_CMX_CORRUPT_SEGMENT = -4, E_CMX_INVALID_ARGUMENT = -5, E_CMX_OUT_OF_MEMORY = -6, E_CMX_CREATE_FAILED = -7, E_CMX_INVALID_PID = -8, E_CMX_CONCURRENT_MODIFICATION = -9, E_CMX_NAME_EXISTS = -10, E_CMX_NOT_FOUND = -11, E_CMX_COMPONENT_FULL = -12, E_CMX_PROTOCOL_VERSION = -13, E_CMX_OUT_OF_RANGE = -14, E_CMX_UNUSED_3 = -15, E_CMX_UNUSED_1 = -16, E_CMX_UNUSED_2 = -17 } |
CMX error codes. Use cmx_common_strerror() for to-string conversion. More... | |
Functions | |
const char * | cmx_common_strerror (const int code) |
returns a string description of a cmx_cmx_error code | |
int | cmx_common_check_string_length (const char *string, unsigned int min_size, unsigned int max_size) |
Check length of a character string. | |
uint64_t | cmx_common_current_time_usec () |
Get current time in usec. | |
int | cmx_common_current_pid () |
Common CMX functions.
enum cmx_cmx_error |
CMX error codes. Use cmx_common_strerror() for to-string conversion.
E_CMX_SUCCESS |
|
E_CMX_OPERATION_FAILED |
|
E_CMX_INVALID_HANDLE |
|
E_CMX_TYPE_MISMATCH |
|
E_CMX_CORRUPT_SEGMENT |
|
E_CMX_INVALID_ARGUMENT |
|
E_CMX_OUT_OF_MEMORY |
|
E_CMX_CREATE_FAILED |
|
E_CMX_INVALID_PID |
|
E_CMX_CONCURRENT_MODIFICATION |
|
E_CMX_NAME_EXISTS |
|
E_CMX_NOT_FOUND |
|
E_CMX_COMPONENT_FULL |
|
E_CMX_PROTOCOL_VERSION |
|
E_CMX_OUT_OF_RANGE |
|
E_CMX_UNUSED_3 |
|
E_CMX_UNUSED_1 |
|
E_CMX_UNUSED_2 |
|
int cmx_common_check_string_length | ( | const char * | string, | |
unsigned int | min_size, | |||
unsigned int | max_size | |||
) |
int cmx_common_current_pid | ( | ) |
uint64_t cmx_common_current_time_usec | ( | ) |
Get current time in usec.