All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
gazebo::transport::Publisher Class Reference

A publisher of messages on a topic. More...

#include <Publisher.hh>

Public Member Functions

 Publisher (const std::string &topic, const std::string &msg_type, unsigned int _limit, bool _latch)
 Use this constructor.
 
virtual ~Publisher ()
 Destructor.
 
bool GetLatching () const
 
std::string GetMsgType () const
 Get the message type.
 
unsigned int GetOutgoingCount () const
 
std::string GetPrevMsg () const
 
std::string GetTopic () const
 Get the topic name.
 
bool HasConnections () const
 
void Publish (const google::protobuf::Message &_message, bool _block=false)
 Publish a message on the topic.
 
template<typename M >
void Publish (M _message, bool _block=false)
 
void SendMessage ()
 Send latest message over the wire. For internal use only.
 
void SetPublication (PublicationPtr &_publication, int _i)
 
void WaitForConnection () const
 Block until a connection has been established with this publisher.
 

Detailed Description

A publisher of messages on a topic.

Constructor & Destructor Documentation

gazebo::transport::Publisher::Publisher ( const std::string &  topic,
const std::string &  msg_type,
unsigned int  _limit,
bool  _latch 
)

Use this constructor.

Parameters
topicName of topic
msg_typeType of the message which is to be published
virtual gazebo::transport::Publisher::~Publisher ( )
virtual

Destructor.

Member Function Documentation

bool gazebo::transport::Publisher::GetLatching ( ) const
std::string gazebo::transport::Publisher::GetMsgType ( ) const

Get the message type.

unsigned int gazebo::transport::Publisher::GetOutgoingCount ( ) const
std::string gazebo::transport::Publisher::GetPrevMsg ( ) const
std::string gazebo::transport::Publisher::GetTopic ( ) const

Get the topic name.

bool gazebo::transport::Publisher::HasConnections ( ) const
void gazebo::transport::Publisher::Publish ( const google::protobuf::Message &  _message,
bool  _block = false 
)
inline

Publish a message on the topic.

template<typename M >
void gazebo::transport::Publisher::Publish ( _message,
bool  _block = false 
)
inline
void gazebo::transport::Publisher::SendMessage ( )

Send latest message over the wire. For internal use only.

void gazebo::transport::Publisher::SetPublication ( PublicationPtr _publication,
int  _i 
)
void gazebo::transport::Publisher::WaitForConnection ( ) const

Block until a connection has been established with this publisher.


The documentation for this class was generated from the following file: