Skip to main content

CommManager

Struct CommManager 

Source
pub struct CommManager<B, T>
where B: BoardIo, T: CommInterface<B>,
{ pub sysid: u8, pub msgs: Messages, /* private fields */ }

Fields§

§sysid: u8§msgs: Messages

Implementations§

Source§

impl<B, T> CommManager<B, T>
where B: BoardIo, T: CommInterface<B>,

Source

pub fn new(comm_link: T, now_us: u64) -> Self

Source

pub fn process_incoming_messages(&mut self, board: &mut B)

Source

pub fn has_pending_messages(&self) -> bool

Source

pub fn set_telemetry_rates(&mut self, telemetry_rates: TelemetryRates)

Source

pub fn configure_telemetry_from_params(&mut self, params: &Params)

Source

pub fn update_telemetry_param( &mut self, params: &Params, id: ParamId, now_us: u64, ) -> bool

Applies one live telemetry parameter without disturbing the deadlines of unrelated streams. The changed stream begins a new period at now_us, avoiding a catch-up burst.

Source

pub fn named_telemetry_due<R>( &self, now_us: u64, processed_sensors: &ProcessedSensors<R>, ) -> bool
where R: FlightFloat,

Source

pub fn send_named_telemetry_streams<S, A, R>( &mut self, ctx: TelemetryCtx<'_, B, S, A, R>, )

Source

pub fn send_one_named_telemetry_stream<S, A, R>( &mut self, ctx: TelemetryCtx<'_, B, S, A, R>, ) -> bool

Source

pub fn send_named_telemetry_stream_if_due<S, A, R>( &mut self, stream: NamedTelemetryStream, ctx: TelemetryCtx<'_, B, S, A, R>, ) -> bool

Source

pub fn send_named_telemetry_stream_with_gate<S, A, R>( &mut self, priority: RealtimeTelemetryPriority, ctx: TelemetryCtx<'_, B, S, A, R>, ) -> bool

Source

pub fn act_on_messages( &mut self, param_events: &mut ParamEventQueues, comm_events: &mut CommEventQueues, command_events: &mut CommandEventQueues, companion_events: &mut CompanionEventQueues, board: &mut B, )

Source

pub fn send_comm_responses( &mut self, board: &mut B, comm_events: &mut CommEventQueues, )

Source

pub fn send_comm_responses_limited( &mut self, board: &mut B, comm_events: &mut CommEventQueues, max_responses: usize, ) -> usize

Source

pub fn send_timesync(&mut self, board: &mut B, msg: TimesyncMsg)

Source

pub fn send_rosflight_heartbeat(&mut self, board: &mut B, msg: HeartbeatMsg)

Source

pub fn send_rosflight_status(&mut self, board: &mut B, msg: RosflightStatusMsg)

Source

pub fn send_rosflight_attitude_quaternion( &mut self, board: &mut B, msg: AttitudeQuaternionMsg, )

Source

pub fn send_rosflight_small_imu(&mut self, board: &mut B, msg: SmallImuMsg)

Source

pub fn send_rosflight_small_baro(&mut self, board: &mut B, msg: SmallBaroMsg)

Source

pub fn send_rosflight_diff_pressure( &mut self, board: &mut B, msg: DiffPressureMsg, )

Source

pub fn send_rosflight_small_mag(&mut self, board: &mut B, msg: SmallMagMsg)

Source

pub fn send_rosflight_small_range(&mut self, board: &mut B, msg: SmallRangeMsg)

Source

pub fn send_rosflight_battery_status( &mut self, board: &mut B, msg: BatteryStatusMsg, )

Source

pub fn send_rosflight_gnss(&mut self, board: &mut B, msg: RosflightGnssMsg)

Source

pub fn send_rosflight_rc_raw(&mut self, board: &mut B, msg: RcChannelsMsg)

Source

pub fn send_rosflight_output_raw( &mut self, board: &mut B, msg: RosflightOutputRawMsg, )

Auto Trait Implementations§

§

impl<B, T> Freeze for CommManager<B, T>
where T: Freeze,

§

impl<B, T> RefUnwindSafe for CommManager<B, T>

§

impl<B, T> Send for CommManager<B, T>
where T: Send, B: Send,

§

impl<B, T> Sync for CommManager<B, T>
where T: Sync, B: Sync,

§

impl<B, T> Unpin for CommManager<B, T>
where T: Unpin, B: Unpin,

§

impl<B, T> UnsafeUnpin for CommManager<B, T>
where T: UnsafeUnpin,

§

impl<B, T> UnwindSafe for CommManager<B, T>
where T: UnwindSafe, B: UnwindSafe,

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> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

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

Source§

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>,

Source§

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.