Add getSubscriberName(), deprecate getSubscriberCallerID()

This commit is contained in:
Josh Faust 2009-09-23 17:49:13 +00:00
parent ed90ea28fb
commit 0a1a9eb4d7
2 changed files with 18 additions and 1 deletions

View File

@ -59,8 +59,20 @@ public:
*/
void publish(const Message& message) const;
/**
* \brief Returns the topic this publisher publishes on
*/
std::string getTopic() const;
std::string getSubscriberCallerID() const;
/**
* \deprecated in favor of getSubscriberName()
*/
ROSCPP_DEPRECATED std::string getSubscriberCallerID() const;
/**
* \brief Returns the name of the subscriber node
*/
std::string getSubscriberName() const;
private:

View File

@ -59,4 +59,9 @@ std::string SingleSubscriberPublisher::getSubscriberCallerID() const
return link_->getDestinationCallerID();
}
std::string SingleSubscriberPublisher::getSubscriberName() const
{
return link_->getDestinationCallerID();
}
} // namespace ros