mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
Loading...
Searching...
No Matches
mrs_lib::PublisherHandler< TopicType > Class Template Reference

user wrapper of the publisher handler implementation More...

#include <publisher_handler.h>

Public Member Functions

 PublisherHandler (void)
 generic constructor
 
 ~PublisherHandler (void)
 generic destructor
 
PublisherHandleroperator= (const PublisherHandler &other)
 operator=
 
 PublisherHandler (const PublisherHandler &other)
 copy constructor
 
 PublisherHandler (const rclcpp::Node::SharedPtr &node, const std::string &address)
 slim constructor
 
 PublisherHandler (const PublisherHandlerOptions &options, const std::string &address)
 full constructor
 
void publish (const TopicType &msg)
 publish message
 
void publish (const std::shared_ptr< TopicType > &msg)
 publish message, std ptr overload
 
void publish (typename TopicType::ConstSharedPtr msg)
 publish message, std const ptr overload
 
unsigned int getNumSubscribers (void)
 get number of subscribers
 

Detailed Description

template<class TopicType>
class mrs_lib::PublisherHandler< TopicType >

user wrapper of the publisher handler implementation

Constructor & Destructor Documentation

◆ PublisherHandler() [1/3]

template<class TopicType >
mrs_lib::PublisherHandler< TopicType >::PublisherHandler ( const PublisherHandler< TopicType > &  other)

copy constructor

Parameters
other

◆ PublisherHandler() [2/3]

template<class TopicType >
mrs_lib::PublisherHandler< TopicType >::PublisherHandler ( const rclcpp::Node::SharedPtr &  node,
const std::string &  address 
)

slim constructor

Parameters
node
address

◆ PublisherHandler() [3/3]

template<class TopicType >
mrs_lib::PublisherHandler< TopicType >::PublisherHandler ( const PublisherHandlerOptions options,
const std::string &  address 
)

full constructor

Parameters
options
address

Member Function Documentation

◆ getNumSubscribers()

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

get number of subscribers

Returns
the number of subscribers

◆ operator=()

template<class TopicType >
PublisherHandler< TopicType > & mrs_lib::PublisherHandler< TopicType >::operator= ( const PublisherHandler< TopicType > &  other)

operator=

Parameters
other
Returns

◆ publish() [1/3]

template<class TopicType >
void mrs_lib::PublisherHandler< TopicType >::publish ( const std::shared_ptr< TopicType > &  msg)

publish message, std ptr overload

Parameters
msg

◆ publish() [2/3]

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

publish message

Parameters
msg

◆ publish() [3/3]

template<class TopicType >
void mrs_lib::PublisherHandler< TopicType >::publish ( typename TopicType::ConstSharedPtr  msg)

publish message, std const ptr overload

Parameters
msg

publish message, std const ptr overload

Parameters
msg

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