ifw-ccf 6.0.0
 
Loading...
Searching...
No Matches
ifw::ccf::protocols::envision_llnetio::ComAdptEnvision Class Reference

CCF Communication Adapter implementing the ENVision Protocol. More...

#include <comAdptEnvision.hpp>

Inheritance diagram for ifw::ccf::protocols::envision_llnetio::ComAdptEnvision:
ifw::ccf::protocols::rtms_llnetio::ComAdptRtms ifw::ccf::common::ComAdptBase ifw::ccf::Base

Public Member Functions

 ComAdptEnvision ()
 
virtual ~ComAdptEnvision ()
 
virtual void InitialiseUser ()
 
virtual void SetDeviceAddressUser (const std::string &address)
 
virtual void CheckConnectionUser (bool &connected)
 
virtual void CheckStatusUser (ifw::ccf::HwStatus &status, std::string &message)
 
virtual void ConnectUser ()
 
virtual void DisconnectUser ()
 
virtual void ReceiveUser (ifw::ccf::common::DataFrame &frame, bool &frame_received, const double timeout, bool &timed_out)
 Implementation of the frame reception.
 
virtual void ReadUser (const std::string &name, ifw::core::utils::param::Parameter &par)
 
virtual void ScanUser (std::vector< ifw::core::utils::param::Parameter > &pars)
 
virtual void StartUser ()
 
virtual void StopUser ()
 
virtual void WriteUser (const ifw::core::utils::param::Parameter &par)
 
virtual void HandleParPreWriteUser (ifw::core::utils::param::Parameter &par)
 
virtual void HandleParPostWriteUser (ifw::core::utils::param::Parameter &par)
 
virtual void HandleParPostReadUser (ifw::core::utils::param::Parameter &par)
 
virtual void HandleSetupUser ()
 
- Public Member Functions inherited from ifw::ccf::protocols::rtms_llnetio::ComAdptRtms
 ComAdptRtms ()
 
virtual ~ComAdptRtms ()
 
- Public Member Functions inherited from ifw::ccf::common::ComAdptBase
 ComAdptBase ()
 
virtual ~ComAdptBase ()
 
const std::string & GetDeviceAddress () const
 Return the address from the configuration.
 
const int16_t GetDeviceWidth () const
 Return the width of the data array from the configuration.
 
const int16_t GetDeviceHeight () const
 Return the height of the data array from the configuration.
 
const int8_t GetDeviceResolution () const
 Return the resolution of the data elements from the configuration.
 
const std::string & GetId () const
 Get the ID of the associated device.
 
double GetMaxFrameRate () const
 Get Maximim frame rate (Hz).
 
void SetHostAdddress (const std::string &host_address)
 Set the address of the host (network interface) used for communication.
 
virtual const std::string & GetHostAddress ()
 Return the address of the host (network interface) used for communicating with the device.
 
void SetIsSimAdapter (const bool is_sim)
 Set the Simulation Adapter Flag.
 
bool GetIsSimAdapter () const
 Return the Simulation Adapter Flag.
 
const std::string & GetProtocol () const
 Return the communication protocol used.
 
template<class TYPE>
TYPE GetDeviceProperty (const std::string &property)
 
bool HasDeviceProperty (const std::string &property, std::string &value)
 
double GetTheoreticFrameRate ()
 Render the theoritic, possible achievable frame rate (frame/s).
 
void Initialise (const bool re_init=false)
 
void SetDeviceAddress (const std::string &address)
 Set the internal address, e.g. URI, used for communicating with the device.
 
void CheckConnection (bool &connected)
 Check if the connection to the device is OK.
 
void CheckStatus (ifw::ccf::HwStatus &status, std::string &message)
 Check the status of the device (health status).
 
bool IsConnected () const
 Returns true if the connection to the device is established and valid.
 
void CheckIfConnected () const
 Check if the connection is established. If not, throw an exception.
 
void Connect ()
 
void AutoConnect (const uint8_t attempts=5, const double timeout=10)
 
void Disconnect ()
 Disconnect from the device.
 
void WriteDeviceProps ()
 
virtual void WriteDevicePropsUser ()
 
void WriteDefaultSetup ()
 
virtual void WriteDefaultSetupUser ()
 
void SetIsConnected (const bool connected)
 
bool GetAllowLostFrames () const
 Return flag (cfg par) indicating if lost frames shall be ignored silently.
 
uint64_t IncLostFramesCount ()
 Increment the counter of lost frames. The new value is returned.
 
void SetLostFramesCount (const int64_t count)
 
uint64_t GetLostFramesCount () const
 Return the number of lost frames currently registered.
 
