pub struct TimerState {
pub actuator: Id,
pub timer: Id,
pub finished_at: Timestamp,
}Expand description
When one timer of one actuator finishes.
A three-field struct rather than a (Id, Timestamp) pair because timer identifiers
are not unique on their own. S2J schemas/Timer.id: “Must be unique in the scope
of the OMBC.SystemDescription, FRBC.ActuatorDescription or DDBC.ActuatorDescription in
which it is used” — so an FRBC system with two actuators may legally call a timer
timer1 on each, and a table keyed by the identifier alone would let one actuator’s
running timer block the other’s transition.
Fields§
§actuator: IdThe actuator whose timer this is.
Id::NIL for OMBC, whose timers belong to the OMBC.SystemDescription itself
rather than to an actuator — the same stand-in
Context::active_modes uses for OMBC’s single state machine.
timer: IdThe timer.
finished_at: TimestampWhen it finishes. In the past means it has finished; “if the timer was never started, the value can be an arbitrary DateTimeStamp in the past”, so a timer nobody has reported on is not the same as a finished one.
Trait Implementations§
Source§impl Clone for TimerState
impl Clone for TimerState
impl Copy for TimerState
Source§impl Debug for TimerState
impl Debug for TimerState
impl Eq for TimerState
Source§impl PartialEq for TimerState
impl PartialEq for TimerState
impl StructuralPartialEq for TimerState
Auto Trait Implementations§
impl Forget for TimerState
impl Freeze for TimerState
impl RefUnwindSafe for TimerState
impl Send for TimerState
impl Sync for TimerState
impl Unpin for TimerState
impl UnsafeUnpin for TimerState
impl UnwindSafe for TimerState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.