Skip to main content

TelemetryPublisher

Trait TelemetryPublisher 

Source
pub trait TelemetryPublisher {
    // Required method
    fn publish(&mut self, record: &TelemetryRecord<'_>);
}
Expand description

Component responsible for publishing telemetry data from the flight system.

The TelemetryPublisher trait defines the interface for components that send flight data to external systems for logging, monitoring, or visualization. This can include sending data to ground control stations, logging systems, or other monitoring tools.

Implementors of this trait may include:

  • Mavlink publishers: Send telemetry via the MAVLink protocol
  • Data loggers: Record flight data for later analysis
  • Visualization interfaces: Send data to real-time flight displays

Required Methods§

Source

fn publish(&mut self, record: &TelemetryRecord<'_>)

Publishes one control-loop tick to external systems.

Fire-and-forget: the flight loop cannot act on a telemetry failure, so implementations handle (log) their own errors instead of returning them.

§Parameters

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl TelemetryPublisher for ()

The no-op sink: discards every record. Use it where a loop needs a publisher but nothing should be published, or as a placeholder slot in a tuple fan-out.

Source§

fn publish(&mut self, _record: &TelemetryRecord<'_>)

Source§

impl<A: TelemetryPublisher, B: TelemetryPublisher> TelemetryPublisher for (A, B)

Fans each record out to both publishers, first A then B.

Source§

fn publish(&mut self, record: &TelemetryRecord<'_>)

Implementors§