ifw-ccf 4.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
ccf::protocols::rtms::ComAdptRtms Class Reference

CCF Communication Adapter implementing RTMS communication. More...

#include <comAdptRtms.hpp>

Inheritance diagram for ccf::protocols::rtms::ComAdptRtms:
ccf::common::ComAdptBase ccf::Base ccf::protocols::envision::ComAdptEnvision

Public Member Functions

 ComAdptRtms ()
 
virtual ~ComAdptRtms ()
 
virtual void InitialiseUser ()
 
virtual void ConnectUser ()
 
virtual void DisconnectUser ()
 
virtual void StartUser ()
 
virtual void StopUser ()
 
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.
 
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 (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.
 
void ResetLostFramesCount ()
 Reset the lost frames counter.
 
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.
 
void Start ()
 Start the image acquisition in the device.
 
void Stop ()
 Stop the image acquisition in the device.
 
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.
 
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.
 
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 bool HasDevicePropertyUser (const std::string &property, std::string &value)
 
virtual double GetTheoreticFrameRateUser ()
 
virtual void ConnectUser ()
 
virtual void DisconnectUser ()
 
virtual bool IsConnectedUser () const
 
virtual void ReadUser (const std::string &name, core::utils::param::Parameter &par)
 
virtual void ReadUser (const std::vector< std::string > &names, std::vector< core::utils::param::Parameter > &pars)
 
virtual void ReceiveUser (ccf::common::DataFrame &frame, bool &frame_received, const double timeout, bool &timed_out)
 
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 WriteUser (const std::vector< core::utils::param::Parameter > &pars)
 
virtual void HandleSetupUser ()
 
virtual void HandleParPreWriteUser (core::utils::param::Parameter &par)
 
virtual void HandleParPostWriteUser (core::utils::param::Parameter &par)
 
virtual void HandleParPostReadUser (core::utils::param::Parameter &par)
 
const NameMappingGetNameMapping () const
 
- Public Member Functions inherited from ccf::Base
 Base ()
 
 ~Base ()
 
const std::string & GetClassName () const
 Return the allocated name of the class.
 

Protected Attributes

ccf::tools::rtms2ccflib::RtmsCcfReceiverm_rtms_receiver {nullptr}
 
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< DataTypem_data_type
 
int m_queue_size
 
int64_t m_previous_lost_frames_count {-1}
 
- Protected Attributes inherited from ccf::common::ComAdptBase
bool m_is_connected
 

Additional Inherited Members

- Static Public Member Functions inherited from ccf::Base
static ccf::mptk::ManagerMptk ()
 Return reference to internal MPTK instance (singleton).
 
- Protected Member Functions inherited from ccf::Base
void SetClassName (const std::string &class_name)
 Set the name of the class in question.
 

Detailed Description

CCF Communication Adapter implementing RTMS communication.

Implements ccf::common::ComAdptBase.

Constructor & Destructor Documentation

◆ ComAdptRtms()

ccf::protocols::rtms::ComAdptRtms::ComAdptRtms ( )

◆ ~ComAdptRtms()

ccf::protocols::rtms::ComAdptRtms::~ComAdptRtms ( )
virtual

Member Function Documentation

◆ ConnectUser()

void ccf::protocols::rtms::ComAdptRtms::ConnectUser ( )
virtual

Specific implementation of the connection algorithm to connect to the device. See also "Connect()".

Reimplemented from ccf::common::ComAdptBase.

Reimplemented in ccf::protocols::envision::ComAdptEnvision.

◆ DisconnectUser()

void ccf::protocols::rtms::ComAdptRtms::DisconnectUser ( )
virtual

Specific implementation of the algorithm to disconnect from the device. See also "Disconnect()".

Reimplemented from ccf::common::ComAdptBase.

Reimplemented in ccf::protocols::envision::ComAdptEnvision.

◆ InitialiseUser()

void ccf::protocols::rtms::ComAdptRtms::InitialiseUser ( )
virtual

Specific implementation of the adapter/device initialisation. See also "Initialise()".

Reimplemented from ccf::common::ComAdptBase.

Reimplemented in ccf::protocols::envision::ComAdptEnvision.

◆ ReceiveUser()

void ccf::protocols::rtms::ComAdptRtms::ReceiveUser ( ccf::common::DataFrame frame,
bool &  frame_received,
const double  timeout,
bool &  timed_out 
)
virtual

Specific implementation of the frame reception. See also "Receive()".

Reimplemented from ccf::common::ComAdptBase.

Reimplemented in ccf::protocols::envision::ComAdptEnvision.

◆ StartUser()

void ccf::protocols::rtms::ComAdptRtms::StartUser ( )
virtual

Specific implementation of the algorithm to start the image acquisition in the device. See also "Start()".

Reimplemented from ccf::common::ComAdptBase.

Reimplemented in ccf::protocols::envision::ComAdptEnvision.

◆ StopUser()

void ccf::protocols::rtms::ComAdptRtms::StopUser ( )
virtual

Specific implementation of the algorithm to stop the image acquisition in the device. See also "Stop()".

Reimplemented from ccf::common::ComAdptBase.

Reimplemented in ccf::protocols::envision::ComAdptEnvision.

Member Data Documentation

◆ m_bytes_per_pixel

int8_t ccf::protocols::rtms::ComAdptRtms::m_bytes_per_pixel
protected

◆ m_data_type

std::optional<DataType> ccf::protocols::rtms::ComAdptRtms::m_data_type
protected

◆ m_data_type_str

std::string ccf::protocols::rtms::ComAdptRtms::m_data_type_str
protected

◆ m_ip_address

std::string ccf::protocols::rtms::ComAdptRtms::m_ip_address
protected

◆ m_net_if

std::string ccf::protocols::rtms::ComAdptRtms::m_net_if
protected

◆ m_port

int ccf::protocols::rtms::ComAdptRtms::m_port
protected

◆ m_previous_lost_frames_count

int64_t ccf::protocols::rtms::ComAdptRtms::m_previous_lost_frames_count {-1}
protected

◆ m_queue_size

int ccf::protocols::rtms::ComAdptRtms::m_queue_size
protected

◆ m_receiver_thread

std::thread* ccf::protocols::rtms::ComAdptRtms::m_receiver_thread
protected

◆ m_rtms_receiver

ccf::tools::rtms2ccflib::RtmsCcfReceiver* ccf::protocols::rtms::ComAdptRtms::m_rtms_receiver {nullptr}
protected

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