[][src]Struct os_balloon::fona::Fona

pub struct Fona {
    serial: Option<Serial>,
}

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]

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]

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]

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]

Sends a command to the FONA serial.

fn read_line(&mut self) -> Result<String, Error>[src]

Reads a line from the serial.

Trait Implementations

impl Drop for Fona[src]

impl Debug for Fona[src]

Auto Trait Implementations

impl Send for Fona

impl Sync for Fona

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T[src]

impl<T> DebugAny for T where
    T: Any + Debug
[src]

impl<T> UnsafeAny for T where
    T: Any
[src]