Woman, Life, Freedom


DoIP Library
Diagnostics over Internet Protocol (DoIP) C++ library
generic_nack.h
1#ifndef GENERIC_NACK_H
2#define GENERIC_NACK_H
3
4#include "./message.h"
5
6namespace DoipLib
7{
9 class GenericNack : public Message
10 {
11 private:
12 static const PayloadType cPayloadType{
13 PayloadType::GenericNegativeAcknowledgement};
14
15 GenericNackType mNackCode;
16
17 protected:
18 void GetPayload(std::vector<uint8_t> &payload) const override;
19
20 virtual bool TrySetPayload(
21 const std::vector<uint8_t> &payload,
22 uint32_t payloadLength) override;
23
24 public:
25 GenericNack() noexcept;
26
30 GenericNack(uint8_t protocolVersion, GenericNackType nackCode) noexcept;
31
34 GenericNackType GetNackCode() const noexcept;
35 };
36}
37
38#endif
Generic negative acknowledgement DoIP message.
Definition: generic_nack.h:10
GenericNackType GetNackCode() const noexcept
Get NACK code.
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.
DoIP generic message.
Definition: message.h:12