pub struct Heartbeat {
pub type_: MavType,
pub autopilot: MavAutopilot,
pub base_mode: MavModeFlag,
pub custom_mode: u32,
pub system_status: MavState,
pub mavlink_version: u8,
}Expand description
MAVLink HEARTBEAT message.
The minimum supported MAVLink version is MAVLink 1.
§Description
The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at https://mavlink.io/en/services/heartbeat.html
§Encoding/Decoding
Message encoding/decoding are provided by implementing core::convert::TryFrom<Payload> for
Heartbeat (encoding) and [IntoPayload] (decoding) traits.
These traits are implemented by Message proc macro.
Fields§
§type_: MavTypeMAVLink field type.
Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type.
autopilot: MavAutopilotMAVLink field autopilot.
Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers.
base_mode: MavModeFlagMAVLink field base_mode.
System mode bitmap.
custom_mode: u32MAVLink field custom_mode.
A bitfield for use for autopilot-specific flags
system_status: MavStateMAVLink field system_status.
System status flag.
mavlink_version: u8MAVLink field mavlink_version.
MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version
Implementations§
Source§impl Heartbeat
impl Heartbeat
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<'de> Deserialize<'de> for Heartbeat
impl<'de> Deserialize<'de> for Heartbeat
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Heartbeat, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Heartbeat, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl IntoPayload for Heartbeat
impl IntoPayload for Heartbeat
Source§impl MessageSpec for Heartbeat
impl MessageSpec for Heartbeat
Source§impl MessageSpecStatic for Heartbeat
impl MessageSpecStatic for Heartbeat
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 Heartbeat
impl NamedType for Heartbeat
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 Serialize for Heartbeat
impl Serialize for Heartbeat
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 Type for Heartbeat
impl Type for Heartbeat
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.