pub struct MavProtocolCapability { /* private fields */ }
common
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_SET_ACTUATOR_TARGET: Self
pub const MAV_PROTOCOL_CAPABILITY_SET_ACTUATOR_TARGET: Self
Autopilot supports direct actuator control.
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 fn from_bits(bits: u64) -> Option<Self>
pub const fn from_bits(bits: u64) -> Option<Self>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u64) -> Self
pub const fn from_bits_truncate(bits: u64) -> Self
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u64) -> Self
pub const unsafe fn from_bits_unchecked(bits: u64) -> Self
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
§Safety
The caller of the bitflags!
macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked()
has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Returns true
if all of the flags in other
are contained within self
.
Sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Inserts or removes the specified flags depending on the passed value.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
Returns the intersection between the flags in self
and
other
.
Specifically, the returned set contains only the flags which are
present in both self
and other
.
This is equivalent to using the &
operator (e.g.
ops::BitAnd
), as in flags & other
.
Sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
Returns the union of between the flags in self
and other
.
Specifically, the returned set contains all flags which are
present in either self
or other
, including any which are
present in both (see Self::symmetric_difference
if that
is undesirable).
This is equivalent to using the |
operator (e.g.
ops::BitOr
), as in flags | other
.
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
Returns the difference between the flags in self
and other
.
Specifically, the returned set contains all flags present in
self
, except for the ones present in other
.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other
(and this syntax is also supported).
This is equivalent to using the -
operator (e.g.
ops::Sub
), as in flags - other
.
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
Returns the symmetric difference between the flags
in self
and other
.
Specifically, the returned set contains the flags present which
are present in self
or other
, but that are not present in
both. Equivalently, it contains the flags present in exactly
one of the sets self
and other
.
This is equivalent to using the ^
operator (e.g.
ops::BitXor
), as in flags ^ other
.
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
Returns the complement of this set of flags.
Specifically, the returned set contains all the flags which are
not set in self
, but which are allowed for this type.
Alternatively, it can be thought of as the set difference
between Self::all()
and self
(e.g. Self::all() - self
)
This is equivalent to using the !
operator (e.g.
ops::Not
), as in !flags
.
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)
Disables all flags disabled in the set.
Source§impl BitOr for MavProtocolCapability
impl BitOr for MavProtocolCapability
Source§fn bitor(self, other: MavProtocolCapability) -> Self
fn bitor(self, other: MavProtocolCapability) -> Self
Returns the union of the two sets of flags.
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)
Adds the set of flags.
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)
Toggles the set of flags.
Source§impl Clone for MavProtocolCapability
impl Clone for MavProtocolCapability
Source§fn clone(&self) -> MavProtocolCapability
fn clone(&self) -> MavProtocolCapability
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
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)
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 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
Source§impl Hash for MavProtocolCapability
impl Hash 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 Ord for MavProtocolCapability
impl Ord for MavProtocolCapability
Source§fn cmp(&self, other: &MavProtocolCapability) -> Ordering
fn cmp(&self, other: &MavProtocolCapability) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for MavProtocolCapability
impl PartialEq for MavProtocolCapability
Source§impl PartialOrd for MavProtocolCapability
impl PartialOrd for MavProtocolCapability
Source§impl Serialize for MavProtocolCapability
impl Serialize for MavProtocolCapability
Source§impl Sub for MavProtocolCapability
impl Sub for MavProtocolCapability
Source§impl SubAssign for MavProtocolCapability
impl SubAssign for MavProtocolCapability
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Disables all flags enabled in the set.