OptrisOptrisDocumentation

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

SnapshotAction

public sealed record SnapshotAction : AlarmAction, IEquatable<SnapshotAction>

Write a still image when the rule fires.

SnapshotAction: constructors

public SnapshotAction(SnapshotFormat Format = 0, string? Directory = null, string? NamePattern = null, Nullable<TimeSpan> MinimumInterval = default, SnapshotOptions? Options = null)

Write a still image when the rule fires.

  • Format: Which format.
  • Directory: Where to write, or null for the camera's output directory and then the working directory.
  • NamePattern: The file name, or null for {rule}_{timestamp}. {rule}, {region}, {serial}, {model}, {sequence}, {timestamp} and {timestamp_us} expand: one table, shared with interval capture. {timestamp} is a local YYYYmmdd_HHMMSS date and {sequence} is zero-padded to six digits; {timestamp_us} is the raw microsecond stamp {timestamp} used to produce.
  • MinimumInterval: The least time between two snapshots from this action. Rate-limited so an alarm chattering at the frame rate cannot fill a disk; null uses one second, and TimeSpan.Zero switches the limit off so that every activation writes a still. TimeSpan.Zero did not always do that: both it and null were sent to the SDK as 0 ms, and 0 on that ABI means "use the default", so an application that switched the limit off still got one second. Measured against an alarm activating sixteen times a second, it got one still a second. Switching it off is a real choice with a real cost: at a high frame rate a chattering alarm will write as fast as the disk accepts, and a still that cannot keep up is reported as ActionOutcome.DroppedQueueFull rather than written. Alarm events and process-interface outputs are unaffected: they no longer share a queue with stills.
  • Options: How to write the file: the compression level, the 16-bit TIFF variant and the fixed Kelvin-per-count scale. null means the defaults. The same type ThermalCamera.SaveSnapshot(…) takes, and that is the point: two stills of one frame must not differ by who asked for them. Until this existed an alarm still was written with the defaults whatever the application had chosen for its own, so a user who picked a 16-bit TIFF because their tool cannot read float32 got alarm stills that tool could not open.

SnapshotAction: properties

public string? Directory { get; init; }

Where to write, or null for the camera's output directory and then the working directory.

public SnapshotFormat Format { get; init; }

Which format.

public Nullable<TimeSpan> MinimumInterval { get; init; }

The least time between two snapshots from this action. Rate-limited so an alarm chattering at the frame rate cannot fill a disk; null uses one second, and TimeSpan.Zero switches the limit off so that every activation writes a still.

TimeSpan.Zero did not always do that: both it and null were sent to the SDK as 0 ms, and 0 on that ABI means "use the default", so an application that switched the limit off still got one second. Measured against an alarm activating sixteen times a second, it got one still a second.

Switching it off is a real choice with a real cost: at a high frame rate a chattering alarm will write as fast as the disk accepts, and a still that cannot keep up is reported as ActionOutcome.DroppedQueueFull rather than written. Alarm events and process-interface outputs are unaffected: they no longer share a queue with stills.

public string? NamePattern { get; init; }

The file name, or null for {rule}_{timestamp}. {rule}, {region}, {serial}, {model}, {sequence}, {timestamp} and {timestamp_us} expand: one table, shared with interval capture. {timestamp} is a local YYYYmmdd_HHMMSS date and {sequence} is zero-padded to six digits; {timestamp_us} is the raw microsecond stamp {timestamp} used to produce.

public SnapshotOptions? Options { get; init; }

How to write the file: the compression level, the 16-bit TIFF variant and the fixed Kelvin-per-count scale. null means the defaults.

The same type ThermalCamera.SaveSnapshot(…) takes, and that is the point: two stills of one frame must not differ by who asked for them. Until this existed an alarm still was written with the defaults whatever the application had chosen for its own, so a user who picked a 16-bit TIFF because their tool cannot read float32 got alarm stills that tool could not open.