Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
image_transport::SubscriberPlugin Class Referenceabstract

Base class for plugins to Subscriber. More...

#include <subscriber_plugin.h>

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

Public Types

typedef boost::function< void(const sensor_msgs::ImageConstPtr &)> Callback
 

Public Member Functions

virtual uint32_t getNumPublishers () const =0
 Returns the number of publishers this subscriber is connected to. More...
 
virtual std::string getTopic () const =0
 Get the transport-specific communication topic. More...
 
virtual std::string getTransportName () const =0
 Get a string identifier for the transport provided by this plugin. More...
 
virtual void shutdown ()=0
 Unsubscribe the callback associated with this SubscriberPlugin. More...
 
void subscribe (ros::NodeHandle &nh, const std::string &base_topic, uint32_t queue_size, const Callback &callback, const ros::VoidPtr &tracked_object=ros::VoidPtr(), const TransportHints &transport_hints=TransportHints())
 Subscribe to an image topic, version for arbitrary boost::function object. More...
 
void subscribe (ros::NodeHandle &nh, const std::string &base_topic, uint32_t queue_size, void(*fp)(const sensor_msgs::ImageConstPtr &), const TransportHints &transport_hints=TransportHints())
 Subscribe to an image topic, version for bare function. More...
 
template<class T >
void subscribe (ros::NodeHandle &nh, const std::string &base_topic, uint32_t queue_size, void(T::*fp)(const sensor_msgs::ImageConstPtr &), const boost::shared_ptr< T > &obj, const TransportHints &transport_hints=TransportHints())
 Subscribe to an image topic, version for class member function with shared_ptr. More...
 
template<class T >
void subscribe (ros::NodeHandle &nh, const std::string &base_topic, uint32_t queue_size, void(T::*fp)(const sensor_msgs::ImageConstPtr &), T *obj, const TransportHints &transport_hints=TransportHints())
 Subscribe to an image topic, version for class member function with bare pointer. More...
 
virtual ~SubscriberPlugin ()
 

Static Public Member Functions

static std::string getLookupName (const std::string &transport_type)
 Return the lookup name of the SubscriberPlugin associated with a specific transport identifier. More...
 

Protected Member Functions

virtual void subscribeImpl (ros::NodeHandle &nh, const std::string &base_topic, uint32_t queue_size, const Callback &callback, const ros::VoidPtr &tracked_object, const TransportHints &transport_hints)=0
 Subscribe to an image transport topic. Must be implemented by the subclass. More...
 

Detailed Description

Base class for plugins to Subscriber.

Definition at line 80 of file subscriber_plugin.h.

Member Typedef Documentation

◆ Callback

typedef boost::function<void(const sensor_msgs::ImageConstPtr&)> image_transport::SubscriberPlugin::Callback

Definition at line 115 of file subscriber_plugin.h.

Constructor & Destructor Documentation

◆ ~SubscriberPlugin()

virtual image_transport::SubscriberPlugin::~SubscriberPlugin ( )
inlinevirtual

Definition at line 117 of file subscriber_plugin.h.

Member Function Documentation

◆ getLookupName()

static std::string image_transport::SubscriberPlugin::getLookupName ( const std::string &  transport_type)
inlinestatic

Return the lookup name of the SubscriberPlugin associated with a specific transport identifier.

Definition at line 189 of file subscriber_plugin.h.

◆ getNumPublishers()

virtual uint32_t image_transport::SubscriberPlugin::getNumPublishers ( ) const
pure virtual

Returns the number of publishers this subscriber is connected to.

Implemented in image_transport::SimpleSubscriberPlugin< M >.

◆ getTopic()

virtual std::string image_transport::SubscriberPlugin::getTopic ( ) const
pure virtual

Get the transport-specific communication topic.

Implemented in image_transport::SimpleSubscriberPlugin< M >.

◆ getTransportName()

virtual std::string image_transport::SubscriberPlugin::getTransportName ( ) const
pure virtual

Get a string identifier for the transport provided by this plugin.

Implemented in image_transport::RawSubscriber, and ResizedSubscriber.

◆ shutdown()

virtual void image_transport::SubscriberPlugin::shutdown ( )
pure virtual

◆ subscribe() [1/4]

void image_transport::SubscriberPlugin::subscribe ( ros::NodeHandle nh,
const std::string &  base_topic,
uint32_t  queue_size,
const Callback callback,
const ros::VoidPtr tracked_object = ros::VoidPtr(),
const TransportHints transport_hints = TransportHints() 
)
inline

Subscribe to an image topic, version for arbitrary boost::function object.

Definition at line 128 of file subscriber_plugin.h.

◆ subscribe() [2/4]

void image_transport::SubscriberPlugin::subscribe ( ros::NodeHandle nh,
const std::string &  base_topic,
uint32_t  queue_size,
void(*)(const sensor_msgs::ImageConstPtr &)  fp,
const TransportHints transport_hints = TransportHints() 
)
inline

Subscribe to an image topic, version for bare function.

Definition at line 138 of file subscriber_plugin.h.

◆ subscribe() [3/4]

template<class T >
void image_transport::SubscriberPlugin::subscribe ( ros::NodeHandle nh,
const std::string &  base_topic,
uint32_t  queue_size,
void(T::*)(const sensor_msgs::ImageConstPtr &)  fp,
const boost::shared_ptr< T > &  obj,
const TransportHints transport_hints = TransportHints() 
)
inline

Subscribe to an image topic, version for class member function with shared_ptr.

Definition at line 162 of file subscriber_plugin.h.

◆ subscribe() [4/4]

template<class T >
void image_transport::SubscriberPlugin::subscribe ( ros::NodeHandle nh,
const std::string &  base_topic,
uint32_t  queue_size,
void(T::*)(const sensor_msgs::ImageConstPtr &)  fp,
T *  obj,
const TransportHints transport_hints = TransportHints() 
)
inline

Subscribe to an image topic, version for class member function with bare pointer.

Definition at line 151 of file subscriber_plugin.h.

◆ subscribeImpl()

virtual void image_transport::SubscriberPlugin::subscribeImpl ( ros::NodeHandle nh,
const std::string &  base_topic,
uint32_t  queue_size,
const Callback callback,
const ros::VoidPtr tracked_object,
const TransportHints transport_hints 
)
protectedpure virtual

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


image_transport
Author(s): Patrick Mihelich
autogenerated on Sat Jan 20 2024 03:14:50