OptrisOptrisDocumentation

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

These are the pre-v12 classes, kept so existing code keeps building. New code should use the modern API — see Migration Guide: v11 to v12.

optris::EnumerationDetector

Common interface for classes detecting available devices.

Public functions

EnumerationDetector

EnumerationDetector()=default

Constructor.

EnumerationDetector

EnumerationDetector(const EnumerationDetector &)=delete

No copy constructor.

operator=

EnumerationDetector & operator=(const EnumerationDetector &)=delete

No copy assignment.

EnumerationDetector

EnumerationDetector(EnumerationDetector &&)=delete

Move constructor.

operator=

EnumerationDetector & operator=(EnumerationDetector &&)=delete

Move assignment.

~EnumerationDetector

~EnumerationDetector()=default

Destructor.

detectDevices

void detectDevices(std::vector< DeviceInfo > &devices) noexcept=0

Detects available devices.

Parameters

Name Description
devices vector containing the already detected devices for this detector to add its own detections to it.

isNetworkDetector

bool isNetworkDetector() const noexcept

Returns whether this detector has to wait for a network to answer. A local bus can be read in milliseconds. A network detector broadcasts and then waits out a receive timeout for replies that may never come, which costs hundreds of milliseconds per network whether or not a camera is there. The EnumerationManager uses this to publish what the local detectors found without holding it behind the network ones -- before, a detection pass was atomic, so on a host with five subnets the first report of a USB camera waited 66 s for a broadcast it had nothing to do with.

Returns: true if detectDevices() waits on a network, false if it reads a local bus. False by default, which is the safe answer: a detector that is treated as local is merely run earlier, while a local one mistaken for a network one would delay the very report this exists to hurry.