ifw-fgf 2.0.0
 
Loading...
Searching...
No Matches
ifw::fgf::andor::CommAdapter Class Reference

Handles communication and interaction with the Andor camera. More...

#include <commAdapter.hpp>

Inheritance diagram for ifw::fgf::andor::CommAdapter:
ifw::fgf::common::ICommAdapter

Public Member Functions

 CommAdapter (const RtmsNetworkConfig &rtms_cfg, std::string_view config_filename="", bool compute_latency=false, const PublisherThreadConfig &thread_cfg=PublisherThreadConfig())
 Constructor for CommAdapter.
 
virtual ~CommAdapter ()
 Destructor for CommAdapter.
 
virtual void Initialise ()
 Initializes the communication adapter.
 
virtual void CheckConnection (bool &connected)
 Checks if the connection to the camera is established.
 
virtual void Connect ()
 Establishes a connection to the camera.
 
virtual void Disconnect ()
 Disconnects from the camera.
 
virtual bool IsConnected () const
 Checks if the adapter is currently connected to the camera.
 
virtual void Read (ifw::fgf::common::VectorVariant &params) const override
 Reads multiple parameters from the camera.
 
virtual void Read (ifw::fgf::common::PairVariant &param) const override
 Reads a single parameter from the camera.
 
virtual void Write (const ifw::fgf::common::VectorVariant &params) override
 Writes multiple parameters to the camera.
 
virtual void Write (const ifw::fgf::common::PairVariant &param) override
 Writes a single parameter to the camera.
 
virtual short Start () override
 Starts the acquisition process.
 
virtual short Stop () override
 Stops the acquisition process.
 
virtual short Init ()
 Initializes the camera for acquisition.
 
virtual std::string GetLoggers ()
 
virtual short SetLogLevel (std::string &level, std::string &logger)
 
virtual short Reset () override
 Resets the camera to its initial state.
 
virtual short Setup ()
 Download parameters to the camera.
 
- Public Member Functions inherited from ifw::fgf::common::ICommAdapter
virtual ~ICommAdapter ()
 
virtual ~ICommAdapter ()
 

Static Public Member Functions

static std::string getErrorMessage (int errorCode)
 

Protected Attributes

std::shared_ptr< ifw::fgf::common::RawImagem_rawimage
 Pointer to latest received image.
 
int m_img_bpp {0}
 Bits per pixel of the current image.
 
int m_img_width {0}
 Width of the current image.
 
int m_img_height {0}
 Height of the current image.
 

Detailed Description

Handles communication and interaction with the Andor camera.

The CommAdapter class provides methods to initialize, connect, read, write, and manage the acquisition process of the Andor camera. It implements the fgf::common::ICommAdapter interface and manages the communication through OPC UA or other protocols.

Constructor & Destructor Documentation

◆ CommAdapter()

ifw::fgf::andor::CommAdapter::CommAdapter ( const RtmsNetworkConfig & rtms_cfg,
std::string_view config_filename = "",
bool compute_latency = false,
const PublisherThreadConfig & thread_cfg = PublisherThreadConfig() )

Constructor for CommAdapter.

Parameters
rtms_cfgRTMS network configuration.
config_filenameOptional configuration file.
compute_latencyEnable runtime latency measurement.
thread_cfgThread affinity and priority tuning.

◆ ~CommAdapter()

ifw::fgf::andor::CommAdapter::~CommAdapter ( )
virtual

Destructor for CommAdapter.

Member Function Documentation

◆ CheckConnection()

void ifw::fgf::andor::CommAdapter::CheckConnection ( bool & connected)
virtual

Checks if the connection to the camera is established.

Parameters
connectedA boolean reference that will be set to true if connected, false otherwise.

◆ Connect()

void ifw::fgf::andor::CommAdapter::Connect ( )
virtual

Establishes a connection to the camera.

◆ Disconnect()

