pub struct MavProtocolCapability(/* private fields */);
python_array_test
only.Expand description
Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability.
Implementations§
Source§impl MavProtocolCapability
impl MavProtocolCapability
Sourcepub const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT: Self
pub const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT: Self
Autopilot supports the MISSION_ITEM float message type. Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead.
Sourcepub const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT: Self
pub const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT: Self
Autopilot supports the new param float message type.
Sourcepub const MAV_PROTOCOL_CAPABILITY_MISSION_INT: Self
pub const MAV_PROTOCOL_CAPABILITY_MISSION_INT: Self
Autopilot supports MISSION_ITEM_INT scaled integer message type. Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated).
Sourcepub const MAV_PROTOCOL_CAPABILITY_COMMAND_INT: Self
pub const MAV_PROTOCOL_CAPABILITY_COMMAND_INT: Self
Autopilot supports COMMAND_INT scaled integer message type.
Sourcepub const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE: Self
pub const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE: Self
Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: https://mavlink.io/en/services/parameter.html#parameter-encoding. Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported.
Sourcepub const MAV_PROTOCOL_CAPABILITY_FTP: Self
pub const MAV_PROTOCOL_CAPABILITY_FTP: Self
Autopilot supports the File Transfer Protocol v1: https://mavlink.io/en/services/ftp.html.
Sourcepub const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET: Self
pub const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET: Self
Autopilot supports commanding attitude offboard.
Sourcepub const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED: Self
pub const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED: Self
Autopilot supports commanding position and velocity targets in local NED frame.
Sourcepub const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT: Self
pub const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT: Self
Autopilot supports commanding position and velocity targets in global scaled integers.
Sourcepub const MAV_PROTOCOL_CAPABILITY_TERRAIN: Self
pub const MAV_PROTOCOL_CAPABILITY_TERRAIN: Self
Autopilot supports terrain protocol / data handling.
Sourcepub const MAV_PROTOCOL_CAPABILITY_RESERVED3: Self
pub const MAV_PROTOCOL_CAPABILITY_RESERVED3: Self
Reserved for future use.
Sourcepub const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION: Self
pub const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION: Self
Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination).
Sourcepub const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION: Self
pub const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION: Self
Autopilot supports onboard compass calibration.
Sourcepub const MAV_PROTOCOL_CAPABILITY_MAVLINK2: Self
pub const MAV_PROTOCOL_CAPABILITY_MAVLINK2: Self
Autopilot supports MAVLink version 2.
Sourcepub const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE: Self
pub const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE: Self
Autopilot supports mission fence protocol.
Sourcepub const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY: Self
pub const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY: Self
Autopilot supports mission rally point protocol.
Sourcepub const MAV_PROTOCOL_CAPABILITY_RESERVED2: Self
pub const MAV_PROTOCOL_CAPABILITY_RESERVED2: Self
Reserved for future use.
Sourcepub const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST: Self
pub const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST: Self
Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: https://mavlink.io/en/services/parameter.html#parameter-encoding. Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported.
Sourcepub const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER: Self
pub const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER: Self
This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested.
Sourcepub const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL: Self
pub const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL: Self
Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL).
Source§impl MavProtocolCapability
impl MavProtocolCapability
Sourcepub const fn bits(&self) -> u64
pub const fn bits(&self) -> u64
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u64) -> Option<Self>
pub const fn from_bits(bits: u64) -> Option<Self>
Convert from a bits value.
This method will return None
if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u64) -> Self
pub const fn from_bits_truncate(bits: u64) -> Self
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u64) -> Self
pub const fn from_bits_retain(bits: u64) -> Self
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Get a flags value with the bits of a flag with the given name set.
This method will return None
if name
is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
remove
won’t truncate other
, but the !
operator will.
Sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&
) of the bits in two flags values.
Sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|
) of the bits in two flags values.
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!
) of the bits in a flags value, truncating the result.
Source§impl MavProtocolCapability
impl MavProtocolCapability
Sourcepub const fn iter(&self) -> Iter<MavProtocolCapability>
pub const fn iter(&self) -> Iter<MavProtocolCapability>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<MavProtocolCapability>
pub const fn iter_names(&self) -> IterNames<MavProtocolCapability>
Yield a set of contained named flags values.
This method is like iter
, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Binary for MavProtocolCapability
impl Binary for MavProtocolCapability
Source§impl BitAnd for MavProtocolCapability
impl BitAnd for MavProtocolCapability
Source§impl BitAndAssign for MavProtocolCapability
impl BitAndAssign for MavProtocolCapability
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
The bitwise and (&
) of the bits in two flags values.
Source§impl BitOr for MavProtocolCapability
impl BitOr for MavProtocolCapability
Source§fn bitor(self, other: MavProtocolCapability) -> Self
fn bitor(self, other: MavProtocolCapability) -> Self
The bitwise or (|
) of the bits in two flags values.
Source§type Output = MavProtocolCapability
type Output = MavProtocolCapability
|
operator.Source§impl BitOrAssign for MavProtocolCapability
impl BitOrAssign for MavProtocolCapability
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
The bitwise or (|
) of the bits in two flags values.
Source§impl BitXor for MavProtocolCapability
impl BitXor for MavProtocolCapability
Source§impl BitXorAssign for MavProtocolCapability
impl BitXorAssign for MavProtocolCapability
Source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
Source§impl Clone for MavProtocolCapability
impl Clone for MavProtocolCapability
Source§fn clone(&self) -> MavProtocolCapability
fn clone(&self) -> MavProtocolCapability
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MavProtocolCapability
impl Debug for MavProtocolCapability
Source§impl Default for MavProtocolCapability
impl Default for MavProtocolCapability
Source§impl<'de> Deserialize<'de> for MavProtocolCapability
impl<'de> Deserialize<'de> for MavProtocolCapability
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 Extend<MavProtocolCapability> for MavProtocolCapability
impl Extend<MavProtocolCapability> for MavProtocolCapability
Source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
The bitwise or (|
) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl Flags for MavProtocolCapability
impl Flags for MavProtocolCapability
Source§const FLAGS: &'static [Flag<MavProtocolCapability>]
const FLAGS: &'static [Flag<MavProtocolCapability>]
Source§fn from_bits_retain(bits: u64) -> MavProtocolCapability
fn from_bits_retain(bits: u64) -> MavProtocolCapability
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true
if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|
) of the bits in two flags values.Source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read moreSource§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^
) of the bits in two flags values.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read moreSource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.Source§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.Source§impl FromIterator<MavProtocolCapability> for MavProtocolCapability
impl FromIterator<MavProtocolCapability> for MavProtocolCapability
Source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
The bitwise or (|
) of the bits in each flags value.
Source§impl IntoIterator for MavProtocolCapability
impl IntoIterator for MavProtocolCapability
Source§impl LowerHex for MavProtocolCapability
impl LowerHex for MavProtocolCapability
Source§impl Not for MavProtocolCapability
impl Not for MavProtocolCapability
Source§impl Octal for MavProtocolCapability
impl Octal for MavProtocolCapability
Source§impl PartialEq for MavProtocolCapability
impl PartialEq for MavProtocolCapability
Source§impl PublicFlags for MavProtocolCapability
impl PublicFlags for MavProtocolCapability
Source§impl Serialize for MavProtocolCapability
impl Serialize for MavProtocolCapability
Source§impl Sub for MavProtocolCapability
impl Sub for MavProtocolCapability
Source§fn sub(self, other: Self) -> Self
fn sub(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
Source§type Output = MavProtocolCapability
type Output = MavProtocolCapability
-
operator.Source§impl SubAssign for MavProtocolCapability
impl SubAssign for MavProtocolCapability
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.