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::Sdk::CalibrationAcquisitionScope

Applies one caller's calibration acquisition settings, and holds them in place until it goes out of scope.

The source list and the source directory above are one setting shared by every camera in the process, and they are read during connect rather than when they are set. A caller that sets them for its own camera and then connects is therefore racing any other caller doing the same: whichever set them last wins, and the loser silently connects with somebody else's calibration policy.

Construct one of these, connect, and let it go out of scope. The settings are applied on construction and no other holder can change them until it is destroyed.

optris::Sdk::CalibrationAcquisitionScope scope{"/mnt/cal", false};
imager->connect(serial);

The source order is fixed and reflects what each source costs: the camera's own memory first, which needs no network and no filesystem, then the caller's directory, then Optris. Disallowing the download drops Internet from the list entirely, so the request is never made rather than made and refused: an offline machine fails at once instead of waiting out a connection that cannot succeed.

Recursive: constructing a second scope on the same thread is permitted and reapplies the settings.

Public functions

CalibrationAcquisitionScope

OTC_SDK_API CalibrationAcquisitionScope(const std::string &sourceDirectory, bool allowInternetDownload)

Parameters

Name Description
sourceDirectory searched before the internet. Empty for none, which also drops Filesystem from the source list.
allowInternetDownload false drops Internet from the list.

Exceptions

Name Description
SDKException if sourceDirectory does not exist or is not a directory.

Note: sourceDirectory is read in the platform's narrow encoding (the ANSI code page on Windows). For a folder in UTF-8, use the version 12 ImagerConfig::calibration_path.

~CalibrationAcquisitionScope

OTC_SDK_API ~CalibrationAcquisitionScope()

Releases the lock. The settings themselves are left as applied.

CalibrationAcquisitionScope

CalibrationAcquisitionScope(const CalibrationAcquisitionScope &)=delete

operator=

CalibrationAcquisitionScope & operator=(const CalibrationAcquisitionScope &)=delete

CalibrationAcquisitionScope

CalibrationAcquisitionScope(CalibrationAcquisitionScope &&)=delete

operator=

CalibrationAcquisitionScope & operator=(CalibrationAcquisitionScope &&)=delete