Thermal Camera SDK 10.0.1
SDK for Optris Thermal Cameras
Loading...
Searching...
No Matches
optris::IRImagerClient Class Reference

Base class for clients observing an IRImager. More...

#include <IRImagerClient.h>

Collaboration diagram for optris::IRImagerClient:
Collaboration graph

Public Member Functions

 IRImagerClient ()=default
 Constructor.
 
 IRImagerClient (const IRImagerClient &)=default
 No copy constructor.
 
IRImagerClientoperator= (const IRImagerClient &)=default
 No copy assignment.
 
 IRImagerClient (IRImagerClient &&)=default
 Move constructor.
 
IRImagerClientoperator= (IRImagerClient &&)=default
 Move assignment.
 
virtual ~IRImagerClient ()=default
 Destructor.
 
virtual void onThermalFrame (const ThermalFrame &thermal, const FrameMetadata &meta)
 Callback method for thermal frames.
 
virtual void onThermalFrameEvent (const ThermalFrame &thermal, const Frame &energy, const FrameMetadata &meta, const std::vector< SnapshotEvent > &events)
 Callback method for thermal frames triggered with a raising edge event on PIF digital input or software trigger.
 
virtual void onFlagStateChange (FlagState flagState)
 Callback method for flag state events. The method is called when the flag state changes.
 
virtual void onMeasurementField (const MeasurementField &field)
 Callback method for measurement fields. The method is called when the calculation has finished.
 
virtual void onConnectionLost ()
 Called when a connection loss is detected.
 
virtual void onConnectionTimeout ()
 Called when a connection timeout is detected.
 
virtual void onProcessExit ()
 Callback method for synchronizing data. This is the very last method to be called for each raw data set.
 

Detailed Description

Base class for clients observing an IRImager.

The architecture is following the Observer design pattern. To receive data like thermal frames from your device derive your own class from it and implement the callback methods. After creating an instance of you need to register it with an IRImager object by calling its IRImager::addClient() method.

Member Function Documentation

◆ onConnectionLost()

virtual void optris::IRImagerClient::onConnectionLost ( )
inlinevirtual

Called when a connection loss is detected.

A connection loss can not be recovered. This happens, for example, if the USB connection is interrupted by pulling the plug.

It is up to the client to call IRImager:disconnect(). This gives the client the ability to ensure a graceful disconnect on its end.

◆ onConnectionTimeout()

virtual void optris::IRImagerClient::onConnectionTimeout ( )
inlinevirtual

Called when a connection timeout is detected.

Unlike with connection losses you may recover from a timeout.

Connection timeouts are the only way to detect connection losses with Ethernet devices. This is due to the fact that these devices continuously send UDP packages once they are powered. Besides receiving these packages the SDK has no way of knowing whether the connection is lost.

It is up to the client to call IRImager:disconnect(). This gives the client the ability to ensure a graceful disconnect on its end.

◆ onFlagStateChange()

virtual void optris::IRImagerClient::onFlagStateChange ( FlagState flagState)
inlinevirtual

Callback method for flag state events. The method is called when the flag state changes.

Parameters
[in]flagStatecurrent flag state.

◆ onMeasurementField()

virtual void optris::IRImagerClient::onMeasurementField ( const MeasurementField & field)
inlinevirtual

Callback method for measurement fields. The method is called when the calculation has finished.

The provided reference will remain valid outside the callback but the data that it is pointing to will be overwritten. Make a copy (C++) or use the clone() method (other languages) if you want to use it outside of the callback.

The reference is const. Thus, you have only read access to the object it is referring to. Attempts to manipulate its content will cause issues.

Parameters
[in]fieldmeasurement field.

◆ onThermalFrame()

virtual void optris::IRImagerClient::onThermalFrame ( const ThermalFrame & thermal,
const FrameMetadata & meta )
inlinevirtual

Callback method for thermal frames.

The provided references will remain valid outside the callback but the data that they are pointing to will be overwritten. Make a copy (C++) or use the clone() method (other languages) if you want to use them outside of
the callback.

The references are const. Thus, you have only read access to the objects they are referring to. Attempts to manipulate their content will cause issues.

This callback will also be triggered during the initial startup calibration phase following a successful device connection. During this time the thermal data is unreliable. You can detect this phase by checking whether the flag state stored in the meta data (FrameMetadata::getFlagState()) is set to Initializing.

Parameters
[in]thermalframe.
[in]metaadditional meta data.

◆ onThermalFrameEvent()

virtual void optris::IRImagerClient::onThermalFrameEvent ( const ThermalFrame & thermal,
const Frame & energy,
const FrameMetadata & meta,
const std::vector< SnapshotEvent > & events )
inlinevirtual

Callback method for thermal frames triggered with a raising edge event on PIF digital input or software trigger.

The provided references will remain valid outside the callback but the data that they are pointing to will be overwritten. Make a copy (C++) or use the clone() method (other languages) if you want to use them outside of
the callback.

The references are const. Thus, you have only read access to the objects they are referring to. Attempts to manipulate their content will cause issues.

For future use.

Parameters
[in]thermalframe.
[in]energyframe.
[in]metaadditional meta data for both frames.
[in]eventssnapshot events.

The documentation for this class was generated from the following file: