Struct sbp::messages::solution_meta::odo_input_type::OdoInputType
source · [−]pub struct OdoInputType {
pub flags: u8,
}
Expand description
Provides detail about the Odometry sensor, its timestamping mode, and its quality for input to the fuzed solution
Metadata around the Odometry sensors involved in the fuzed solution. Accessible through sol_in[N].flags in a MSG_SOLN_META.
Fields
flags: u8
Instrument ODO rate, grade, and quality.
Implementations
sourceimpl OdoInputType
impl OdoInputType
sourcepub fn rate(&self) -> Result<Rate, u8>
pub fn rate(&self) -> Result<Rate, u8>
Gets the Rate stored in the flags
bitfield.
Returns Ok
if the bitrange contains a known Rate
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 Rate
were added.
sourcepub fn set_rate(&mut self, rate: Rate)
pub fn set_rate(&mut self, rate: Rate)
Set the bitrange corresponding to the Rate of the flags
bitfield.
sourcepub fn odometer_grade(&self) -> Result<OdometerGrade, u8>
pub fn odometer_grade(&self) -> Result<OdometerGrade, u8>
Gets the OdometerGrade stored in the flags
bitfield.
Returns Ok
if the bitrange contains a known OdometerGrade
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 OdometerGrade
were added.
sourcepub fn set_odometer_grade(&mut self, odometer_grade: OdometerGrade)
pub fn set_odometer_grade(&mut self, odometer_grade: OdometerGrade)
Set the bitrange corresponding to the OdometerGrade of the flags
bitfield.
sourcepub fn odometer_class(&self) -> Result<OdometerClass, u8>
pub fn odometer_class(&self) -> Result<OdometerClass, u8>
Gets the OdometerClass stored in the flags
bitfield.
Returns Ok
if the bitrange contains a known OdometerClass
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 OdometerClass
were added.
sourcepub fn set_odometer_class(&mut self, odometer_class: OdometerClass)
pub fn set_odometer_class(&mut self, odometer_class: OdometerClass)
Set the bitrange corresponding to the OdometerClass of the flags
bitfield.
Trait Implementations
sourceimpl Clone for OdoInputType
impl Clone for OdoInputType
sourcefn clone(&self) -> OdoInputType
fn clone(&self) -> OdoInputType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for OdoInputType
impl Send for OdoInputType
impl Sync for OdoInputType
impl Unpin for OdoInputType
impl UnwindSafe for OdoInputType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more