RTC Toolkit 5.1.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Types | Protected Attributes | Static Protected Attributes | List of all members
rtctk::telRepub::PubThread Class Reference

DDS publisher thread class that supports production and simulation mode. More...

#include <ddsPubThread.hpp>

Inheritance diagram for rtctk::telRepub::PubThread:
rtctk::telRepub::PubThreadMudpi rtctk::telRepub::PubThreadSim

Public Member Functions

 PubThread (DataWriter &data_writer, componentFramework::ServiceContainer &service, const numapp::NumaPolicies &thread_policies, std::uint32_t sample_id_increment)
 Spawns publisher thread and sets up performance counters for monitoring.
 
virtual ~PubThread ()
 Joins publisher thread and prints some statistics information.
 
virtual void RunAsync ()
 Enable publishing data.
 
void IdleAsync ()
 Disable publishing data.
 
std::string GetTopicName ()
 
virtual bool Monitor ()
 

Protected Types

enum class  State { Idle , Run , Exit }
 

Protected Attributes

std::string m_topic_name
 
log4cplus::Logger m_logger
 
std::atomic< Statem_requested_state
 
std::thread m_thread
 
std::string m_thread_name
 
DataWriterm_data_writer
 
ComponentMetricsIfm_metrics
 
componentFramework::AlertSource m_topic_publish_alert
 Alerts.
 
componentFramework::AlertSource m_wrangler_alert
 
perfc::CounterI64 m_pc_published_samples
 Diverse Performance counters.
 
perfc::ScopedRegistration m_pc_published_samples_reg
 
perfc::CounterI64 m_pc_publication_errors
 
perfc::ScopedRegistration m_pc_publication_errors_reg
 
perfc::CounterI64 m_pc_last_sample_id_published
 
perfc::ScopedRegistration m_pc_last_sample_id_published_reg
 
std::unique_ptr< DurationMonitor<> > m_dur_mon
 
std::uint32_t m_expected_sample_id_increment
 

Static Protected Attributes

static std::atomic< std::uint16_t > s_count = 0
 

Detailed Description

DDS publisher thread class that supports production and simulation mode.

Member Enumeration Documentation

◆ State

Enumerator
Idle 
Run 
Exit 

Constructor & Destructor Documentation

◆ PubThread()

rtctk::telRepub::PubThread::PubThread ( DataWriter & data_writer,
componentFramework::ServiceContainer & service,
const numapp::NumaPolicies & thread_policies,
std::uint32_t sample_id_increment )

Spawns publisher thread and sets up performance counters for monitoring.

Parameters
[in,out]data_writerDDS data writer.
[in,out]serviceComponent service.
[in]thread_policiesThread policies to apply to the publisher thread.
[in]sample_id_incrementSubsample factor (1 or larger).

◆ ~PubThread()

rtctk::telRepub::PubThread::~PubThread ( )
virtual

Joins publisher thread and prints some statistics information.

Member Function Documentation

◆ GetTopicName()

std::string rtctk::telRepub::PubThread::GetTopicName ( )

◆ IdleAsync()

void rtctk::telRepub::PubThread::IdleAsync ( )

Disable publishing data.

◆ Monitor()

bool rtctk::telRepub::PubThread::Monitor ( )
virtual

◆ RunAsync()

void rtctk::telRepub::PubThread::RunAsync ( )
virtual

Enable publishing data.

Reimplemented in rtctk::telRepub::PubThreadMudpi.

Member Data Documentation

◆ m_data_writer

DataWriter& rtctk::telRepub::PubThread::m_data_writer
protected

◆ m_dur_mon

std::unique_ptr<DurationMonitor<> > rtctk::telRepub::PubThread::m_dur_mon
protected

◆ m_expected_sample_id_increment

std::uint32_t rtctk::telRepub::PubThread::m_expected_sample_id_increment
protected

◆ m_logger

log4cplus::Logger rtctk::telRepub::PubThread::m_logger
protected

◆ m_metrics

ComponentMetricsIf& rtctk::telRepub::PubThread::m_metrics
protected

◆ m_pc_last_sample_id_published

perfc::CounterI64 rtctk::telRepub::PubThread::m_pc_last_sample_id_published
protected

◆ m_pc_last_sample_id_published_reg

perfc::ScopedRegistration rtctk::telRepub::PubThread::m_pc_last_sample_id_published_reg
protected

◆ m_pc_publication_errors

perfc::CounterI64 rtctk::telRepub::PubThread::m_pc_publication_errors
protected

◆ m_pc_publication_errors_reg

perfc::ScopedRegistration rtctk::telRepub::PubThread::m_pc_publication_errors_reg
protected

◆ m_pc_published_samples

perfc::CounterI64 rtctk::telRepub::PubThread::m_pc_published_samples
protected

Diverse Performance counters.

◆ m_pc_published_samples_reg

perfc::ScopedRegistration rtctk::telRepub::PubThread::m_pc_published_samples_reg
protected

◆ m_requested_state

std::atomic<State> rtctk::telRepub::PubThread::m_requested_state
protected

◆ m_thread

std::thread rtctk::telRepub::PubThread::m_thread
protected

◆ m_thread_name

std::string rtctk::telRepub::PubThread::m_thread_name
protected

◆ m_topic_name

std::string rtctk::telRepub::PubThread::m_topic_name
protected

◆ m_topic_publish_alert

componentFramework::AlertSource rtctk::telRepub::PubThread::m_topic_publish_alert
protected

Alerts.

◆ m_wrangler_alert

componentFramework::AlertSource rtctk::telRepub::PubThread::m_wrangler_alert
protected

◆ s_count

std::atomic< std::uint16_t > rtctk::telRepub::PubThread::s_count = 0
staticprotected

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