Go to the documentation of this file.
28 #ifndef ROSCPP_SUBSCRIBE_OPTIONS_H
29 #define ROSCPP_SUBSCRIBE_OPTIONS_H
51 , allow_concurrent_callbacks(false)
64 SubscribeOptions(
const std::string& _topic, uint32_t _queue_size,
const std::string& _md5sum,
const std::string& _datatype)
66 , queue_size(_queue_size)
70 , allow_concurrent_callbacks(false)
83 const boost::function<
void (P)>& _callback,
88 queue_size = _queue_size;
89 md5sum = message_traits::md5sum<MessageType>();
90 datatype = message_traits::datatype<MessageType>();
91 helper = boost::make_shared<SubscriptionCallbackHelperT<P> >(_callback, factory_fn);
103 void init(
const std::string& _topic, uint32_t _queue_size,
109 queue_size = _queue_size;
110 md5sum = message_traits::md5sum<MessageType>();
111 datatype = message_traits::datatype<MessageType>();
112 helper = boost::make_shared<SubscriptionCallbackHelperT<const boost::shared_ptr<MessageType const>&> >(_callback, factory_fn);
159 ops.
init<M>(topic, queue_size, callback);
std::string topic
Topic to subscribe to.
TransportHints transport_hints
Hints for transport type and options.
Provides a way of specifying network transport hints to ros::NodeHandle::subscribe() and someday ros:...
CallbackQueueInterface * callback_queue
Queue to add callbacks to. If NULL, the global callback queue will be used.
bool allow_concurrent_callbacks
SubscribeOptions(const std::string &_topic, uint32_t _queue_size, const std::string &_md5sum, const std::string &_datatype)
Constructor.
VoidConstPtr tracked_object
An object whose destruction will prevent the callback associated with this subscription.
void init(const std::string &_topic, uint32_t _queue_size, const boost::function< void(const boost::shared_ptr< M const > &)> &_callback, const boost::function< boost::shared_ptr< M >(void)> &factory_fn=DefaultMessageCreator< M >())
Templated initialization, templated on message type. Only supports "const boost::shared_ptr<M const>&...
std::string md5sum
MD5 of the message datatype.
boost::remove_reference< typename boost::remove_const< M >::type >::type Message
static SubscribeOptions create(const std::string &topic, uint32_t queue_size, const boost::function< void(const boost::shared_ptr< M const > &)> &callback, const VoidConstPtr &tracked_object, CallbackQueueInterface *queue)
Templated helper function for creating an AdvertiseServiceOptions with most of its options.
void initByFullCallbackType(const std::string &_topic, uint32_t _queue_size, const boost::function< void(P)> &_callback, const boost::function< boost::shared_ptr< typename ParameterAdapter< P >::Message >(void)> &factory_fn=DefaultMessageCreator< typename ParameterAdapter< P >::Message >())
Templated initialization, templated on callback parameter type. Supports any callback parameters supp...
Encapsulates all options available for creating a Subscriber.
uint32_t queue_size
Number of incoming messages to queue up for processing (messages in excess of this queue capacity wil...
std::string datatype
Datatype of the message we'd like to subscribe as.
SubscriptionCallbackHelperPtr helper
Helper object used to get create messages and call callbacks.
Abstract interface for a queue used to handle all callbacks within roscpp.
roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim, Dirk Thomas
, Jacob Perron
autogenerated on Sat Sep 14 2024 02:59:35