SOME/IP RPC abstract client. More...
#include <rpc_client.h>
Public Types | |
using | HandlerType = std::function< void(const SomeIpRpcMessage &)> |
SOME/IP RPC response handler type. | |
Public Member Functions | |
void | SetHandler (uint16_t serviceId, uint16_t methodId, HandlerType handler) |
Set a RPC response handler. More... | |
void | Send (uint16_t serviceId, uint16_t methodId, uint16_t clientId, const std::vector< uint8_t > &rpcPayload) |
Send a request to the RPC server. More... | |
Protected Member Functions | |
RpcClient (uint8_t protocolVersion, uint8_t interfaceVersion) noexcept | |
Constructor. More... | |
void | InvokeHandler (const std::vector< uint8_t > &payload) const |
Invoke corresponding response handler at a message reception. More... | |
virtual void | Send (const std::vector< uint8_t > &payload)=0 |
Send a SOME/IP request to the RPC server. More... | |
SOME/IP RPC abstract client.
|
protectednoexcept |
Constructor.
protocolVersion | SOME/IP protocol header version |
interfaceVersion | Service interface version |
|
protected |
Invoke corresponding response handler at a message reception.
payload | Serialized SOME/IP response payload byte vector |
|
protectedpure virtual |
Send a SOME/IP request to the RPC server.
payload | Serialized SOME/IP request payload byte vector |
Implemented in ara::com::someip::rpc::SocketRpcClient.
void ara::com::someip::rpc::RpcClient::Send | ( | uint16_t | serviceId, |
uint16_t | methodId, | ||
uint16_t | clientId, | ||
const std::vector< uint8_t > & | rpcPayload | ||
) |
Send a request to the RPC server.
serviceId | Service ID that contains the requested method |
methodId | Requested method ID for invocation |
clientId | Client ID that sends the request |
rpcPayload | Serialized RPC request payload byte vector |
void ara::com::someip::rpc::RpcClient::SetHandler | ( | uint16_t | serviceId, |
uint16_t | methodId, | ||
HandlerType | handler | ||
) |
Set a RPC response handler.
serviceId | Service ID that contains the requested method |
methodId | Requested method ID for invocation |
handler | Handler to be invoked at the response arrival |