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

#include <ddsPubThread.hpp>

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

Public Member Functions

 PubThread (typename T::DataWriter *dw)
 
 ~PubThread ()
 
void ReadQueuePub ()
 
void SimPub ()
 
void CreateSimThread (u_int16_t f)
 
void CreateThread ()
 
void JoinThread ()
 
void SetAffinity (unsigned int cpu)
 
void PrintAffinity ()
 
void WaitForAcknowledgments ()
 
- Public Member Functions inherited from rtctk::telRepub::PubThreadBase< 3000 >
 PubThreadBase (const char *topic_name)
 
virtual ~PubThreadBase ()
 
virtual bool push (topicT const &value)
 
std::string getTopicName ()
 

Protected Attributes

boost::thread m_thread
 
bool m_loop
 
unsigned long m_framecounter
 
m_message
 
T::DataWriter * m_data_writer
 
useconds_t m_simLoopSleep
 
- Protected Attributes inherited from rtctk::telRepub::PubThreadBase< 3000 >
bool push_ret
 
boost::lockfree::spsc_queue< topicT, boost::lockfree::capacity< Q_SIZE > > * queue_m
 
unsigned long rcvSamples_m
 
unsigned long skipedSamples_m
 
uint32_t lastSkipedSample_m
 
std::string topic_name_m
 
boost::mutex mut
 
boost::condition_variable cond
 

Constructor & Destructor Documentation

◆ PubThread()

template<typename T = rtctk::AgnosticTopic, int Q_SIZE = 3000>
rtctk::telRepub::PubThread< T, Q_SIZE >::PubThread ( typename T::DataWriter *  dw)
inline

◆ ~PubThread()

template<typename T = rtctk::AgnosticTopic, int Q_SIZE = 3000>
rtctk::telRepub::PubThread< T, Q_SIZE >::~PubThread ( )
inline

Member Function Documentation

◆ CreateSimThread()

template<typename T = rtctk::AgnosticTopic, int Q_SIZE = 3000>
void rtctk::telRepub::PubThread< T, Q_SIZE >::CreateSimThread ( u_int16_t  f)
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

◆ CreateThread()

template<typename T = rtctk::AgnosticTopic, int Q_SIZE = 3000>
void rtctk::telRepub::PubThread< T, Q_SIZE >::CreateThread ( )
inline

Create thread for publishing data from the queue. Is either created thread for publish simulated or "real" topic samples.

◆ JoinThread()

template<typename T = rtctk::AgnosticTopic, int Q_SIZE = 3000>
void rtctk::telRepub::PubThread< T, Q_SIZE >::JoinThread ( )
inline

Join thread.

◆ PrintAffinity()

template<typename T = rtctk::AgnosticTopic, int Q_SIZE = 3000>
void rtctk::telRepub::PubThread< T, Q_SIZE >::PrintAffinity ( )
inline

◆ ReadQueuePub()

template<typename T = rtctk::AgnosticTopic, int Q_SIZE = 3000>
void rtctk::telRepub::PubThread< T, Q_SIZE >::ReadQueuePub ( )
inline

Thread worker that reads (pops) agnostic topic from queue and publishes it via DDS.

◆ SetAffinity()

template<typename T = rtctk::AgnosticTopic, int Q_SIZE = 3000>
void rtctk::telRepub::PubThread< T, Q_SIZE >::SetAffinity ( unsigned int  cpu)
inline

set affinity of the thread.

Parameters
cpunumber of CPU(core)

◆ SimPub()

template<typename T = rtctk::AgnosticTopic, int Q_SIZE = 3000>
void rtctk::telRepub::PubThread< T, Q_SIZE >::SimPub ( )
inline

Thread worker in case of simulation i.e. just dummy agnostic topic is published with certain configure rate

◆ WaitForAcknowledgments()

template<typename T = rtctk::AgnosticTopic, int Q_SIZE = 3000>
void rtctk::telRepub::PubThread< T, Q_SIZE >::WaitForAcknowledgments ( )
inline

Member Data Documentation

◆ m_data_writer

template<typename T = rtctk::AgnosticTopic, int Q_SIZE = 3000>
T::DataWriter* rtctk::telRepub::PubThread< T, Q_SIZE >::m_data_writer
protected

◆ m_framecounter

template<typename T = rtctk::AgnosticTopic, int Q_SIZE = 3000>
unsigned long rtctk::telRepub::PubThread< T, Q_SIZE >::m_framecounter
protected

◆ m_loop

template<typename T = rtctk::AgnosticTopic, int Q_SIZE = 3000>
bool rtctk::telRepub::PubThread< T, Q_SIZE >::m_loop
protected

◆ m_message

template<typename T = rtctk::AgnosticTopic, int Q_SIZE = 3000>
T rtctk::telRepub::PubThread< T, Q_SIZE >::m_message
protected

◆ m_simLoopSleep

template<typename T = rtctk::AgnosticTopic, int Q_SIZE = 3000>
useconds_t rtctk::telRepub::PubThread< T, Q_SIZE >::m_simLoopSleep
protected

◆ m_thread

template<typename T = rtctk::AgnosticTopic, int Q_SIZE = 3000>
boost::thread rtctk::telRepub::PubThread< T, Q_SIZE >::m_thread
protected

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