pub struct MsgImuAux {
    pub sender_id: Option<u16>,
    pub imu_type: u8,
    pub temp: i16,
    pub imu_conf: u8,
}
Expand description

Auxiliary IMU data

Auxiliary data specific to a particular IMU. The imu_type field will always be consistent but the rest of the payload is device specific and depends on the value of imu_type.

Fields

sender_id: Option<u16>

The message sender_id

imu_type: u8

IMU type

temp: i16

Raw IMU temperature

imu_conf: u8

IMU configuration

Implementations

Gets the ImuType stored in the imu_type bitfield.

Returns Ok if the bitrange contains a known ImuType 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 ImuType were added.

Set the bitrange corresponding to the ImuType of the imu_type bitfield.

Gets the GyroscopeRange stored in the imu_conf bitfield.

Returns Ok if the bitrange contains a known GyroscopeRange 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 GyroscopeRange were added.

Set the bitrange corresponding to the GyroscopeRange of the imu_conf bitfield.

Gets the AccelerometerRange stored in the imu_conf bitfield.

Returns Ok if the bitrange contains a known AccelerometerRange 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 AccelerometerRange were added.

Set the bitrange corresponding to the AccelerometerRange of the imu_conf bitfield.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The message type.

The message name.

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Get the message name.

Get the message type.

Get the sender_id if it is set.

Set the sender id.

Number of bytes this message will take on the wire.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.