Public Member Functions | Private Member Functions | Private Attributes | List of all members
image_transport::SubscriberFilter Class Reference

Image subscription filter. More...

#include <subscriber_filter.h>

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

Public Member Functions

uint32_t getNumPublishers () const
 Returns the number of publishers this subscriber is connected to. More...
 
const SubscribergetSubscriber () const
 Returns the internal image_transport::Subscriber object. More...
 
std::string getTopic () const
 
std::string getTransport () const
 Returns the name of the transport being used. More...
 
void subscribe (ImageTransport &it, const std::string &base_topic, uint32_t queue_size, const TransportHints &transport_hints=TransportHints())
 Subscribe to a topic. More...
 
 SubscriberFilter (ImageTransport &it, const std::string &base_topic, uint32_t queue_size, const TransportHints &transport_hints=TransportHints())
 Constructor. More...
 
 SubscriberFilter ()
 Empty constructor, use subscribe() to subscribe to a topic. More...
 
void unsubscribe ()
 Force immediate unsubscription of this subscriber from its topic. More...
 
 ~SubscriberFilter ()
 
- Public Member Functions inherited from message_filters::SimpleFilter< sensor_msgs::Image >
const std::string & getName ()
 
Connection registerCallback (const C &callback)
 
Connection registerCallback (void(T::*callback)(P), T *t)
 
Connection registerCallback (void(*callback)(P))
 
Connection registerCallback (const boost::function< void(P)> &callback)
 
void setName (const std::string &name)
 

Private Member Functions

void cb (const sensor_msgs::ImageConstPtr &m)
 

Private Attributes

Subscriber sub_
 

Additional Inherited Members

- Public Types inherited from message_filters::SimpleFilter< sensor_msgs::Image >
typedef boost::function< void(const MConstPtr &)> Callback
 
typedef boost::function< void(const EventType &)> EventCallback
 
typedef ros::MessageEvent< sensor_msgs::Imageconst > EventType
 
typedef boost::shared_ptr< sensor_msgs::Imageconst > MConstPtr
 
- Protected Member Functions inherited from message_filters::SimpleFilter< sensor_msgs::Image >
void signalMessage (const MConstPtr &msg)
 
void signalMessage (const ros::MessageEvent< sensor_msgs::Imageconst > &event)
 

Detailed Description

Image subscription filter.

This class wraps Subscriber as a "filter" compatible with the message_filters package. It acts as a highest-level filter, simply passing messages from an image transport subscription through to the filters which have connected to it.

When this object is destroyed it will unsubscribe from the ROS subscription.

connections

SubscriberFilter has no input connection.

The output connection for the SubscriberFilter object is the same signature as for roscpp subscription callbacks, ie.

void callback(const boost::shared_ptr<const sensor_msgs::Image>&);

Definition at line 64 of file subscriber_filter.h.

Constructor & Destructor Documentation

image_transport::SubscriberFilter::SubscriberFilter ( ImageTransport it,
const std::string &  base_topic,
uint32_t  queue_size,
const TransportHints transport_hints = TransportHints() 
)
inline

Constructor.

See the ros::NodeHandle::subscribe() variants for more information on the parameters

Parameters
nhThe ros::NodeHandle to use to subscribe.
base_topicThe topic to subscribe to.
queue_sizeThe subscription queue size
transport_hintsThe transport hints to pass along

Definition at line 77 of file subscriber_filter.h.

image_transport::SubscriberFilter::SubscriberFilter ( )
inline

Empty constructor, use subscribe() to subscribe to a topic.

Definition at line 86 of file subscriber_filter.h.

image_transport::SubscriberFilter::~SubscriberFilter ( )
inline

Definition at line 90 of file subscriber_filter.h.

Member Function Documentation

void image_transport::SubscriberFilter::cb ( const sensor_msgs::ImageConstPtr &  m)
inlineprivate

Definition at line 153 of file subscriber_filter.h.

uint32_t image_transport::SubscriberFilter::getNumPublishers ( ) const
inline

Returns the number of publishers this subscriber is connected to.

Definition at line 130 of file subscriber_filter.h.

const Subscriber& image_transport::SubscriberFilter::getSubscriber ( ) const
inline

Returns the internal image_transport::Subscriber object.

Definition at line 146 of file subscriber_filter.h.

std::string image_transport::SubscriberFilter::getTopic ( ) const
inline

Definition at line 122 of file subscriber_filter.h.

std::string image_transport::SubscriberFilter::getTransport ( ) const
inline

Returns the name of the transport being used.

Definition at line 138 of file subscriber_filter.h.

void image_transport::SubscriberFilter::subscribe ( ImageTransport it,
const std::string &  base_topic,
uint32_t  queue_size,
const TransportHints transport_hints = TransportHints() 
)
inline

Subscribe to a topic.

If this Subscriber is already subscribed to a topic, this function will first unsubscribe.

Parameters
nhThe ros::NodeHandle to use to subscribe.
base_topicThe topic to subscribe to.
queue_sizeThe subscription queue size
transport_hintsThe transport hints to pass along

Definition at line 105 of file subscriber_filter.h.

void image_transport::SubscriberFilter::unsubscribe ( )
inline

Force immediate unsubscription of this subscriber from its topic.

Definition at line 117 of file subscriber_filter.h.

Member Data Documentation

Subscriber image_transport::SubscriberFilter::sub_
private

Definition at line 158 of file subscriber_filter.h.


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


image_transport
Author(s): Patrick Mihelich
autogenerated on Sat Apr 4 2020 03:14:58