PifFailSafeConfig
pub struct PifFailSafeConfig
The fail-safe line: a watchdog that must keep changing, plus the conditions that trip it.
The toggle is the load-bearing part. The line alternates every
period_ms; a receiver that sees it stop knows the host stopped,
which is the entire point. A constant level would be
indistinguishable from the fault it exists to signal.
PifFailSafeConfig — fields
enabled: bool
Arm the watchdog.
on_alarm: bool
Never implemented, on any camera. Setting this is refused
with Status::NotSupported rather than accepted and ignored.
The field exists so that a caller porting code that asked for it is told so, instead of finding the option absent and assuming the fail-safe line covers alarms. Drive an ordinary digital or analog output from the alarm rule instead, and keep the fail-safe line for camera and pipeline health.
on_flag_timeout: bool
Not configured from here, and setting this is refused with
Status::NotSupported.
The shutter is watched by the camera, not by the process interface, through a legacy setting reachable only from a legacy configuration file -- not from Rust, from .NET or from the C ABI. Refused rather than accepted so that no application believes it has a shutter interlock it does not have.
index: u8
Which channel carries the line.
signal: PifSignal
The line's electrical nature.
active_value: f32
Level driven when the watchdog is satisfied.
inactive_value: f32
Level driven when it is not.
period_ms: u32
Watchdog toggle period, in milliseconds.
flag_cycles: u16
Inert. Meaningful only alongside
PifFailSafeConfig::on_flag_timeout, which is refused, so
this can never be reached.
Deliberately not refused on its own: it is part of the record every caller round-trips, and refusing a value that was merely read back and written again would reject a plain watchdog that asked for nothing.
default_to_range_endpoints: bool
Beat between the two ends of the channel's range when no level was given. True by default.
With this set and active_value / inactive_value still at
their defaults of 1 and 0, an analog fail-safe drives the top
and the bottom of the channel's output range -- 20 and 4 mA, 20
and 0 mA, 10 and 0 V -- the largest edge the channel can make.
Set either level to anything else and that is what is driven
instead: this governs the default, it never overrides an
instruction.
Clear it to drive a literal 1 and 0 on an analog line, which on a live-zero range is then refused as a flat line. Inert on a digital line and on the dedicated fail-safe terminals.
PifFailSafeConfig — methods
pub fn new() -> Result<Self>
The SDK's defaults: disabled, on channel 0, a 500 ms toggle period, tripping on neither alarms nor flag timeout.
Errors
Returns an error only if the SDK's own initialiser fails.