SOME/IP RPC server.
More...
#include <rpc_server.h>
|
using | HandlerType = std::function< bool(const std::vector< uint8_t > &, std::vector< uint8_t > &)> |
| SOME/IP RPC request handler type.
|
|
|
| RpcServer (uint8_t protocolVersion, uint8_t interfaceVersion) noexcept |
| Constructor. More...
|
|
bool | TryInvokeHandler (const std::vector< uint8_t > &requestPayload, std::vector< uint8_t > &responsePayload) const |
| Try to invoke corresponding request handler at a message reception. More...
|
|
◆ RpcServer()
ara::com::someip::rpc::RpcServer::RpcServer |
( |
uint8_t |
protocolVersion, |
|
|
uint8_t |
interfaceVersion |
|
) |
| |
|
protectednoexcept |
Constructor.
- Parameters
-
protocolVersion | SOME/IP protocol header version |
interfaceVersion | Service interface version |
◆ SetHandler()
void ara::com::someip::rpc::RpcServer::SetHandler |
( |
uint16_t |
serviceId, |
|
|
uint16_t |
methodId, |
|
|
HandlerType |
handler |
|
) |
| |
Set a RPC request handler.
- Parameters
-
serviceId | Service ID that contains the requested method |
methodId | Requested method ID for invocation |
handler | Handler to be invoked at the request arrival |
◆ TryInvokeHandler()
bool ara::com::someip::rpc::RpcServer::TryInvokeHandler |
( |
const std::vector< uint8_t > & |
requestPayload, |
|
|
std::vector< uint8_t > & |
responsePayload |
|
) |
| const |
|
protected |
Try to invoke corresponding request handler at a message reception.
- Parameters
-
[in] | requestPayload | Serialized SOME/IP request payload byte vector |
[out] | responsePayload | Serialized SOME/IP response payload byte vector |
- Returns
- True if the request is handled; otherwise false