|
SatCat5
|
Example TelemetryWatcher that logs received key/value pairs.
If a specific key-string is specified, it only responds to that key.
Definition at line 301 of file net_telemetry.h.
#include <net_telemetry.h>
Public Member Functions | |
| TelemetryLogger (satcat5::net::TelemetryRx *rx, const char *kstr=nullptr) | |
| Constructor for string keys, or default null = no filter. | |
| TelemetryLogger (satcat5::net::TelemetryRx *rx, u32 key) | |
| Constructor for integer keys. | |
Protected Member Functions | |
| void | telem_rcvd (u32 key, const QCBORItem &item, QCBORDecodeContext *cbor) override |
| Callback for each received key/value pair. More... | |
Protected Attributes | |
| satcat5::util::optional< u32 > | m_filter |
| satcat5::net::TelemetryRx *const | m_rx |
| Pointer to the receive-and-decode object. | |
Private Attributes | |
| satcat5::net::TelemetryWatcher * | m_next |
|
overrideprotectedvirtual |
Callback for each received key/value pair.
The child object MUST override this callback method. Users with string keys should compare against the hash first, to ensure the matching process can iterate quickly.
| key | Integer key, or CRC32 hash of a string key. |
| item | Value associated with this key. |
| cbor | QCBOR decoder for reading complex data structures. This pointer is provided for maps and arrays, not for simple items. The callback MUST NOT call ExitArray or ExitMap. |
Implements satcat5::net::TelemetryWatcher.
Definition at line 159 of file net_telemetry.cc.