OptrisOptrisDocumentation

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

optris_sdk_device_monitor_options

What the device monitor watches for.

Public attributes

struct_size

uint32_t struct_size

Set to sizeof(optris_sdk_device_monitor_options).

watch_claims

uint8_t watch_claims

Non-zero to also report OPTRIS_SDK_DEVICE_CLAIMED and OPTRIS_SDK_DEVICE_RELEASED.

Off by default because it costs a poll: nothing in the operating system pushes a notification when a camera is claimed, so the only way to see the transition is to keep looking.

watch_network

uint8_t watch_network

Non-zero to also report cameras on the network.

Off by default, and the reason is cost: nothing reports a camera appearing on a network, so seeing one means broadcasting a discovery datagram and waiting for replies -- and silence takes as long to hear as an answer. A USB application should not pay that every few seconds.

With it set, a camera that answers discovery for the first time arrives as OPTRIS_SDK_DEVICE_ARRIVED and one that stops answering leaves as OPTRIS_SDK_DEVICE_REMOVED, described exactly as an enumeration with include_network would describe it. It is not instant -- up to one poll interval to appear, two to disappear, because one dropped reply is not a camera leaving -- and discovery is a broadcast, so a camera behind a router is invisible however healthy it is.

reserved0

uint8_t reserved0[2]

Reserved; always zero.

claim_poll_interval_ms

uint32_t claim_poll_interval_ms

How often to look, in milliseconds, when watch_claims is set. Zero uses the SDK default of 1000.

network_poll_interval_ms

uint32_t network_poll_interval_ms

How often to broadcast, in milliseconds, when watch_network is set. Zero uses the SDK default of 5000.

network_discovery_timeout_ms

uint32_t network_discovery_timeout_ms

How long one network pass may wait for replies, in milliseconds, when watch_network is set. Zero uses the SDK default of 2000. Must be comfortably shorter than network_poll_interval_ms or the poll never rests.