#[non_exhaustive]pub struct Explanation {Show 16 fields
pub instruction_id: Id,
pub kind: MessageKind,
pub execution_time: Timestamp,
pub abnormal_condition: bool,
pub actuator: Option<Id>,
pub operation_mode: Option<(Id, Option<String>)>,
pub factor: Option<f64>,
pub power: Vec<PowerValue>,
pub fill_rate: Option<f64>,
pub supply_rate: Option<f64>,
pub limits: Vec<(CommodityQuantity, Limits)>,
pub sequence: Option<(Id, Id, Id, Duration)>,
pub transition_duration: Duration,
pub blocked_by: Vec<(Id, Option<String>)>,
pub abnormal_only_misuse: bool,
pub notes: Vec<String>,
}Expand description
What an instruction means, read against the descriptions that were sent.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.instruction_id: IdThe instruction’s own identifier.
kind: MessageKindWhich kind of instruction it is.
execution_time: TimestampWhen it takes effect. In the past means as soon as possible.
abnormal_condition: boolWhether it is an abnormal-condition instruction.
actuator: Option<Id>The actuator it addresses, for the control types that have them.
operation_mode: Option<(Id, Option<String>)>The operation mode it selects, with its diagnostic label where there is one.
factor: Option<f64>The factor it asks for.
power: Vec<PowerValue>The power that factor implies.
fill_rate: Option<f64>FRBC: how fast the store will fill, in fill-level units per second.
supply_rate: Option<f64>DDBC: the supply rate the mode will deliver.
limits: Vec<(CommodityQuantity, Limits)>PEBC: the bounds in force when the envelope starts.
sequence: Option<(Id, Id, Id, Duration)>PPBC: the profile, container and sequence it chose, and how long it takes.
transition_duration: DurationHow long the move takes to take effect.
blocked_by: Vec<(Id, Option<String>)>Timers that have not finished and block the move this instruction asks for.
abnormal_only_misuse: boolWhether it uses something marked abnormal_condition_only without saying so.
notes: Vec<String>Anything else worth saying in a log line.
Implementations§
Source§impl Explanation
impl Explanation
Sourcepub fn is_actionable(&self) -> bool
pub fn is_actionable(&self) -> bool
Whether this instruction can be carried out right now, as far as the description can tell.
Sourcepub fn electric_power(&self) -> Option<f64>
pub fn electric_power(&self) -> Option<f64>
The electrical power the instruction implies, if it names one.
Trait Implementations§
Source§impl Clone for Explanation
impl Clone for Explanation
Source§fn clone(&self) -> Explanation
fn clone(&self) -> Explanation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more