FailSafeConfiguration
public sealed class FailSafeConfiguration
The fail-safe line: a watchdog that has to keep changing, plus the conditions that trip it.
The toggle is the load-bearing part. The line alternates every FailSafeConfiguration.Period; 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.
The alternation is produced by the fail-safe watchdog and by nothing else. On every frame the camera delivers, the watchdog checks that frames are still arriving, that the pipeline still finishes them, that the shutter still cycles and that the application has not called ThermalCamera.InterruptFailSafe(…); only a check that passes moves the line. ProcessInterface.Poll does not move the line at all.
FailSafeConfiguration: constructors
public FailSafeConfiguration()
Create a configuration with the defaults.
FailSafeConfiguration: properties
public float ActiveValue { get; set; }
The level driven when the watchdog is satisfied.
Used only when FailSafeConfiguration.Signal is PifSignal.Analog. On a digital line and on the dedicated fail-safe terminals the watchdog drives the pin's own two states and these two properties are inert.
On an analog line they are in the channel's PifChannel.OutputRange own unit -- volts in 0-10 V, milliamperes in the two current ranges.
A level you set here is driven exactly as set, whatever FailSafeConfiguration.DefaultToRangeEndpoints says. Two levels you set that land on one converter code are still refused when the configuration is applied, because a line that cannot move is the fault this signal exists to report.
The defaults, 1 and 0, are logic levels inherited from the digital case and mean nothing on an analog line -- on a 4-20 mA line both clamp to 4 mA and land on one converter code. They are left in place as the mark that no level was given, and FailSafeConfiguration.DefaultToRangeEndpoints is what resolves them.
public int ChannelIndex { get; set; }
Which channel carries the line.
public bool DefaultToRangeEndpoints { get; set; }
Beat between the two ends of the channel's range when no level was given.
With this set and FailSafeConfiguration.ActiveValue and FailSafeConfiguration.InactiveValue still at their defaults, an analog fail-safe drives the top and the bottom of the channel's PifChannel.OutputRange (20 and 4 mA, 20 and 0 mA, 10 and 0 V), the largest edge the channel can make, so an application that configures no levels still gets a heartbeat a PLC can see. Set either level to anything else and that is what is driven instead: this governs the default, it never overrides an instruction.
A flag rather than a sentinel in the two floats because telling "the caller asked for 1" from "nobody set a level" needs a third state, and these values round-trip through JSON, which writes a NaN as null and then throws reading it back. Clear it to drive a literal 1 and 0 on an analog line, which on a live-zero range is then refused, correctly, as a flat line.
Inert on a digital line and on the dedicated fail-safe terminals, where the two levels are inert as well.
public int FlagCycles { get; set; }
Inert. See FailSafeConfiguration.TripOnFlagTimeout.
Meaningful only alongside FailSafeConfiguration.TripOnFlagTimeout, 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.
public float InactiveValue { get; set; }
The level driven when it is not.
See FailSafeConfiguration.ActiveValue for the unit.
public bool IsEnabled { get; set; }
Whether the watchdog is armed.
public TimeSpan Period { get; set; }
The shortest interval between edges on the watchdog line.
Not a timer that produces edges: the watchdog offers a step on every check that passes, and a step arriving sooner than this is skipped so the camera's command channel is not saturated. Zero means "step on every passed check"; it does not mean "never step".
Bounded above by PifHardwareInfo.MaxFailSafePeriod: 250 milliseconds on every interface today. A longer period is refused with an SdkConfigurationException, not clamped: the interface's fail-safe relay is retriggered once per cycle and holds for about 1.1 seconds, so a period the relay cannot carry produces exactly the fault this line exists to report. Earlier releases accepted anything up to 60 seconds and called the result healthy.
Zero is what the hardware group would rather an application asked for: the SDK knows the frame rate and the interface, and a value chosen in an application cannot do better.
Carried as whole milliseconds: rounded, and never down to zero, since zero is the sentinel above. Asking for a period shorter than a millisecond gets one millisecond, still a rate limit, rather than no rate limit at all.
public PifSignal Signal { get; set; }
The line's electrical nature.
public bool TripOnAlarm { get; set; }
Not implemented. Setting this is refused.
Applying a configuration with this set throws FeatureNotSupportedException rather than accepting it and ignoring it, which is what earlier releases did. Drive an ordinary digital or analog output from the alarm instead, and keep the fail-safe line for camera and pipeline health.
public bool TripOnFlagTimeout { get; set; }
Not configured from here. Setting this is refused.
The shutter is watched by the camera, not by the process interface, and it is watched by default. Applying a configuration with this set throws FeatureNotSupportedException. No.NET surface configures the camera-side setting: it is a legacy value reachable only from a legacy configuration file, so this property has no replacement to point at rather than one you cannot reach.