PcapPlusPlus
Next
|
Represents a negative acknowledgment message in response to a DiagnosticMessage. More...
#include <DoIpLayer.h>
Public Member Functions | |
DoIpDiagnosticMessageNack (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
Constructs a DiagnosticNackMessage from raw packet data. More... | |
DoIpDiagnosticMessageNack (uint16_t sourceAddress, uint16_t targetAddress, DoIpDiagnosticMessageNackCodes nackCode) | |
Constructs a DiagnosticNackMessage from specified field values. More... | |
DoIpDiagnosticMessageNackCodes | getNackCode () const |
Gets the negative acknowledgment code. More... | |
void | setNackCode (DoIpDiagnosticMessageNackCodes code) |
Sets the negative acknowledgment code. More... | |
std::string | getSummary () const override |
Returns a human-readable summary of the message. | |
DoIpPayloadTypes | getPayloadType () const override |
Returns the DoIP payload type. | |
![]() | |
uint16_t | getSourceAddress () const |
Gets the source logical address of the message. More... | |
void | setSourceAddress (uint16_t sourceAddress) |
Sets the source logical address. More... | |
uint16_t | getTargetAddress () const |
Gets the target logical address of the message. More... | |
void | setTargetAddress (uint16_t targetAddress) |
Sets the target logical address. More... | |
![]() | |
std::string | getPayloadTypeAsStr () const |
DoIpProtocolVersion | getProtocolVersion () const |
std::string | getProtocolVersionAsStr () const |
void | setProtocolVersion (DoIpProtocolVersion version) |
void | setProtocolVersion (uint8_t rawVersion) |
uint8_t | getInvertProtocolVersion () const |
void | setInvertProtocolVersion (uint8_t iVersion) |
uint32_t | getPayloadLength () const |
void | setPayloadLength (uint32_t length) |
void | parseNextLayer () override |
parse UDS layer | |
size_t | getHeaderLen () const override |
std::string | toString () const override |
void | computeCalculateFields () override |
Each layer can compute field values automatically using this method. This is an abstract method. | |
OsiModelLayer | getOsiModelLayer () const override |
![]() | |
~Layer () override | |
Layer * | getNextLayer () const |
Layer * | getPrevLayer () const |
ProtocolType | getProtocol () const |
bool | isMemberOfProtocolFamily (ProtocolTypeFamily protocolTypeFamily) const |
uint8_t * | getData () const |
size_t | getDataLen () const |
uint8_t * | getLayerPayload () const |
size_t | getLayerPayloadSize () const |
bool | isAllocatedToPacket () const |
void | copyData (uint8_t *toArr) const |
uint8_t * | getDataPtr (size_t offset=0) const override |
Additional Inherited Members | |
![]() | |
static DoIpLayer * | parseDoIpLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) |
static bool | isDoIpPort (uint16_t port) |
static bool | isDataValid (uint8_t *data, size_t dataLen) |
![]() | |
template<typename T , typename... Args> | |
Layer * | constructNextLayer (uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs) |
template<typename T , typename TFallback , typename... Args> | |
Layer * | tryConstructNextLayerWithFallback (uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs) |
![]() | |
template<typename T > | |
static bool | canReinterpretAs (const uint8_t *data, size_t dataLen) |
Check if the data is large enough to reinterpret as a type. More... | |
Represents a negative acknowledgment message in response to a DiagnosticMessage.
This message is sent by a DoIP node when a diagnostic message is received but could not be processed successfully. It may include the original message for reference.
pcpp::DoIpDiagnosticMessageNack::DoIpDiagnosticMessageNack | ( | uint8_t * | data, |
size_t | dataLen, | ||
Layer * | prevLayer, | ||
Packet * | packet | ||
) |
Constructs a DiagnosticNackMessage from raw packet data.
[in] | data | Pointer to the raw payload data. |
[in] | dataLen | Length of the data buffer. |
[in] | prevLayer | Pointer to the previous protocol layer. |
[in] | packet | Pointer to the parent packet. |
pcpp::DoIpDiagnosticMessageNack::DoIpDiagnosticMessageNack | ( | uint16_t | sourceAddress, |
uint16_t | targetAddress, | ||
DoIpDiagnosticMessageNackCodes | nackCode | ||
) |
Constructs a DiagnosticNackMessage from specified field values.
[in] | sourceAddress | Address of the sending ECU. |
[in] | targetAddress | Address of the receiving ECU. |
[in] | nackCode | Negative acknowledgment code describing the failure. |
DoIpDiagnosticMessageNackCodes pcpp::DoIpDiagnosticMessageNack::getNackCode | ( | ) | const |
Gets the negative acknowledgment code.
void pcpp::DoIpDiagnosticMessageNack::setNackCode | ( | DoIpDiagnosticMessageNackCodes | code | ) |
Sets the negative acknowledgment code.
[in] | code | enum DoIpDiagnosticMessageNackCodes describing the negative acknowledgment code. |