Struct nrfxlib::gnss::GnssSocket [−][src]
pub struct GnssSocket(_);
Expand description
Represents a connection to the GPS sub-system.
Implementations
impl GnssSocket
[src]
impl GnssSocket
[src]pub fn new() -> Result<GnssSocket, Error>
[src]
pub fn new() -> Result<GnssSocket, Error>
[src]Create a new GNSS socket.
pub fn start(&self, delete_mask: DeleteMask) -> Result<(), Error>
[src]
pub fn start(&self, delete_mask: DeleteMask) -> Result<(), Error>
[src]Deletes the specified information from non-volatile memory, then starts the GNSS sub-system.
pub fn set_fix_interval(&self, interval: u16) -> Result<(), Error>
[src]
pub fn set_fix_interval(&self, interval: u16) -> Result<(), Error>
[src]Set the Fix Interval.
Defines the interval between each fix in seconds. The default is 1. A value of 0 means single-fix mode.
pub fn set_fix_retry(&self, interval: u16) -> Result<(), Error>
[src]
pub fn set_fix_retry(&self, interval: u16) -> Result<(), Error>
[src]Set the Fix Retry time.
Defines how long (in seconds) the receiver should try to get a fix. The default is 60 seconds and a value of 0 means wait forever.
pub fn get_fix_interval(&self) -> Result<u16, Error>
[src]
pub fn get_fix_interval(&self) -> Result<u16, Error>
[src]Get the current Fix Interval (in seconds).
See set_fix_interval
for more information.
pub fn get_fix_retry(&self) -> Result<u16, Error>
[src]
pub fn get_fix_retry(&self) -> Result<u16, Error>
[src]Get the Fix Retry time (in seconds).
See set_fix_retry
for more information.
pub fn set_nmea_mask(&self, mask: NmeaMask) -> Result<(), Error>
[src]
pub fn set_nmea_mask(&self, mask: NmeaMask) -> Result<(), Error>
[src]Set the NMEA mask.
You can select which particular NMEA strings you want from the GNSS socket here.
If you pass a default NmeaMask
, you get no NMEA frames (only
GnssData::Position
or GnssData::Agps
frames).
pub fn get_nmea_mask(&self) -> Result<NmeaMask, Error>
[src]
pub fn get_nmea_mask(&self) -> Result<NmeaMask, Error>
[src]Get the current NMEA mask.
See set_nmea_mask
.
pub fn get_fix(&self) -> Result<Option<GnssData>, Error>
[src]
pub fn get_fix(&self) -> Result<Option<GnssData>, Error>
[src]Get a fix from the GNSS system.
Performs a read on the GNSS socket. The Nordic library determines which
frame type you get on each read. You will get None
if there is no fix
to be read.
pub fn get_fix_blocking(&self) -> Result<Option<GnssData>, Error>
[src]
pub fn get_fix_blocking(&self) -> Result<Option<GnssData>, Error>
[src]Wait for a fix from the GNSS system.
Performs a read on the GNSS socket and returns either a
GnssData::Nmea
, if an NMEA string has been returned, or a
GnssData::Position
. The Nordic library determines which you get on
each read. You will get None
if there is no fix to be read.
Trait Implementations
impl Debug for GnssSocket
[src]
impl Debug for GnssSocket
[src]impl Deref for GnssSocket
[src]
impl Deref for GnssSocket
[src]impl DerefMut for GnssSocket
[src]
impl DerefMut for GnssSocket
[src]impl Drop for GnssSocket
[src]
impl Drop for GnssSocket
[src]impl Pollable for GnssSocket
[src]
impl Pollable for GnssSocket
[src]Auto Trait Implementations
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self