[−][src]Struct lora_serial::LoRaSerial
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
impl Send for LoRaSerial
impl !Sync for LoRaSerial
impl Unpin for LoRaSerial
impl !UnwindSafe for LoRaSerial
impl !RefUnwindSafe for LoRaSerial
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
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>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
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>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,