11.12.3.4.10. Function iot_agent_datastore_write

11.12.3.4.10.1. Function Documentation

iot_agent_status_t iot_agent_datastore_write(iot_agent_datastore_t *datastore, size_t offset, const void *src, size_t len)

Write from a buffer in memory to a datastore.

From src, len bytes are copied to the datastore. The first byte is written to the position offset in the datastore.

Length check on the destaination - the datastore - is performed, memory in the datastore needs to be pre-allocated. If the data does not fit, this function does not return IOT_AGENT_SUCCESS.