#include <topic_manager.h>
|
bool | addSubCallback (const SubscribeOptions &ops) |
|
void | getBusInfo (XmlRpc::XmlRpcValue &info) |
| Compute the info for the node's connectivity. More...
|
|
void | getBusInfoCallback (XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result) |
|
void | getBusStats (XmlRpc::XmlRpcValue &stats) |
| Compute the statistics for the node's connectivity. More...
|
|
void | getBusStatsCallback (XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result) |
|
void | getPublications (XmlRpc::XmlRpcValue &publications) |
| Return the list of advertised topics for the node. More...
|
|
void | getPublicationsCallback (XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result) |
|
void | getSubscriptions (XmlRpc::XmlRpcValue &subscriptions) |
| Return the list of subcriptions for the node. More...
|
|
void | getSubscriptionsCallback (XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result) |
|
bool | isShuttingDown () |
|
bool | isTopicAdvertised (const std::string &topic) |
|
PublicationPtr | lookupPublicationWithoutLock (const std::string &topic) |
|
void | processPublishQueues () |
|
bool | pubUpdate (const std::string &topic, const std::vector< std::string > &pubs) |
| Update local publisher lists. More...
|
|
void | pubUpdateCallback (XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result) |
|
bool | registerSubscriber (const SubscriptionPtr &s, const std::string &datatype) |
|
bool | requestTopic (const std::string &topic, XmlRpc::XmlRpcValue &protos, XmlRpc::XmlRpcValue &ret) |
| Request a topic. More...
|
|
void | requestTopicCallback (XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result) |
|
bool | unregisterPublisher (const std::string &topic) |
|
bool | unregisterSubscriber (const std::string &topic) |
|
Definition at line 63 of file topic_manager.h.
ros::TopicManager::TopicManager |
( |
| ) |
|
ros::TopicManager::~TopicManager |
( |
| ) |
|
if it finds a pre-existing subscription to the same topic and of the same message type, it appends the Functor to the callback vector for that subscription. otherwise, it returns false, indicating that a new subscription needs to be created.
Definition at line 198 of file topic_manager.cpp.
void ros::TopicManager::getAdvertisedTopics |
( |
V_string & |
topics | ) |
|
Get the list of topics advertised by this node.
- Parameters
-
[out] | topics | The advertised topics |
Definition at line 162 of file topic_manager.cpp.
Compute the info for the node's connectivity.
This is the implementation of the xml-rpc getBusInfo function; it populates the XmlRpcValue object sent to it with various info about the node's connectivity.
Definition at line 937 of file topic_manager.cpp.
Compute the statistics for the node's connectivity.
This is the implementation of the xml-rpc getBusStats function; it populates the XmlRpcValue object sent to it with various statistics about the node's connectivity, bandwidth utilization, etc.
Definition at line 904 of file topic_manager.cpp.
size_t ros::TopicManager::getNumPublishers |
( |
const std::string & |
_topic | ) |
|
Return the number of publishers connected to this node on a particular topic.
- Parameters
-
_topic | the topic name to check |
- Returns
- the number of subscribers
Definition at line 883 of file topic_manager.cpp.
size_t ros::TopicManager::getNumSubscribers |
( |
const std::string & |
_topic | ) |
|
Return the number of subscribers a node has for a particular topic:
- Parameters
-
_topic | The topic name to check |
- Returns
- number of subscribers
Definition at line 859 of file topic_manager.cpp.
size_t ros::TopicManager::getNumSubscriptions |
( |
| ) |
|
Return the list of advertised topics for the node.
This is the implementation of the xml-rpc getPublications function; it populates the XmlRpcValue object sent to it with the list of advertised topics and their datatypes.
Definition at line 982 of file topic_manager.cpp.
void ros::TopicManager::getSubscribedTopics |
( |
V_string & |
topics | ) |
|
Get the list of topics subscribed to by this node.
- Parameters
-
[out] | The | subscribed topics |
Definition at line 172 of file topic_manager.cpp.
Return the list of subcriptions for the node.
This is the implementation of the xml-rpc getSubscriptions function; it populates the XmlRpcValue object sent to it with the list of subscribed topics and their datatypes.
Definition at line 962 of file topic_manager.cpp.
void ros::TopicManager::incrementSequence |
( |
const std::string & |
_topic | ) |
|
bool ros::TopicManager::isLatched |
( |
const std::string & |
topic | ) |
|
bool ros::TopicManager::isShuttingDown |
( |
| ) |
|
|
inlineprivate |
bool ros::TopicManager::isTopicAdvertised |
( |
const std::string & |
topic | ) |
|
|
private |
PublicationPtr ros::TopicManager::lookupPublication |
( |
const std::string & |
topic | ) |
|
Lookup an advertised topic.
This method iterates over advertised_topics, looking for one with name matching the given topic name. The advertised_topics_mutex is locked during this search. This method is only used internally.
- Parameters
-
topic | The topic name to look for. |
- Returns
- Pointer to the matching Publication, NULL if none is found.
Definition at line 186 of file topic_manager.cpp.
PublicationPtr ros::TopicManager::lookupPublicationWithoutLock |
( |
const std::string & |
topic | ) |
|
|
private |
void ros::TopicManager::processPublishQueues |
( |
| ) |
|
|
private |
template<typename M >
void ros::TopicManager::publish |
( |
const std::string & |
topic, |
|
|
const M & |
message |
|
) |
| |
|
inline |
bool ros::TopicManager::pubUpdate |
( |
const std::string & |
topic, |
|
|
const std::vector< std::string > & |
pubs |
|
) |
| |
|
private |
Update local publisher lists.
Use this method to update address information for publishers on a given topic.
- Parameters
-
topic | The topic of interest |
pubs | The list of publishers to update. |
- Returns
- true on success, false otherwise.
Definition at line 550 of file topic_manager.cpp.
bool ros::TopicManager::registerSubscriber |
( |
const SubscriptionPtr & |
s, |
|
|
const std::string & |
datatype |
|
) |
| |
|
private |
Request a topic.
Negotiate a subscriber connection on a topic.
- Parameters
-
topic | The topic of interest. |
protos | List of transport protocols, in preference order |
ret | Return value |
- Returns
- true on success, false otherwise
- Todo:
- Consider making this private
Definition at line 588 of file topic_manager.cpp.
void ros::TopicManager::shutdown |
( |
| ) |
|
void ros::TopicManager::start |
( |
| ) |
|
bool ros::TopicManager::unregisterPublisher |
( |
const std::string & |
topic | ) |
|
|
private |
bool ros::TopicManager::unregisterSubscriber |
( |
const std::string & |
topic | ) |
|
|
private |
std::list<std::string> ros::TopicManager::advertised_topic_names_ |
|
private |
boost::mutex ros::TopicManager::advertised_topic_names_mutex_ |
|
private |
boost::recursive_mutex ros::TopicManager::advertised_topics_mutex_ |
|
private |
volatile bool ros::TopicManager::shutting_down_ |
|
private |
boost::mutex ros::TopicManager::shutting_down_mutex_ |
|
private |
boost::mutex ros::TopicManager::subs_mutex_ |
|
private |
The documentation for this class was generated from the following files:
roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim, Dirk Thomas
autogenerated on Mon Nov 2 2020 03:52:27