uint64_t GetFrameCounter () const
 Return the internal frame counter.
 
double GetTimeForLastFrame () const
 
void ResetLostFramesCount ()
 Reset the lost frames counter.
 
void Read (const std::string &name, ifw::core::utils::param::Parameter &par)
 
void Read (const std::vector< std::string > &names, std::vector< ifw::core::utils::param::Parameter > &pars)
 
std::string Read (const std::string &name)
 
template<class TYPE>
TYPE Read (const std::string &name)
 
void Write (const ifw::core::utils::param::Parameter &par)
 
void Write (const std::vector< ifw::core::utils::param::Parameter > &pars)
 
template<class TYPE>
void Write (const std::string &name, const TYPE &value)
 
void Receive (ifw::ccf::common::DataFrame &frame, bool &frame_received, const double timeout, bool &timed_out)
 
void Scan (std::vector< ifw::core::utils::param::Parameter > &pars)
 Scan the address of the associated device and store the parameters in the vector.
 
void Start ()
 Start the image acquisition in the device.
 
void Stop ()
 Stop the image acquisition in the device.
 
void HandleSetup ()
 
void HandleParPreWrite (ifw::core::utils::param::Parameter &par)
 
void HandleParPostWrite (ifw::core::utils::param::Parameter &par)
 
void HandleParPostRead (ifw::core::utils::param::Parameter &par)
 Invoked before reading a parameter from the device, in case speciel handling is needed.
 
void MapParForDevice (ifw::core::utils::param::Parameter &par) const
 
void MapParFromDevice (ifw::core::utils::param::Parameter &par) const
 
bool HasNameMapping (const std::string &name) const
 Return true if a mapping is defined in the Device Name Mapping for the given name.
 
virtual void SetAcqTrigger (const AcqTrigger &acq_trigger)
 
AcqTriggerGetAcqTrigger ()
 
ifw::ccf::common::TriggerType GetAcqTriggerType () const
 
virtual bool HasDevicePropertyUser (const std::string &property, std::string &value)
 
virtual double GetTheoreticFrameRateUser ()
 
virtual bool IsConnectedUser () const
 
virtual void ReadUser (const std::vector< std::string > &names, std::vector< ifw::core::utils::param::Parameter > &pars)
 
virtual void AddMetaDataUser (ifw::ccf::common::DataFrame &frame)
 
virtual void WriteUser (const std::vector< ifw::core::utils::param::Parameter > &pars)
 
void ReadMutableSetupPars ()
 Read setup parameters from the camera device, which may mutate.
 
const NameMappingGetNameMapping () const
 
virtual void SetAcqTriggerUser ()
 Specific implementation of the algorithm to trigger an acquisition.
 
- Public Member Functions inherited from ifw::ccf::Base
 Base ()
 
 ~Base ()
 
const std::string & GetClassName () const
 Return the allocated name of the class.
 

Additional Inherited Members

- Static Public Member Functions inherited from ifw::ccf::common::ComAdptBase
static std::string ResolveHostname (const std::string &address)
 
- Static Public Member Functions inherited from ifw::ccf::Base
static ifw::ccf::mptk::ManagerMptk ()
 Return reference to internal MPTK instance (singleton).
 
- Protected Member Functions inherited from ifw::ccf::common::ComAdptBase
virtual void AdjustExpoTimeFrameRate ()
 
- Protected Member Functions inherited from ifw::ccf::Base
void SetClassName (const std::string &class_name)
 Set the name of the class in question.
 
- Protected Attributes inherited from ifw::ccf::protocols::rtms_llnetio::ComAdptRtms
std::unique_ptr< ifw::ccf::tools::llnetio::rtms2ccflib::RtmsCcfReceiverm_rtms_receiver
 
std::unique_ptr< std::thread > m_receiver_thread
 
int8_t m_bytes_per_pixel
 
int m_width {0}
 
int m_height {0}
 
std::string m_ip_address
 
std::string m_interface_name
 
int m_port
 
std::string m_data_type_str
 
std::optional< ifw::fnd::datatype::DataType > m_data_type
 
int m_queue_size
 
int m_mtu_size
 
int m_topic_id {10}
 
ifw::rtmslib::ExtendedInfoMode m_ext_info_mode
 
int64_t m_previous_lost_frames_count {-1}
 
- Protected Attributes inherited from ifw::ccf::common::ComAdptBase
bool m_is_connected
 
AcqTrigger m_acq_trigger
 

Detailed Description

CCF Communication Adapter implementing the ENVision Protocol.

Constructor & Destructor Documentation

