OptrisOptrisDocumentation

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

optris_sdk_frame_rate_info

What rate frames arrive at, what was asked for, and the difference.

Public attributes

struct_size

uint32_t struct_size

Set to sizeof(optris_sdk_frame_rate_info).

valid

uint8_t valid

Non-zero when there was something to report. Every other field is zero otherwise.

export_restricted

uint8_t export_restricted

Non-zero when this camera is export-restricted, whatever is currently holding the rate.

A different question from reason, which is why it is a field and not an enumerator. reason answers what limits the rate right now; this answers whether the unit is restricted at all, which is a legal property of the hardware and is true whether or not a request is in force.

reason == OPTRIS_SDK_FRAME_RATE_EXPORT_RESTRICTED implies this, but not the other way round: a request below 9 fps on a restricted camera takes effect and reports OPTRIS_SDK_FRAME_RATE_AS_REQUESTED, so before this field existed such a unit could not be told from an unrestricted one for as long as the request stood.

One-way. It is a direct read of the export cap, and a cap is armed in one direction only -- nothing in this SDK takes one out of force. Read per frame it goes zero to non-zero on the frame the restriction takes hold and never back, across a mode switch or a reconnect. It is armed at the open from the control channel and later from the frames' own marker, so on a camera whose control channel could not be asked it may turn non-zero some frames into the stream. A camera that could not be asked at all counts as restricted, which is the fail-safe direction.

Zero on a simulated camera and on a recording: neither is a unit.

Spends one of the three bytes that used to be reserved here, so the struct's size is unchanged and no caller's struct_size became wrong. A caller compiled against an older header reads it as part of reserved0 and sees the zero it was promised only while the camera is unrestricted -- which is why this is documented as a field now rather than left to be discovered.

reserved0

uint8_t reserved0[2]

Reserved; always zero. Named so the struct has no implicit padding.

sensor_rate_hz

float sensor_rate_hz

The rate the sensor itself streams at in its active operation mode, in Hz.

requested_hz

float requested_hz

The rate that was asked for, in Hz, or 0 when none was.

effective_hz

float effective_hz

The rate the SDK actually delivers frames at, in Hz.

reason

optris_sdk_frame_rate_limit_reason reason

One of the optris_sdk_frame_rate_limit_reason values.

explanation

char explanation[OPTRIS_SDK_MAX_MESSAGE]

The reason in words, naming the rates behind it. Never empty when valid.