41 const GetNumSubscribersFn& num_subscribers_fn,
42 const PublishFn& publish_fn)
43 : caller_id_(caller_id), topic_(topic),
44 num_subscribers_fn_(num_subscribers_fn),
45 publish_fn_(publish_fn)
49 std::string SingleSubscriberPublisher::getSubscriberName()
const
54 std::string SingleSubscriberPublisher::getTopic()
const
59 uint32_t SingleSubscriberPublisher::getNumSubscribers()
const
61 return num_subscribers_fn_();
64 void SingleSubscriberPublisher::publish(
const sensor_msgs::Image& message)
const
69 void SingleSubscriberPublisher::publish(
const sensor_msgs::ImageConstPtr& message)
const
71 publish_fn_(*message);