28 #ifndef ROSCPP_TOPIC_MANAGER_H 29 #define ROSCPP_TOPIC_MANAGER_H 38 #include <boost/thread/mutex.hpp> 39 #include <boost/thread/recursive_mutex.hpp> 45 struct SubscribeOptions;
46 struct AdvertiseOptions;
57 class ConnectionManager;
60 class SubscriptionCallbackHelper;
66 static const TopicManagerPtr& instance();
75 bool unsubscribe(
const std::string &_topic,
const SubscriptionCallbackHelperPtr& helper);
110 size_t getNumSubscribers(
const std::string &_topic);
111 size_t getNumSubscriptions();
119 size_t getNumPublishers(
const std::string &_topic);
122 void publish(
const std::string& topic,
const M& message)
124 using namespace serialization;
127 publish(topic, boost::bind(serializeMessage<M>, boost::ref(message)), m);
132 void incrementSequence(
const std::string &_topic);
133 bool isLatched(
const std::string& topic);
158 bool isTopicAdvertised(
const std::string& topic);
161 bool unregisterSubscriber(
const std::string& topic);
162 bool unregisterPublisher(
const std::string& topic);
164 PublicationPtr lookupPublicationWithoutLock(
const std::string &topic);
166 void processPublishQueues();
210 bool pubUpdate(
const std::string &topic,
const std::vector<std::string> &pubs);
239 #endif // ROSCPP_TOPIC_MANAGER_H XMLRPCManagerPtr xmlrpc_manager_
volatile bool shutting_down_
std::list< std::string > advertised_topic_names_
ROSCPP_DECL void start()
Actually starts the internals of the node (spins up threads, starts the network polling and xmlrpc lo...
L_Subscription subscriptions_
boost::shared_ptr< XMLRPCManager > XMLRPCManagerPtr
PollManagerPtr poll_manager_
Encapsulates all options available for creating a Publisher.
std::vector< PublicationPtr > V_Publication
boost::shared_ptr< SubscriptionCallbackHelper > SubscriptionCallbackHelperPtr
boost::shared_ptr< ConnectionManager > ConnectionManagerPtr
boost::mutex shutting_down_mutex_
boost::shared_ptr< TopicManager > TopicManagerPtr
std::vector< std::string > V_string
boost::mutex advertised_topic_names_mutex_
Encapsulates all options available for creating a Subscriber.
V_Publication advertised_topics_
ROSCPP_DECL void getSubscribedTopics(V_string &topics)
Get the list of topics subscribed to by this node.
ROSCPP_DECL void getAdvertisedTopics(V_string &topics)
Get the list of topics advertised by this node.
ROSCPP_DECL void shutdown()
Disconnects everything and unregisters from the master. It is generally not necessary to call this fu...
std::list< SubscriptionPtr > L_Subscription
void publish(const std::string &topic, const M &message)
boost::shared_ptr< PollManager > PollManagerPtr
boost::recursive_mutex advertised_topics_mutex_
ConnectionManagerPtr connection_manager_