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

source

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

source§

fn clone(&self) -> TelemetryBuffer

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for TelemetryBuffer

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Copy for TelemetryBuffer

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.