OptrisOptrisDocumentation

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

optris_sdk_nuc_cycle_report

What one SDK-commanded shutter cycle asked for, what it got, and what it did.

Delivered through optris_sdk_imager_set_nuc_cycle_callback(), once per cycle that reached a decision, at the moment the decision is taken. optris_sdk_imager_get_last_nuc_cycle() returns the most recent one, for a caller that registered its handler later.

Every number here was already computed once per cycle and went only to the log. A fifteen-camera host reported the symptom this is for: 24 cycles on one camera that all logged "Finalizing with 8 frames" and were indistinguishable from 24 good ones, while the tile showed a dark reference averaged from frames of the scene.

A cycle taken over by a process interface, or cut short by a mode switch, a reconnect or shutdown, never reaches a decision and publishes nothing. sequence is how a caller sees that: it counts cycles reported, so it does not advance.

Public attributes

struct_size

uint32_t struct_size

Set to sizeof(optris_sdk_nuc_cycle_report).

outcome

optris_sdk_nuc_cycle_outcome outcome

One of the optris_sdk_nuc_cycle_outcome values.

requested_camera_frames

uint32_t requested_camera_frames

The closure the SDK asked the camera for, in the camera's own frames.

The hardware is handed a count of its own frames and reopens by itself after that many; the SDK never commands the reopen. So this is not comparable with the received-frame counts below, and the two being different units is exactly what makes that comparison wrong. The conversion between them is delivery_share.

planned_frame_period_ms

float planned_frame_period_ms

The frame period the closure was planned at, in milliseconds, measured where frames arrive.

Carried because it is the input the plan was wrong about: on a host losing frames the measured period is longer than the camera's, and a closure computed from it alone came out shorter than a healthy one -- 25 frames at 32 Hz, 24 at 21, 21 at 10.

has_delivery_share

uint8_t has_delivery_share

Non-zero when delivery_share rests on a measurement.

Read this before delivery_share. A camera whose stream format carries no frame counter cannot be measured at all and reports a share of 0, which every caller inside the SDK reads as 1 -- the value assumed unconditionally before any of this existed, so an unmeasurable camera keeps exactly its old closure.

An application must be able to tell "the share is 1" from "nobody could measure it", and 0 is not that answer: it is a sentinel a reader would have to know about, and the two cases mean opposite things about whether a short cycle is the host's fault. So this flag says which, on the same convention optris_sdk_image::has_frame_metadata uses. When it is zero, delivery_share is 0 and expected_received_frames is the count a share of 1 implies.

ended_at_reopen

uint8_t ended_at_reopen

Non-zero when the capture ended because the camera's counter said its closure was spent, rather than because its frames were in hand.

Non-zero means the shutter reopened before the capture had what it needed. Always zero when camera_counter_span is 0.

reserved0

uint8_t reserved0[2]

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

delivery_share

float delivery_share

Arrivals per frame the camera took, over the frames before this cycle. 1 on a host receiving everything; 0 and meaningless when has_delivery_share is zero.

Counted where the transport hands the frame over, ahead of the subsampling and export gates, because those drop frames deliberately: measured after them a camera subsampled to 8 Hz would report 0.125 and be declared starved for as long as the subsampling lasted.

expected_received_frames

uint32_t expected_received_frames

How many frames the SDK expected the closure to deliver to the host, from requested_camera_frames and delivery_share.

Compare against frames_kept + frames_discarded. A gap is the host losing frames inside the closure.

camera_counter_span

uint32_t camera_counter_span

How far the camera's own frame counter advanced across the closure.

The only quantity on the frame that says how many frames there were rather than how many arrived. Zero when the stream format carries no counter.

frames_kept

uint32_t frames_kept

Shut-flag frames the pipeline accumulated into the new reference.

frames_discarded

uint32_t frames_discarded

Shut-flag frames deliberately thrown away at the start of the closure, because the flag was still moving when their telemetry was sampled.

frames_rejected_not_shut

uint32_t frames_rejected_not_shut

Frames the accumulation refused because the camera did not report the flag shut on them.

Scene frames that a window-based accumulation would have averaged into the dark reference. Non-zero means the closure and the frames arriving inside it had come out of step.

frames_target

uint32_t frames_target

How many kept frames the cycle was aiming for.

frames_floor

uint32_t frames_floor

The floor frames_kept was judged against. Below it the cycle is discarded.

capture_ms

uint32_t capture_ms

How long the accumulation ran, in milliseconds.

timestamp_us

uint64_t timestamp_us

When the decision was taken, in microseconds on the SDK's monotonic clock. For timing; host_time_us is for dating.

host_time_us

uint64_t host_time_us

The same moment as a date: microseconds since the Unix epoch.

Read in the same breath as timestamp_us and not derived from it. That clock is monotonic and this one is not -- see the long note on optris_sdk_shutter_event::host_time_us, which applies unchanged.

sequence

uint64_t sequence

Cycles reported on this camera, from 1.

Zero means no cycle has been reported yet, which is how optris_sdk_imager_get_last_nuc_cycle() says "nothing to report" without a second out-parameter. A simulated camera, a recording, and a camera on which every cycle so far was abandoned rather than decided all answer zero.