Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::com::someip::rpc::SocketRpcClient Class Reference

TCP socket-based RPC client. More...

#include <socket_rpc_client.h>

Inheritance diagram for ara::com::someip::rpc::SocketRpcClient:
ara::com::someip::rpc::RpcClient

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.
 

Detailed Description

TCP socket-based RPC client.

Constructor & Destructor Documentation

◆ SocketRpcClient()

ara::com::someip::rpc::SocketRpcClient::SocketRpcClient ( AsyncBsdSocketLib::Poller *  poller,
std::string  ipAddress,
uint16_t  port,
uint8_t  protocolVersion,
uint8_t  interfaceVersion = 1 
)

Constructor.

Parameters
pollerBSD sockets poller
ipAddressRPC server IP address
portRPC server listening TCP port number
protocolVersionSOME/IP protocol header version
interfaceVersionService interface version
Exceptions
std::runtime_errorThrows when the TCP client socket configuration failed

Member Function Documentation

◆ Send()

void ara::com::someip::rpc::SocketRpcClient::Send ( const std::vector< uint8_t > &  payload)
overrideprotectedvirtual

Send a SOME/IP request to the RPC server.

Parameters
payloadSerialized SOME/IP request payload byte vector

Implements ara::com::someip::rpc::RpcClient.