Struct unbounded_gpsd::GpsdConnection
[−]
[src]
pub struct GpsdConnection { /* fields omitted */ }
A connection to gpsd.
Methods
impl GpsdConnection
[src]
fn new<A: ToSocketAddrs>(addr: A) -> GpsdResult<Self>
[src]
Make a new connection to a given address.
fn watch(&mut self, watch: bool) -> GpsdResult<()>
[src]
Enable or disable watcher mode.
fn poll(&mut self) -> GpsdResult<()>
[src]
The POLL command requests data from the last-seen fixes on all active GPS devices. Devices must previously have been activated by ?WATCH to be pollable.
fn version(&mut self) -> GpsdResult<()>
[src]
Ask for the server's version (triggers a Response::Version).
fn devices(&mut self) -> GpsdResult<()>
[src]
Ask for the server's devices (triggers a Response::Devices)
fn set_read_timeout(&mut self, dur: Option<Duration>) -> GpsdResult<()>
[src]
Sets the read timeout for get_response
.
A value of None
implies that the read will never block.
fn get_response(&mut self) -> GpsdResult<Response>
[src]
Polls for responses from GPSD, blocking if necessary.
Ideally, you run this in a loop somewhere to process messages.