Variant message publisher. More...
#include <Publisher.h>
Classes | |
class | Impl |
Variant message publisher implementation. More... | |
Public Member Functions | |
size_t | getNumSubscribers () const |
Retrieve this publisher's number of subscribers. More... | |
std::string | getTopic () const |
Retrieve the topic this publisher publishes on. More... | |
bool | isLatched () const |
True, if the topic this publisher publishes on is latched. More... | |
operator ros::Publisher () const | |
Convert this variant message publisher to a native ROS publisher. More... | |
operator void * () const | |
Void pointer conversion. More... | |
void | publish (const MessageVariant &variant) |
Publish a message variant on the topic associated with this publisher. More... | |
Publisher () | |
Default constructor. More... | |
Publisher (const Publisher &src) | |
Copy constructor. More... | |
void | shutdown () |
Perform shutdown of the publisher. More... | |
~Publisher () | |
Destructor. More... | |
Private Types | |
typedef boost::shared_ptr< Impl > | ImplPtr |
Declaration of the publisher implementation pointer type. More... | |
typedef boost::weak_ptr< Impl > | ImplWPtr |
Declaration of the publisher implementation weak pointer type. More... | |
Private Attributes | |
ImplPtr | impl |
The publisher's implementation. More... | |
Friends | |
class | MessageType |
Variant message publisher.
Definition at line 36 of file Publisher.h.
|
private |
Declaration of the publisher implementation pointer type.
Definition at line 131 of file Publisher.h.
|
private |
Declaration of the publisher implementation weak pointer type.
Definition at line 136 of file Publisher.h.
variant_topic_tools::Publisher::Publisher | ( | ) |
Default constructor.
Definition at line 32 of file Publisher.cpp.
variant_topic_tools::Publisher::Publisher | ( | const Publisher & | src | ) |
Copy constructor.
Definition at line 35 of file Publisher.cpp.
variant_topic_tools::Publisher::~Publisher | ( | ) |
Destructor.
Definition at line 39 of file Publisher.cpp.
size_t variant_topic_tools::Publisher::getNumSubscribers | ( | ) | const |
Retrieve this publisher's number of subscribers.
Definition at line 90 of file Publisher.cpp.
std::string variant_topic_tools::Publisher::getTopic | ( | ) | const |
Retrieve the topic this publisher publishes on.
Definition at line 83 of file Publisher.cpp.
bool variant_topic_tools::Publisher::isLatched | ( | ) | const |
True, if the topic this publisher publishes on is latched.
Definition at line 97 of file Publisher.cpp.
variant_topic_tools::Publisher::operator ros::Publisher | ( | ) | const |
Convert this variant message publisher to a native ROS publisher.
Definition at line 72 of file Publisher.cpp.
|
inline |
Void pointer conversion.
Definition at line 69 of file Publisher.h.
void variant_topic_tools::Publisher::publish | ( | const MessageVariant & | variant | ) |
Publish a message variant on the topic associated with this publisher.
Definition at line 117 of file Publisher.cpp.
void variant_topic_tools::Publisher::shutdown | ( | ) |
Perform shutdown of the publisher.
Definition at line 112 of file Publisher.cpp.
|
friend |
Definition at line 37 of file Publisher.h.
|
private |
The publisher's implementation.
Definition at line 140 of file Publisher.h.