void ifw::fgf::andor::CommAdapter::Disconnect ( )
virtual

Disconnects from the camera.

◆ getErrorMessage()

static std::string ifw::fgf::andor::CommAdapter::getErrorMessage ( int errorCode)
inlinestatic

◆ GetLoggers()

std::string ifw::fgf::andor::CommAdapter::GetLoggers ( )
virtual

◆ Init()

short ifw::fgf::andor::CommAdapter::Init ( )
virtual

Initializes the camera for acquisition.

Returns
Short indicating success (0) or failure (non-zero).

◆ Initialise()

void ifw::fgf::andor::CommAdapter::Initialise ( )
virtual

Initializes the communication adapter.

◆ IsConnected()

bool ifw::fgf::andor::CommAdapter::IsConnected ( ) const
virtual

Checks if the adapter is currently connected to the camera.

Returns
True if connected, false otherwise.

◆ Read() [1/2]

void ifw::fgf::andor::CommAdapter::Read ( ifw::fgf::common::PairVariant & param) const
overridevirtual

Reads a single parameter from the camera.

Parameters
paramA reference to a PairVariant that will be filled with the parameter value.

Implements ifw::fgf::common::ICommAdapter.

◆ Read() [2/2]

void ifw::fgf::andor::CommAdapter::Read ( ifw::fgf::common::VectorVariant & params) const
overridevirtual

Reads multiple parameters from the camera.

Parameters
paramsA reference to a VectorVariant that will be filled with parameter values.

Implements ifw::fgf::common::ICommAdapter.

◆ Reset()

short ifw::fgf::andor::CommAdapter::Reset ( )
overridevirtual

Resets the camera to its initial state.

Returns
Short indicating success (0) or failure (non-zero).

Implements ifw::fgf::common::ICommAdapter.

◆ SetLogLevel()

short ifw::fgf::andor::CommAdapter::SetLogLevel ( std::string & level,
std::string & logger )
virtual

◆ Setup()

short ifw::fgf::andor::CommAdapter::Setup ( )
virtual

Download parameters to the camera.

Returns
Short indicating success (0) or failure (non-zero).

Implements ifw::fgf::common::ICommAdapter.

◆ Start()

short ifw::fgf::andor::CommAdapter::Start ( )
overridevirtual

Starts the acquisition process.

Returns
Short indicating success (0) or failure (non-zero).

Implements ifw::fgf::common::ICommAdapter.

◆ Stop()

short ifw::fgf::andor::CommAdapter::Stop ( )
overridevirtual

Stops the acquisition process.

Returns
Short indicating success (0) or failure (non-zero).

Implements ifw::fgf::common::ICommAdapter.

◆ Write() [1/2]

void ifw::fgf::andor::CommAdapter::Write ( const ifw::fgf::common::PairVariant & param)
overridevirtual

Writes a single parameter to the camera.

Parameters
paramA constant reference to a PairVariant containing the parameter to write.

Implements ifw::fgf::common::ICommAdapter.

◆ Write() [2/2]

void ifw::fgf::andor::CommAdapter::Write ( const ifw::fgf::common::VectorVariant & params)
overridevirtual

Writes multiple parameters to the camera.

Parameters
paramsA constant reference to a VectorVariant containing the parameters to write.

Implements ifw::fgf::common::ICommAdapter.

Member Data Documentation

◆ m_img_bpp

int ifw::fgf::andor::CommAdapter::m_img_bpp {0}
protected

Bits per pixel of the current image.

◆ m_img_height

int ifw::fgf::andor::CommAdapter::m_img_height {0}
protected

Height of the current image.

◆ m_img_width

int ifw::fgf::andor::CommAdapter::m_img_width {0}
protected

Width of the current image.

◆ m_rawimage

std::shared_ptr<ifw::fgf::common::RawImage> ifw::fgf::andor::CommAdapter::m_rawimage
protected

Pointer to latest received image.


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