pub struct LoraphyRadio<M: RawMutex + 'static, const RX: usize, const TX: usize> { /* private fields */ }Expand description
Implements umsh_hal::Radio over the shared Channels.
The actual TX power and modulation params live on the runner side (it
owns the LoRa driver). This handle only carries:
- the channel pair used to talk to the runner,
- a precomputed worst-case airtime so the MAC’s scheduler doesn’t have to recompute it.
Implementations§
Trait Implementations§
Source§impl<M: RawMutex + 'static, const RX: usize, const TX: usize> Radio for LoraphyRadio<M, RX, TX>
impl<M: RawMutex + 'static, const RX: usize, const TX: usize> Radio for LoraphyRadio<M, RX, TX>
type Error = RadioError
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.