ifw-ccf  3.0.0-pre2
Public Member Functions | List of all members
ccf::protocols::envision::ComAdptEnvision Class Reference

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

#include <comAdptEnvision.hpp>

Inheritance diagram for ccf::protocols::envision::ComAdptEnvision:
ccf::protocols::rtms::ComAdptRtms ccf::common::ComAdptBase 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 (ccf::HwStatus &status, std::string &message)
 
virtual void ConnectUser ()
 
virtual void DisconnectUser ()
 
virtual void ReadUser (const std::string &name, core::utils::param::Parameter &par)
 
virtual void ScanUser (std::vector< core::utils::param::Parameter > &pars)
 
virtual void StartUser ()
 
virtual void StopUser ()
 
virtual void WriteUser (const core::utils::param::Parameter &par)
 
virtual void HandleParPreWriteUser (core::utils::param::Parameter &par)
 
virtual void HandleParPostWriteUser (core::utils::param::Parameter &par)
 
virtual void HandleParPostReadUser (core::utils::param::Parameter &par)
 
- Public Member Functions inherited from ccf::protocols::rtms::ComAdptRtms
 ComAdptRtms ()
 
virtual ~ComAdptRtms ()
 
virtual void ReceiveUser (ccf::common::DataFrame &frame, bool &frame_received, const double timeout, bool &timed_out)
 
- Public Member Functions inherited from ccf::common::ComAdptBase
 ComAdptBase ()
 
virtual ~ComAdptBase ()
 
const std::string & GetDeviceAddress () const
 Return the address from the configuration. More...
 
const int16_t GetDeviceWidth () const
 Return the width of the data array from the configuration. More...
 
const int16_t GetDeviceHeight () const
 Return the height of the data array from the configuration. More...
 
const int8_t GetDeviceResolution () const
 Return the resolution of the data elements. from the configuration. More...
 
const std::string & GetId () const
 Get the ID of the associated device. More...
 
double GetMaxFrameRate () const
 Get Maximim frame rate (Hz). More...
 
void SetHostAdddress (const std::string &host_address)
 Set the address of the host (network interface) used for communication. More...
 
virtual const std::string & GetHostAddress ()
 Return the address of the host (network interface) used for communicating with the device. More...
 
void SetIsSimAdapter (const bool is_sim)
 Set the Simulation Adapter Flag. More...
 
bool GetIsSimAdapter () const
 Return the Simulation Adapter Flag. More...
 
const std::string & GetProtocol () const
 Return the communication protocol used. More...
 
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). More...
 
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. More...
 
void CheckConnection (bool &connected)
 Check if the connection to the device is OK. More...
 
void CheckStatus (ccf::HwStatus &status, std::string &message)
 Check the status of the device (health status). More...
 
bool IsConnected () const
 Returns true if the connection to the device is established and valid. More...
 
void CheckIfConnected () const
 Check if the connection is established. If not, throw an exception. More...
 
void Connect ()
 
void AutoConnect (const uint8_t attempts=5, const double timeout=10)
 
void Disconnect ()
 Disconnect from the device. More...
 
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. More...
 
uint64_t IncLostFramesCount ()
 Increment the counter of lost frames. The new value is returned. More...
 
uint64_t GetLostFramesCount () const
 Return the number of lost frames currently registered. More...
 
void ResetLostFramesCount ()
 Reset the lost frames counter. More...
 
void Read (const std::string &name, core::utils::param::Parameter &par)
 
void Read (const std::vector< std::string > &names, std::vector< core::utils::param::Parameter > &pars)
 
std::string Read (const std::string &name)
 
template<class TYPE >
TYPE Read (const std::string &name)
 
void Write (const core::utils::param::Parameter &par)
 
void Write (const std::vector< core::utils::param::Parameter > &pars)
 
template<class TYPE >
void Write (const std::string &name, const TYPE &value)
 
void Receive (ccf::common::DataFrame &frame, bool &frame_received, const double timeout, bool &timed_out)
 
void Scan (std::vector< core::utils::param::Parameter > &pars)
 Scan the address of the associated device and store the parameters in the vector. More...
 
void Start ()
 Start the image acquisition in the device. More...
 
void Stop ()
 Stop the image acquisition in the device. More...
 
