transport/transport.hh More...
#include <SubscriptionTransport.hh>
Inherits CallbackHelper.
Public Member Functions | |
| SubscriptionTransport () | |
| Constructor. More... | |
| virtual | ~SubscriptionTransport () |
| Destructor. More... | |
| const ConnectionPtr & | GetConnection () const |
| Get the connection we're using. More... | |
| unsigned int | GetId () const |
| Get the unique ID of this callback. More... | |
| bool | GetLatching () const |
| Is the callback latching? More... | |
| virtual 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) |
| Output a message to a connection. More... | |
| virtual bool | HandleMessage (MessagePtr _newMsg) |
| Process new incoming message. More... | |
| void | Init (ConnectionPtr _conn, bool _latching) |
| Initialize the publication link. More... | |
| virtual bool | IsLocal () const |
| Is the callback local? More... | |
| void | SetLatching (bool _latch) |
| Set whether this callback is latching. More... | |
Protected Attributes | |
| 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... | |
transport/transport.hh
Handles sending data over the wire to remote subscribers
Constructor.
|
virtual |
Destructor.
| const ConnectionPtr& GetConnection | ( | ) | const |
Get the connection we're using.
|
inherited |
Get the unique ID of this callback.
|
inherited |
Is the callback latching?
|
virtualinherited |
Get the typename of the message that is handled.
Reimplemented in RawCallbackHelper, and CallbackHelperT< M >.
|
virtual |
Output a message to a connection.
| [in] | _newdata | The message to be handled |
| [in] | _cb | If non-null, callback to be invoked after transmission is complete. |
| [in] | _id | ID associated with the message data. |
Implements CallbackHelper.
|
virtual |
Process new incoming message.
| [in] | _newMsg | Incoming message to be processed |
Implements CallbackHelper.
| void Init | ( | ConnectionPtr | _conn, |
| bool | _latching | ||
| ) |
Initialize the publication link.
| [in] | _conn | The connection to use |
| [in] | _latching | If true, latch the latest message; if false, don't latch |
|
virtual |
Is the callback local?
Implements CallbackHelper.
|
inherited |
Set whether this callback is latching.
This function should only be used by the Transport library.
| [in] | _latch | False to turn off latching. |
Referenced by CallbackHelperT< M >::HandleData(), RawCallbackHelper::HandleData(), CallbackHelperT< M >::HandleMessage(), and RawCallbackHelper::HandleMessage().
|
protectedinherited |
True means that the callback helper will get the last published message on the topic.
|
mutableprotectedinherited |
Mutex to protect the latching variable.