5#include <asyncbsdsocket/poller.h>
6#include <asyncbsdsocket/tcp_client.h>
7#include "../../ara/core/optional.h"
8#include "../../ara/com/helper/concurrent_queue.h"
19 static constexpr size_t cDoipPacketSize{64};
21 AsyncBsdSocketLib::Poller *
const mPoller;
22 AsyncBsdSocketLib::TcpClient mClient;
23 const uint8_t cProtocolVersion;
24 const std::function<void(std::vector<uint8_t> &&)> mCallback;
28 void handleVehicleIdResponse(
29 const std::vector<uint8_t> &serializedMessage);
31 void handleDiagMessageAck(
32 const std::vector<uint8_t> &serializedMessage)
const;
46 AsyncBsdSocketLib::Poller *poller,
47 std::string ipAddress,
49 uint8_t protocolVersion,
50 std::function<
void(std::vector<uint8_t> &&)> &&callback);
A class to send DoIP requests to a DoIP server.
Definition: doip_client.h:17
DoipClient(AsyncBsdSocketLib::Poller *poller, std::string ipAddress, uint16_t port, uint8_t protocolVersion, std::function< void(std::vector< uint8_t > &&)> &&callback)
Constructor.
Definition: doip_client.cpp:15
bool TrySendDiagMessage(std::vector< uint8_t > &&userData)
Try to send a diagnostic message to the DoIP server asynchronously.
Definition: doip_client.cpp:148
Thread-safe wrapper around STL queue using locking mechanism.
Definition: concurrent_queue.h:18
A wrapper around a possible value.
Definition: optional.h:16
AUTOSAR application namespace.
Definition: diag_message_handler.cpp:5