Struct multiwii_serial_protocol::structs::MspIdent
[−]
[src]
pub struct MspIdent { pub version: u8, pub mixer_mode: u8, pub protocol_version: u8, pub capability: u32, }
Fields
version: u8
mixer_mode: u8
protocol_version: u8
capability: u32
Methods
impl MspIdent
[src]
fn packed_struct_display_formatter<'a>(
&'a self
) -> PackedStructDisplay<'a, Self, [u8; 7]>
[src]
&'a self
) -> PackedStructDisplay<'a, Self, [u8; 7]>
Display formatter for console applications
Trait Implementations
impl PackedStruct<[u8; 7]> for MspIdent
[src]
Structure that can be packed an unpacked into 7 bytes.
Bit, MSB0 | Name | Type |
0:7 | version | u8 |
8:15 | mixer_mode | u8 |
16:23 | protocol_version | u8 |
24:55 | capability | u32 |
fn pack(&self) -> [u8; 7]
[src]
Packs the structure into a byte array.
fn unpack(src: &[u8; 7]) -> Result<MspIdent, PackingError>
[src]
Unpacks the structure from a byte array.
impl PackedStructInfo for MspIdent
[src]
fn packed_bits() -> usize
[src]
Number of bits that this structure occupies when being packed.
impl PackedStructSlice for MspIdent
[src]
fn pack_to_slice(&self, output: &mut [u8]) -> Result<(), PackingError>
[src]
Pack the structure into an output buffer.
fn unpack_from_slice(src: &[u8]) -> Result<Self, PackingError>
[src]
Unpack the structure from a buffer.
fn packed_bytes() -> usize
[src]
Number of bytes that this structure demands for packing or unpacking.
fn pack_to_vec(&self) -> Result<Vec<u8>, PackingError>
[src]
Pack the structure into a new byte vector.
impl PackedStructDebug for MspIdent
[src]
fn fmt_fields(&self, fmt: &mut Formatter) -> Result<(), Error>
[src]
fn packed_struct_display_header() -> &'static str
[src]
impl Display for MspIdent
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more