[][src]Struct gps_data_reader_bjarki18::GPS

pub struct GPS {
    pub baud: u32,
    pub latitude: String,
    pub longitude: String,
    pub north_south: String,
    pub east_west: String,
    pub satellites: String,
    pub altitude: String,
}

Provides access to the data read from the gps module.

Fields

baud: u32latitude: Stringlongitude: Stringnorth_south: Stringeast_west: Stringsatellites: Stringaltitude: String

Implementations

impl GPS[src]

pub fn default() -> Self[src]

Constructs a default empty GPS struct.

pub fn print_data(&mut self)[src]

Formats data from the struct and prints it.

pub fn set_data(&mut self, vektor: Vec<&str>)[src]

Sets the struct data from Vec<&str> format

pub fn read_data(&mut self, res: String)[src]

Reads in data from an input String type - only reads gps data with the identifier "$GPGGA".

pub fn check_baud(&mut self, value: u32) -> Option<u32>[src]

checks the baud rate with an Option enum.

pub fn set_baud(&mut self, value: u32)[src]

sets the baud rate of the system, only accepts the default 9600 of the gps module.

Auto Trait Implementations

impl RefUnwindSafe for GPS

impl Send for GPS

impl Sync for GPS

impl Unpin for GPS

impl UnwindSafe for GPS

Blanket Implementations

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

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

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

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.