Struct gpsd_proto::Device

source ·
pub struct Device {
    pub path: Option<String>,
    pub activated: Option<String>,
    pub flags: Option<i32>,
    pub driver: Option<String>,
    pub subtype: Option<String>,
    pub bps: Option<u16>,
    pub parity: Option<String>,
    pub stopbits: Option<u8>,
    pub native: Option<u8>,
    pub cycle: Option<f32>,
    pub mincycle: Option<f32>,
}
Expand description

Device information.

Fields§

§path: Option<String>

Name the device for which the control bits are being reported, or for which they are to be applied. This attribute may be omitted only when there is exactly one subscribed channel.

§activated: Option<String>

Time the device was activated as an ISO8601 timestamp. If the device is inactive this attribute is absent.

§flags: Option<i32>

Bit vector of property flags. Currently defined flags are: describe packet types seen so far (GPS, RTCM2, RTCM3, AIS). Won’t be reported if empty, e.g. before gpsd has seen identifiable packets from the device.

§driver: Option<String>

GPSD’s name for the device driver type. Won’t be reported before gpsd has seen identifiable packets from the device.

§subtype: Option<String>

Whatever version information the device returned.

§bps: Option<u16>

Device speed in bits per second.

§parity: Option<String>

N, O or E for no parity, odd, or even.

§stopbits: Option<u8>

Stop bits (1 or 2).

§native: Option<u8>

0 means NMEA mode and 1 means alternate mode (binary if it has one, for SiRF and Evermore chipsets in particular). Attempting to set this mode on a non-GPS device will yield an error.

§cycle: Option<f32>

Device cycle time in seconds.

§mincycle: Option<f32>

Device minimum cycle time in seconds. Reported from ?DEVICE when (and only when) the rate is switchable. It is read-only and not settable.

Trait Implementations§

source§

impl Clone for Device

source§

fn clone(&self) -> Device

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Device

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Device

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,