pub struct ComponentMetadata {
pub time_boot_ms: u32,
pub file_crc: u32,
pub uri: [u8; 100],
}Expand description
MAVLink COMPONENT_METADATA message.
Minimum supported MAVLink version is MAVLink 2.
§Description
Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.
This contains the MAVLink FTP URI and CRC for the component’s general metadata file. The file must be hosted on the component, and may be xz compressed. The file CRC can be used for file caching.
The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet. For more information see: https://mavlink.io/en/services/component_information.html.
Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION.
§Encoding/Decoding
Message encoding/decoding are provided by implementing core::convert::TryFrom<Payload> for
ComponentMetadata (encoding) and [IntoPayload] (decoding) traits.
These traits are implemented by Message proc macro.
Fields§
§time_boot_ms: u32MAVLink field time_boot_ms.
Timestamp (time since system boot).
file_crc: u32MAVLink field file_crc.
CRC32 of the general metadata file.
uri: [u8; 100]MAVLink field uri.
MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated.
Implementations§
Source§impl ComponentMetadata
impl ComponentMetadata
Sourcepub const fn spec() -> MessageInfo
pub const fn spec() -> MessageInfo
Returns specification for this message.
Sourcepub const fn message_id() -> MessageId
pub const fn message_id() -> MessageId
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 ComponentMetadata
impl Clone for ComponentMetadata
Source§fn clone(&self) -> ComponentMetadata
fn clone(&self) -> ComponentMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ComponentMetadata
impl Debug for ComponentMetadata
Source§impl Default for ComponentMetadata
impl Default for ComponentMetadata
Source§impl<'de> Deserialize<'de> for ComponentMetadata
impl<'de> Deserialize<'de> for ComponentMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<ComponentMetadata> for Common
impl From<ComponentMetadata> for Common
Source§fn from(value: ComponentMetadata) -> Self
fn from(value: ComponentMetadata) -> Self
Source§impl IntoPayload for ComponentMetadata
impl IntoPayload for ComponentMetadata
Source§impl MessageSpec for ComponentMetadata
impl MessageSpec for ComponentMetadata
Source§impl MessageSpecStatic for ComponentMetadata
impl MessageSpecStatic for ComponentMetadata
Source§fn spec() -> MessageInfo
fn spec() -> MessageInfo
Source§fn message_id() -> MessageId
fn message_id() -> MessageId
ID.Source§fn min_supported_mavlink_version() -> MavLinkVersion
fn min_supported_mavlink_version() -> MavLinkVersion
Source§impl NamedType for ComponentMetadata
impl NamedType for ComponentMetadata
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 ComponentMetadata
impl PartialEq for ComponentMetadata
Source§impl Serialize for ComponentMetadata
impl Serialize for ComponentMetadata
Source§impl TryFrom<&Payload> for ComponentMetadata
impl TryFrom<&Payload> for ComponentMetadata
Source§impl Type for ComponentMetadata
impl Type for ComponentMetadata
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.