pub struct FaultDetector {
pub comm_timeout: Option<Duration>,
/* private fields */
}Expand description
Fault detection engine.
Call FaultDetector::evaluate periodically (the bundled server uses a
10-second interval) against the object database. Every object is visited;
objects opt in by overriding
BACnetObject::evaluate_reliability_internal.
The default object hook is a no-op.
Fields§
§comm_timeout: Option<Duration>Timeout after which an object is considered to have a communication
failure. Set to None to disable communication-failure detection.
Implementations§
Source§impl FaultDetector
impl FaultDetector
Sourcepub fn new(comm_timeout: Option<Duration>) -> Self
pub fn new(comm_timeout: Option<Duration>) -> Self
Create a new fault detector with the given communication timeout.
Sourcepub fn evaluate(&self, db: &mut ObjectDatabase) -> Vec<ReliabilityChange>
pub fn evaluate(&self, db: &mut ObjectDatabase) -> Vec<ReliabilityChange>
Evaluate reliability for all objects in the database.
Each object owns both the decision and any mutation. Engineering
Min_Pres_Value / Max_Pres_Value metadata is not a reliability fault
algorithm. Only a successful hook result of
ReliabilityEvaluation::Changed produces a ReliabilityChange.
Hook errors are rate-limited per object and produce no change record.
Returns a list of changes that object hooks successfully applied.