the base class for all objects that can be used in the senml data tree.
| virtual int SenMLBase::fieldsToCbor |
( |
| ) |
|
|
pure 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.
Implemented in SenMLBinaryRecord, SenMLBoolRecord, SenMLDoubleRecord, SenMLFloatRecord, SenMLHalfFloatRecord, SenMLIntRecord, SenMLRecord, SenMLStringRecord, SenMLDoublePack, SenMLIntPack, SenMLPack, SenMLSimplePack, and SenMLBasePack.
| virtual int SenMLBase::fieldsToJson |
( |
| ) |
|
|
pure 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
- : None
Implemented in SenMLBinaryRecord, SenMLBoolRecord, SenMLDoubleRecord, SenMLFloatRecord, SenMLHalfFloatRecord, SenMLIntRecord, SenMLRecord, SenMLStringRecord, SenMLDoublePack, SenMLIntPack, SenMLPack, SenMLSimplePack, and SenMLBasePack.