OptrisOptrisDocumentation

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

optris_sdk_frame_focus_reading

A lens position for a frame, and how far to trust it. Read with optris_sdk_frame_get_focus_reading().

optris_sdk_frame_get_focus() reports only positions from the frame itself. This reports those too, and also the status telegram's, so check source before treating a position as the frame's own.

Public attributes

struct_size

uint32_t struct_size

Set to sizeof(optris_sdk_frame_focus_reading).

known

uint8_t known

Non-zero when there is a reading. Zero when the camera's frames carry no position and it reports none beside the stream, before the SDK has placed the status telegram's encoder reading on the lens travel, when the last telegram is more than 5 seconds old, and for a frame from a session or a still. Every other field is zero then and means nothing.

reserved0

uint8_t reserved0[3]

Reserved; always zero.

fraction

float fraction

Where the lens was, as a fraction of its travel: 0.0 at the near end of optris_sdk_imager_get_focus_range(), 1.0 at the far end.

position

uint16_t position

The same position in the scale of optris_sdk_imager_get_focus_position(), so it can be sent back to the lens with optris_sdk_imager_set_focus_position() unchanged.

reserved1

uint16_t reserved1

Reserved; always zero.

source

optris_sdk_frame_focus_source source

Where the position came from.

age_ms

uint32_t age_ms

For OPTRIS_SDK_FRAME_FOCUS_SOURCE_STATUS_TELEGRAM: how many milliseconds before the frame was handed over the telegram arrived, plus how much later than the quickest recent telegram it came. The time the camera took to read its lens and send the telegram is not in it. At most 5000. Zero for a position from the frame.

arrived_us

uint64_t arrived_us

For OPTRIS_SDK_FRAME_FOCUS_SOURCE_STATUS_TELEGRAM: when the telegram reached this computer, in microseconds on the same clock as the frames' optris_sdk_frame_info::timestamp_us, which over Ethernet is also the computer's arrival time. So info.timestamp_us - arrived_us is how long before the frame arrived the telegram did, and two readings with the same arrived_us are the same telegram. It is when the telegram arrived, not when the camera read its lens. Zero for a position from the frame.