Struct sbp::messages::system::sub_system_report::SubSystemReport
source · pub struct SubSystemReport {
pub component: u16,
pub generic: u8,
pub specific: u8,
}
Expand description
Subsystem Status report
Report the general and specific state of a subsystem. If the generic state is reported as initializing, the specific state should be ignored.
Fields§
§component: u16
Identity of reporting subsystem
generic: u8
Generic form status report
specific: u8
Subsystem specific status code
Implementations§
source§impl SubSystemReport
impl SubSystemReport
sourcepub fn subsystem(&self) -> Result<Subsystem, u16>
pub fn subsystem(&self) -> Result<Subsystem, u16>
Gets the Subsystem stored in the component
bitfield.
Returns Ok
if the bitrange contains a known Subsystem
variant.
Otherwise the value of the bitrange is returned as an Err(u16)
. This may be because of a malformed message,
or because new variants of Subsystem
were added.
sourcepub fn set_subsystem(&mut self, subsystem: Subsystem)
pub fn set_subsystem(&mut self, subsystem: Subsystem)
Set the bitrange corresponding to the Subsystem of the component
bitfield.
sourcepub fn generic(&self) -> Result<Generic, u8>
pub fn generic(&self) -> Result<Generic, u8>
Gets the Generic stored in the generic
bitfield.
Returns Ok
if the bitrange contains a known Generic
variant.
Otherwise the value of the bitrange is returned as an Err(u8)
. This may be because of a malformed message,
or because new variants of Generic
were added.
sourcepub fn set_generic(&mut self, generic: Generic)
pub fn set_generic(&mut self, generic: Generic)
Set the bitrange corresponding to the Generic of the generic
bitfield.
Trait Implementations§
source§impl Clone for SubSystemReport
impl Clone for SubSystemReport
source§fn clone(&self) -> SubSystemReport
fn clone(&self) -> SubSystemReport
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SubSystemReport
impl Debug for SubSystemReport
source§impl<'de> Deserialize<'de> for SubSystemReport
impl<'de> Deserialize<'de> for SubSystemReport
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 PartialEq for SubSystemReport
impl PartialEq for SubSystemReport
source§fn eq(&self, other: &SubSystemReport) -> bool
fn eq(&self, other: &SubSystemReport) -> bool
self
and other
values to be equal, and is used
by ==
.