SatCat5
satcat5::udp::LogFromCbor Class Referencefinal

Detailed Description

Specialization of satcat5::log::FromCbor for UDP datagrams.

Definition at line 141 of file log_cbor.h.

#include <log_cbor.h>

Inheritance diagram for satcat5::udp::LogFromCbor:
[legend]
Collaboration diagram for satcat5::udp::LogFromCbor:
[legend]

Public Member Functions

 LogFromCbor (satcat5::udp::Dispatch *iface, const satcat5::udp::Port &port)
 Constructor binds to a specific incoming UDP port.
 
void set_min_priority (s8 priority)
 Set the minimum priority for message forwarding. More...
 

Protected Member Functions

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::Protocolm_next
 Linked list of Protocols.
 

Member Function Documentation

◆ frame_rcvd()

void FromCbor::frame_rcvd ( satcat5::io::LimitedRead src)
overrideprotectedvirtualinherited

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.

◆ log_event()

void FromCbor::log_event ( s8  priority,
unsigned  nbytes,
const char *  msg 
)
protectedvirtualinherited

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.

◆ set_min_priority()

void satcat5::log::FromCbor::set_min_priority ( s8  priority)
inlineinherited

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.


The documentation for this class was generated from the following files: