RTC Toolkit  2.0.0
Public Member Functions | Protected Attributes | List of all members
rtctk::telRepub::PubThread< T, Q_SIZE, TDW > Class Template Reference

#include <ddsPubThread.hpp>

Inheritance diagram for rtctk::telRepub::PubThread< T, Q_SIZE, TDW >:
rtctk::telRepub::PubThreadBase< 300 >

Public Member Functions

 PubThread (TDW *dw, componentFramework::ComponentMetricsIf &metrics, std::uint32_t queue_size=300)
 
 ~PubThread ()
 
void ReadQueuePub ()
 Thread worker that reads agnostic topic from the buffer/queue and publishes it via DDS. More...
 
void SimPub ()
 Thread worker in case of simulation i.e. More...
 
void CreateSimThread (u_int16_t f, numapp::NumaPolicies const &pub_thread_policies)
 Create thread for simulation. More...
 
void CreateThread (numapp::NumaPolicies const &pub_thread_policies)
 Create thread for publishing data from the queue. More...
 
void JoinThread ()
 Join thread. More...
 
- Public Member Functions inherited from rtctk::telRepub::PubThreadBase< 300 >
 PubThreadBase (const char *topic_name, std::uint32_t queue_size)
 
 PubThreadBase (const std::string &topic_name, std::uint32_t queue_size)
 
virtual ~PubThreadBase ()
 
std::string getTopicName ()
 
RepubBuf< rtctk::componentFramework::AgnosticTopic > * GetRepubBuf ()
 Get internal queue/buffer. More...
 

Protected Attributes

std::thread m_thread
 
std::string m_thread_name
 
std::atomic< bool > m_loop
 
unsigned long m_framecounter
 
uint32_t m_sample_id = 0
 
uint32_t m_last_sample_id = 0
 
m_message
 
T * m_msg
 
TDW * m_data_writer
 
componentFramework::ComponentMetricsIfm_metrics
 
perfc::CounterI64 m_pc_sent_samples
 Diverse Performance counters. More...
 
perfc::ScopedRegistration m_pc_sent_samples_reg
 
useconds_t m_sim_loop_sleep
 
- Protected Attributes inherited from rtctk::telRepub::PubThreadBase< 300 >
RepubBuf< rtctk::componentFramework::AgnosticTopic > * m_repub_buf
 
unsigned long rcvSamples_m
 
unsigned long skipedSamples_m
 
uint32_t lastSkipedSample_m
 
std::string topic_name_m
 
boost::mutex mut
 
boost::condition_variable cond
 
log4cplus::Logger m_logger
 

Constructor & Destructor Documentation

◆ PubThread()

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::PubThread ( TDW *  dw,
componentFramework::ComponentMetricsIf metrics,
std::uint32_t  queue_size = 300 
)
inline

◆ ~PubThread()

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::~PubThread ( )
inline

Member Function Documentation

◆ CreateSimThread()

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
void rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::CreateSimThread ( u_int16_t  f,
numapp::NumaPolicies const &  pub_thread_policies 
)
inline

Create thread for simulation.

Is either created thread for publish simulated or "real" topic samples.

Parameters
frate (frequency) with which the simulated (dummy) topic sample are published
pub_thread_policiesthread policies used to create the thread

◆ CreateThread()

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
void rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::CreateThread ( numapp::NumaPolicies const &  pub_thread_policies)
inline

Create thread for publishing data from the queue.

Is either created thread for publish simulated or "real" topic samples.

Parameters
pub_thread_policiesthread policies used to create the thread

◆ JoinThread()

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
void rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::JoinThread ( )
inline

Join thread.

◆ ReadQueuePub()

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
void rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::ReadQueuePub ( )
inline

Thread worker that reads agnostic topic from the buffer/queue and publishes it via DDS.

◆ SimPub()

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
void rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::SimPub ( )
inline

Thread worker in case of simulation i.e.

just dummy agnostic topic is published with certain configure rate

Member Data Documentation

◆ m_data_writer

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
TDW* rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::m_data_writer
protected

◆ m_framecounter

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
unsigned long rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::m_framecounter
protected

◆ m_last_sample_id

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
uint32_t rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::m_last_sample_id = 0
protected

◆ m_loop

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
std::atomic<bool> rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::m_loop
protected

◆ m_message

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
T rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::m_message
protected

◆ m_metrics

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
componentFramework::ComponentMetricsIf& rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::m_metrics
protected

◆ m_msg

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
T* rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::m_msg
protected

◆ m_pc_sent_samples

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
perfc::CounterI64 rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::m_pc_sent_samples
protected

Diverse Performance counters.

◆ m_pc_sent_samples_reg

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
perfc::ScopedRegistration rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::m_pc_sent_samples_reg
protected

◆ m_sample_id

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
uint32_t rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::m_sample_id = 0
protected

◆ m_sim_loop_sleep

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
useconds_t rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::m_sim_loop_sleep
protected

◆ m_thread

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
std::thread rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::m_thread
protected

◆ m_thread_name

template<typename T = rtctk::componentFramework::AgnosticTopic, uint16_t Q_SIZE = 300, typename TDW = DataWriter>
std::string rtctk::telRepub::PubThread< T, Q_SIZE, TDW >::m_thread_name
protected

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