Wirepas SDK
poslib_tlv.h
Go to the documentation of this file.
1
7#ifndef _POSLIB_TLV_H_
8#define _POSLIB_TLV_H_
9
10#include <stdint.h>
11
21
22
26typedef struct
27{
28 uint16_t type;
29 uint8_t * value;
30 uint8_t length;
32
37typedef struct
38{
39 uint8_t * buffer;
40 uint8_t length;
41 uint8_t index;
43
52void PosLibTlv_init(poslib_tlv_record * rcd, uint8_t * buffer, uint8_t length);
53
62 poslib_tlv_item_t * item);
63
64
72 poslib_tlv_item_t * item);
73
74
75#endif /* _POSLIB_TLV_H_ */
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.
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.
uint8_t * buffer
Definition poslib_tlv.h:39
poslib_tlv_res_e
List of return codes.
Definition poslib_tlv.h:16
@ POSLIB_TLV_RES_OK
Definition poslib_tlv.h:17
@ POSLIB_TLV_RES_ERROR
Definition poslib_tlv.h:18
@ POSLIB_TLV_RES_END
Definition poslib_tlv.h:19
void PosLibTlv_init(poslib_tlv_record *rcd, uint8_t *buffer, uint8_t length)
Initialize a TLV record.
uint8_t * value
Definition poslib_tlv.h:29
Structure describing a Type Length Value item.
Definition poslib_tlv.h:27
This structure holds the buffer containing TLV items and data to manage it, max. buffer size and curr...
Definition poslib_tlv.h:38