DutyGatedRadio

Struct DutyGatedRadio 

Source
pub struct DutyGatedRadio<R, C> { /* private fields */ }
Expand description

A [Radio] decorator enforcing the shared duty budget.

Implementations§

Source§

impl<R, C> DutyGatedRadio<R, C>

Source

pub fn new(inner: R, ledger: &'static DutyLedger, clock: C) -> Self

Source

pub fn with_load_hook( inner: R, ledger: &'static DutyLedger, clock: C, load_hook: fn(), ) -> Self

Trait Implementations§

Source§

impl<R: Radio, C: Clock> Radio for DutyGatedRadio<R, C>

Source§

type Error = <R as Radio>::Error

Source§

async fn transmit( &mut self, data: &[u8], options: TxOptions, ) -> Result<(), TxError<Self::Error>>

Transmit a complete raw UMSH frame.
Source§

fn poll_receive( &mut self, cx: &mut Context<'_>, buf: &mut [u8], ) -> Poll<Result<RxInfo, Self::Error>>

Poll reception of one frame into buf. Read more
Source§

fn max_frame_size(&self) -> usize

Return the largest supported raw frame size.
Source§

fn t_frame_ms(&self) -> u32

Return the approximate airtime for a maximum-length frame.

Auto Trait Implementations§

§

impl<R, C> Freeze for DutyGatedRadio<R, C>
where R: Freeze, C: Freeze,

§

impl<R, C> !RefUnwindSafe for DutyGatedRadio<R, C>

§

impl<R, C> Send for DutyGatedRadio<R, C>
where R: Send, C: Send,

§

impl<R, C> Sync for DutyGatedRadio<R, C>
where R: Sync, C: Sync,

§

impl<R, C> Unpin for DutyGatedRadio<R, C>
where R: Unpin, C: Unpin,

§

impl<R, C> !UnwindSafe for DutyGatedRadio<R, C>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

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

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

Performs the conversion.
§

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.
§

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

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V