SHM
Shared-memorybasedHandy-communicationManager
Public Member Functions | List of all members
irlab::shm::Publisher< T > Class Template Reference

Class representing a publisher that outputs topics to shared memory This class is used to output the type or class given as template class as a topic. More...

#include <shm_pub_sub.hpp>

Public Member Functions

 Publisher (std::string name="", int buffer_num=3, PERM perm=DEFAULT_PERM, bool legacy=false)
 Constructor Shared-memory name Number of Buffers Permission infomation None Create shared memory objects and initialize mutex and condition variables.
 
 ~Publisher ()
 Destructor None

 
void publish (const T &data)
 Publish a topic None Writes the topic to the buffer with the oldest timestamp and updates the timestamp. It also sends a resume signal to the waiting process via a pthread condition variable.
 

Detailed Description

template<typename T>
class irlab::shm::Publisher< T >

Class representing a publisher that outputs topics to shared memory This class is used to output the type or class given as template class as a topic.

Examples
test1.cpp.

Definition at line 59 of file shm_pub_sub.hpp.


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