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::IRImager
Deprecated
Use optris::sdk::Imager instead. Backward-compatibility facade wrapping the new v12 Imager API.
Public types
FlagStateObserver
std::function< void(FlagState, std::uint64_t, std::uint64_t)> FlagStateObserver
Called on every flag state transition, with two timestamps of that transition in microseconds.
The second argument is the host monotonic clock (std::chrono::steady_clock) and the third is wall-clock time since the Unix epoch (std::chrono::system_clock). Both are read at the point the transition is published, one immediately after the other, so a consumer can correlate them. Neither is computed from the other: the system clock can be stepped by NTP or by an operator, and a wall-clock value reconstructed from a monotonic one would carry exactly the drift the caller is trying to escape.
FlagCorrectionObserver
std::function< void(const FlagCorrectionReport &)> FlagCorrectionObserver
Called once when a closure the SDK did not command ends, with what came of it.
A closure made through a process-interface input in Shutter Control is reported on the flag-state observer above; whether it was long enough to build a dark reference from is a different fact and is reported here. The two were deliberately not merged: FlagState has an Error value, and it already means the shutter did not move, which a closure too short to average is not.
Fired at the reopen, because until the flag opens the closure's duration -- which is the capture window -- is not known.
Public static functions
Create
static OTC_SDK_API std::shared_ptr< IRImager > Create()
Creates a legacy IRImager backed by the new v12 API. Replaces the deleted IRImagerFactory singleton.
Public functions
IRImager
IRImager()=default
Constructor.
IRImager
IRImager(const IRImager &)=delete
No copy constructor.
operator=
IRImager & operator=(const IRImager &)=delete
No copy assignment.
IRImager
IRImager(IRImager &&)=delete
No move constructor.
operator=
IRImager & operator=(IRImager &&)=delete
No move assignment.
~IRImager
~IRImager()=default
Destructor.
connect
void connect(IRImagerConfig config)=0
Connects to the device with the given configuration.
Note: If the serial number in IRImagerConfig is set to 0, the SDK will use the EnumerationManager to find a device to connect to. Its remaining data points will be ignored and the SDK will generate a default configuration for the detected device but without saving it.
Parameters
| Name | Description |
|---|---|
config |
configuration. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if connecting fails. |
connect
void connect(const DeviceInfo &deviceInfo)=0
Connects to the device with the given device information.
Note: If the serial number is set to 0, the SDK will use the EnumerationManager to find a device to connect to.
Parameters
| Name | Description |
|---|---|
deviceInfo |
device information. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if connecting fails. |
connect
void connect(unsigned long serialNumber)=0
Connects to the device with the given serial number.
Note: If the serial number is set to 0, the SDK will use the EnumerationManager to find a device to connect to.
Parameters
| Name | Description |
|---|---|
serialNumber |
of the device. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if connecting fails. |
disconnect
void disconnect() noexcept=0
Disconnects from the current device.
isConnected
bool isConnected() const noexcept=0
Returns whether a connection is established.
Returns: true if a connection is established. False otherwise.
addClient
bool addClient(IRImagerClient *client) noexcept=0
Adds an observer/client that will be updated when new data arrives.
Parameters
| Name | Description |
|---|---|
client |
callback client. |
Returns: true, if the client was added. False otherwise.
removeClient
bool removeClient(IRImagerClient *client) noexcept=0
Removes the given observer/client.
Parameters
| Name | Description |
|---|---|
client |
to remove. |
Returns: true, if the client was removed. False otherwise.
run
bool run()=0
Runs the processing loop continuously. Blocks until stopRunning() or disconnect() is called from another thread or until the IRImager instance is destroyed.
Note: After invoking run() it can take a very brief amount of time until isRunning() changes to true.
Returns: true, if the processing loop ran successfully. False, if the processing loop is already running (e.g. in another thread) or if not connected.
See also: stopRunning(), disconnect(), isRunning()
runAsync
bool runAsync()=0
Runs the processing loop continuously in a dedicated thread. Runs until stopRunning() or disconnect() is called from another thread or until the IRImager instance is destroyed.
Note: All callback methods of a registered client now are called from this processing thread.
Returns: true, if the thread started within five seconds. False, if the thread did not start in time or if the processing loop is already running or if not connected.
See also: stopRunning(), disconnect(), isRunning()
stopRunning
void stopRunning()=0
Stops the continuously running processing loop.
isRunning
bool isRunning() const noexcept=0
Returns whether the processing loop is currently running.
Returns: true if the processing loop is running. False otherwise.
skipStartupCalibration
bool skipStartupCalibration() noexcept=0
Skips an active startup (re)calibration that is performed every time the processing loop is run. Will have not effect if a startup (re)calibration is not active.
Attention: Skipping the startup calibration may lead to inaccurate temperature measurements and should only be used for testing and debugging purposes.
Returns: true if a startup (re)calibration was skipped. False otherwise.
setProcessingOutputs
void setProcessingOutputs(const ProcessingOutputConfig &outputs)=0
Sets which outputs should be computed and provided by the SDK.
Parameters
| Name | Description |
|---|---|
outputs |
configuration specifying which outputs should be computed and provided. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
getProcessingOutputs
ProcessingOutputConfig getProcessingOutputs() const noexcept=0
Returns which outputs are currently configured to be computed and provided by the SDK.
Returns: configuration specifying which outputs are currently configured to be computed and provided by the SDK or a default configuration if not connected.
setProcessingMaxResultPoolSize
void setProcessingMaxResultPoolSize(unsigned int maxPoolSize)=0
Sets the maximum number of processing results that are pooled for reuse to avoid unnecessary allocations. Buffers for processing results are added as needed but will not exceed the specified maximum pool size. An insufficient pool size may lead to overriding of already existing results or to waits that will slow down processing. Keep your callback implementations concise and fast to avoid such situation.
Parameters
| Name | Description |
|---|---|
maxPoolSize |
maximum number of processing results that are pooled for reuse. If set to 0, the pool size will be set to 1. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
getProcessingMaxResultPoolSize
unsigned int getProcessingMaxResultPoolSize() const noexcept=0
Returns the maximum number of processing results that are pooled for reuse to avoid unnecessary allocations. This only returns the maximum pool size but not the actual number of currently pooled processing results.
Returns: maximum number of processing results that are pooled for reuse.
getDeviceType
DeviceType getDeviceType() const =0
Returns the type of device the IRImager is connected to.
Returns: type of device the IRImager is connected to or unknown if not connected.
getSerialNumber
unsigned long getSerialNumber() const =0
Returns the serial number of the connected device.
Returns: serial number of the connected device or 0 if not connected.
getHardwareRevision
unsigned int getHardwareRevision() const =0
Returns the hardware revision of the connected device.
Returns: hardware revision number of the connected device or 0 if not connected.
getFirmwareRevision
unsigned int getFirmwareRevision() const =0
Returns the firmware revision of the connected device.
Returns: firmware revision number of the connected device or 0 if not connected.
getConfig
IRImagerConfig getConfig()=0
Returns the current configuration.
Returns: current configuration.
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
saveConfig
void saveConfig()=0
Saves the current configuration. The configuration is saved to the default location on the filesystem.
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected or if saving the configuration fails. |
getConnectionInterface
std::string getConnectionInterface() const noexcept=0
Returns the name of the connection interface used to communication with the device.
Returns: name of the connection interface used to communication with the device or an empty string if not connected.
getIpAddress
IpAddress getIpAddress() const noexcept=0
Returns the IP address of the connected device.
Note: The returned value is only relevant when connected to an Ethernet device.
Returns: IP address of the connected device, or the unspecified address 0.0.0.0 if not connected. v11 answered 192.168.0.101 here, which is a plausible camera address and so indistinguishable from a real answer; 0.0.0.0 cannot be mistaken for one.
getPort
Port getPort() const noexcept=0
Returns the number of the port on which the device data is received.
Note: The returned value is only relevant when connected to an Ethernet device.
Returns: number of the port on which the device data is received, or 0 if not connected. v11 answered 50101, the default camera port, which a caller could not tell from a real one.
getOperationModes
std::vector< OperationMode::ConstShared > getOperationModes()=0
Returns the operation modes for the currently connected device. Each operation mode holds a valid combination of optics, temperature range and video format settings for the currently connected device. The returned container is always sorted in an ascending order based on the optics, temperature range and video format properties. With OperationMode::getIndex() you can conveniently inquire a mode for its index within the returned container.
Returns: operation modes for the currently connected device.
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
See also: OperationMode::getIndex()
setActiveOperationMode
void setActiveOperationMode(const OperationMode::ConstShared &mode)=0
Sets the active operation mode for the currently connected device. Each operation mode holds a valid combination of optics, temperature range and video format settings for the currently connected device.
Parameters
| Name | Description |
|---|---|
mode |
to set active. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected, if mode is not supported by device or if applying the mode fails. |
setActiveOperationMode
void setActiveOperationMode(int opticsFieldOfView, const std::string &opticsText, float temperatureLowerLimit, float temperatureUpperLimit, int width, int height, int framerate)=0
Sets the active operation mode for the currently connected device. Each operation mode holds a valid combination of optics, temperature range and video format settings for the currently connected device.
Note: You can use "wildcards", if you do not want to specify the optics, temperature range or video format explicitly: - optics : set opticsFieldOfView to 0 AND leave opticsText empty. - temperature range: set temperatureLowerLimit AND temperatureUpperLimit to 0. - video format : set width, height AND framerate to 0.
Parameters
| Name | Description |
|---|---|
opticsFieldOfView |
in degrees. |
opticsText |
further specifying the optics if the field of view is not unique enough. |
temperatureLowerLimit |
in degree Celsius (not extended). |
temperatureUpperLimit |
in degree Celsius (not extended). |
width |
in pixel of the output frame. |
height |
in pixel of the output frame. |
framerate |
in Hz (not sub-sampled). |
Exceptions
| Name | Description |
|---|---|
SDKException |
SDKException if not connected, if mode is not supported by device or if applying the mode fails. |
getActiveOperationMode
OperationMode::ConstShared getActiveOperationMode()=0
Returns the active operation mode for the currently connected device. Each operation mode holds a valid combination of optics, temperature range and video format settings for the currently connected device.
Returns: active operation mode for the currently connected device.
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
setSoSCorrectionEnabled
void setSoSCorrectionEnabled(bool enable)=0
Enables or disables the Size of Source Correction.
Parameters
| Name | Description |
|---|---|
enable |
indicates whether to enable or disable the Size of Source Correction. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
isSoSCorrectionEnabled
bool isSoSCorrectionEnabled() const noexcept=0
Checks if the Size of Source Correction is enabled.
Returns: true if the Size of Source Correction is enabled. False if disabled or if not connected.
setRdcMode
void setRdcMode(RdcMode rdcMode)=0
Sets the mode of radial distortion correction (RDC).
Note: This method is only relevant for devices and operation modes that feature a significant radial distortion and support RDC.
Parameters
| Name | Description |
|---|---|
rdcMode |
the RDC mode to set. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected or if setting the RDC mode fails. |
getRdcMode
RdcMode getRdcMode() const =0
Returns the mode of radial distortion correction (RDC).
Note: This method is only relevant for devices and operation modes that feature a significant radial distortion and support RDC.
Returns: the current RDC mode.
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected or if retrieving the RDC mode fails. |
setTemperatureRangeExtensionEnabled
void setTemperatureRangeExtensionEnabled(bool enabled)=0
Die-/Enables temperature range extension.
Attention: Extended temperature ranges feature poor precision and should not be used for measurements. The main purpose of this feature is to give users an easier time to physically align the field of view of the device when a temperature range has a high lower limit.
Note: Not all temperature ranges can be extended.
Parameters
| Name | Description |
|---|---|
enabled |
if true temperature range extension is enabled. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if setting enabled failed or if not connected. |
isTemperatureRangeExtensionEnabled
bool isTemperatureRangeExtensionEnabled() const noexcept=0
Returns whether the temperature ranges are being extended.
Note: Not all temperature ranges can be extended.
Returns: true, if the temperature ranges are being extended. False, otherwise or if not connected.
See also: OperationMode::isTemperatureRangeExtended(), OperationMode::isTemperatureRangeExtendable()
setTemperatureHighPrecisionEnabled
void setTemperatureHighPrecisionEnabled(bool enabled)=0
Dis-/Enables high precision temperature measurements.
Note: Not all temperature ranges on all devices feature high precision temperature measurements.
Parameters
| Name | Description |
|---|---|
enabled |
if true high temperature measurements are enabled. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if setting enabled failed or if not connected. |
isTemperatureHighPrecisionEnabled
bool isTemperatureHighPrecisionEnabled() const noexcept=0
Returns whether high precision temperature measurements are enabled.
Note: Not all temperature ranges on all devices feature high precision temperature measurements.
Returns: true, if high precision temperature measurements are enabled. False, otherwise or if not connected.
See also: OperationMode::isTemperatureHighPrecision(), OperationMode::isTemperatureHighPrecisionAvailable()
getWidth
int getWidth() const noexcept=0
Returns the width in pixels of the thermal frame.
Returns: width in pixels of the thermal frame, i.e. number of columns or 0 if not connected.
getHeight
int getHeight() const noexcept=0
Returns the height in pixels of thermal frame.
Returns: height in pixels of the thermal frame, i.e. number of rows or 0 if not connected.
getSubsampledFramerate
float getSubsampledFramerate() const noexcept=0
Returns the subsampled framerate.
Returns: the subsampled framerate or a value <= 0 if not connected or if no subsampling is performed.
setSubsampledFramerate
void setSubsampledFramerate(float subsampledFramerate)=0
Sets the subsampled framerate.
Note: The subsampling is performed by the SDK. The subsampled framerate has no effect on the framerate with which the devices send frame data.
Parameters
| Name | Description |
|---|---|
subsampledFramerate |
to set. Provide a value less or equal to 0 to deactivate subsampling. If the value is higher than the framerate of the currently active operation mode, no subsampling will occur. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
addMeasurementField
MeasurementField::ConstShared addMeasurementField(const MeasurementFieldConfig &config)=0
Adds a measurement field that is processed for every new thermal frame. The newly added measurement field will always be drawn on top of the already existing measurement fields. The thermal frame will remain in the background. IRImagerClient::onMeasurementFieldAdded() is called when the field was updated with new thermal data.
Parameters
| Name | Description |
|---|---|
config |
of the measurement field to add. |
Returns: smart pointer to the added measurement field.
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected or if the measurement field is not completely within the thermal frame or if adding it failed. |
removeMeasurementField
void removeMeasurementField(const MeasurementField::ConstShared &field)=0
Removes the given measurement field. The measurement field instance is only destroyed when the smart pointer field is released. The ID of the removed measurement field is set to the invalid value of -1 to indicate its successful removal.
Attention: Removing a measurement field can have the following consequences: - PIF analog output channels using the field turn themselves off automatically. - Alarm channel using the field turn orphaned and are subsequently removed.
Parameters
| Name | Description |
|---|---|
field |
to remove. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected or if the measurement field does not exist for this imager instance. |
getMeasurementFields
std::vector< MeasurementField::ConstShared > getMeasurementFields() const noexcept=0
Returns all active measurement fields ordered by their index. The measurement fields are ordered by their render tier. Fields with a higher index are drawn on top of fields with a lower index.
Returns: All active measurement fields ordered by their index or an empty container if not connected.
getMeasurementFieldCount
int getMeasurementFieldCount() const noexcept=0
Returns the number of active measurement fields.
Returns: number of active measurement fields or 0 if not connected.
updateMeasurementField
void updateMeasurementField(const MeasurementField::ConstShared &field, const MeasurementFieldConfig &config)=0
Updated the configuration of a measurement field.
Parameters
| Name | Description |
|---|---|
field |
to update. |
config |
to update the measurement field with. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected, if the measurement field does not exist for this imager or the configuration cannot be applied. |
swapMeasurementFieldIndices
void swapMeasurementFieldIndices(std::uint32_t index1, std::uint32_t index2)=0
Swaps the indices of two measurement fields. The measurement field indices determine the render tier of the measurement fields. Fields with a higher index are drawn on top of fields with a lower index. The thermal frame is always in the background.
Parameters
| Name | Description |
|---|---|
index1 |
first index to swap. |
index2 |
second index to swap. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected, if the indices do not exist or if the provided indices are identical. |
addAlarmChannel
AlarmChannel::ConstShared addAlarmChannel(const AlarmChannelConfig &config)=0
Adds a new alarm channel.
Parameters
| Name | Description |
|---|---|
config |
of the new alarm channel to add. |
Returns: smart pointer to the added alarm channel.
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected or if adding the channel failed. |
removeAlarmChannel
void removeAlarmChannel(const AlarmChannel::ConstShared &channel)=0
Removes the given alarm channel. The alarm channel instance is only destroyed when the smart pointer alarm is released. The ID of the removed alarm channel is set to the invalid value of -1 to indicate its successful removal.
Parameters
| Name | Description |
|---|---|
channel |
to remove. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected or if the given alarm channel does not exist for this imager instance. |
getAlarmChannels
std::vector< AlarmChannel::ConstShared > getAlarmChannels() const noexcept=0
Returns all current alarm channels. They are sorted based on their IDs.
Returns: all current alarm channels or an empty container if not connected.
getAlarmChannelStatuses
std::vector< AlarmChannelStatus > getAlarmChannelStatuses() const noexcept=0
Returns the status of all current alarm channels. They are sorted based on the ID of the corresponding alarm channel.
Returns: status of all current alarm channels or an empty container if not connected.
getAlarmChannelCount
int getAlarmChannelCount() const noexcept=0
Returns the count of all current alarm channels.
Returns: count of all current alarm channels.
updateAlarmChannel
void updateAlarmChannel(const AlarmChannel::ConstShared &channel, const AlarmChannelConfig &config)=0
Updates the configuration of an alarm channel.
Parameters
| Name | Description |
|---|---|
channel |
to update. |
config |
to update the alarm channel with. |
setAutoFlagEnabled
void setAutoFlagEnabled(bool enable)=0
Sets the automatic triggering of flag cycles en-/disabled.
Parameters
| Name | Description |
|---|---|
enable |
or disable automatic triggering of flag cycles. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
isAutoFlagEnabled
bool isAutoFlagEnabled() const noexcept=0
Returns whether flag cycles are triggered automatically.
Returns: true, if flag cycles are triggered automatically. False is automatic triggering is diabled or if not connected.
setFlagInterval
void setFlagInterval(float minInterval, float maxInterval)=0
Sets the minimum and maximum flag intervals in seconds.
Parameters
| Name | Description |
|---|---|
minInterval |
minimal time in seconds that has to elapse before a new flag cycle is triggered. |
maxInterval |
maximum time in seconds that can elapse until a new flag cycle is triggered. Set to 0 to deactivate. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if provided intervals are negative or not connected. |
getFlagMinInterval
float getFlagMinInterval() const noexcept=0
Returns the minimum flag interval in seconds. Minimum time that has to elapse before a new flag cycle is triggered.
Returns: minimum flag interval in seconds or 0 if not connected.
getFlagMaxInterval
float getFlagMaxInterval() const noexcept=0
Returns the maximum flag interval in seconds. Maximum time that can elapse before a new flag cycle is triggered.
Returns: maximum flag interval in seconds or 0 if not connected.
setFlagDriftThreshold
void setFlagDriftThreshold(float threshold)
Sets how far an internal temperature probe may drift, in °C, before a flag cycle is due.
Once the minimum interval has elapsed, the box, chip and flag probes are compared against their readings at the last cycle, and a cycle is triggered when the largest of those three changes exceeds this threshold. The maximum interval still forces a cycle regardless of drift.
A larger threshold means fewer interruptions and more drift between corrections; a smaller one the reverse. The default, 0.1 °C, is the value this was hard-coded to before it was settable.
Not pure: an implementation with no drift-driven schedule of its own ignores it.
Parameters
| Name | Description |
|---|---|
threshold |
in °C. Must be greater than zero. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if the threshold is not positive, or if not connected. |
getFlagDriftThreshold
float getFlagDriftThreshold() const noexcept
Returns the drift threshold in °C.
Returns: the threshold in °C, or 0 if not connected.
setFlagWhileRecording
void setFlagWhileRecording(int policy, float overrideDriftC)
Sets what a running recording does to the flag schedule.
See IRImagerConfig::flagWhileRecording for the three values. The override is only consulted by policy 2 and is not validated here; the public setter refuses the zero-override pair.
Not pure: an implementation with no schedule of its own ignores it. Storing it is still required of one that reports it back.
Parameters
| Name | Description |
|---|---|
policy |
0 use, 1 avoid, 2 avoid unless drift. |
overrideDriftC |
drift in °C that overrides policy 2. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
getFlagWhileRecording
int getFlagWhileRecording() const noexcept
Returns the while-recording policy in force.
Returns: 0, 1 or 2 as above, or 0 if not connected.
getFlagRecordingOverrideDrift
float getFlagRecordingOverrideDrift() const noexcept
Returns the drift in °C that overrides policy 2.
Returns: the override in °C, or 0 if not connected.
setFlagDriftProbes
void setFlagDriftProbes(int probes)
Selects which internal probes the drift arm may consult.
Not pure, for the same reason setFlagWhileRecording() is not: an implementation with no schedule of its own ignores it.
Parameters
| Name | Description |
|---|---|
probes |
0 box, chip and flag (v11's behaviour and the default); 1 box and chip only. An unrecognised value is treated as 0, so an unknown selection never silences a probe. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
getFlagDriftProbes
int getFlagDriftProbes() const noexcept
Returns which probes the drift arm consults.
Returns: 0 or 1 as above, or 0 if not connected.
setFlagDriftFilter
void setFlagDriftFilter(float seconds)
Sets the time constant for filtering the probes before the drift arm compares them.
Not pure, for the same reason setFlagWhileRecording() is not: an implementation with no schedule of its own ignores it.
Parameters
| Name | Description |
|---|---|
seconds |
the time constant in seconds. 0 compares one frame's raw reading, which is v11's behaviour and the default. Negative values are treated as 0. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
getFlagDriftFilter
float getFlagDriftFilter() const noexcept
Returns the probe filter's time constant.
Returns: the time constant in seconds, or 0 if not connected.
setFlagDriftBandSteps
void setFlagDriftBandSteps(int steps)
Sets the deadband floor in multiples of each probe's own smallest observed change.
Not pure, for the same reason setFlagWhileRecording() is not.
Parameters
| Name | Description |
|---|---|
steps |
how many of the probe's own counts the deadband is at least. 0 uses the drift threshold alone, which is v11's behaviour and the default. Negative values are treated as 0. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
getFlagDriftBandSteps
int getFlagDriftBandSteps() const noexcept
Returns the deadband floor in probe counts.
Returns: the number of counts, or 0 if not connected.
setRecordingActive
void setRecordingActive(bool active)
Tells the engine whether a recording is being written.
The one fact the flag scheduler cannot find out for itself: the recorder lives above this interface and nothing below it holds a pointer upwards. Pushed down on every start and stop, in the same one-way style as setFlagStateObserver().
A true edge resets the deferral counters, so getPeakFlagDriftC() and getDeferredFlagFrameCount() describe the current recording and not every recording the camera has made. Kept after a false edge, so they are readable once the file is closed -- the contract rec::RecordingStats has.
Idempotent: setting the value it already holds resets nothing.
isFlagDeferralInForce
bool isFlagDeferralInForce() const noexcept
Whether the while-recording policy can act at all.
False when no recording is running, when the policy is 0, when the automatic schedule is off, and while the flag is externally controlled -- that last case being the one where a configuration that was accepted does nothing.
isDeferringFlagCycle
bool isDeferringFlagCycle() const noexcept
Whether a cycle is being held right now.
getFlagDriftC
float getFlagDriftC() const noexcept
The worst probe drift since the last cycle, in °C.
Zero until the minimum interval has elapsed, because that is when the probes are read. Not a measurement of no drift.
getPeakFlagDriftC
float getPeakFlagDriftC() const noexcept
The largest drift reached since the current recording started, in °C.
getDeferredFlagFrameCount
std::uint32_t getDeferredFlagFrameCount() const noexcept
How many scheduled cycles have been held since the current recording started.
A count of refused decisions, one per frame on which a cycle stayed due, not a count of corrections missed.
forceFlagEvent
void forceFlagEvent(float time=0.F)=0
Force a flag cycle manually.
Parameters
| Name | Description |
|---|---|
time |
point of time in future in milliseconds, when the shutter flag should be closed. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
isFlagOpen
bool isFlagOpen() const noexcept=0
Returns whether the shutter flag is open.
Returns: true if the shutter flag is open. False if the shutter flag is closed or if not connected.
isNucInProgress
bool isNucInProgress() const noexcept
isFlagExternallyControlled
bool isFlagExternallyControlled() const noexcept
Whether the shutter flag belongs to something other than the SDK.
True while a process-interface input is configured as Shutter Control: the camera firmware then drives the flag from that pin and the SDK runs no cycle of its own -- no automatic cycle, no startup calibration, and forceFlagEvent() is refused. The host still computes the correction; the firmware only moves the flag.
Default false, which is the honest answer for an imager that has no process interface to hand the flag to -- a simulated camera, a recording, or a camera with no PIF attached.
flagSourcePifChannelIndex
int flagSourcePifChannelIndex() const noexcept
Which process-interface input owns the flag.
Only meaningful while isFlagExternallyControlled() is true; it is the channel index of the input configured as Shutter Control, which is what a PIF-domain signal on the flag is indexed by. There is one flag per camera, so this says which pin is driving it rather than which of several flags is meant.
setFlagStateObserver
void setFlagStateObserver(FlagStateObserver observer) noexcept
Be told when the flag state changes, rather than polling.
The frame stream cannot carry this: on a live camera the frames captured while the flag is closed are never dispatched, because the sensor is looking at the flag rather than at the scene. This is the only push channel for the shutter.
The observer is invoked on whichever internal thread performed the transition -- the flag cycle thread for a real camera, the frame thread for a simulated one -- so it must be quick and must not call back into the imager.
Replaces any previous observer; an empty function removes it. Implementations that cannot report the flag ignore this, which is why it is not pure.
Parameters
| Name | Description |
|---|---|
observer |
the observer, or an empty function. |
setFlagCorrectionObserver
void setFlagCorrectionObserver(FlagCorrectionObserver observer) noexcept
Be told what came of each externally driven closure.
Invoked on the frame thread, from inside the frame that reported the reopen, so it must be quick and must not call back into the imager.
Replaces any previous observer; an empty function removes it. Implementations whose flag no interface can take ignore this, which is why it is not pure.
Parameters
| Name | Description |
|---|---|
observer |
the observer, or an empty function. |
setFlagForecastEnabled
void setFlagForecastEnabled(bool enable)=0
Set the shutter flag forecast en-/disabled.
Parameters
| Name | Description |
|---|---|
enable |
of disable the shutter flag forecast. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
isFlagForecastEnabled
bool isFlagForecastEnabled() const noexcept=0
Returns whether the shutter flag forecast is en-/disabled.
Returns: true if the shutter flag forecast is enabled. False if flag forecast is disabled or if not connected.
getTemperatureFlag
float getTemperatureFlag() const noexcept=0
Returns the temperature of the shutter flag in °C.
Returns: temperature of the shutter flag in °C or INVALID_TEMPERATURE if not connected or 35.0 °C if connected but processing has not yet started (s. run() and runAsync()).
getTemperatureBox
float getTemperatureBox() const noexcept=0
Returns the temperature of the device housing in °C.
Returns: temperature of the device housing in °C or INVALID_TEMPERATURE if not connected or 35.0 °C if connected but processing has not yet started (s. run() and runAsync()).
getTemperatureChip
float getTemperatureChip() const noexcept=0
Returns the temperature of the sensor chip.
Returns: temperature of the sensor chip in °C or INVALID_TEMPERATURE if not connected or 35.0 °C if connected but processing has not yet started (s. run() and runAsync()).
setChipHeatingMode
void setChipHeatingMode(ChipHeatingMode mode, float temperature=40.F)=0
Sets the provide mode for heating the sensor chip.
Parameters
| Name | Description |
|---|---|
mode |
indicating the heating mode. |
temperature |
target temperature for fixed mode in °C. Its value is automatically clamped to [20., 55.] °C. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
getChipHeatingMode
ChipHeatingMode getChipHeatingMode() const noexcept=0
Returns the current sensor chip heating mode.
Returns: current sensor chip heating mode or ChipHeatingMode::Floating if not connected.
getChipHeatingTemperature
float getChipHeatingTemperature() const noexcept=0
Returns the the target temperature in °C for the sensor chip heating.
Note: The actual sensor chip temperature can be accessed with IRImager::getTemperatureChip().
Returns: target temperature in °C for the sensor chip heating or INVALID_TEMPERATURE if not connected or if the heating mode is not fixed.
getEmissivitySource
RadiationParameterSource getEmissivitySource() const noexcept=0
Returns the source that currently defines the emissivity for the thermal frame.
Returns: source that currently defines the emissivity for the thermal frame or RadiationParameterSource::Sdk if not connected.
getAmbientTemperatureSource
RadiationParameterSource getAmbientTemperatureSource() const noexcept=0
Returns the source that currently defines the ambient temperature for the thermal frame.
Returns: source that currently defines the ambient temperature for the thermal frame or RadiationParameterSource::Sdk if not connected.
setRadiationParameters
void setRadiationParameters(const RadiationParameters &radiation)=0
Sets the radiation parameters (emissivity, transmissivity and ambient temperature).
Parameters
| Name | Description |
|---|---|
radiation |
parameters to set. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected or if parameters are invalid or if setting the parameters fails. |
getRadiationParameters
RadiationParameters getRadiationParameters() const noexcept=0
Returns the set/configured radiation parameters.
Attention: The radiation parameters may be modified via the process interface (PIF) and through automated ambient temperature estimations. This method return the parameters set in the configuration or vis IRImager::setRadiationParameters(). To get the actually applied parameters see the FrameMetadata::getRadiationParameters() for the thermal frame and the MeasurementField::getRadiationParameters() for measurement fields.
Returns: the set/configured radiation parameters or their default values if not connected.
setFocusMotorPosition
void setFocusMotorPosition(float position)=0
Sets the position of the focus motor. The position should be in [0, 100] %. If not, the position will automatically be clipped.
Parameters
| Name | Description |
|---|---|
position |
focus motor position in %. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected or if no focus motor is available. |
getFocusMotorPosition
float getFocusMotorPosition() const =0
Returns the position of the focus motor.
Returns: focus motor position in % or -1.0 if not connected or if no focus motor is available.
setReferenceTemperature
void setReferenceTemperature(float referenceTemperature, float measuredTemperature, float ambientTemperature=INVALID_TEMPERATURE)=0
Sets a reference temperature to a known reference source inside the view of the device to improve measurement accuracy.
Parameters
| Name | Description |
|---|---|
referenceTemperature |
real temperature of reference source. |
measuredTemperature |
measured temperature from the device of reference source. |
ambientTemperature |
in °C. Set it to INVALID_TEMPERATURE or less to force the SDK to estimate the ambient temperature based on thermal probe readings of the device. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
resetReferenceTemperature
void resetReferenceTemperature()=0
Resets a previously set reference temperature.
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
setDeviceNetworkConfig
bool setDeviceNetworkConfig(const DeviceNetworkConfig &networkConfig)=0
Sets the network configuration of the device. The SDK tries to retain an active Ethernet connection. This, however, is only possible if the following settings were changed:
- device IP address
- destination port In any other case the SDK considers the connection lost and triggers the IRImagerClient::onConnectionLost() callback which a client should use to call
disconnect(). Parameters | Name | Description | | --- | --- | |networkConfig| to set. | Exceptions | Name | Description | | --- | --- | |SDKException| if not connected of if the device does not support Ethernet or if setting the device network configuration failed. | Returns: true, if the device connection was retained. False otherwise. See also: IRImagerClient::onConnectionLost()
getDeviceNetworkConfig
DeviceNetworkConfig getDeviceNetworkConfig()=0
Returns the network configuration of the device.
Returns: network configuration of the device.
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected of if the device does not support Ethernet or if getting the device network configuration failed. |
supportsNetworkConfig
bool supportsNetworkConfig() const =0
Whether this device has an Ethernet interface to configure at all.
Asked before getDeviceNetworkConfig() so that "this camera has no
Ethernet" can be told apart from "this camera has one and it could not
be read". Both used to arrive as the same empty configuration, which is how a PI 640 on USB and an Xi 80 with a broken control channel became indistinguishable to a caller.
Answers from the device's capability record, so it needs no round trip and cannot itself fail. False for a device that is not connected.
getPif
ProcessInterface & getPif()=0
Grants access to the process interface.
Not connected is an error, not a reading. There is no "absent" process interface to hand back, which is why this returns a reference and throws rather than returning something that answers every question with a zero.
Whether a PIF is attached is then a question asked of the returned interface -- ProcessInterface::getActualDeviceCount() and ProcessInterface::isActualConnected() -- and a count of 0 from those means no PIF is plugged in. That is the same separation supportsNetworkConfig() makes for Ethernet: "this camera has none" and "this camera has one and it could not be reached" must not arrive as the same answer.
The reference stays valid for as long as this IRImager does, and may be kept across disconnect(), and across closing the camera and opening it again. It used to become a dangling reference the moment the camera closed, because it named an object the disconnect destroyed; a client that held it -- which nothing stopped it doing -- read freed memory on its next call. It now follows the camera: calls answer from the process interface the camera has at that moment, once the camera is closed the reads report no attached interface (a device count of 0) and the writes throw SDKException, and after a re-open they reach the interface the re-opened camera has.
What it does not do is carry a configuration over silently: a re-open builds a new process interface, so a channel table or a fail-safe written through this reference before the outage has to be written again unless the SDK restored it.
Returns: reference to the process interface.
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
getPif
const ProcessInterface & getPif() const =0
Grants read access to the process interface.
Same lifetime as the non-const overload above: valid for as long as this IRImager, and safe to keep across a disconnect.
Returns: constant reference to the process interface.
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
interruptFailSafe
void interruptFailSafe(bool active, const std::string &reason)=0
Interrups the all clear fail safe signal.
Note: The client is only one source that can trigger the fail safe. If any of these sources detects an error, the fail safe will be triggered and it will only be released, if ALL the sources report an all clear.
Parameters
| Name | Description |
|---|---|
active |
if true the all clear signal is interrupted. If false, the all clear may be restored, if all other sources report an all clear. |
reason |
to be displayed in the logs. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected. |
configureOperationInfo
void configureOperationInfo(int interval, int x, int y)=0
Configure the tracing of the operation modules that comprise the processing pipeline.
Parameters
| Name | Description |
|---|---|
interval |
desired time in ms between subsequent updates. Set to 0 to deactivate tracing. |
x |
coordinate of a pixel whose value should be traced through processing. |
y |
coordinate of a pixel whose value should be traced through processing. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if not connected or if the pixel coordinates lie outside the frame. |
See also: IRImagerClient::onOperationInfo()