OptrisOptrisDocumentation

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

optris::sdk::RegionState

A dense, per-frame view of one region, for a HUD.

Public attributes

region_id

uint64_t region_id = 0

the region this describes

stats

RegionStats stats

its measurement this frame

alarm

AlarmState alarm = AlarmState::kUnknown

worst state across its rules

active_rules

uint16_t active_rules = 0

How many rules are raised, counting this region's own and every descendant's. Rules, not regions: a region with three active rules reports 3.

warning_rules

uint16_t warning_rules = 0

How many rules sit in their warning band, over the same set.

Independent of active_rules and of alarm. A region with one active rule and one warning rule reports 1 and 1, and alarm kActive, because alarm is the worst of the two states while these count every rule in each.

has_frame_metadata

bool has_frame_metadata = false

Whether frame_sequence and frame_timestamp_us say anything.

False on a store that has not measured yet, and on one measured from a bare buffer with no capture behind it. Read this first. Sequence 0 is a real frame -- the first of the stream -- so no value of frame_sequence can mean "nobody said". Same shape and same reason as RawFrame::HasMetadata() and optris_sdk_image::has_frame_metadata.

frame_sequence

uint32_t frame_sequence = 0

Which captured frame these statistics were measured on.

Why this is here: Why this is here The statistics are the fourth view of one capture, and they used to be the only one that could not say which capture. ClientBridge invokes the thermal callback before it runs the measuring pass, so a consumer holding frame N reads a store that may still hold N-1 -- or N+k when the consumer has fallen behind, which is worse because it looks current. Without this field the mismatch was undetectable and a wrong value was read silently; with it a consumer can compare against the frame in its hand and say so.

It does not make the pairing exact. It makes it answerable, which is what separates a defect from a limitation.

frame_timestamp_us

uint64_t frame_timestamp_us = 0

That frame's FrameMetadata::timestamp_us.

The monotonic stopwatch reading, so two states can be ordered and an interval between them measured. Never a wall-clock date.