35 #ifndef IMAGE_TRANSPORT_SINGLE_SUBSCRIBER_PUBLISHER 36 #define IMAGE_TRANSPORT_SINGLE_SUBSCRIBER_PUBLISHER 38 #include <boost/noncopyable.hpp> 39 #include <boost/function.hpp> 40 #include <sensor_msgs/Image.h> 52 typedef boost::function<void(const sensor_msgs::Image&)>
PublishFn;
55 const GetNumSubscribersFn& num_subscribers_fn,
56 const PublishFn& publish_fn);
64 void publish(
const sensor_msgs::Image& message)
const;
65 void publish(
const sensor_msgs::ImageConstPtr& message)
const;
Manages advertisements of multiple transport options on an Image topic.
SingleSubscriberPublisher(const std::string &caller_id, const std::string &topic, const GetNumSubscribersFn &num_subscribers_fn, const PublishFn &publish_fn)
boost::function< void(const SingleSubscriberPublisher &)> SubscriberStatusCallback
uint32_t getNumSubscribers() const
boost::function< void(const sensor_msgs::Image &)> PublishFn
Allows publication of an image to a single subscriber. Only available inside subscriber connection ca...
GetNumSubscribersFn num_subscribers_fn_
std::string getSubscriberName() const
void publish(const sensor_msgs::Image &message) const
std::string getTopic() const
boost::function< uint32_t()> GetNumSubscribersFn