pub struct SecureCommand {
pub target_system: u8,
pub target_component: u8,
pub sequence: u32,
pub operation: SecureCommandOp,
pub data_length: u8,
pub sig_length: u8,
pub data: [u8; 220],
}Expand description
MAVLink SECURE_COMMAND message.
The minimum supported MAVLink version is MAVLink 2.
§Description
Send a secure command. Data should be signed with a private key corresponding with a public key known to the recipient. Signature should be over the concatenation of the sequence number (little-endian format), the operation (little-endian format) the data and the session key. For SECURE_COMMAND_GET_SESSION_KEY the session key should be zero length. The data array consists of the data followed by the signature. The sum of the data_length and the sig_length cannot be more than 220. The format of the data is command specific.
§Encoding/Decoding
Message encoding/decoding are provided by implementing core::convert::TryFrom<Payload> for
SecureCommand (encoding) and [IntoPayload] (decoding) traits.
These traits are implemented by Message proc macro.
Fields§
§target_system: u8MAVLink field target_system.
System ID.
target_component: u8MAVLink field target_component.
Component ID.
sequence: u32MAVLink field sequence.
Sequence ID for tagging reply.
operation: SecureCommandOpMAVLink field operation.
Operation being requested.
data_length: u8MAVLink field data_length.
Data length.
sig_length: u8MAVLink field sig_length.
Signature length.
data: [u8; 220]MAVLink field data.
Signed data.
Implementations§
Source§impl SecureCommand
impl SecureCommand
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 SecureCommand
impl Clone for SecureCommand
Source§fn clone(&self) -> SecureCommand
fn clone(&self) -> SecureCommand
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SecureCommand
impl Debug for SecureCommand
Source§impl Default for SecureCommand
impl Default for SecureCommand
Source§fn default() -> SecureCommand
fn default() -> SecureCommand
Source§impl<'de> Deserialize<'de> for SecureCommand
impl<'de> Deserialize<'de> for SecureCommand
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SecureCommand, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SecureCommand, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl From<SecureCommand> for Ardupilotmega
impl From<SecureCommand> for Ardupilotmega
Source§fn from(value: SecureCommand) -> Ardupilotmega
fn from(value: SecureCommand) -> Ardupilotmega
Source§impl IntoPayload for SecureCommand
impl IntoPayload for SecureCommand
Source§impl MessageSpec for SecureCommand
impl MessageSpec for SecureCommand
Source§impl MessageSpecStatic for SecureCommand
impl MessageSpecStatic for SecureCommand
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 SecureCommand
impl NamedType for SecureCommand
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 SecureCommand
impl PartialEq for SecureCommand
Source§impl Serialize for SecureCommand
impl Serialize for SecureCommand
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 SecureCommand
impl TryFrom<&Payload> for SecureCommand
Source§impl Type for SecureCommand
impl Type for SecureCommand
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.