Go to the documentation of this file.
29 #ifndef ROSCPP_ADVERTISE_OPTIONS_H
30 #define ROSCPP_ADVERTISE_OPTIONS_H
32 #include "ros/forwards.h"
33 #include "ros/message_traits.h"
59 AdvertiseOptions(
const std::string& _topic, uint32_t _queue_size,
const std::string& _md5sum,
60 const std::string& _datatype,
const std::string& _message_definition,
67 , message_definition(_message_definition)
68 , connect_cb(_connect_cb)
69 , disconnect_cb(_disconnect_cb)
85 void init(
const std::string& _topic, uint32_t _queue_size,
91 connect_cb = _connect_cb;
92 disconnect_cb = _disconnect_cb;
93 md5sum = message_traits::md5sum<M>();
94 datatype = message_traits::datatype<M>();
95 message_definition = message_traits::definition<M>();
96 has_header = message_traits::hasHeader<M>();
const char * md5sum()
returns MD5Sum<M>::value();
const char * datatype()
returns DataType<M>::value();
SubscriberStatusCallback disconnect_cb
The function to call when a subscriber disconnects from this topic.
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 has_header
Tells whether or not the message has a header. If it does, the sequence number will be written direct...
bool latch
Whether or not this publication should "latch". A latching publication will automatically send out th...
VoidConstPtr tracked_object
An object whose destruction will prevent the callbacks associated with this advertisement from being ...
SubscriberStatusCallback connect_cb
The function to call when a subscriber connects to this topic.
Abstract interface for a queue used to handle all callbacks within roscpp.
std::string message_definition
The full definition of the message published on this topic.
std::string md5sum
The md5sum of the message datatype published on this topic.
uint32_t queue_size
The maximum number of outgoing messages to be queued for delivery to subscribers.
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 topic
The topic to publish on.
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.
std::function< void(const SingleSubscriberPublisher &)> SubscriberStatusCallback
CallbackQueueInterface * callback_queue
Queue to add callbacks to. If NULL, the global callback queue will be used.
std::shared_ptr< void const > VoidConstPtr
std::string datatype
The datatype of the message published on this topic (eg. "std_msgs/String")
sick_scan_xd
Author(s): Michael Lehning
, Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:07