Struct stabilizer::net::telemetry::TelemetryBuffer
source · pub struct TelemetryBuffer {
pub adcs: [AdcCode; 2],
pub dacs: [DacCode; 2],
pub digital_inputs: [bool; 2],
}
Expand description
The telemetry buffer is used for storing sample values during execution.
§Note
These values can be converted to SI units immediately before reporting to save processing time. This allows for the DSP process to continually update the values without incurring significant run-time overhead during conversion to SI units.
Fields§
§adcs: [AdcCode; 2]
The latest input sample on ADC0/ADC1.
dacs: [DacCode; 2]
The latest output code on DAC0/DAC1.
digital_inputs: [bool; 2]
The latest digital input states during processing.
Implementations§
source§impl TelemetryBuffer
impl TelemetryBuffer
sourcepub fn finalize(self, afe0: Gain, afe1: Gain, cpu_temp: f32) -> Telemetry
pub fn finalize(self, afe0: Gain, afe1: Gain, cpu_temp: f32) -> Telemetry
Convert the telemetry buffer to finalized, SI-unit telemetry for reporting.
§Args
afe0
- The current AFE configuration for channel 0.afe1
- The current AFE configuration for channel 1.cpu_temp
- The current CPU temperature.
§Returns
The finalized telemetry structure that can be serialized and reported.
Trait Implementations§
source§impl Clone for TelemetryBuffer
impl Clone for TelemetryBuffer
source§fn clone(&self) -> TelemetryBuffer
fn clone(&self) -> TelemetryBuffer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for TelemetryBuffer
impl Default for TelemetryBuffer
impl Copy for TelemetryBuffer
Auto Trait Implementations§
impl Freeze for TelemetryBuffer
impl RefUnwindSafe for TelemetryBuffer
impl Send for TelemetryBuffer
impl Sync for TelemetryBuffer
impl Unpin for TelemetryBuffer
impl UnwindSafe for TelemetryBuffer
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more