Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
socket_rpc_client.h
1#ifndef SOCKET_RPC_CLIENT_H
2#define SOCKET_RPC_CLIENT_H
3
4#include <asyncbsdsocket/poller.h>
5#include <asyncbsdsocket/tcp_client.h>
6#include "../../helper/concurrent_queue.h"
7#include "./rpc_client.h"
8
9namespace ara
10{
11 namespace com
12 {
13 namespace someip
14 {
15 namespace rpc
16 {
19 {
20 private:
21 static const size_t cBufferSize{256};
22
24 AsyncBsdSocketLib::Poller *const mPoller;
25 AsyncBsdSocketLib::TcpClient mClient;
26
27 void onSend();
28 void onReceive();
29
30 protected:
31 void Send(const std::vector<uint8_t> &payload) override;
32
33 public:
42 AsyncBsdSocketLib::Poller *poller,
43 std::string ipAddress,
44 uint16_t port,
45 uint8_t protocolVersion,
46 uint8_t interfaceVersion = 1);
47
48 virtual ~SocketRpcClient() override;
49 };
50 }
51 }
52 }
53}
54
55#endif
Thread-safe wrapper around STL queue using locking mechanism.
Definition: concurrent_queue.h:18
SOME/IP RPC abstract client.
Definition: rpc_client.h:20
TCP socket-based RPC client.
Definition: socket_rpc_client.h:19
void Send(const std::vector< uint8_t > &payload) override
Send a SOME/IP request to the RPC server.
Definition: socket_rpc_client.cpp:88
SocketRpcClient(AsyncBsdSocketLib::Poller *poller, std::string ipAddress, uint16_t port, uint8_t protocolVersion, uint8_t interfaceVersion=1)
Constructor.
Definition: socket_rpc_client.cpp:14