UM C API
6.16.1
|
The LBM Pre-Defined Message(PDM) API provides a framework for applications to create message definitions and messages from those definitions. A PDM definition contains a list of field information describing the fields that will be contained in a message. A PDM message contains one or more fields with each field corresponding to a specific field information object in the definition. Field info consists of:
Description | PDM Type | C Type |
---|---|---|
Boolean | PDM_TYPE_BOOLEAN | uint8_t |
8-bit signed integer | PDM_TYPE_INT8 | int8_t |
8-bit unsigned integer | PDM_TYPE_UINT8 | uint8_t |
16-bit signed integer | PDM_TYPE_INT16 | int16_t |
16-bit unsigned integer | PDM_TYPE_UINT16 | uint16_t |
32-bit signed integer | PDM_TYPE_INT32 | int32_t |
32-bit unsigned integer | PDM_TYPE_UINT32 | uint32_t |
64-bit signed integer | PDM_TYPE_INT64 | int64_t |
64-bit unsigned integer | PDM_TYPE_UINT64 | uint64_t |
Single-precision floating point | PDM_TYPE_FLOAT | float |
Double-precision floating point | PDM_TYPE_DOUBLE | double |
Decimal | PDM_TYPE_DECIMAL | struct decimal |
Timestamp | PDM_TYPE_TIMESTAMP | struct timestamp |
Fixed Length String | PDM_TYPE_FIX_STRING | char * |
String | PDM_TYPE_STRING | char * |
Fixed Length Unicode | PDM_TYPE_FIX_UNICODE | char * |
Unicode | PDM_TYPE_UNICODE | char * |
Nested PDM message | PDM_TYPE_MESSAGE | lbmpdm_msg_t * |
Binary large object (BLOB) | PDM_TYPE_BLOB | void * |
lbmpdm_msg_set_field_value()
to set a field's value using its handle. lbmpdm_msg_set_field_value_vec()
API function. lbmpdm_msg_get_field_value()
. lbmpdm_msg_get_field_value_vec()
.