ifw-fgf 1.0.0-pre1
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
fgf::andor::CommAdapter Class Reference

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

#include <commAdapter.hpp>

Inheritance diagram for fgf::andor::CommAdapter:

Public Member Functions

 CommAdapter (fgf::common::RtmsPublisher &publisher, std::string_view config_filename="")
 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 (fgf::common::VectorVariant &params) const override
 Reads multiple parameters from the camera.
 
virtual void Read (fgf::common::PairVariant &param) const override
 Reads a single parameter from the camera.
 
virtual void Write (const fgf::common::VectorVariant &params) override
 Writes multiple parameters to the camera.
 
virtual void Write (const 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 () override
 Initializes the camera for acquisition.
 
virtual short Reset () override
 Resets the camera to its initial state.
 
virtual short Setup ()
 Download parameters to the camera.
 

Static Public Member Functions

static std::string getErrorMessage (int errorCode)
 

Protected Attributes

std::shared_ptr< fgf::common::RawImage > m_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()

fgf::andor::CommAdapter::CommAdapter ( fgf::common::RtmsPublisher & publisher,
std::string_view config_filename = "" )

Constructor for CommAdapter.

Parameters
publisherReference to the RTMS publisher.

◆ ~CommAdapter()

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

Destructor for CommAdapter.

Member Function Documentation

◆ CheckConnection()

void 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 fgf::andor::CommAdapter::Connect ( )
virtual

Establishes a connection to the camera.

◆ Disconnect()

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

Disconnects from the camera.

◆ getErrorMessage()

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

◆ Init()

short fgf::andor::CommAdapter::Init ( )
overridevirtual

Initializes the camera for acquisition.

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

◆ Initialise()

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

Initializes the communication adapter.

◆ IsConnected()

bool 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 fgf::andor::CommAdapter::Read ( 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.

◆ Read() [2/2]

void fgf::andor::CommAdapter::Read ( 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.

◆ Reset()

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

Resets the camera to its initial state.

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

◆ Setup()

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

Download parameters to the camera.

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

◆ Start()

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

Starts the acquisition process.

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

◆ Stop()

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

Stops the acquisition process.

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

◆ Write() [1/2]

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

Writes a single parameter to the camera.

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

◆ Write() [2/2]

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

Writes multiple parameters to the camera.

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

Member Data Documentation

◆ m_img_bpp

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

Bits per pixel of the current image.

◆ m_img_height

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

Height of the current image.

◆ m_img_width

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

Width of the current image.

◆ m_rawimage

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

Pointer to latest received image.


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