Allows publication of an image to a single subscriber. Only available inside subscriber connection callbacks. More...
#include <single_subscriber_publisher.h>
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 |
Allows publication of an image to a single subscriber. Only available inside subscriber connection callbacks.
Definition at line 48 of file single_subscriber_publisher.h.
typedef boost::function<uint32_t()> image_transport::SingleSubscriberPublisher::GetNumSubscribersFn |
Definition at line 51 of file single_subscriber_publisher.h.
typedef boost::function<void(const sensor_msgs::Image&)> image_transport::SingleSubscriberPublisher::PublishFn |
Definition at line 52 of file single_subscriber_publisher.h.
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 40 of file single_subscriber_publisher.cpp.
uint32_t image_transport::SingleSubscriberPublisher::getNumSubscribers | ( | ) | const |
Definition at line 59 of file single_subscriber_publisher.cpp.
std::string image_transport::SingleSubscriberPublisher::getSubscriberName | ( | ) | const |
Definition at line 49 of file single_subscriber_publisher.cpp.
std::string image_transport::SingleSubscriberPublisher::getTopic | ( | ) | const |
Definition at line 54 of file single_subscriber_publisher.cpp.
void image_transport::SingleSubscriberPublisher::publish | ( | const sensor_msgs::Image & | message | ) | const |
Definition at line 64 of file single_subscriber_publisher.cpp.
void image_transport::SingleSubscriberPublisher::publish | ( | const sensor_msgs::ImageConstPtr & | message | ) | const |
Definition at line 69 of file single_subscriber_publisher.cpp.
friend class Publisher [friend] |
Definition at line 73 of file single_subscriber_publisher.h.
std::string image_transport::SingleSubscriberPublisher::caller_id_ [private] |
Definition at line 68 of file single_subscriber_publisher.h.
Definition at line 70 of file single_subscriber_publisher.h.
Definition at line 71 of file single_subscriber_publisher.h.
std::string image_transport::SingleSubscriberPublisher::topic_ [private] |
Definition at line 69 of file single_subscriber_publisher.h.