|
DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
|
SenML (RFC 8428) sensor-measurement pack builder (DETWS_ENABLE_SENML) - zero-heap SenML-JSON and SenML-CBOR encoders over the shipped JSON / CBOR codecs. SenML is the standard measurement format for CoAP / LwM2M / HTTP telemetry. More...
#include "ServerConfig.h"Go to the source code of this file.
SenML (RFC 8428) sensor-measurement pack builder (DETWS_ENABLE_SENML) - zero-heap SenML-JSON and SenML-CBOR encoders over the shipped JSON / CBOR codecs. SenML is the standard measurement format for CoAP / LwM2M / HTTP telemetry.
A SenML pack is an array of records. Each record carries an optional base name / base time (applied to the records that follow), a name, a unit, and exactly one value (a number, a string, or a boolean), plus an optional time:
SenML-JSON uses the text labels (bn/bt/n/u/v/vs/vb/t); SenML-CBOR uses the integer labels (n=0 u=1 v=2 vs=3 vb=4 t=6, bn=-2 bt=-3) in a CBOR map per record. Numbers that are integral are emitted as integers (so timestamps keep full precision); otherwise as floats.
The caller fills a SenmlRecord array and the builder emits the whole pack into a caller buffer (fail-closed on overflow). Verified against the RFC 8428 example.
Definition in file senml.h.