[][src]Struct lora_serial::LoRaSerial

pub struct LoRaSerial { /* fields omitted */ }

Methods

impl LoRaSerial[src]

pub fn init_all() -> Vec<LoRaSerial>[src]

Convenience method to connect to all detected USBSerial modems Modems that fail to initialize will be passed over Each instance will be given a unique id for logging, and each modem will get an address matching it's instance id

pub fn modem_address(&mut self) -> u8[src]

Get the address assigned to the modem modem address is stored in the LoRaSerial struct so no communication with the modem takes place

pub fn reset(&mut self) -> Result<(), ErrorKind>[src]

reset the modem

pub fn set_frequency(&mut self, new_freq: f32) -> Result<(), ErrorKind>[src]

Set the transmitter and receiver center frequency

pub fn set_radio_preset(&mut self, preset: RadioPreset) -> Result<(), ErrorKind>[src]

Select a modem config preset

pub fn set_tx_power(&mut self, power: i8) -> Result<(), ErrorKind>[src]

set tx power

pub fn set_modem_address(&mut self, address: u8) -> Result<(), ErrorKind>[src]

pub fn tx_string(&mut self, msg: &str, dst: u8) -> Result<(), ErrorKind>[src]

send a packet

pub fn tx(&mut self, msg: &[u8], dst: u8) -> Result<(), ErrorKind>[src]

pub fn rx(&mut self) -> Result<Option<LoraMsg>, ErrorKind>[src]

try to receive a packet (puts the radio into receive mode, if if's not there already)

pub fn rx_string(&mut self) -> Result<Option<LoraStringMsg>, ErrorKind>[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]