#[repr(i32)]pub enum SafetyState {
Unspecified = 0,
Safe = 1,
Armed = 2,
Ready = 3,
Firing = 4,
Cooldown = 5,
Fault = 6,
Maintenance = 7,
}Expand description
Weapon safety state - strict state machine
Variants§
Unspecified = 0
Safe = 1
Safe - cannot fire, all interlocks engaged Transition: SAFE -> ARMED requires authorization
Armed = 2
Armed - ready to engage, safety interlocks disengaged Transition: ARMED -> READY when firing solution valid
Ready = 3
Ready - firing solution valid, authorized to engage Transition: READY -> FIRING on trigger
Firing = 4
Firing - currently engaging target Transition: FIRING -> READY or COOLDOWN after engagement
Cooldown = 5
Cooldown - post-firing cooldown period Transition: COOLDOWN -> ARMED after cooldown complete
Fault = 6
Fault - safety interlock tripped, requires manual reset Transition: FAULT -> SAFE requires maintenance action
Maintenance = 7
Maintenance - system under maintenance, cannot arm
Implementations§
Source§impl SafetyState
impl SafetyState
Source§impl SafetyState
impl SafetyState
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for SafetyState
impl Clone for SafetyState
Source§fn clone(&self) -> SafetyState
fn clone(&self) -> SafetyState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more