Go to the documentation of this file.
28 #ifndef ROSCPP_TOPIC_MANAGER_H
29 #define ROSCPP_TOPIC_MANAGER_H
38 #include <boost/bind/bind.hpp>
39 #include <boost/thread/mutex.hpp>
40 #include <boost/thread/recursive_mutex.hpp>
46 struct SubscribeOptions;
47 struct AdvertiseOptions;
58 class ConnectionManager;
61 class SubscriptionCallbackHelper;
111 size_t getNumSubscribers(
const std::string &_topic);
112 size_t getNumSubscriptions();
120 size_t getNumPublishers(
const std::string &_topic);
123 void publish(
const std::string& topic,
const M& message)
125 using namespace serialization;
128 publish(topic, boost::bind(serializeMessage<M>, boost::ref(message)), m);
133 void incrementSequence(
const std::string &_topic);
134 bool isLatched(
const std::string& topic);
159 bool isTopicAdvertised(
const std::string& topic);
161 bool registerSubscriber(
const SubscriptionPtr& s,
const std::string& datatype);
162 bool unregisterSubscriber(
const std::string& topic);
163 bool unregisterPublisher(
const std::string& topic);
165 PublicationPtr lookupPublicationWithoutLock(
const std::string &topic);
167 void processPublishQueues();
211 bool pubUpdate(
const std::string &topic,
const std::vector<std::string> &pubs);
240 #endif // ROSCPP_TOPIC_MANAGER_H
boost::shared_ptr< SubscriptionCallbackHelper > SubscriptionCallbackHelperPtr
PollManagerPtr poll_manager_
ROSCPP_DECL void shutdown()
Disconnects everything and unregisters from the master. It is generally not necessary to call this fu...
std::list< std::string > advertised_topic_names_
Encapsulates all options available for creating a Publisher.
ConnectionManagerPtr connection_manager_
L_Subscription subscriptions_
V_Publication advertised_topics_
std::vector< PublicationPtr > V_Publication
boost::shared_ptr< TopicManager > TopicManagerPtr
boost::mutex shutting_down_mutex_
ROSCPP_DECL void start()
Actually starts the internals of the node (spins up threads, starts the network polling and xmlrpc lo...
void publish(const std::string &topic, const M &message)
boost::mutex advertised_topic_names_mutex_
Encapsulates all options available for creating a Subscriber.
boost::shared_ptr< ConnectionManager > ConnectionManagerPtr
ROSCPP_DECL void getAdvertisedTopics(V_string &topics)
Get the list of topics advertised by this node.
std::vector< std::string > V_string
boost::shared_ptr< PollManager > PollManagerPtr
XMLRPCManagerPtr xmlrpc_manager_
ROSCPP_DECL void getSubscribedTopics(V_string &topics)
Get the list of topics subscribed to by this node.
boost::shared_ptr< XMLRPCManager > XMLRPCManagerPtr
volatile bool shutting_down_
boost::recursive_mutex advertised_topics_mutex_
std::list< SubscriptionPtr > L_Subscription
roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim, Dirk Thomas
, Jacob Perron
autogenerated on Tue May 20 2025 03:00:11