pub struct AvailableModes {
pub number_modes: u8,
pub mode_index: u8,
pub standard_mode: MavStandardMode,
pub custom_mode: u32,
pub properties: MavModeProperty,
pub mode_name: [u8; 35],
}Expand description
MAVLink AVAILABLE_MODES message.
The minimum supported MAVLink version is MAVLink 2.
§Description
Information about a flight mode.
The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE. Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode. The modes must be available/settable for the current vehicle/frame type. Each mode should only be emitted once (even if it is both standard and custom). Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed. See https://mavlink.io/en/services/standard_modes.html
§Encoding/Decoding
Message encoding/decoding are provided by implementing core::convert::TryFrom<Payload> for
AvailableModes (encoding) and [IntoPayload] (decoding) traits.
These traits are implemented by Message proc macro.
Fields§
§number_modes: u8MAVLink field number_modes.
The total number of available modes for the current vehicle type.
mode_index: u8MAVLink field mode_index.
The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change.
standard_mode: MavStandardModeMAVLink field standard_mode.
Standard mode.
custom_mode: u32MAVLink field custom_mode.
A bitfield for use for autopilot-specific flags
properties: MavModePropertyMAVLink field properties.
Mode properties.
mode_name: [u8; 35]MAVLink field mode_name.
Name of custom mode, with null termination character. Should be omitted for standard modes.
Implementations§
Source§impl AvailableModes
impl AvailableModes
Sourcepub const fn spec() -> MessageInfo
pub const fn spec() -> MessageInfo
Returns specification for this message.
Sourcepub const fn message_id() -> u32
pub const fn message_id() -> u32
Message ID.
Sourcepub const fn min_supported_mavlink_version() -> MavLinkVersion
pub const fn min_supported_mavlink_version() -> MavLinkVersion
Minimum supported MAVLink version for this message.
Trait Implementations§
Source§impl Clone for AvailableModes
impl Clone for AvailableModes
Source§fn clone(&self) -> AvailableModes
fn clone(&self) -> AvailableModes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AvailableModes
impl Debug for AvailableModes
Source§impl Default for AvailableModes
impl Default for AvailableModes
Source§fn default() -> AvailableModes
fn default() -> AvailableModes
Source§impl<'de> Deserialize<'de> for AvailableModes
impl<'de> Deserialize<'de> for AvailableModes
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AvailableModes, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AvailableModes, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl From<AvailableModes> for Common
impl From<AvailableModes> for Common
Source§fn from(value: AvailableModes) -> Common
fn from(value: AvailableModes) -> Common
Source§impl IntoPayload for AvailableModes
impl IntoPayload for AvailableModes
Source§impl MessageSpec for AvailableModes
impl MessageSpec for AvailableModes
Source§impl MessageSpecStatic for AvailableModes
impl MessageSpecStatic for AvailableModes
Source§fn spec() -> MessageInfo
fn spec() -> MessageInfo
Source§fn message_id() -> u32
fn message_id() -> u32
ID.Source§fn min_supported_mavlink_version() -> MavLinkVersion
fn min_supported_mavlink_version() -> MavLinkVersion
Source§impl NamedType for AvailableModes
impl NamedType for AvailableModes
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeCollection,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeCollection, generics: &[DataType], ) -> NamedDataType
Source§fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
Source§impl PartialEq for AvailableModes
impl PartialEq for AvailableModes
Source§impl Serialize for AvailableModes
impl Serialize for AvailableModes
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl TryFrom<&Payload> for AvailableModes
impl TryFrom<&Payload> for AvailableModes
Source§impl Type for AvailableModes
impl Type for AvailableModes
Source§fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
Source§fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
definition will be put into the type map.