OptrisOptrisDocumentation

Documentation/OTC SDK/optris_sdk — Rust API referencev12.0

RegionState

pub struct RegionState

A dense per-frame view of one region.

What a live display should read, via crate::Camera::read_region_states: one lock and one copy for every region, rather than a getter call each.

RegionState — fields

region_id: u64

The region this describes.

stats: RegionStats

Its measurement for the most recent frame.

alarm: AlarmState

The worst alarm state across its rules and its children's.

active_rules: u16

How many of its rules are alarming.

warning_rules: u16

How many of its rules are in the warning band.

has_frame: bool

Whether frame_sequence and frame_timestamp_us name the frame these statistics were measured on.

Read this first. Sequence 0 is a real frame -- the first of the stream -- so no value of frame_sequence can mean "nobody said". False before the camera's first measuring pass.

frame_sequence: u32

Which captured frame these statistics were measured on.

The SDK delivers a frame before it runs the measuring pass, so a consumer holding frame N can read a store still holding N-1 -- or N+k once it has fallen behind. Comparing this against the frame in hand makes a stale read visible instead of silent Meaningless unless has_frame.

frame_timestamp_us: u64

When that frame was captured, in microseconds from the camera's start. A stopwatch reading, not a date. Meaningless unless has_frame.