Struct sbp::messages::system::msg_gnss_time_offset::MsgGnssTimeOffset
source · pub struct MsgGnssTimeOffset {
pub sender_id: Option<u16>,
pub weeks: i16,
pub milliseconds: i32,
pub microseconds: i16,
pub flags: u8,
}
Expand description
Offset of the local time with respect to GNSS time
The GNSS time offset message contains the information that is needed to translate messages tagged with a local timestamp (e.g. IMU or wheeltick messages) to GNSS time for the sender producing this message.
Fields§
§sender_id: Option<u16>
The message sender_id
weeks: i16
Weeks portion of the time offset
milliseconds: i32
Milliseconds portion of the time offset
microseconds: i16
Microseconds portion of the time offset
flags: u8
Status flags
Implementations§
source§impl MsgGnssTimeOffset
impl MsgGnssTimeOffset
sourcepub fn reserved_set_to_zero(&self) -> u8
pub fn reserved_set_to_zero(&self) -> u8
Gets the reserved_set_to_zero
stored in flags
.
sourcepub fn set_reserved_set_to_zero(&mut self, reserved_set_to_zero: u8)
pub fn set_reserved_set_to_zero(&mut self, reserved_set_to_zero: u8)
Sets the reserved_set_to_zero
bitrange of flags
.
sourcepub fn weeks_behavior(&self) -> Result<WeeksBehavior, u8>
pub fn weeks_behavior(&self) -> Result<WeeksBehavior, u8>
Gets the WeeksBehavior stored in the flags
bitfield.
Returns Ok
if the bitrange contains a known WeeksBehavior
variant.
Otherwise the value of the bitrange is returned as an Err(u8)
. This may be because of a malformed message,
or because new variants of WeeksBehavior
were added.
sourcepub fn set_weeks_behavior(&mut self, weeks_behavior: WeeksBehavior)
pub fn set_weeks_behavior(&mut self, weeks_behavior: WeeksBehavior)
Set the bitrange corresponding to the WeeksBehavior of the flags
bitfield.
Trait Implementations§
source§impl Clone for MsgGnssTimeOffset
impl Clone for MsgGnssTimeOffset
source§fn clone(&self) -> MsgGnssTimeOffset
fn clone(&self) -> MsgGnssTimeOffset
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl ConcreteMessage for MsgGnssTimeOffset
impl ConcreteMessage for MsgGnssTimeOffset
source§const MESSAGE_TYPE: u16 = 65_287u16
const MESSAGE_TYPE: u16 = 65_287u16
source§const MESSAGE_NAME: &'static str = "MSG_GNSS_TIME_OFFSET"
const MESSAGE_NAME: &'static str = "MSG_GNSS_TIME_OFFSET"
source§impl Debug for MsgGnssTimeOffset
impl Debug for MsgGnssTimeOffset
source§impl<'de> Deserialize<'de> for MsgGnssTimeOffset
impl<'de> Deserialize<'de> for MsgGnssTimeOffset
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl FriendlyName for MsgGnssTimeOffset
impl FriendlyName for MsgGnssTimeOffset
fn friendly_name() -> &'static str
source§impl From<MsgGnssTimeOffset> for Sbp
impl From<MsgGnssTimeOffset> for Sbp
source§fn from(msg: MsgGnssTimeOffset) -> Self
fn from(msg: MsgGnssTimeOffset) -> Self
source§impl PartialEq for MsgGnssTimeOffset
impl PartialEq for MsgGnssTimeOffset
source§fn eq(&self, other: &MsgGnssTimeOffset) -> bool
fn eq(&self, other: &MsgGnssTimeOffset) -> bool
self
and other
values to be equal, and is used
by ==
.