30static constexpr size_t TLV_MAX_LEN = 253;
33static constexpr uint8_t TAG_EMPTY = 0;
48 uint8_t
Val[TLV_MAX_LEN];
Memory management using an arena.
Fixed, pre-allocated memory.
Definition Arena.h:74
void SetRecord(Record &rec, uint8_t tag, uint8_t length, const char *data)
uint8_t * WriteToMemory(Arena &arena, uint8_t *cursor, Record &rec)
uint8_t * LocateTag(Arena &arena, uint8_t *cursor, Record &rec)
void DeleteRecord(Arena &arena, uint8_t *cursor)
void ReadFromMemory(Record &rec, uint8_t *cursor)
uint8_t * FindTag(Arena &arena, uint8_t *cursor, Record &rec)
uint8_t * SkipRecord(Record &rec, uint8_t *cursor)
uint8_t * FindEmpty(Arena &arena, uint8_t *cursor)
scsl is the top-level namespace containing all the code in this library.
Definition scsl.h:43
Tag-length-value record with single byte tags and lengths.
Definition TLV.h:42
uint8_t Tag
A Tag is used to identify the type of this record.
Definition TLV.h:44
uint8_t Len
Len describes the number of bytes stored in Val.
Definition TLV.h:46
uint8_t Val[TLV_MAX_LEN]
Val contains the data in the record.
Definition TLV.h:48