pub struct EventStateChange {
pub from: EventState,
pub to: EventState,
}Expand description
A detected change in event state.
Fields§
§from: EventStateThe previous event state.
to: EventStateThe new event state.
Implementations§
Source§impl EventStateChange
impl EventStateChange
Sourcepub fn event_type(&self, algorithm: EventType) -> EventType
pub fn event_type(&self, algorithm: EventType) -> EventType
Select the notification’s Event Type for this transition.
ASHRAE 135-2020 Clause 13.2.5.3 requires
CHANGE_OF_RELIABILITY for every transition to or from FAULT.
Any other transition reports the Event Type that belongs to the
object’s own configured algorithm (Clauses 13.8.1.1 and 13.9.1.1),
which the caller passes as algorithm.
Sourcepub fn transition(&self) -> EventTransition
pub fn transition(&self) -> EventTransition
Derive the event transition category from the state change.
to == NORMAL->ToNormalto == FAULT->ToFault- Everything else (OFFNORMAL, HIGH_LIMIT, LOW_LIMIT) ->
ToOffnormal
Trait Implementations§
Source§impl Clone for EventStateChange
impl Clone for EventStateChange
Source§impl Debug for EventStateChange
impl Debug for EventStateChange
impl Eq for EventStateChange
Source§impl PartialEq for EventStateChange
impl PartialEq for EventStateChange
impl StructuralPartialEq for EventStateChange
Auto Trait Implementations§
impl Freeze for EventStateChange
impl RefUnwindSafe for EventStateChange
impl Send for EventStateChange
impl Sync for EventStateChange
impl Unpin for EventStateChange
impl UnsafeUnpin for EventStateChange
impl UnwindSafe for EventStateChange
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
Mutably borrows from an owned value. Read more