SatCat5
satcat5::log::ToCbor Class Reference

Detailed Description

Write local logs to a CBOR-formatted network message.

SatCat5 CBOR log messages.

This class is not intended to be used directly. For a specific protocol, satcat5::eth::ToCbor or satcat5::udp::ToCbor.

Definition at line 80 of file log_cbor.h.

#include <log_cbor.h>

Inheritance diagram for satcat5::log::ToCbor:
[legend]
Collaboration diagram for satcat5::log::ToCbor:
[legend]

Public Member Functions

void set_min_priority (s8 priority)
 

Protected Member Functions

 ToCbor (satcat5::net::Address *dst)
 Only children can safely access constructor/destructor. More...
 
void log_event (s8 priority, unsigned nbytes, const char *msg) override
 Callback for each formatted Log message. More...
 

Protected Attributes

satcat5::net::Address *const m_dst
 

Private Attributes

s8 m_min_priority = satcat5::log::DEBUG
 
satcat5::log::EventHandlerm_next
 

Constructor & Destructor Documentation

◆ ToCbor()

ToCbor::ToCbor ( satcat5::net::Address dst)
explicitprotected

Only children can safely access constructor/destructor.

Constructor sets the destination address and interface.

Definition at line 90 of file log_cbor.cc.

Member Function Documentation

◆ log_event()

void ToCbor::log_event ( s8  priority,
unsigned  nbytes,
const char *  msg 
)
overrideprotectedvirtual

Callback for each formatted Log message.

Child class must override this method.)

Implements satcat5::log::EventHandler.

Definition at line 96 of file log_cbor.cc.


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