pub struct CommandFailureDetector {
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
COMMAND_FAILURE event detector for commandable output objects (BO, MSO).
Transitions to OFFNORMAL when present_value differs from feedback_value. Returns to NORMAL when they match.
Time_Delay is honored via the split Self::probe / Self::tick
entry points; see OutOfRangeDetector for the delay contract.
Fields§
§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.4 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 CommandFailureDetector
impl CommandFailureDetector
Sourcepub const ALGORITHM: EventType = EventType::COMMAND_FAILURE
pub const ALGORITHM: EventType = EventType::COMMAND_FAILURE
BACnet Event Type corresponding to this detector’s event algorithm.
Sourcepub fn evaluate(
&mut self,
present_value: u32,
feedback_value: u32,
reliability: Reliability,
) -> Option<TransitionOutcome>
pub fn evaluate( &mut self, present_value: u32, feedback_value: u32, reliability: Reliability, ) -> Option<TransitionOutcome>
Per-write entry point; see OutOfRangeDetector::evaluate.
Sourcepub fn probe(
&mut self,
present_value: u32,
feedback_value: u32,
reliability: Reliability,
) -> Option<TransitionOutcome>
pub fn probe( &mut self, present_value: u32, feedback_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,
feedback_value: u32,
reliability: Reliability,
) -> Option<TransitionOutcome>
pub fn tick( &mut self, present_value: u32, feedback_value: u32, reliability: Reliability, ) -> Option<TransitionOutcome>
Periodic tick: advance the countdown and fire on expiry.