Arduino KVComm
master
Key-Value pair communication library for Arduino
|
Go to the documentation of this file.
15 for (
size_t i = 0; i < count; ++i) {
25 if (dataDestination ==
nullptr)
38 uint8_t *destination =
buffer + offset;
Template struct for making types serializable.
KV_Type type definitions for fundamental types (int::_t, uint::_t, float, double, bool,...
bool append(const char *key, const T *data, size_t count)
Append the new element to the buffer.
constexpr static uint8_t getTypeID()
uint8_t * writeHeader(const char *key, uint8_t typeID, size_t length)
Write the header of a new element into the buffer, advance the write pointer, and return a pointer to...
uint8_t getTypeID() const
Get the type ID of the current element.
const uint8_t * getData() const
Get a pointer to the data of the current element.
uint16_t getDataLength() const
Get the length of the data of the current element.
bool overwrite(KV_Iterator::iterator existing, const T *data, size_t count)
Overwrite the existing element referenced by existing with the new data, if the type and size match.
static void writeToBuffer(const T &, uint8_t *buffer)
This file contains the KV_Builder class, a key-value pair, dictionary-like container that supports ma...
constexpr static size_t getLength()