|
SatCat5
|
Thin wrapper for sending CBOR telemetry over raw-Ethernet.
Definition at line 368 of file net_telemetry.h.
#include <net_telemetry.h>
Public Member Functions | |
| Telemetry (satcat5::eth::Dispatch *eth, bool concat_tiers=true) | |
| Link this object to a network interface. More... | |
| void | connect (const satcat5::eth::MacAddr &addr, const satcat5::eth::MacType &type, const satcat5::eth::VlanTag &vtag=satcat5::eth::VTAG_NONE) |
| Set the destination MAC address and EtherType. More... | |
| void | close () |
| Close the connection and stop transmission. | |
| void | telem_concat (bool concat_tiers) |
| Change to concatenated or per-tier mode. | |
| void | telem_send (TelemetryCbor &cbor, u32 tier_id) |
| Send data to all attached TelemetrySink objects. More... | |
| unsigned | timer_interval () const |
| Query the polling interval for this aggregator. More... | |
Protected Member Functions | |
| void | telem_ready (u32 tier_id, unsigned nbytes, const void *data) override |
| This method is called for each outgoing telemetry message. More... | |
| void | timer_event () override |
| Child class MUST override this method. | |
| void | timer_once (unsigned msec) |
| Configure a one-time notification after X milliseconds. | |
| void | timer_every (unsigned msec) |
| Configure a repeating notification every X milliseconds. | |
| void | timer_stop () |
| Stop all future notifications. | |
| unsigned | timer_remaining () const |
| Accessor for time to next event, if one is set. | |
Static Protected Member Functions | |
| static unsigned | count_timer () |
| Count all objects of this type, including idle timers. | |
Protected Attributes | |
| satcat5::eth::Address | m_addr |
| bool | m_tlm_concat |
| satcat5::util::List< satcat5::net::TelemetrySink > | m_sinks |
| satcat5::util::List< satcat5::net::TelemetryTier > | m_tiers |
| u8 | m_buff [SATCAT5_QCBOR_BUFFER] |
| satcat5::net::TelemetryAggregator *const | m_tlm |
| Pointer to the parent object. | |
Private Member Functions | |
| void | query (unsigned elapsed_msec) |
Private Attributes | |
| satcat5::poll::Timer * | m_next |
| unsigned | m_trem |
| unsigned | m_tnext |
| satcat5::eth::Telemetry::Telemetry | ( | satcat5::eth::Dispatch * | eth, |
| bool | concat_tiers = true |
||
| ) |
Link this object to a network interface.
User must call connect() to begin sending telemetry.
Definition at line 23 of file net_telemetry.cc.
|
inline |
Set the destination MAC address and EtherType.
Recommended EtherType is satcat5::eth::ETYPE_CBOR_TLM.
Definition at line 383 of file net_telemetry.h.
|
inlineoverrideprotectedvirtual |
This method is called for each outgoing telemetry message.
Implements satcat5::net::TelemetrySink.
Definition at line 395 of file net_telemetry.h.
|
inherited |
Send data to all attached TelemetrySink objects.
This is normally called automatically, but calling it directly may be used for unscheduled messages.
Definition at line 123 of file net_telemetry.cc.
|
inlineinherited |
Query the polling interval for this aggregator.
Rate is adjusted automatically based on active sources.
Definition at line 235 of file net_telemetry.h.