with the service response. More...
#include <RepHandler.hh>
Public Member Functions | |
RepHandler ()=default | |
virtual std::string | RepTypeName () const |
Get the message type name used in the service response. More... | |
virtual std::string | ReqTypeName () const |
Get the message type name used in the service request. More... | |
void | RunCallback (const std::string &_req, std::string &_rep, bool &_result) |
Executes the callback registered for this handler. More... | |
void | RunLocalCallback (const transport::ProtoMsg &_msgReq, transport::ProtoMsg &_msgRep, bool &_result) |
Executes the local callback registered for this handler. More... | |
void | SetCallback (const std::function< void(const Req &, Rep &, bool &)> &_cb) |
Set the callback for this handler. More... | |
![]() | |
IRepHandler () | |
Constructor. More... | |
virtual | ~IRepHandler ()=default |
Destructor. More... | |
std::string | HandlerUuid () const |
Get the unique UUID of this handler. More... | |
Additional Inherited Members | |
![]() | |
std::string | hUuid |
Unique handler's UUID. More... | |
with the service response.
It creates a service reply handler for a pair of protobuf messages containing the request parameters and the response.
'Req' is the protobuf message type containing the input parameters of
|
default |
|
inlinevirtual |
Get the message type name used in the service response.
Implements ignition::transport::IRepHandler.
|
inlinevirtual |
Get the message type name used in the service request.
Implements ignition::transport::IRepHandler.
|
inlinevirtual |
Executes the callback registered for this handler.
[in] | _req | Serialized data received. The data will be used to compose a specific protobuf message and will be passed to the callback function. |
[out] | _rep | Out parameter with the data serialized. |
[out] | _result | Service call result. |
Implements ignition::transport::IRepHandler.
|
inlinevirtual |
Executes the local callback registered for this handler.
[in] | _msgReq | Input parameter (Protobuf message). |
[out] | _msgRep | Output parameter (Protobuf message). |
[out] | _result | Service call result. |
Implements ignition::transport::IRepHandler.
|
inline |
Set the callback for this handler.
[in] | _cb | The callback with the following parameters: |
[in] | _req | Protobuf message containing the service request params |
[out] | _rep | Protobuf message containing the service response. |
[out] | _result | True when the service response is considered successful or false otherwise. |