A helper class to handle callbacks when messages arrive. More...
#include <transport/transport.hh>
Public Member Functions | |
CallbackHelper (bool _latching=false) | |
Constructor. | |
virtual | ~CallbackHelper () |
Destructor. | |
unsigned int | GetId () const |
Get the unique ID of this callback. | |
bool | GetLatching () const |
Is the callback latching? | |
virtual std::string | GetMsgType () const |
Get the typename of the message that is handled. | |
virtual bool | HandleData (const std::string &_newdata, boost::function< void(uint32_t)> _cb, uint32_t _id)=0 |
Process new incoming data. | |
virtual bool | HandleMessage (MessagePtr _newMsg)=0 |
Process new incoming message. | |
virtual bool | IsLocal () const =0 |
Is the callback local? |
Protected Attributes | |
bool | latching |
True means that the callback helper will get the last published message on the topic. |
A helper class to handle callbacks when messages arrive.
gazebo::transport::CallbackHelper::CallbackHelper | ( | bool | _latching = false | ) |
Constructor.
[in] | _latching | Set to true to make the callback helper latching. |
|
virtual |
Destructor.
unsigned int gazebo::transport::CallbackHelper::GetId | ( | ) | const |
Get the unique ID of this callback.
bool gazebo::transport::CallbackHelper::GetLatching | ( | ) | const |
Is the callback latching?
|
virtual |
Get the typename of the message that is handled.
Reimplemented in gazebo::transport::RawCallbackHelper, and gazebo::transport::CallbackHelperT< M >.
|
pure virtual |
Process new incoming data.
[in] | _newdata | Incoming data to be processed |
[in] | _cb | If non-null, callback to be invoked which signals that transmission is complete. |
[in] | _id | ID associated with the message data. |
Implemented in gazebo::transport::RawCallbackHelper, gazebo::transport::CallbackHelperT< M >, and gazebo::transport::SubscriptionTransport.
|
pure virtual |
Process new incoming message.
[in] | _newMsg | Incoming message to be processed |
Implemented in gazebo::transport::RawCallbackHelper, gazebo::transport::CallbackHelperT< M >, and gazebo::transport::SubscriptionTransport.
|
pure virtual |
Is the callback local?
Implemented in gazebo::transport::RawCallbackHelper, gazebo::transport::CallbackHelperT< M >, and gazebo::transport::SubscriptionTransport.
|
protected |
True means that the callback helper will get the last published message on the topic.