It creates a subscription handler for a specific protobuf message. More...
#include <SubscriptionHandler.hh>

Public Member Functions | |
| SubscriptionHandler (const std::string &_nUuid, const SubscribeOptions &_opts=SubscribeOptions()) | |
| const std::shared_ptr< ProtoMsg > | CreateMsg (const std::string &_data, const std::string &) const |
| Create a specific protobuf message given its serialized data. More... | |
| bool | RunLocalCallback (const ProtoMsg &_msg, const MessageInfo &_info) |
| Executes the local callback registered for this handler. More... | |
| void | SetCallback (const MsgCallback< T > &_cb) |
| Set the callback for this handler. More... | |
| std::string | TypeName () |
| Get the type of the messages from which this subscriber handler is subscribed. More... | |
Public Member Functions inherited from ignition::transport::ISubscriptionHandler | |
| ISubscriptionHandler (const std::string &_nUuid, const SubscribeOptions &_opts=SubscribeOptions()) | |
| Constructor. More... | |
| virtual | ~ISubscriptionHandler () |
| Destructor. More... | |
| std::string | HandlerUuid () const |
| Get the unique UUID of this handler. More... | |
| std::string | NodeUuid () const |
| Get the node UUID. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ignition::transport::ISubscriptionHandler | |
| bool | UpdateThrottling () |
| Check if message subscription is throttled. More... | |
Protected Attributes inherited from ignition::transport::ISubscriptionHandler | |
| std::string | hUuid |
| Unique handler's UUID. More... | |
| Timestamp | lastCbTimestamp |
| Timestamp of the last callback executed. More... | |
| SubscribeOptions | opts |
| Subscribe options. More... | |
| double | periodNs |
| If throttling is enabled, the minimum period for receiving a message in nanoseconds. More... | |
It creates a subscription handler for a specific protobuf message.
'T' is the Protobuf message type that will be used for this particular handler.
|
inlineexplicit |
|
inlinevirtual |
Create a specific protobuf message given its serialized data.
| [in] | _data | The serialized data. |
| [in] | _type | The data type. |
Implements ignition::transport::ISubscriptionHandler.
|
inlinevirtual |
Executes the local callback registered for this handler.
| [in] | _msg | Protobuf message received. |
| [in] | _info | Message information (e.g.: topic name). |
Implements ignition::transport::ISubscriptionHandler.
|
inline |
Set the callback for this handler.
| [in] | _cb | The callback with the following parameters: |
|
inlinevirtual |
Get the type of the messages from which this subscriber handler is subscribed.
Implements ignition::transport::ISubscriptionHandler.