Enum canadensis_core::Priority
source · pub enum Priority {
Exceptional,
Immediate,
Fast,
High,
Nominal,
Low,
Slow,
Optional,
}
Expand description
Basic transfer priority levels that all transports should support
Transports can define their own priority levels with more detail.
Variants§
Exceptional
The bus designer can ignore these messages when calculating bus load since they should only be sent when a total system failure has occurred. For example, a self-destruct message on a rocket would use this priority. Another analogy is an NMI on a microcontroller.
Immediate
Immediate is a “high priority message” but with additional latency constraints. Since exceptional messages are not considered when designing a bus, the latency of immediate messages can be determined by considering only immediate messages.
Fast
Fast and immediate are both “high priority messages” but with additional latency constraints. Since exceptional messages are not considered when designing a bus, the latency of fast messages can be determined by considering only immediate and fast messages.
High
High priority messages are more important than nominal messages but have looser latency requirements than fast messages. This priority is used so that, in the presence of rogue nominal messages,important commands can be received. For example, one might envision a failure mode where a temperature sensor starts to load a vehicle bus with nominal messages. The vehicle remains operational (for a time) because the controller is exchanging fast and immediate messages with sensors and actuators. A system safety monitor is able to detect the distressed bus and command the vehicle to a safe state by sending high priority messages to the controller.
Nominal
This is what all messages should use by default. Specifically the heartbeat messages should use this priority.
Low
Low priority messages are expected to be sent on a bus under all conditions but cannot prevent the delivery of nominal messages. They are allowed to be delayed but latency should be constrained by the bus designer.
Slow
Slow messages are low priority messages that have no time sensitivity at all. The bus designer need only ensure that, for all possible system states, these messages will eventually be sent.
Optional
These messages might never be sent (theoretically) for some possible system states. The system shall tolerate never exchanging optional messages in every possible state. The bus designer can ignore these messages when calculating bus load. This should be the priority used for diagnostic or debug messages that are not required on an operational system.
Trait Implementations§
source§impl Ord for Priority
impl Ord for Priority
source§impl PartialEq<Priority> for Priority
impl PartialEq<Priority> for Priority
source§impl PartialOrd<Priority> for Priority
impl PartialOrd<Priority> for Priority
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more