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>
impl<R, C> DutyGatedRadio<R, C>
pub fn new(inner: R, ledger: &'static DutyLedger, clock: C) -> Self
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>
impl<R: Radio, C: Clock> Radio for DutyGatedRadio<R, C>
type Error = <R as Radio>::Error
Source§async fn transmit(
&mut self,
data: &[u8],
options: TxOptions,
) -> Result<(), TxError<Self::Error>>
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>>
fn poll_receive( &mut self, cx: &mut Context<'_>, buf: &mut [u8], ) -> Poll<Result<RxInfo, Self::Error>>
Poll reception of one frame into
buf. Read moreSource§fn max_frame_size(&self) -> usize
fn max_frame_size(&self) -> usize
Return the largest supported raw frame size.
Source§fn t_frame_ms(&self) -> u32
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>
impl<R, C> !RefUnwindSafe for DutyGatedRadio<R, C>
impl<R, C> Send for DutyGatedRadio<R, C>
impl<R, C> Sync for DutyGatedRadio<R, C>
impl<R, C> Unpin for DutyGatedRadio<R, C>
impl<R, C> !UnwindSafe for DutyGatedRadio<R, C>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more