use super::{ControlCommandOutput, ControlLatch, ControlSample, ControlState};
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct ControlTimeExpansion {
pub high_s: f64,
pub low_s: f64,
}
#[derive(Clone, Debug, PartialEq)]
pub struct ControlTimerWitness {
pub started_at_s: f64,
pub evaluated_at_s: f64,
pub delay_s: f64,
pub elapsed_high_s: f64,
pub elapsed_low_s: f64,
pub ready: bool,
pub allowed_elapsed: Option<ControlTimeExpansion>,
pub allowed_elapsed_overflow: bool,
pub within_lateness: bool,
}
#[derive(Clone, Debug, PartialEq)]
pub struct ControlTransitionReceipt {
pub decision_index: usize,
pub time_s: f64,
pub from: ControlLatch,
pub to: ControlLatch,
pub sample: ControlSample,
pub timer: ControlTimerWitness,
}
#[derive(Clone, Debug, PartialEq)]
pub struct ControlDecisionReceipt {
pub element: usize,
pub controller_id: String,
pub before: ControlState,
pub sample: ControlSample,
pub qualifies: bool,
pub timer: Option<ControlTimerWitness>,
pub transitioned: bool,
pub after: ControlState,
}
#[derive(Clone, Debug, PartialEq)]
pub struct ControlStepDiagnostics {
pub start_s: f64,
pub end_s: f64,
pub decision_index: Option<usize>,
pub left_commands: Vec<ControlCommandOutput>,
pub right_commands: Vec<ControlCommandOutput>,
pub decisions: Vec<ControlDecisionReceipt>,
}