OptrisOptrisDocumentation

Documentation/OTC SDK/optris_sdk — Rust API referencev12.0

PifFailSafeStatus

pub struct PifFailSafeStatus

What the fail-safe line is doing, with the numbers behind it.

Read this rather than IoSnapshot::fail_safe_level: that reports the instantaneous level of a line whose whole job is to alternate, so it flickers between high and low on a perfectly healthy system and is not a health indicator.

Answered at the moment of the call, from the time since the last edge, so a heartbeat that has stopped is reported as stopped.

PifFailSafeStatus — fields

health: PifFailSafeHealth

The verdict. PifFailSafeHealth::Beating is the only value that says the relay is being retriggered and held.

since_last_edge_ms: u32

Milliseconds since the last edge was driven. Zero when nothing has been driven yet.

longest_gap_ms: u32

The longest interval between edges since the fail-safe was armed, including the gap still open now.

A line that was late an hour ago looks healthy the moment you ask; this is what a support report needs.

edge_budget_ms: u32

The interval the two above are judged against: half the interface's relay hold, because the relay is retriggered once per cycle.

was_ever_late: bool

Whether the line has ever been late since it was armed, whatever it is doing now.

edges: u64

Edges driven since the fail-safe was armed.

detail: String

The same answer in words, naming the numbers behind it, for a log line or a support report. Never empty.

PifFailSafeStatus — methods

pub fn is_beating(&self) -> bool

Whether edges are arriving inside the interface's budget.

The only state in which anything wired to the terminals is not reading a fault.