Public Types | Public Member Functions | Private Attributes | Friends | List of all members
image_transport::SingleSubscriberPublisher Class Reference

Allows publication of an image to a single subscriber. Only available inside subscriber connection callbacks. More...

#include <single_subscriber_publisher.h>

Inheritance diagram for image_transport::SingleSubscriberPublisher:
Inheritance graph
[legend]

Public Types

typedef boost::function< uint32_t()> GetNumSubscribersFn
 
typedef boost::function< void(const sensor_msgs::Image &)> PublishFn
 

Public Member Functions

uint32_t getNumSubscribers () const
 
std::string getSubscriberName () const
 
std::string getTopic () const
 
void publish (const sensor_msgs::Image &message) const
 
void publish (const sensor_msgs::ImageConstPtr &message) const
 
 SingleSubscriberPublisher (const std::string &caller_id, const std::string &topic, const GetNumSubscribersFn &num_subscribers_fn, const PublishFn &publish_fn)
 

Private Attributes

std::string caller_id_
 
GetNumSubscribersFn num_subscribers_fn_
 
PublishFn publish_fn_
 
std::string topic_
 

Friends

class Publisher
 

Detailed Description

Allows publication of an image to a single subscriber. Only available inside subscriber connection callbacks.

Definition at line 81 of file single_subscriber_publisher.h.

Member Typedef Documentation

◆ GetNumSubscribersFn

Definition at line 116 of file single_subscriber_publisher.h.

◆ PublishFn

typedef boost::function<void(const sensor_msgs::Image&)> image_transport::SingleSubscriberPublisher::PublishFn

Definition at line 117 of file single_subscriber_publisher.h.

Constructor & Destructor Documentation

◆ SingleSubscriberPublisher()

image_transport::SingleSubscriberPublisher::SingleSubscriberPublisher ( const std::string &  caller_id,
const std::string &  topic,
const GetNumSubscribersFn num_subscribers_fn,
const PublishFn publish_fn 
)

Definition at line 72 of file single_subscriber_publisher.cpp.

Member Function Documentation

◆ getNumSubscribers()

uint32_t image_transport::SingleSubscriberPublisher::getNumSubscribers ( ) const

Definition at line 91 of file single_subscriber_publisher.cpp.

◆ getSubscriberName()

std::string image_transport::SingleSubscriberPublisher::getSubscriberName ( ) const

Definition at line 81 of file single_subscriber_publisher.cpp.

◆ getTopic()

std::string image_transport::SingleSubscriberPublisher::getTopic ( ) const

Definition at line 86 of file single_subscriber_publisher.cpp.

◆ publish() [1/2]

void image_transport::SingleSubscriberPublisher::publish ( const sensor_msgs::Image &  message) const

Definition at line 96 of file single_subscriber_publisher.cpp.

◆ publish() [2/2]

void image_transport::SingleSubscriberPublisher::publish ( const sensor_msgs::ImageConstPtr &  message) const

Definition at line 101 of file single_subscriber_publisher.cpp.

Friends And Related Function Documentation

◆ Publisher

friend class Publisher
friend

Definition at line 138 of file single_subscriber_publisher.h.

Member Data Documentation

◆ caller_id_

std::string image_transport::SingleSubscriberPublisher::caller_id_
private

Definition at line 133 of file single_subscriber_publisher.h.

◆ num_subscribers_fn_

GetNumSubscribersFn image_transport::SingleSubscriberPublisher::num_subscribers_fn_
private

Definition at line 135 of file single_subscriber_publisher.h.

◆ publish_fn_

PublishFn image_transport::SingleSubscriberPublisher::publish_fn_
private

Definition at line 136 of file single_subscriber_publisher.h.

◆ topic_

std::string image_transport::SingleSubscriberPublisher::topic_
private

Definition at line 134 of file single_subscriber_publisher.h.


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


image_transport
Author(s): Patrick Mihelich
autogenerated on Sun Apr 5 2020 03:15:29