ISubscriptionHandler Class Referenceabstract
Interface class used to manage generic protobuf messages. More...
#include <SubscriptionHandler.hh>
Public Member Functions | |
| ISubscriptionHandler (const std::string &_pUuid, const std::string &_nUuid, const SubscribeOptions &_opts=SubscribeOptions()) | |
| Constructor.   | |
| virtual | ~ISubscriptionHandler ()=default | 
| Destructor.   | |
| virtual const std::shared_ptr< ProtoMsg > | CreateMsg (const std::string &_data, const std::string &_type) const =0 | 
| Create a specific protobuf message given its serialized data.   | |
| virtual bool | RunLocalCallback (const ProtoMsg &_msg, const MessageInfo &_info)=0 | 
| Executes the local callback registered for this handler.   | |
  Public Member Functions inherited from SubscriptionHandlerBase | |
| SubscriptionHandlerBase (const std::string &_pUuid, const std::string &_nUuid, const SubscribeOptions &_opts=SubscribeOptions()) | |
| Constructor.   | |
| virtual | ~SubscriptionHandlerBase () | 
| Destructor.   | |
| std::string | HandlerUuid () const | 
| Get the unique UUID of this handler.   | |
| bool | IgnoreLocalMessages () const | 
| Return whether local messages are ignored or not.   | |
| std::string | NodeUuid () const | 
| Get the node UUID.   | |
| std::string | ProcUuid () const | 
| Get the process UUID.   | |
| virtual std::string | TypeName ()=0 | 
| Get the type of the messages from which this subscriber handler is subscribed.   | |
Additional Inherited Members | |
  Protected Member Functions inherited from SubscriptionHandlerBase | |
| bool | UpdateThrottling () | 
| Check if message subscription is throttled. If so, verify whether the callback should be executed or not.   | |
  Protected Attributes inherited from SubscriptionHandlerBase | |
| std::unique_ptr< SubscriptionHandlerBasePrivate > | dataPtr | 
| Private data.   | |
| SubscribeOptions | opts | 
| Subscribe options.   | |
| double | periodNs | 
| If throttling is enabled, the minimum period for receiving a message in nanoseconds.   | |
Detailed Description
Interface class used to manage generic protobuf messages.
gz/transport/SubscriptionHandler.hh
This extends SubscriptionHandlerBase by defining virtual functions for deserializing protobuf message data, and for receiving deserialized messages. Those functions are not needed by the RawSubscriptionHandler class.
Constructor & Destructor Documentation
◆ ISubscriptionHandler()
      
  | 
  explicit | 
Constructor.
- Parameters
 - 
  
[in] _pUuid UUID of the process registering the handler. [in] _nUuid UUID of the node registering the handler. [in] _opts Subscription options.  
◆ ~ISubscriptionHandler()
      
  | 
  virtualdefault | 
Destructor.
Member Function Documentation
◆ CreateMsg()
      
  | 
  pure virtual | 
Create a specific protobuf message given its serialized data.
- Parameters
 - 
  
[in] _data The serialized data. [in] _type The data type.  
- Returns
 - Pointer to the specific protobuf message.
 
Implemented in SubscriptionHandler< T >, and SubscriptionHandler< ProtoMsg >.
◆ RunLocalCallback()
      
  | 
  pure virtual | 
Executes the local callback registered for this handler.
- Parameters
 - 
  
[in] _msg Protobuf message received. [in] _info Message information (e.g.: topic name).  
- Returns
 - True when success, false otherwise.
 
Implemented in SubscriptionHandler< T >, and SubscriptionHandler< ProtoMsg >.
The documentation for this class was generated from the following file:
 Public Member Functions inherited from