1#ifndef OBD_TO_DOIP_CONVERTER_H
2#define OBD_TO_DOIP_CONVERTER_H
4#include <obdemulator/obd_service.h>
5#include "./doip_client.h"
17 static const uint8_t cService{0x01};
18 static const uint8_t cSid{0x22};
19 static const uint8_t cProtocolVersion{2};
23 static bool tryParseUdsData(
24 std::vector<uint8_t> &&udsResponse,
26 std::vector<uint8_t> &obdData);
28 void onUdsDataReceived(
29 std::vector<uint8_t> &&receivedUdsData)
const;
31 bool trySendAsDoip(uint8_t pid);
40 AsyncBsdSocketLib::Poller *poller,
41 std::string ipAddress,
45 const std::vector<uint8_t> &pid,
46 std::vector<uint8_t> &response)
const override;
48 bool TryGetResponseAsync(
const std::vector<uint8_t> &pid)
override;
A class to send DoIP requests to a DoIP server.
Definition: doip_client.h:17
A OBD service class to handle OBD queries asynchronously.
Definition: obd_to_doip_converter.h:14
ObdToDoipConverter(AsyncBsdSocketLib::Poller *poller, std::string ipAddress, uint16_t port)
Constructor.
Definition: obd_to_doip_converter.cpp:12
AUTOSAR application namespace.
Definition: diag_message_handler.cpp:5