optris_sdk_reconnect_config
How hard, and for how long, the SDK tries to re-open a camera that has gone. Mirrors optris::sdk::ReconnectConfig.
Initialise with optris_sdk_reconnect_config_init() before changing anything, so a field added later gets its default rather than whatever was on your stack.
Attempt n waits initial_delay_ms * backoff_multiplier^(n-1), capped at max_delay_ms. The delays are not politeness: a host resume re-enumerates USB over a second or two, and retrying as fast as possible in that window is how a recoverable drop becomes one that needs a real replug.
Public attributes
struct_size
uint32_t struct_size
Set to sizeof(optris_sdk_reconnect_config).
max_attempts
int32_t max_attempts
How many attempts before giving up. Zero or negative means keep trying for as long as the camera is open, which is what an unattended installation wants and what an interactive one does not.
initial_delay_ms
uint32_t initial_delay_ms
The wait before the first attempt, in milliseconds. Must be at least 1: a zero wait is a retry loop with no wait in it.
max_delay_ms
uint32_t max_delay_ms
The longest wait between attempts, however far the backoff has climbed, in milliseconds.
backoff_multiplier
float backoff_multiplier
How much longer each attempt waits than the one before. Must be at least 1.0 -- below that the wait shortens after every failure, which is the opposite of backing off.
reserved0
uint32_t reserved0
Reserved; always zero.