Go to the documentation of this file.
28 #ifndef ROSCPP_ADVERTISE_OPTIONS_H
29 #define ROSCPP_ADVERTISE_OPTIONS_H
58 AdvertiseOptions(
const std::string& _topic, uint32_t _queue_size,
const std::string& _md5sum,
59 const std::string& _datatype,
const std::string& _message_definition,
63 , queue_size(_queue_size)
66 , message_definition(_message_definition)
67 , connect_cb(_connect_cb)
68 , disconnect_cb(_disconnect_cb)
84 void init(
const std::string& _topic, uint32_t _queue_size,
89 queue_size = _queue_size;
90 connect_cb = _connect_cb;
91 disconnect_cb = _disconnect_cb;
92 md5sum = message_traits::md5sum<M>();
93 datatype = message_traits::datatype<M>();
94 message_definition = message_traits::definition<M>();
95 has_header = message_traits::hasHeader<M>();
155 ops.
init<M>(topic, queue_size, connect_cb, disconnect_cb);
std::string topic
The topic to publish on.
CallbackQueueInterface * callback_queue
Queue to add callbacks to. If NULL, the global callback queue will be used.
SubscriberStatusCallback connect_cb
The function to call when a subscriber connects to this topic.
SubscriberStatusCallback disconnect_cb
The function to call when a subscriber disconnects from this topic.
std::string datatype
The datatype of the message published on this topic (eg. "std_msgs/String")
bool has_header
Tells whether or not the message has a header. If it does, the sequence number will be written direct...
boost::function< void(const SingleSubscriberPublisher &)> SubscriberStatusCallback
Encapsulates all options available for creating a Publisher.
AdvertiseOptions(const std::string &_topic, uint32_t _queue_size, const std::string &_md5sum, const std::string &_datatype, const std::string &_message_definition, const SubscriberStatusCallback &_connect_cb=SubscriberStatusCallback(), const SubscriberStatusCallback &_disconnect_cb=SubscriberStatusCallback())
bool latch
Whether or not this publication should "latch". A latching publication will automatically send out th...
uint32_t queue_size
The maximum number of outgoing messages to be queued for delivery to subscribers.
static AdvertiseOptions create(const std::string &topic, uint32_t queue_size, const SubscriberStatusCallback &connect_cb, const SubscriberStatusCallback &disconnect_cb, const VoidConstPtr &tracked_object, CallbackQueueInterface *queue)
Templated helper function for creating an AdvertiseOptions for a message type with most options.
void init(const std::string &_topic, uint32_t _queue_size, const SubscriberStatusCallback &_connect_cb=SubscriberStatusCallback(), const SubscriberStatusCallback &_disconnect_cb=SubscriberStatusCallback())
templated helper function for automatically filling out md5sum, datatype and message definition
std::string md5sum
The md5sum of the message datatype published on this topic.
std::string message_definition
The full definition of the message published on this topic.
VoidConstPtr tracked_object
An object whose destruction will prevent the callbacks associated with this advertisement from being ...
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