◆ ComAdptEnvision()

ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::ComAdptEnvision ( )

◆ ~ComAdptEnvision()

ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::~ComAdptEnvision ( )
virtual

Member Function Documentation

◆ CheckConnectionUser()

void ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::CheckConnectionUser ( bool & connected)
virtual

Check the validity of the connection. See also "ifw::ccf::common::CheckConnection()".

Reimplemented from ifw::ccf::common::ComAdptBase.

◆ CheckStatusUser()

void ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::CheckStatusUser ( ifw::ccf::HwStatus & status,
std::string & message )
virtual

Carry out a health check of the associated device. See also "ifw::ccf::common::CheckStatus()".

Reimplemented from ifw::ccf::common::ComAdptBase.

◆ ConnectUser()

void ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::ConnectUser ( )
virtual

Establish a connection to the associated device. See also "ifw::ccf::common::Connect()".

Reimplemented from ifw::ccf::common::ComAdptBase.

◆ DisconnectUser()

void ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::DisconnectUser ( )
virtual

Disconnect from the associated device. See also "ifw::ccf::common::Disconnect()".

Reimplemented from ifw::ccf::common::ComAdptBase.

◆ HandleParPostReadUser()

void ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::HandleParPostReadUser ( ifw::core::utils::param::Parameter & par)
virtual

Specific implementation of the algorithm to process a parameter after reading it from the device. See also "ifw::ccf::common::HandleParPostRead()".

Reimplemented from ifw::ccf::common::ComAdptBase.

◆ HandleParPostWriteUser()

void ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::HandleParPostWriteUser ( ifw::core::utils::param::Parameter & par)
virtual

Specific implementation of the parameter processing after this is written to the device. See also "ifw::ccf::common::HandleParPostWrite()".

Reimplemented from ifw::ccf::common::ComAdptBase.

◆ HandleParPreWriteUser()

void ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::HandleParPreWriteUser ( ifw::core::utils::param::Parameter & par)
virtual

Specific implementation of the parameter processing before this is written to the device. See also "ifw::ccf::common::HandleParPreWrite()".

Reimplemented from ifw::ccf::common::ComAdptBase.

◆ HandleSetupUser()

void ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::HandleSetupUser ( )
virtual

Specific implementation of the handling of new setup parameters. See also "HandleSetup()".

Reimplemented from ifw::ccf::common::ComAdptBase.

◆ InitialiseUser()

void ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::InitialiseUser ( )
virtual

Initialise the communication adapter. See also "ifw::ccf::common::ccf::common::Initialise()".

Reimplemented from ifw::ccf::protocols::rtms_llnetio::ComAdptRtms.

◆ ReadUser()

void ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::ReadUser ( const std::string & name,
ifw::core::utils::param::Parameter & par )
virtual

Read the value of a given parameter from the associated device. See also "ifw::ccf::common::Read(single)".

Reimplemented from ifw::ccf::common::ComAdptBase.

◆ ReceiveUser()

void ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::ReceiveUser ( ifw::ccf::common::DataFrame & frame,
bool & frame_received,
const double timeout,
bool & timed_out )
virtual

Implementation of the frame reception.

Reimplemented from ifw::ccf::protocols::rtms_llnetio::ComAdptRtms.

◆ ScanUser()

void ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::ScanUser ( std::vector< ifw::core::utils::param::Parameter > & pars)
virtual

Scan the parameter name space from the associated device. See also "ifw::ccf::common::Scan()".

Reimplemented from ifw::ccf::common::ComAdptBase.

◆ SetDeviceAddressUser()

void ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::SetDeviceAddressUser ( const std::string & address)
virtual

Check/register the device address. See also "ifw::ccf::common::SetDeviceAddress()".

Reimplemented from ifw::ccf::common::ComAdptBase.

◆ StartUser()

void ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::StartUser ( )
virtual

Start the frame acquisition. See also "ifw::ccf::common::Start()".

Reimplemented from ifw::ccf::protocols::rtms_llnetio::ComAdptRtms.

◆ StopUser()

void ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::StopUser ( )
virtual

Stop the frame acquisition. See also "ifw::ccf::common::Stop()".

Reimplemented from ifw::ccf::protocols::rtms_llnetio::ComAdptRtms.

◆ WriteUser()

void ifw::ccf::protocols::envision_llnetio::ComAdptEnvision::WriteUser ( const ifw::core::utils::param::Parameter & par)
virtual

Write a parameter to the associated device. See also "ifw::ccf::common::Write(single)".

Reimplemented from ifw::ccf::common::ComAdptBase.


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