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) -> EventType
pub fn event_type(&self) -> EventType
Derive the BACnet EventType from the state transition.
If either the from or to state is HIGH_LIMIT or LOW_LIMIT,
the event type is OUT_OF_RANGE. Otherwise it is CHANGE_OF_STATE.
Sourcepub fn transition(&self) -> EventTransition
pub fn transition(&self) -> EventTransition
Derive the event transition category from the state change.
Per Clause 13.2.5:
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§fn clone(&self) -> EventStateChange
fn clone(&self) -> EventStateChange
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EventStateChange
impl Debug for EventStateChange
Source§impl PartialEq for EventStateChange
impl PartialEq for EventStateChange
impl Eq 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