Skip to main content

hydr_structures/structures/actuator/
package.rs

1//! Explicit finite-rate actuator package contracts.
2
3use super::*;
4use crate::structures::StructureElement;
5/// Schema identity of the gate actuator snapshot package.
6pub const GATE_ACTUATOR_SNAPSHOT_SCHEMA: &str = "hydr-gate-actuator-checkpoint-2";
7/// Numerical contract identity of the gate actuator snapshot package.
8pub const GATE_ACTUATOR_CONTRACT_VERSION: &str = "hydr-gate-actuator-numr-cpu-1";
9
10/// Caller-owned complete continuation. Encoding must preserve every original float bit.
11#[derive(Clone, Debug, PartialEq)]
12pub struct GateActuatorSnapshotData {
13    /// Package schema identity.
14    pub schema: String,
15    /// Numerical contract identity.
16    pub contract: String,
17    /// Complete immutable original structure definitions, including uncontrolled elements.
18    pub elements: Vec<StructureElement>,
19    /// Ordered immutable actuator definitions and explicit numerical policies.
20    pub definitions: Vec<GateActuatorDefinition>,
21    /// Original supplied initial actual openings and target bits.
22    pub initial_states: Vec<GateActuatorInitialState>,
23    /// Original immutable target calendar and terminal support.
24    pub schedule: GateActuatorSchedule,
25    /// Original accepted or retained event time in seconds.
26    pub time_s: f64,
27    /// Index of the next unprocessed original target event.
28    pub next_target_index: usize,
29    /// Number of accepted positive-duration intervals.
30    pub accepted_steps: usize,
31    /// Complete current ordered actuator continuation values.
32    pub states: Vec<GateActuatorState>,
33    /// Bounded immediate final interval evidence, absent for zero accepted history.
34    pub last_step: Option<GateActuatorStepDiagnostics>,
35}