Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
vehicle_id_request_handler.h
1#ifndef VEHICLE_ID_REQUEST_HANDLER_H
2#define VEHICLE_ID_REQUEST_HANDLER_H
3
4#include <doiplib/message_handler.h>
5#include <doiplib/vehicle_id_request.h>
6#include <doiplib/vehicle_id_response.h>
7
8namespace application
9{
10 namespace doip
11 {
13 class VehicleIdRequestHandler : public DoipLib::MessageHandler
14 {
15 private:
16 static constexpr size_t cMacAddressSize{6};
18 static const uint8_t cFurtherAction{0x00};
19
20 DoipLib::VehicleIdRequest mRequest;
21 DoipLib::VehicleIdResponse mResponse;
22
23 static std::array<uint8_t, cMacAddressSize> convertToMacAddress(
24 uint64_t id);
25
26 public:
34 uint8_t protocolVersion,
35 std::string &&vin,
36 uint16_t logicalAddress,
37 uint64_t eid,
38 uint64_t gid);
39
40 DoipLib::Message *GetMessage() override;
41
42 bool TryHandle(
43 const DoipLib::Message *request,
44 std::vector<uint8_t> &response) const override;
45 };
46 }
47}
48
49#endif
A class to handle vehicle ID requests via DoIP.
Definition: vehicle_id_request_handler.h:14
VehicleIdRequestHandler(uint8_t protocolVersion, std::string &&vin, uint16_t logicalAddress, uint64_t eid, uint64_t gid)
Constructor.
Definition: vehicle_id_request_handler.cpp:10
AUTOSAR application namespace.
Definition: diag_message_handler.cpp:5