optris::sdk::ShutterDeferral
What the while-recording policy is doing right now, and what it has cost.
The readback that makes FlagWhileRecording honest. A suppressed shutter cycle is invisible from outside -- the stream looks healthy, the temperatures look like temperatures, and the only difference is that they are wrong by an amount nobody is told. This says the amount.
Read with Detector::GetShutterDeferral(). Every field is zero or false on a camera that is not suppressing anything, which is every camera running the default.
Public attributes
policy_in_force
bool policy_in_force = false
Whether the policy can act at all right now.
False, and the two live fields -- deferring_now and drift_c -- left at false and zero, in four cases that are different problems for whoever has to act on them:
- no recording is running, so there is nothing to protect;
AutoNucConfig::while_recordingisFlagWhileRecording::kUse;AutoNucConfig::enabledis false, so there is no automatic schedule to hold in the first place;- a process-interface input owns the flag, so the SDK runs no cycle of its own and the setting is moot rather than working -- ask
Detector::IsShutterExternallyControlled()to tell this case from the others.
peak_drift_c and deferred_frames are deliberately not gated on this, and that is the point of them: the policy stops being in force the moment the recording stops, and those two are the summary that has to survive the file being closed. So a false here does not mean the struct is empty -- read the two summary fields after a take, not before.
An application showing a "flag suppressed" indicator should drive it from this and not from the configured mode. The two disagree exactly when the configuration cannot take effect, which is the case worth showing.
deferring_now
bool deferring_now = false
Whether a cycle is being held right now: one is due and the policy is refusing it. The frames arriving while this is true are the degraded ones.
drift_c
float drift_c = 0.0f
The worst of the three internal probes' drift since the last correction, as a difference in degrees of the SDK's temperature unit (kelvin-sized in Celsius, Fahrenheit-sized in Fahrenheit). The radiometric cost, as the scheduler measures it.
Zero until AutoNucConfig::min_interval_secs has elapsed since the last cycle, because the probes are read only once an interval has elapsed -- a cost the engine declines to pay on every frame. A zero here early in a recording is "not measured yet", not "no
drift".
peak_drift_c
float peak_drift_c = 0.0f
The largest drift_c reached since the current recording started, in the same unit. The single number to put beside a recording.
Reset when a recording starts, kept after it stops, so it is readable once the file is closed -- the same contract rec::RecordingStats has.
deferred_frames
uint32_t deferred_frames = 0
How many frames have been delivered with a correction overdue, since the current recording started.
Frames, and the name says frames, because that is the only unit this can honestly be counted in. The scheduler re-decides every frame, and a cycle it refuses stays due -- the interval keeps elapsing and the drift keeps growing -- so a refusal is not an event that happens once. Under kAvoid every frame from the first due cycle to the end of the take is counted, which on a ten-minute recording at 27 Hz is some sixteen thousand.
It was deferred_cycles and documented as being much larger than a count of cycles. A number that needs a paragraph explaining it is not what its name says is a number that will be quoted without the paragraph; nothing has shipped, so the name was fixed instead.
Read it against the frame count of the recording -- "16 000 of
16 200 frames were recorded uncorrected" is the sentence it supports -- and peak_drift_c for what that cost in drift.