OptrisOptrisDocumentation

Documentation/OTC SDK/Optris.Sdk — C# API referencev12.0

ShutterCorrection

public sealed record ShutterCorrection : IEquatable<ShutterCorrection>

A closure made through the process interface, and what came of it.

Delivered to the handler given to ThermalCamera.OnShutterCorrection(…), once per closure, when the flag reopens, not when it shuts. Until it reopens there is no answer to give: the closure's own duration is the capture window.

ThermalCamera.LastShutterCorrection returns the most recent one, for a handler installed after a closure had already happened.

This is a different question from ShutterState.Error on the shutter notification. That one says the shutter did not move; this one says it moved and the closure was or was not long enough to correct from.

Example

camera.OnShutterCorrection(correction =>
{
    if (correction.Outcome == ShutterCorrectionOutcome.SkippedTooShort)
    {
        log.WriteLine($"break too short to correct: "
                      + $"{correction.FramesUsed} of "
                      + $"{correction.FramesRequired} frames in "
                      + $"{correction.Closed.TotalMilliseconds:F0} ms");
    }
});

ShutterCorrection: constructors

public ShutterCorrection(ShutterCorrectionOutcome Outcome, uint FramesUsed, uint FramesRequired, TimeSpan Closed, TimeSpan Timestamp, DateTimeOffset HostTime, ulong Sequence)

A closure made through the process interface, and what came of it.

  • Outcome: Whether the correction was applied, skipped, or applied below the floor because there was nothing to keep.
  • FramesUsed: Shut-flag frames the pipeline kept. Not the number of frames in the closure: the first is discarded, because the flag was still moving when its telemetry was sampled.
  • FramesRequired: The floor FramesUsed was judged against. Carried rather than documented because it is a change from version 11, which applied whatever it had collected whenever at least one frame was left and logged an error only at zero. A machine whose breaks are short behaves differently on v12, and this says by how much.
  • Closed: How long the flag was shut.
  • Timestamp: When the closure ended, on the SDK's monotonic clock. For timing; HostTime is for dating.
  • HostTime: The same moment as a date. Read in the same breath as Timestamp and not derived from it: this clock is steppable and that one is not. Stamped where the reopen is observed, which is the first frame after the flag moved, so it lags the movement by up to one frame period.
  • Sequence: Closures reported on this camera, from 1. Zero means none has been reported yet, which is what ThermalCamera.LastShutterCorrection answers for a camera whose flag no interface has taken, for a simulated camera and for a recording.

Delivered to the handler given to ThermalCamera.OnShutterCorrection(…), once per closure, when the flag reopens, not when it shuts. Until it reopens there is no answer to give: the closure's own duration is the capture window.

ThermalCamera.LastShutterCorrection returns the most recent one, for a handler installed after a closure had already happened.

This is a different question from ShutterState.Error on the shutter notification. That one says the shutter did not move; this one says it moved and the closure was or was not long enough to correct from.

Example

camera.OnShutterCorrection(correction =>
{
    if (correction.Outcome == ShutterCorrectionOutcome.SkippedTooShort)
    {
        log.WriteLine($"break too short to correct: "
                      + $"{correction.FramesUsed} of "
                      + $"{correction.FramesRequired} frames in "
                      + $"{correction.Closed.TotalMilliseconds:F0} ms");
    }
});

ShutterCorrection: properties

public TimeSpan Closed { get; init; }

How long the flag was shut.

public uint FramesRequired { get; init; }

The floor FramesUsed was judged against.

Carried rather than documented because it is a change from version 11, which applied whatever it had collected whenever at least one frame was left and logged an error only at zero. A machine whose breaks are short behaves differently on v12, and this says by how much.

public uint FramesUsed { get; init; }

Shut-flag frames the pipeline kept. Not the number of frames in the closure: the first is discarded, because the flag was still moving when its telemetry was sampled.

public bool HasReport { get; }

Whether anything has been reported on this camera at all.

false only for the placeholder ThermalCamera.LastShutterCorrection returns before the first closure. Every delivered report is true.

public DateTimeOffset HostTime { get; init; }

The same moment as a date. Read in the same breath as Timestamp and not derived from it: this clock is steppable and that one is not. Stamped where the reopen is observed, which is the first frame after the flag moved, so it lags the movement by up to one frame period.

public ShutterCorrectionOutcome Outcome { get; init; }

Whether the correction was applied, skipped, or applied below the floor because there was nothing to keep.

public bool ReferenceWasTaken { get; }

Whether a new dark reference came out of this closure, by either route.

The question most callers ask, answered once here so that nobody has to enumerate two of the three outcomes and get it wrong when a fourth is added.

public ulong Sequence { get; init; }

Closures reported on this camera, from 1. Zero means none has been reported yet, which is what ThermalCamera.LastShutterCorrection answers for a camera whose flag no interface has taken, for a simulated camera and for a recording.

public TimeSpan Timestamp { get; init; }

When the closure ended, on the SDK's monotonic clock. For timing; HostTime is for dating.