TCP socket-based RPC client. More...
#include <socket_rpc_client.h>
Public Member Functions | |
SocketRpcClient (AsyncBsdSocketLib::Poller *poller, std::string ipAddress, uint16_t port, uint8_t protocolVersion, uint8_t interfaceVersion=1) | |
Constructor. More... | |
Public Member Functions inherited from ara::com::someip::rpc::RpcClient | |
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 | |
void | Send (const std::vector< uint8_t > &payload) override |
Send a SOME/IP request to the RPC server. More... | |
Protected Member Functions inherited from ara::com::someip::rpc::RpcClient | |
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... | |
Additional Inherited Members | |
Public Types inherited from ara::com::someip::rpc::RpcClient | |
using | HandlerType = std::function< void(const SomeIpRpcMessage &)> |
SOME/IP RPC response handler type. | |
TCP socket-based RPC client.
ara::com::someip::rpc::SocketRpcClient::SocketRpcClient | ( | AsyncBsdSocketLib::Poller * | poller, |
std::string | ipAddress, | ||
uint16_t | port, | ||
uint8_t | protocolVersion, | ||
uint8_t | interfaceVersion = 1 |
||
) |
Constructor.
poller | BSD sockets poller |
ipAddress | RPC server IP address |
port | RPC server listening TCP port number |
protocolVersion | SOME/IP protocol header version |
interfaceVersion | Service interface version |
std::runtime_error | Throws when the TCP client socket configuration failed |
|
overrideprotectedvirtual |
Send a SOME/IP request to the RPC server.
payload | Serialized SOME/IP request payload byte vector |
Implements ara::com::someip::rpc::RpcClient.