optris::sdk::EnumerationOptions
Options for device enumeration.
Public attributes
include_simulated
bool include_simulated = false
Append synthetic cameras to the results. They need no hardware, so they are what the tools and tests exercise.
Lists whatever RegisterSimulatedDevice() has been given. If nothing has been registered, one built-in device is listed -- a PI 160 on serial 9990001, which is what this option has always produced and what the tools expect to find.
device_type_filter
std::optional< DeviceType > device_type_filter
Keep only this exact model. This is one DeviceType, not a family: filtering on kXi80 returns Xi 80 cameras and not Xi 400s.
Applied to the results, and it cannot be anything else: a camera's model is only known once the sweep has found it. Unlike connection_type_filter below, this makes a sweep no cheaper.
connection_type_filter
std::optional< ConnectionType > connection_type_filter
Keep only devices attached this way, and look only there.
This decides which sources are read rather than filtering what they returned, so it makes a sweep as cheap as it looks:
- kUsb reads the local buses and sends no broadcast, whatever include_network says -- a network camera could not have passed the filter anyway.
- kNetwork broadcasts and does not read the local buses.
- kSimulated reads nothing and sends nothing. It is the one request in this API that means "no hardware is to be touched", and it returns immediately. Pair it with include_simulated, which is what puts the synthetic cameras in the list.
include_network
bool include_network = false
Broadcast for cameras on the network as well as reading the local buses. Off by default: the broadcast and the wait for replies are the entire cost of a sweep, and a USB application should not pay it. A network camera is not returned unless this is set.
network_discovery_timeout
std::chrono::milliseconds network_discovery_timeout {3000}
How long the sweep may spend waiting for network discovery.