|
SatCat5
|
Read CBOR-formatted network messages and copy to the local log.
This class is not intended to be used directly. For a specific protocol, satcat5::eth::FromCbor or satcat5::udp::FromCbor.
Definition at line 41 of file log_cbor.h.
#include <log_cbor.h>
Public Member Functions | |
| void | set_min_priority (s8 priority) |
| Set the minimum priority for message forwarding. More... | |
Protected Member Functions | |
| FromCbor (satcat5::net::Dispatch *src, satcat5::net::Type filter) | |
| Only children can safely access constructor/destructor. | |
| void | frame_rcvd (satcat5::io::LimitedRead &src) override |
| Event handler for incoming messages. More... | |
| virtual void | log_event (s8 priority, unsigned nbytes, const char *msg) |
| Event handler for validated messages. More... | |
Protected Attributes | |
| satcat5::net::Dispatch *const | m_src |
| Pointer to the interface object. | |
| satcat5::net::Type | m_filter |
| Incoming packet filter. | |
Private Attributes | |
| s8 | m_min_priority = satcat5::log::DEBUG |
| satcat5::net::Protocol * | m_next |
| Linked list of Protocols. | |
|
overrideprotectedvirtual |
Event handler for incoming messages.
After parsing and validation, this method calls log_event.
Implements satcat5::net::Protocol.
Definition at line 46 of file log_cbor.cc.
|
protectedvirtual |
Event handler for validated messages.
The built-in handler creates a log::Log message object, which notifies all local log::EventHandler instances. Users may override this method in a child class to add new behavior. Note: The string argument is NOT null-terminated.
Definition at line 85 of file log_cbor.cc.
|
inline |
Set the minimum priority for message forwarding.
By default, all messages are forwarded for processing. After calling this method, messages below the specified cutoff are ignored.
Definition at line 68 of file log_cbor.h.