void HandleSetup ()
 
void HandleParPreWrite (core::utils::param::Parameter &par)
 
void HandleParPostWrite (core::utils::param::Parameter &par)
 
void HandleParPostRead (core::utils::param::Parameter &par)
 Invoked before reading a parameter from the device, in case speciel handling is needed. More...
 
void MapParForDevice (core::utils::param::Parameter &par) const
 
void MapParFromDevice (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. More...
 
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< core::utils::param::Parameter > &pars)
 
virtual void WriteUser (const std::vector< core::utils::param::Parameter > &pars)
 
virtual void HandleSetupUser ()
 
- Public Member Functions inherited from ccf::Base
 Base ()
 
 ~Base ()
 
const std::string & GetClassName () const
 Return the allocated name of the class. More...
 
log4cplus::Logger & Loggger ()
 Return reference to logger used in this context. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ccf::Base
static ccf::mptk::ManagerMptk ()
 Return reference to internal MPTK instance (singleton). More...
 
static void SetLogLevel (const ccf::LogLevel log_level)
 Set the log level. More...
 
static ccf::LogLevel GetLogLevel ()
 Return the current CCF log level. More...
 
- Protected Member Functions inherited from ccf::Base
void SetClassName (const std::string &class_name)
 Set the name of the class in question. More...
 
void SetLogger (log4cplus::Logger &logger)
 Set reference to logger used in this context. More...
 
- Protected Attributes inherited from ccf::protocols::rtms::ComAdptRtms
ccf::tools::rtms2ccflib::RtmsCcfReceiverm_rtms_receiver
 
std::thread * m_receiver_thread
 
int8_t m_bytes_per_pixel
 
std::string m_ip_address
 
int m_port
 
std::string m_net_if
 
std::string m_data_type_str
 
std::optional< DataTypesm_data_type
 
int m_queue_size
 
- Protected Attributes inherited from ccf::common::ComAdptBase
bool m_is_connected
 
- Protected Attributes inherited from ccf::Base
log4cplus::Logger m_logger
 

Detailed Description

CCF Communication Adapter implementing the ENVision Protocol.

Constructor & Destructor Documentation

◆ ComAdptEnvision()

ccf::protocols::envision::ComAdptEnvision::ComAdptEnvision ( )

◆ ~ComAdptEnvision()

ccf::protocols::envision::ComAdptEnvision::~ComAdptEnvision ( )
virtual

Member Function Documentation

◆ CheckConnectionUser()

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

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

Reimplemented from ccf::common::ComAdptBase.

◆ CheckStatusUser()

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

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

Reimplemented from ccf::common::ComAdptBase.

◆ ConnectUser()

void ccf::protocols::envision::ComAdptEnvision::ConnectUser ( )
virtual

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

Reimplemented from ccf::protocols::rtms::ComAdptRtms.

◆ DisconnectUser()

void ccf::protocols::envision::ComAdptEnvision::DisconnectUser ( )
virtual

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

Reimplemented from ccf::protocols::rtms::ComAdptRtms.

◆ HandleParPostReadUser()

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

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

Reimplemented from ccf::common::ComAdptBase.

◆ HandleParPostWriteUser()

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

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

Reimplemented from ccf::common::ComAdptBase.

◆ HandleParPreWriteUser()

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

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

Reimplemented from ccf::common::ComAdptBase.

◆ InitialiseUser()

void ccf::protocols::envision::ComAdptEnvision::InitialiseUser ( )
virtual

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

Reimplemented from ccf::protocols::rtms::ComAdptRtms.

◆ ReadUser()

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

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

Reimplemented from ccf::common::ComAdptBase.

◆ ScanUser()

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

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

Reimplemented from ccf::common::ComAdptBase.

◆ SetDeviceAddressUser()

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

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

Reimplemented from ccf::common::ComAdptBase.

◆ StartUser()

void ccf::protocols::envision::ComAdptEnvision::StartUser ( )
virtual

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

Reimplemented from ccf::common::ComAdptBase.

◆ StopUser()

void ccf::protocols::envision::ComAdptEnvision::StopUser ( )
virtual

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

Reimplemented from ccf::common::ComAdptBase.

◆ WriteUser()

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

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

Reimplemented from ccf::common::ComAdptBase.


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