Wirepas SDK
|
Library to encode/decode buffers in PosLibTLV compact format. More...
Library to encode/decode buffers in PosLibTLV compact format.
Definition in file poslib_tlv.h.
Go to the source code of this file.
Functions | |
void | PosLibTlv_init (poslib_tlv_record *rcd, uint8_t *buffer, uint8_t length) |
Initialize a TLV record. More... | |
poslib_tlv_res_e | PosLibTlv_Decode_getNextItem (poslib_tlv_record *rcd, poslib_tlv_item_t *item) |
Decode the next tlv_item in the tlv_record passed in parameter. More... | |
poslib_tlv_res_e | PosLibTlv_Encode_addItem (poslib_tlv_record *rcd, poslib_tlv_item_t *item) |
Encode tlv_item in the tlv_record passed as parameter. More... | |
Data Structures | |
struct | poslib_tlv_item_t |
Structure describing a Type Length Value item. More... | |
struct | poslib_tlv_record |
This structure holds the buffer containing TLV items and data to manage it, max. buffer size and current index. More... | |
Enumerations | |
enum | poslib_tlv_res_e { POSLIB_TLV_RES_OK, POSLIB_TLV_RES_ERROR, POSLIB_TLV_RES_END } |
List of return codes. More... | |
poslib_tlv_res_e PosLibTlv_Decode_getNextItem | ( | poslib_tlv_record * | rcd, |
poslib_tlv_item_t * | item | ||
) |
Decode the next tlv_item in the tlv_record passed in parameter.
[in] | rcd | Pointer to a tlv_record structure to decode items from. |
[in] | item | Pointer to a tlv_item. Updated by the call if return code is POSLIB_TLV_RES_OK |
poslib_tlv_res_e PosLibTlv_Encode_addItem | ( | poslib_tlv_record * | rcd, |
poslib_tlv_item_t * | item | ||
) |
Encode tlv_item in the tlv_record passed as parameter.
[in] | rcd | Pointer to a tlv_record structure to encode items into. |
[in] | item | Pointer to a tlv_item to add. |
void PosLibTlv_init | ( | poslib_tlv_record * | rcd, |
uint8_t * | buffer, | ||
uint8_t | length | ||
) |
Initialize a TLV record.
[in] | rcd | Pointer to the tlv_record structure to initialize. |
[in] | buffer | Buffer used by the tlv_record. |
[in] | length | Size in bytes of the buffer. |
struct poslib_tlv_item_t |
Structure describing a Type Length Value item.
Definition at line 26 of file poslib_tlv.h.
Data Fields | ||
---|---|---|
uint8_t | length |
Length of the value buffer. |
uint16_t | type |
Type of the TLV item. |
uint8_t * | value |
Pointer to the buffer containing the value |
struct poslib_tlv_record |
This structure holds the buffer containing TLV items and data to manage it, max. buffer size and current index.
Definition at line 37 of file poslib_tlv.h.
Data Fields | ||
---|---|---|
uint8_t * | buffer |
Pointer to a buffer containing TLV Items. |
uint8_t | index |
Current encode/decode index in the buffer. |
uint8_t | length |
Length of the buffer. |
enum poslib_tlv_res_e |
List of return codes.
Definition at line 15 of file poslib_tlv.h.