![]()  | 
        
           Wirepas SDK
           
         | 
        
Library to encode/decode buffers in TLV (Type Length Value) format. More...
Library to encode/decode buffers in TLV (Type Length Value) format.
Definition in file tlv.h.
Go to the source code of this file.
Functions | |
| void | Tlv_init (tlv_record *rcd, uint8_t *buffer, uint8_t length) | 
| Initialize a TLV record.  More... | |
| tlv_res_e | Tlv_Decode_getNextItem (tlv_record *rcd, tlv_item_t *item) | 
| Decode the next tlv_item in the tlv_record passed in parameter.  More... | |
| tlv_res_e | Tlv_Encode_addItem (tlv_record *rcd, tlv_item_t *item) | 
| Add a TLV item to the buffer contained in the TLV record.  More... | |
| int | Tlv_Encode_getBufferSize (tlv_record *rcd) | 
| Returns the size of the generated buffer by successive calls to Tlv_Encode_addItem.  More... | |
Data Structures | |
| struct | tlv_item_t | 
| Structure describing a Type Length Value item.  More... | |
| struct | tlv_record | 
| This structure holds the buffer containing TLV items and data to manage it, max. buffer size and current index.  More... | |
Enumerations | |
| enum | tlv_res_e { TLV_RES_OK, TLV_RES_ERROR, TLV_RES_END } | 
| List of return codes.  More... | |
| tlv_res_e Tlv_Decode_getNextItem | ( | tlv_record * | rcd, | 
| 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 TLV_RES_OK | 
| tlv_res_e Tlv_Encode_addItem | ( | tlv_record * | rcd, | 
| tlv_item_t * | item | ||
| ) | 
Add a TLV item to the buffer contained in the TLV record.
| [in] | rcd | Pointer to a tlv_record structure | 
| [in] | item | Pointer to a tlv_item to add in the TLV record | 
| int Tlv_Encode_getBufferSize | ( | tlv_record * | rcd | ) | 
Returns the size of the generated buffer by successive calls to Tlv_Encode_addItem.
| [in] | rcd | Pointer to a tlv_record structure. | 
| void Tlv_init | ( | 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 tlv_item_t | 
| struct tlv_record | 
| enum tlv_res_e |