pub type RequestMessage = Message;Expand description
Type alias for version 3 request messages
This is a convenience alias for request::Message that makes it
clear we’re working with protocol v3 requests.
Aliased Type§
pub enum RequestMessage {
Devices,
Watch(Option<Watch>),
Device(Option<Device>),
Poll,
Version,
}Variants§
Devices
Request a list of all GPS devices known to GPSD
Command: ?DEVICES;
Watch(Option<Watch>)
Control data streaming from GPSD
None: Query current watch settings (?WATCH;)Some(watch): Set watch parameters (?WATCH={...};)
Device(Option<Device>)
Control or query a specific GPS device
None: Query current device (?DEVICE;)Some(device): Configure device (?DEVICE={...};)
Poll
Poll for current GPS data from all devices
Command: ?POLL;
Version
Request GPSD version information
Command: ?VERSION;
Trait Implementations§
Source§impl GpsdJsonRequest for RequestMessage
impl GpsdJsonRequest for RequestMessage
Source§fn to_command(&self) -> String
fn to_command(&self) -> String
Converts a request message into a GPSD command string
Each request type is formatted according to the GPSD protocol:
- Simple commands:
?COMMAND; - Commands with parameters:
?COMMAND={"json":"params"};