Woman, Life, Freedom


DoIP Library
Diagnostics over Internet Protocol (DoIP) C++ library
routing_activation_response.h
1#ifndef ROUTING_ACTIVATION_RESPONSE_H
2#define ROUTING_ACTIVATION_RESPONSE_H
3
4#include "./message.h"
5#include "./routing_activation_response_type.h"
6
7namespace DoipLib
8{
11 {
12 private:
13 static const PayloadType cPayloadType{
14 PayloadType::RoutingActivationResponse};
15 const uint32_t cIsoReserved{0x00000000};
16
17 uint16_t mTesterLogicalAddress;
18 uint16_t mEntityLogicalAddress;
19 RoutingActivationResponseType mResponseCode;
20 bool mHasOemSpecificData;
21 uint32_t mOemSpecificData;
22
24 uint8_t protocolVersion,
25 uint16_t testerLogicalAddress,
26 uint16_t entityLogicalAddress,
27 RoutingActivationResponseType responseCode,
28 bool hasOemSpecificData,
29 uint32_t oemSpecificData = 0) noexcept;
30
31 void SetPayload(const std::vector<uint8_t> &payload);
32
33 protected:
34 void GetPayload(std::vector<uint8_t> &payload) const override;
35
36 virtual bool TrySetPayload(
37 const std::vector<uint8_t> &payload,
38 uint32_t payloadLength) override;
39
40 public:
42
49 uint8_t protocolVersion,
50 uint16_t testerLogicalAddress,
51 uint16_t entityLogicalAddress,
52 RoutingActivationResponseType responseCode) noexcept;
53
61 uint8_t protocolVersion,
62 uint16_t testerLogicalAddress,
63 uint16_t entityLogicalAddress,
64 RoutingActivationResponseType responseCode,
65 uint32_t oemSpecificData) noexcept;
66
69 uint16_t GetTesterLogicalAddress() const noexcept;
70
73 uint16_t GetEntityLogicalAddress() const noexcept;
74
77 RoutingActivationResponseType GetResponseCode() const noexcept;
78
82 bool TryGetOemSpecificData(uint32_t &oemSpecificData) const noexcept;
83 };
84}
85
86#endif
DoIP generic message.
Definition: message.h:12
Tester routing activation response to an internal vehicle network.
Definition: routing_activation_response.h:11
virtual bool TrySetPayload(const std::vector< uint8_t > &payload, uint32_t payloadLength) override
Try to set message payload.
uint16_t GetTesterLogicalAddress() const noexcept
Get tester logical address.
uint16_t GetEntityLogicalAddress() const noexcept
Get entity logical address.
RoutingActivationResponseType GetResponseCode() const noexcept
Get response code.
void GetPayload(std::vector< uint8_t > &payload) const override
Get message payload.
bool TryGetOemSpecificData(uint32_t &oemSpecificData) const noexcept
Try to get the OEM-specific data.