1#ifndef DIAG_MESSAGE_ACK_H
2#define DIAG_MESSAGE_ACK_H
12 static const PayloadType cPayloadType{
13 PayloadType::DiagMessagePositiveAcknowledgement};
14 const uint8_t cAckCode{0x00};
16 uint16_t mSourceAddress;
17 uint16_t mTargetAddress;
18 bool mHasPreviousMessage;
19 std::vector<uint8_t> mPreviousMessage;
21 bool TrySetCompulsoryPayload(
const std::vector<uint8_t> &payload);
24 void GetPayload(std::vector<uint8_t> &payload)
const override;
27 const std::vector<uint8_t> &payload,
28 uint32_t payloadLength)
override;
38 uint8_t protocolVersion,
39 uint16_t sourceAddress,
40 uint16_t targetAddress);
48 uint8_t protocolVersion,
49 uint16_t sourceAddress,
50 uint16_t targetAddress,
51 const std::vector<uint8_t> &previousMessage);
59 uint8_t protocolVersion,
60 uint16_t sourceAddress,
61 uint16_t targetAddress,
62 std::vector<uint8_t> &&previousMessage);
Diagnostic message positive acknowledgement.
Definition: diag_message_ack.h:10
DiagMessageAck(uint8_t protocolVersion, uint16_t sourceAddress, uint16_t targetAddress, const std::vector< uint8_t > &previousMessage)
Constructor including previous message.
DiagMessageAck(uint8_t protocolVersion, uint16_t sourceAddress, uint16_t targetAddress, std::vector< uint8_t > &&previousMessage)
Constructor including previous message.
uint16_t GetTargetAddress() const noexcept
Get message target address.
virtual bool TrySetPayload(const std::vector< uint8_t > &payload, uint32_t payloadLength) override
Try to set message payload.
uint16_t GetSourceAddress() const noexcept
Get message source address.
bool TryGetPreviousMessage(std::vector< uint8_t > &previousMessage)
Get previous diagnostic message.
DiagMessageAck(uint8_t protocolVersion, uint16_t sourceAddress, uint16_t targetAddress)
Constructor without previous message.
void GetPayload(std::vector< uint8_t > &payload) const override
Get message payload.
DoIP generic message.
Definition: message.h:12