Used to connect publishers to subscribers, where the subscriber wants the raw data from the publisher.
More...
#include <CallbackHelper.hh>
Public Member Functions |
| RawCallbackHelper (const boost::function< void(const std::string &)> &_cb, bool _latching=false) |
| Constructor.
|
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) |
| Process new incoming data.
|
virtual bool | HandleMessage (MessagePtr _newMsg) |
| Process new incoming message.
|
virtual bool | IsLocal () const |
| Is the callback local?
|
| 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?
|
Additional Inherited Members |
bool | latching |
| True means that the callback helper will get the last published message on the topic.
|
Detailed Description
Used to connect publishers to subscribers, where the subscriber wants the raw data from the publisher.
Raw means that the data has not been converted into a protobuf message.
Constructor & Destructor Documentation
gazebo::transport::RawCallbackHelper::RawCallbackHelper |
( |
const boost::function< void(const std::string &)> & |
_cb, |
|
|
bool |
_latching = false |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
[in] | _cb | boost function to call on incoming messages |
[in] | _latching | Set to true to make the callback helper latching. |
Member Function Documentation
std::string gazebo::transport::RawCallbackHelper::GetMsgType |
( |
| ) |
const |
|
inlinevirtual |
virtual bool gazebo::transport::RawCallbackHelper::HandleData |
( |
const std::string & |
_newdata, |
|
|
boost::function< void(uint32_t)> |
_cb, |
|
|
uint32_t |
_id |
|
) |
| |
|
inlinevirtual |
Process new incoming data.
- Parameters
-
[in] | _newdata | Incoming data to be processed |
- Returns
- true if successfully processed; false otherwise
- Parameters
-
[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.
virtual bool gazebo::transport::RawCallbackHelper::HandleMessage |
( |
MessagePtr |
_newMsg | ) |
|
|
inlinevirtual |
Process new incoming message.
- Parameters
-
[in] | _newMsg | Incoming message to be processed |
- Returns
- true if successfully processed; false otherwise
Implements gazebo::transport::CallbackHelper.
virtual bool gazebo::transport::RawCallbackHelper::IsLocal |
( |
| ) |
const |
|
inlinevirtual |
The documentation for this class was generated from the following file: