Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::com::someip::rpc::RpcClient Class Referenceabstract

SOME/IP RPC abstract client. More...

#include <rpc_client.h>

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

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...
 

Detailed Description

SOME/IP RPC abstract client.

Constructor & Destructor Documentation

◆ RpcClient()

ara::com::someip::rpc::RpcClient::RpcClient ( uint8_t  protocolVersion,
uint8_t  interfaceVersion 
)
protectednoexcept

Constructor.

Parameters
protocolVersionSOME/IP protocol header version
interfaceVersionService interface version

Member Function Documentation

◆ InvokeHandler()

void ara::com::someip::rpc::RpcClient::InvokeHandler ( const std::vector< uint8_t > &  payload) const
protected

Invoke corresponding response handler at a message reception.

Parameters
payloadSerialized SOME/IP response payload byte vector

◆ Send() [1/2]

virtual void ara::com::someip::rpc::RpcClient::Send ( const std::vector< uint8_t > &  payload)
protectedpure virtual

Send a SOME/IP request to the RPC server.

Parameters
payloadSerialized SOME/IP request payload byte vector

Implemented in ara::com::someip::rpc::SocketRpcClient.

◆ Send() [2/2]

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.

Parameters
serviceIdService ID that contains the requested method
methodIdRequested method ID for invocation
clientIdClient ID that sends the request
rpcPayloadSerialized RPC request payload byte vector

◆ SetHandler()

void ara::com::someip::rpc::RpcClient::SetHandler ( uint16_t  serviceId,
uint16_t  methodId,
HandlerType  handler 
)

Set a RPC response handler.

Parameters
serviceIdService ID that contains the requested method
methodIdRequested method ID for invocation
handlerHandler to be invoked at the response arrival