optris_sdk_region_state
A dense per-frame view of one region, for a live display that repaints faster than it wants to walk the model.
Public attributes
struct_size
uint32_t struct_size
Set to sizeof(optris_sdk_region_state).
region_id
uint64_t region_id
The region this describes.
stats
optris_sdk_region_stats stats
Its measurement for the most recent frame.
alarm
optris_sdk_alarm_state alarm
The worst alarm state across the region's rules and its children's.
active_rules
uint16_t active_rules
How many of its rules are alarming.
warning_rules
uint16_t warning_rules
How many of its rules are in the warning band.
has_frame_metadata
int32_t has_frame_metadata
Non-zero when frame_sequence and frame_timestamp_us below name the capture these statistics were measured on.
Check this before reading either of them. Zero is a real sequence number -- the first frame of the stream -- and a real time stamp, so neither field has a value that can mean "nobody
said". The same rule, and the same reason, as optris_sdk_image::has_frame_metadata.
Zero before the first measuring pass of a camera or a replay, and zero for a store measured from a bare buffer with no capture behind it. Non-zero on every pass driven by a frame.
Why a caller wants it: Why a caller wants it The statistics are the fourth view of one capture, and they were the only one that could not say which capture. The SDK invokes the thermal callback before it runs the measuring pass, so a consumer holding frame N can read a store that still holds N-1 -- or N+k once it has fallen behind, which is worse because it looks current. Compare this against the sequence of the frame in hand and a stale read becomes visible instead of silent.
This is not a tolerated short struct: This is not a tolerated short struct Unlike optris_sdk_image, these are read as an array by optris_sdk_imager_read_region_states, which validates state_size for exact equality -- the library strides by its own sizeof and cannot do so safely over elements of another size. A caller compiled against a header without these three fields therefore receives OPTRIS_SDK_ERROR_INVALID_ARGUMENT and nothing written, rather than a struct that stops early. Recompile against this header.
frame_sequence
uint32_t frame_sequence
The capture's monotonic sequence number, the same value optris_sdk_frame_info::sequence carries for the thermal frame of that moment.
Meaningless unless has_frame_metadata is non-zero.
frame_timestamp_us
uint64_t frame_timestamp_us
When that capture was taken, in microseconds, the same value optris_sdk_frame_info::timestamp_us carries.
A stopwatch reading, not a date -- see that field for what the epoch is and is not. Order two states by frame_sequence and measure the interval between them with this.
Meaningless unless has_frame_metadata is non-zero.