#include <senml_binary_record.h>
A SenMLRecord that stores binary data. This type of object can only be used for sensor data. If actuation is needed, use SenMLBinaryActuator instead.
◆ SenMLBinaryRecord() [1/3]
| SenMLBinaryRecord::SenMLBinaryRecord |
( |
const char * |
name | ) |
|
|
inline |
◆ SenMLBinaryRecord() [2/3]
| SenMLBinaryRecord::SenMLBinaryRecord |
( |
const char * |
name, |
|
|
SenMLUnit |
unit |
|
) |
| |
|
inline |
◆ SenMLBinaryRecord() [3/3]
◆ fieldsToCbor()
| int SenMLBinaryRecord::fieldsToCbor |
( |
| ) |
|
|
virtual |
renders all the fields to cbor format. renders all the fields of the object without the length info at the beginning note: this is public so that custom implementations for the record object can use other objects internally and render to json using this function (ex: coordinatesRecord using 3 floatRecrods for lat, lon & alt.
- Returns
- : The number of bytes that were written.
Reimplemented from SenMLRecord.
◆ fieldsToJson()
| int SenMLBinaryRecord::fieldsToJson |
( |
| ) |
|
|
virtual |
renders all the fields to json, without the starting and ending brackets. Inheriters can extend this function if they want to add extra fields to the json output note: this is public so that custom implementations for the record object can use other objects internally and render to json using this function (ex: coordinatesRecord using 3 floatRecrods for lat, lon & alt.
- Returns
- : The number of bytes that were written.
Reimplemented from SenMLRecord.
◆ get()
| unsigned char * SenMLBinaryRecord::get |
( |
| ) |
|
◆ set()
| bool SenMLBinaryRecord::set |
( |
unsigned char * |
value, |
|
|
unsigned int |
length, |
|
|
double |
time = NAN |
|
) |
| |
set the value and length. warning: value is not copied over. a direct reference to the buffer is stored, so if this memory is changed/freed, then the data stored in the object will also be changed.
The documentation for this class was generated from the following files: