[−][src]Struct os_balloon::fona::Fona
Adafruit FONA control structure.
Fields
serial: Option<Serial>
Methods
impl Fona
[src]
pub fn initialize(&mut self) -> Result<(), Error>
[src]
Initializes the Adafruit FONA module.
pub fn is_on(&self) -> Result<bool, Error>
[src]
Checks if the FONA module is on.
pub fn turn_on(&mut self) -> Result<(), Error>
[src]
Turns on the FONA module.
pub fn turn_off(&mut self) -> Result<(), Error>
[src]
Tuns off the FONA module.
pub fn send_sms<M>(&mut self, message: M) -> Result<(), Error> where
M: AsRef<str>,
[src]
M: AsRef<str>,
Sends an SMS with the given text to the given phone number.
pub fn location(&mut self) -> Result<Location, Error>
[src]
Gets the current location using GPRS.
pub fn battery_percent(&mut self) -> Result<f32, Error>
[src]
Checks the FONA battery level, in percentage.
pub fn battery_voltage(&mut self) -> Result<f32, Error>
[src]
Checks the FONA battery voltage, in volts (V
).
pub fn adc_voltage(&mut self) -> Result<f32, Error>
[src]
Gets the ADC (Analog-Digital converter) voltage of the FONA, in volts (V
).
pub fn has_connectivity(&mut self) -> Result<bool, Error>
[src]
Checks if the FONA module has GSM connectivity.
fn send_command_read<C>(&mut self, command: C) -> Result<String, Error> where
C: AsRef<[u8]>,
[src]
C: AsRef<[u8]>,
Sends a command to the FONA module and reads the response.
fn send_command_read_limit<C>(
&mut self,
command: C,
count: usize
) -> Result<String, Error> where
C: AsRef<[u8]>,
[src]
&mut self,
command: C,
count: usize
) -> Result<String, Error> where
C: AsRef<[u8]>,
Sends a command and reads a limited amount of characters.
fn send_command<C>(&mut self, command: C) -> Result<(), Error> where
C: AsRef<[u8]>,
[src]
C: AsRef<[u8]>,
Sends a command to the FONA serial.
fn read_line(&mut self) -> Result<String, Error>
[src]
Reads a line from the serial.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
[src]
impl<T> DebugAny for T where
T: Any + Debug,
[src]
T: Any + Debug,
impl<T> UnsafeAny for T where
T: Any,
[src]
T: Any,