|
Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
One #TAG key=value ... line in a fixed buffer.
More...
One #TAG key=value ... line in a fixed buffer.
| SIZE | Buffer size in bytes, terminator and line ending included |
Definition at line 59 of file tagged.hpp.
#include <tagged.hpp>
Public Member Functions | |
| TaggedLine (const char *tag) | |
| void | reset (const char *tag) |
| TaggedLine & | field (const char *key, float value, uint8_t decimals=3) |
A float field, rounded to decimals places. | |
| template<typename T , typename = std::enable_if_t<std::is_integral_v<T>>> | |
| TaggedLine & | field (const char *key, T value) |
| TaggedLine & | field (const char *key, const char *value) |
| uint8_t | fields () const |
| bool | overflowed () const |
| const char * | c_str () const |
| template<typename Output > | |
| void | write () |
|
inlineexplicit |
Definition at line 63 of file tagged.hpp.
Start over with a new tag and no fields.
Definition at line 66 of file tagged.hpp.
References sbl::log::is_sink_v.
|
inline |
A float field, rounded to decimals places.
A value that is not finite, or beyond TAGGED_MAX_MAGNITUDE, is written as nan.
Definition at line 82 of file tagged.hpp.
References sbl::log::TaggedLine< SIZE >::field(), sbl::log::is_sink_v, sbl::log::TAGGED_MAX_DECIMALS, and sbl::log::TAGGED_MAX_MAGNITUDE.
Referenced by sbl::log::TaggedLine< SIZE >::field(), and sbl::control::write_scheduler_report().
|
inline |
|
inline |
A string field. The convention allows no spaces in a value.
Definition at line 117 of file tagged.hpp.
References sbl::log::is_sink_v.
|
inline |
Number of fields on the line.
Definition at line 123 of file tagged.hpp.
|
inline |
True when a field was left out for lack of room.
Definition at line 126 of file tagged.hpp.
|
inline |
The line so far, without its line ending.
Definition at line 129 of file tagged.hpp.
|
inline |
Write the line and its line ending to Output (a sink with static void write(const char*)).
Definition at line 133 of file tagged.hpp.