optris::sdk::pif::PifFailSafeStatus
The fail-safe line's health, with the numbers behind it.
Read it 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.
Public attributes
health
FailSafeHealth health = FailSafeHealth::kDisabled
since_last_edge
std::chrono::milliseconds since_last_edge {0}
Time since the last edge was driven. Zero when nothing has been driven yet.
longest_gap
std::chrono::milliseconds longest_gap {0}
The longest gap between two consecutive edges observed since the fail-safe was armed, including the gap still open now. This is what a support report needs: a line that was late once an hour ago looks healthy the moment you ask.
edge_budget
std::chrono::milliseconds edge_budget {0}
The gap since_last_edge and longest_gap are judged against -- PifHardwareInfo::fail_safe_edge_budget().
edges
uint64_t edges = 0
Edges driven since the fail-safe was armed.
was_ever_late
bool was_ever_late = false
Non-zero if longest_gap ever exceeded edge_budget since arming, whatever the line is doing now.
detail
std::string detail
The same answer in words, naming the numbers behind it, for a log line or a support report. Never empty.