pub struct ChangeOfStateDetector {
pub alarm_values: Vec<u32>,
pub notification_class: u32,
pub notify_type: NotifyType,
pub event_enable: EventTransitionBits,
pub time_delay: u32,
pub time_delay_normal: Option<u32>,
pub event_state: EventState,
pub acked_transitions: EventTransitionBits,
pub pending: Option<PendingTransition>,
pub fault_reliability: Option<Reliability>,
}Expand description
CHANGE_OF_STATE event detector for binary and multi-state objects.
Transitions to OFFNORMAL when the monitored value
matches any value in the alarm_values list. Returns to NORMAL when
the value no longer matches any alarm value.
Time_Delay is honored via the split Self::probe / Self::tick
entry points; see OutOfRangeDetector for the delay contract.
Fields§
§alarm_values: Vec<u32>Values that trigger an OFFNORMAL state.
notification_class: u32Instance number of the Notification Class object that distributes the events.
notify_type: NotifyTypeNotify_Type: whether the transitions are reported as alarms or as events.
event_enable: EventTransitionBitsEvent_Enable: the transitions whose notifications are distributed.
time_delay: u32Seconds an offnormal condition must persist before TO_OFFNORMAL fires, and the NORMAL
delay too when time_delay_normal is None; 0 fires immediately. Fault transitions are
never delayed.
time_delay_normal: Option<u32>Time_Delay_Normal (property 356): the Clause 13.3.2 pTimeDelayNormal
parameter — the number of seconds a return to normal has to be
sustained before the detector confirms it. None is the not-configured case
and uses time_delay as the fallback required for absent pTimeDelayNormal.
event_state: EventStateCurrent event state.
acked_transitions: EventTransitionBitsAcked_Transitions: a set flag means that transition was acknowledged.
pending: Option<PendingTransition>Pending delayed transition, or None when no delay is in progress.
fault_reliability: Option<Reliability>Reliability value in force at the last entry to FAULT; None outside FAULT.
Implementations§
Source§impl ChangeOfStateDetector
impl ChangeOfStateDetector
Sourcepub const ALGORITHM: EventType = EventType::CHANGE_OF_STATE
pub const ALGORITHM: EventType = EventType::CHANGE_OF_STATE
BACnet Event Type corresponding to this detector’s event algorithm.
Sourcepub fn evaluate(
&mut self,
present_value: u32,
reliability: Reliability,
) -> Option<TransitionOutcome>
pub fn evaluate( &mut self, present_value: u32, reliability: Reliability, ) -> Option<TransitionOutcome>
Per-write entry point; see OutOfRangeDetector::evaluate.
Sourcepub fn probe(
&mut self,
present_value: u32,
reliability: Reliability,
) -> Option<TransitionOutcome>
pub fn probe( &mut self, present_value: u32, reliability: Reliability, ) -> Option<TransitionOutcome>
Per-write probe: seed or cancel a pending transition, fire on zero delay.
Sourcepub fn tick(
&mut self,
present_value: u32,
reliability: Reliability,
) -> Option<TransitionOutcome>
pub fn tick( &mut self, present_value: u32, reliability: Reliability, ) -> Option<TransitionOutcome>
Periodic tick: advance the countdown and fire on expiry.