Callback helper Template. More...
#include <transport/transport.hh>
Public Member Functions | |
CallbackHelperT (const boost::function< void(const boost::shared_ptr< M const > &)> &_cb, bool _latching=false) | |
Constructor. More... | |
std::string | GetMsgType () const |
Get the typename of the message that is handled. More... | |
virtual bool | HandleData (const std::string &_newdata, boost::function< void(uint32_t)> _cb, uint32_t _id) |
Process new incoming data. More... | |
virtual bool | HandleMessage (MessagePtr _newMsg) |
Process new incoming message. More... | |
virtual bool | IsLocal () const |
Is the callback local? More... | |
Public Member Functions inherited from gazebo::transport::CallbackHelper | |
CallbackHelper (bool _latching=false) | |
Constructor. More... | |
virtual | ~CallbackHelper () |
Destructor. More... | |
unsigned int | GetId () const |
Get the unique ID of this callback. More... | |
bool | GetLatching () const |
Is the callback latching? More... | |
void | SetLatching (bool _latch) |
Set whether this callback is latching. More... | |
Additional Inherited Members | |
Protected Attributes inherited from gazebo::transport::CallbackHelper | |
bool | latching |
True means that the callback helper will get the last published message on the topic. More... | |
std::mutex | latchingMutex |
Mutex to protect the latching variable. More... | |
Callback helper Template.
|
inline |
Constructor.
[in] | _cb | boost function to call on incoming messages |
[in] | _latching | Set to true to make the callback helper latching. |
|
inlinevirtual |
Get the typename of the message that is handled.
Reimplemented from gazebo::transport::CallbackHelper.
|
inlinevirtual |
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. |
Implements gazebo::transport::CallbackHelper.
References gazebo::transport::CallbackHelper::SetLatching().
|
inlinevirtual |
Process new incoming message.
[in] | _newMsg | Incoming message to be processed |
Implements gazebo::transport::CallbackHelper.
References gazebo::transport::CallbackHelper::SetLatching().
|
inlinevirtual |
Is the callback local?
Implements gazebo::transport::CallbackHelper.