mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
mrs_lib::PublisherHandler_impl< TopicType > Class Template Reference

implementation of the publisher handler More...

#include <publisher_handler.h>

Public Member Functions

 PublisherHandler_impl (void)
 default constructor
 
 ~PublisherHandler_impl (void)
 default destructor
 
 PublisherHandler_impl (ros::NodeHandle &nh, const std::string &address, const unsigned int &buffer_size=1, const bool &latch=false, const double &rate=0.0)
 constructor More...
 
void publish (const TopicType &msg)
 publish message More...
 
void publish (const boost::shared_ptr< TopicType > &msg)
 publish message, boost ptr overload More...
 
void publish (const boost::shared_ptr< TopicType const > &msg)
 publish message, boost const ptr overload More...
 
unsigned int getNumSubscribers (void)
 get number of subscribers More...
 

Detailed Description

template<class TopicType>
class mrs_lib::PublisherHandler_impl< TopicType >

implementation of the publisher handler

Constructor & Destructor Documentation

◆ PublisherHandler_impl()

template<class TopicType >
mrs_lib::PublisherHandler_impl< TopicType >::PublisherHandler_impl ( ros::NodeHandle &  nh,
const std::string &  address,
const unsigned int &  buffer_size = 1,
const bool &  latch = false,
const double &  rate = 0.0 
)

constructor

Parameters
nhROS node handler
addresstopic address
buffer_sizebuffer size
latchlatching

Member Function Documentation

◆ getNumSubscribers()

template<class TopicType >
unsigned int mrs_lib::PublisherHandler_impl< TopicType >::getNumSubscribers ( void  )

get number of subscribers

Returns
the number of subscribers

◆ publish() [1/3]

template<class TopicType >
void mrs_lib::PublisherHandler_impl< TopicType >::publish ( const boost::shared_ptr< TopicType > &  msg)

publish message, boost ptr overload

Parameters
msg

◆ publish() [2/3]

template<class TopicType >
void mrs_lib::PublisherHandler_impl< TopicType >::publish ( const boost::shared_ptr< TopicType const > &  msg)

publish message, boost const ptr overload

Parameters
msg

◆ publish() [3/3]

template<class TopicType >
void mrs_lib::PublisherHandler_impl< TopicType >::publish ( const TopicType &  msg)

publish message

Parameters
msgdata

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