pub struct Chip { /* private fields */ }Expand description
A simulated SX126x or SX127x, shared between its driver and the program watching it.
Cloning a chip gives another handle on the same part.
Implementations§
Source§impl Chip
impl Chip
Sourcepub fn hear(&self, payload: &[u8], rssi_dbm: Decibels, snr_db: Decibels)
pub fn hear(&self, payload: &[u8], rssi_dbm: Decibels, snr_db: Decibels)
Puts a frame on the air for the chip to receive the next time it listens.
§Arguments
payload- the frame’s payload, at most 255 bytes; any more is cut off, as no LoRa frame carries it.rssi_dbm- the strength the chip hears the frame at.snr_db- the signal-to-noise ratio it hears it with, negative below the noise.
Sourcepub fn hear_corrupt(&self, rssi_dbm: Decibels, snr_db: Decibels)
pub fn hear_corrupt(&self, rssi_dbm: Decibels, snr_db: Decibels)
Puts a frame on the air whose CRC fails, which the chip reports and drops.
§Arguments
rssi_dbm- the strength the chip hears the frame at.snr_db- the signal-to-noise ratio it hears it with.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Chip
impl RefUnwindSafe for Chip
impl Send for Chip
impl Sync for Chip
impl Unpin for Chip
impl UnsafeUnpin for Chip
impl UnwindSafe for Chip
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more