Woman, Life, Freedom


DoIP Library
Diagnostics over Internet Protocol (DoIP) C++ library
routing_activation_request.h
1#ifndef ROUTING_ACTIVATION_REQUEST_H
2#define ROUTING_ACTIVATION_REQUEST_H
3
4#include "./message.h"
5
6namespace DoipLib
7{
10 {
11 private:
12 static const PayloadType cPayloadType{
13 PayloadType::RoutingActivationRequest};
14 const uint32_t cIsoReserved{0x00000000};
15
16 uint16_t mSourceAddress;
17 uint8_t mActivationType;
18 bool mHasOemSpecificData;
19 uint32_t mOemSpecificData;
20
22 uint8_t protocolVersion,
23 uint16_t sourceAddress,
24 uint8_t activationType,
25 bool hasOemSpecificData,
26 uint32_t oemSpecificData = 0) noexcept;
27
28 bool TrySetCompulsoryPayload(const std::vector<uint8_t> &payload);
29
30 protected:
31 void GetPayload(std::vector<uint8_t> &payload) const override;
32
33 virtual bool TrySetPayload(
34 const std::vector<uint8_t> &payload,
35 uint32_t payloadLength) override;
36
37 public:
38 RoutingActivationRequest() noexcept;
39
45 uint8_t protocolVersion,
46 uint16_t sourceAddress,
47 uint8_t activationType) noexcept;
48
55 uint8_t protocolVersion,
56 uint16_t sourceAddress,
57 uint8_t activationType,
58 uint32_t oemSpecificData) noexcept;
59
62 uint16_t GetSourceAddress() const noexcept;
63
66 uint8_t GetActivationType() const noexcept;
67
71 bool TryGetOemSpecificData(uint32_t &oemSpecificData) const noexcept;
72 };
73}
74
75#endif
DoIP generic message.
Definition: message.h:12
Tester routing activation request to an internal vehicle network.
Definition: routing_activation_request.h:10
uint16_t GetSourceAddress() const noexcept
Get request source address.
bool TryGetOemSpecificData(uint32_t &oemSpecificData) const noexcept
Try to get the OEM-specific data.
void GetPayload(std::vector< uint8_t > &payload) const override
Get message payload.
virtual bool TrySetPayload(const std::vector< uint8_t > &payload, uint32_t payloadLength) override
Try to set message payload.
uint8_t GetActivationType() const noexcept
Get activation type.