OptrisOptrisDocumentation

Documentation/OTC SDK/OTC SDK — C API referencev12.0

optris_sdk_condition

The alarm band, an optional warning band, and the temporal shaping applied to both.

Public attributes

struct_size

uint32_t struct_size

Set to sizeof(optris_sdk_condition).

compare

optris_sdk_compare compare

How the value is compared against the limits.

alarm

optris_sdk_limits alarm

The alarm band.

has_warning

int32_t has_warning

Non-zero if warning below is meaningful. A warning band is evaluated with the same compare, and an alarm always overrides a warning.

warning

optris_sdk_limits warning

The pre-alarm band. Ignored when has_warning is zero.

on_delay_ms

uint32_t on_delay_ms

How long the condition must hold before the state rises, in milliseconds. Zero reacts on the first observation.

This was on_delay_frames, a count of frames, until API version 12 -- same offset, same width, different unit, so a caller that passed 16 meaning "sixteen frames" now gets 16 ms and the compiler will not find it.

A frame count only meant a duration in combination with a frame rate, and the frame rate is a property of the operation mode, which an operator can change at any time from the same application. Sixteen frames was half a second on a 32 Hz camera and a full second on a 16 Hz one. The engine converts this to a count of frames from the interval it observes between them, so a mode change re-derives it with no caller involvement. A delay shorter than one frame interval debounces one frame, not zero.

off_delay_ms

uint32_t off_delay_ms

How long it must stop holding before the state falls, in milliseconds. Set independently of on_delay_ms, so an alarm can be slow to raise and quick to clear, or the reverse. Was off_delay_frames; see on_delay_ms.

latching

int32_t latching

Non-zero to stay active until acknowledged. Acknowledging a condition that still holds does not silence it -- see optris_sdk_imager_acknowledge_alarm().