Struct unbounded_gpsd::GpsdConnection [−][src]
pub struct GpsdConnection { /* fields omitted */ }
A connection to gpsd.
Methods
impl GpsdConnection
[src]
impl GpsdConnection
pub fn new<A: ToSocketAddrs>(addr: A) -> GpsdResult<Self>
[src]
pub fn new<A: ToSocketAddrs>(addr: A) -> GpsdResult<Self>
Make a new connection to a given address.
pub fn watch(&mut self, watch: bool) -> GpsdResult<()>
[src]
pub fn watch(&mut self, watch: bool) -> GpsdResult<()>
Enable or disable watcher mode.
pub fn watch_raw(&mut self, watch: bool, json: bool, raw: u8) -> GpsdResult<()>
[src]
pub fn watch_raw(&mut self, watch: bool, json: bool, raw: u8) -> GpsdResult<()>
Enable RAW mode. In RAW mode, gpsd sends raw data from the GPS device, depending on the value of raw
:
When this attribute is set to 1 for a channel, gpsd reports the unprocessed NMEA or AIVDM data stream from whatever device is attached. Binary GPS packets are hex-dumped. RTCM2 and RTCM3 packets are not dumped in raw mode. When this attribute is set to 2 for a channel that processes binary data, gpsd reports the received data verbatim without hex-dumping.
pub fn poll(&mut self) -> GpsdResult<()>
[src]
pub fn poll(&mut self) -> GpsdResult<()>
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.
pub fn version(&mut self) -> GpsdResult<()>
[src]
pub fn version(&mut self) -> GpsdResult<()>
Ask for the server's version (triggers a Response::Version).
pub fn devices(&mut self) -> GpsdResult<()>
[src]
pub fn devices(&mut self) -> GpsdResult<()>
Ask for the server's devices (triggers a Response::Devices)
pub fn set_read_timeout(&mut self, dur: Option<Duration>) -> GpsdResult<()>
[src]
pub fn set_read_timeout(&mut self, dur: Option<Duration>) -> GpsdResult<()>
Sets the read timeout for get_response
.
A value of None
implies that the read will never block.
pub fn get_response(&mut self) -> GpsdResult<Response>
[src]
pub fn get_response(&mut self) -> GpsdResult<Response>
Polls for responses from GPSD, blocking if necessary.
Ideally, you run this in a loop somewhere to process messages.
Auto Trait Implementations
impl Send for GpsdConnection
impl Send for GpsdConnection
impl Sync for GpsdConnection
impl Sync for GpsdConnection