RTC Toolkit  2.0.0
Public Member Functions | Protected Member Functions | List of all members
rtctk::standaloneTools::ShmSubscriber< Topic, ConditionPolicy, ShmTraits > Class Template Reference

Implements basic features for a simple shared memory subscriber program. More...

#include <shmSubscriber.hpp>

Inheritance diagram for rtctk::standaloneTools::ShmSubscriber< Topic, ConditionPolicy, ShmTraits >:
rtctk::standaloneTools::ShmSubscriberBase

Public Member Functions

 ShmSubscriber ()=default
 
virtual ~ShmSubscriber ()=default
 
- Public Member Functions inherited from rtctk::standaloneTools::ShmSubscriberBase
 ShmSubscriberBase ()=default
 
virtual ~ShmSubscriberBase ()=default
 
int Run (int argc, char *argv[])
 Executes the shared memory subscriber program. More...
 

Protected Member Functions

virtual void PrintSample (const Topic &sample)
 Prints a hex dump of the sample. More...
 
- Protected Member Functions inherited from rtctk::standaloneTools::ShmSubscriberBase
const std::string & GetQueueName () const
 
const std::string & GetFilename () const
 
const int64_t GetSampleNumber () const
 
const int64_t PrintWihtLongFormat () const
 

Detailed Description

template<typename Topic, class ConditionPolicy = ipcq::BoostConditionPolicy, class ShmTraits = ipcq::detail::BoostInterprocessTraits>
class rtctk::standaloneTools::ShmSubscriber< Topic, ConditionPolicy, ShmTraits >

Implements basic features for a simple shared memory subscriber program.

This class should be used to quickly instantiate a shared memory subscriber program that allows basic monitoring of the shared memory and dumping of the raw data to file. This can be useful for testing and debugging.

Constructor & Destructor Documentation

◆ ShmSubscriber()

template<typename Topic , class ConditionPolicy = ipcq::BoostConditionPolicy, class ShmTraits = ipcq::detail::BoostInterprocessTraits>
rtctk::standaloneTools::ShmSubscriber< Topic, ConditionPolicy, ShmTraits >::ShmSubscriber ( )
default

◆ ~ShmSubscriber()

template<typename Topic , class ConditionPolicy = ipcq::BoostConditionPolicy, class ShmTraits = ipcq::detail::BoostInterprocessTraits>
virtual rtctk::standaloneTools::ShmSubscriber< Topic, ConditionPolicy, ShmTraits >::~ShmSubscriber ( )
virtualdefault

Member Function Documentation

◆ PrintSample()

template<typename Topic , class ConditionPolicy = ipcq::BoostConditionPolicy, class ShmTraits = ipcq::detail::BoostInterprocessTraits>
virtual void rtctk::standaloneTools::ShmSubscriber< Topic, ConditionPolicy, ShmTraits >::PrintSample ( const Topic &  sample)
inlineprotectedvirtual

Prints a hex dump of the sample.

If the –print-long option was used on the command line then the whole buffer is printed, otherwise only the first 64 bytes is printed.

Parameters
[in]sampleThe data for the sample read from shared memory.

To print better human readable information this method needs to be overridden.


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