Skip to main content

hydr_structures/structures/operating_source/
event.rs

1//! Exact component event origins without dynamic actuator-lane projection.
2
3/// Next strictly later supported component event or common terminal bound.
4#[derive(Clone, Debug, PartialEq)]
5pub struct OperatingSourceEvent {
6    /// Original represented event time in seconds. No epsilon merging applies.
7    pub time_s: f64,
8    /// The event is the registry's common terminal bound.
9    pub terminal: bool,
10    /// Exactly coincident origins in original source registration order.
11    pub origins: Vec<OperatingSourceEventOrigin>,
12}
13/// Static registered source identity and its component event summary.
14#[derive(Clone, Debug, PartialEq)]
15pub struct OperatingSourceEventOrigin {
16    /// Original registered source identity.
17    pub source_id: String,
18    /// Exact component event kind, without inferred actuator IDs.
19    pub kind: OperatingSourceEventKind,
20}
21/// Supported point-source event semantics. This predicts no complete future feedback sequence.
22#[derive(Clone, Debug, PartialEq)]
23pub enum OperatingSourceEventKind {
24    /// A prescribed source's original knot event.
25    PrescribedKnot,
26    /// A fresh actuator frame's scalar event summary.
27    Actuator {
28        /// Original target index when this event installs complete target packets.
29        target_index: Option<usize>,
30        /// At least one current arrival window reaches its lower boundary.
31        arrival_lower_boundary: bool,
32        /// At least one current arrival window reaches its upper boundary.
33        arrival_upper_boundary: bool,
34        /// This actuator reaches its original terminal support.
35        terminal: bool,
36    },
37    /// A fresh controlled pump's original sampled decision or terminal boundary.
38    PumpControl {
39        /// Original sampled decision index, absent at a separate terminal boundary.
40        decision_index: Option<usize>,
41        /// This controller reaches its original terminal support.
42        terminal: bool,
43    },
44}