|
PcapPlusPlus
Next
|
Represents a DoIP Vehicle Announcement message. More...
#include <DoIpLayer.h>
Public Member Functions | |
| DoIpVehicleAnnouncementMessage (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
| Constructs the layer from raw DoIP packet data. More... | |
| DoIpVehicleAnnouncementMessage (const std::array< uint8_t, DOIP_VIN_LEN > &vin, uint16_t logicalAddress, const std::array< uint8_t, DOIP_EID_LEN > &eid, const std::array< uint8_t, DOIP_GID_LEN > &gid, DoIpActionCodes actionCode) | |
| Constructs the message using specified field values. More... | |
| std::array< uint8_t, DOIP_VIN_LEN > | getVIN () const |
| Gets the Vehicle Identification Number (VIN). More... | |
| void | setVIN (const std::array< uint8_t, DOIP_VIN_LEN > &vin) |
| Sets the Vehicle Identification Number (VIN). More... | |
| uint16_t | getLogicalAddress () const |
| Gets the logical address of the vehicle. More... | |
| void | setLogicalAddress (uint16_t address) |
| Sets the logical address. More... | |
| std::array< uint8_t, DOIP_EID_LEN > | getEID () const |
| Gets the Entity Identifier (EID). More... | |
| void | setEID (const std::array< uint8_t, DOIP_EID_LEN > &eid) |
| Sets the Entity Identifier (EID). More... | |
| std::array< uint8_t, DOIP_GID_LEN > | getGID () const |
| Gets the Group Identifier (GID). More... | |
| void | setGID (const std::array< uint8_t, DOIP_GID_LEN > &gid) |
| Sets the Group Identifier (GID). More... | |
| DoIpActionCodes | getFurtherActionRequired () const |
| Gets the further action required code. More... | |
| void | setFurtherActionRequired (DoIpActionCodes action) |
| Sets the further action required code. More... | |
| DoIpSyncStatus | getSyncStatus () const |
| Gets the optional synchronization status if available. More... | |
| void | setSyncStatus (DoIpSyncStatus sync) |
| Sets the synchronization status. More... | |
| bool | hasSyncStatus () const |
| Checks whether the sync status is present. More... | |
| void | clearSyncStatus () |
| Clears the optional sync status field. | |
| std::string | getSummary () const |
| Returns a human-readable summary of the message. | |
| DoIpPayloadTypes | getPayloadType () const override |
| Returns the DoIP payload type. | |
Public Member Functions inherited from pcpp::DoIpLayer | |
| 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 |
Public Member Functions inherited from pcpp::Layer | |
| ~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 |
Static Public Member Functions | |
| static bool | isDataLenValid (size_t dataLen) |
| checks if the vehicle announcement data length is valid. More... | |
Static Public Member Functions inherited from pcpp::DoIpLayer | |
| 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) |
Additional Inherited Members | |
Protected Member Functions inherited from pcpp::Layer | |
| 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) |
Static Protected Member Functions inherited from pcpp::Layer | |
| 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 DoIP Vehicle Announcement message.
This message is broadcasted by a vehicle to announce its presence, including VIN, logical address, EID, GID, and optionally synchronization status.
| pcpp::DoIpVehicleAnnouncementMessage::DoIpVehicleAnnouncementMessage | ( | uint8_t * | data, |
| size_t | dataLen, | ||
| Layer * | prevLayer, | ||
| Packet * | packet | ||
| ) |
Constructs the layer from raw DoIP packet data.
| [in] | data | Pointer to the raw data buffer. |
| [in] | dataLen | Size of the data buffer in bytes. |
| [in] | prevLayer | Pointer to the previous protocol layer. |
| [in] | packet | Pointer to the parent packet. |
| pcpp::DoIpVehicleAnnouncementMessage::DoIpVehicleAnnouncementMessage | ( | const std::array< uint8_t, DOIP_VIN_LEN > & | vin, |
| uint16_t | logicalAddress, | ||
| const std::array< uint8_t, DOIP_EID_LEN > & | eid, | ||
| const std::array< uint8_t, DOIP_GID_LEN > & | gid, | ||
| DoIpActionCodes | actionCode | ||
| ) |
Constructs the message using specified field values.
| [in] | vin | Vehicle Identification Number (VIN). |
| [in] | logicalAddress | Logical address of the vehicle. |
| [in] | eid | Entity Identifier (EID). |
| [in] | gid | Group Identifier (GID). |
| [in] | actionCode | Further action code. |
| std::array<uint8_t, DOIP_EID_LEN> pcpp::DoIpVehicleAnnouncementMessage::getEID | ( | ) | const |
Gets the Entity Identifier (EID).
| DoIpActionCodes pcpp::DoIpVehicleAnnouncementMessage::getFurtherActionRequired | ( | ) | const |
Gets the further action required code.
| std::array<uint8_t, DOIP_GID_LEN> pcpp::DoIpVehicleAnnouncementMessage::getGID | ( | ) | const |
Gets the Group Identifier (GID).
| uint16_t pcpp::DoIpVehicleAnnouncementMessage::getLogicalAddress | ( | ) | const |
Gets the logical address of the vehicle.
| DoIpSyncStatus pcpp::DoIpVehicleAnnouncementMessage::getSyncStatus | ( | ) | const |
Gets the optional synchronization status if available.
| std::runtime_error | if the sync status is not present. |
| std::array<uint8_t, DOIP_VIN_LEN> pcpp::DoIpVehicleAnnouncementMessage::getVIN | ( | ) | const |
Gets the Vehicle Identification Number (VIN).
| bool pcpp::DoIpVehicleAnnouncementMessage::hasSyncStatus | ( | ) | const |
Checks whether the sync status is present.
|
inlinestatic |
checks if the vehicle announcement data length is valid.
| [in] | dataLen | Length of the data buffer. |
| void pcpp::DoIpVehicleAnnouncementMessage::setEID | ( | const std::array< uint8_t, DOIP_EID_LEN > & | eid | ) |
Sets the Entity Identifier (EID).
| [in] | eid | A 6-byte Entity Identifier (EID). |
| void pcpp::DoIpVehicleAnnouncementMessage::setFurtherActionRequired | ( | DoIpActionCodes | action | ) |
Sets the further action required code.
| [in] | action | enum DoIpActionCodes representing the further action required code to set. |
| void pcpp::DoIpVehicleAnnouncementMessage::setGID | ( | const std::array< uint8_t, DOIP_GID_LEN > & | gid | ) |
Sets the Group Identifier (GID).
| [in] | gid | A 6-byte Group Identifier (GID). |
| void pcpp::DoIpVehicleAnnouncementMessage::setLogicalAddress | ( | uint16_t | address | ) |
Sets the logical address.
| [in] | address | A 2-byte logical address of the vehicle. |
| void pcpp::DoIpVehicleAnnouncementMessage::setSyncStatus | ( | DoIpSyncStatus | sync | ) |
Sets the synchronization status.
| [in] | sync | enum DoIpSyncStatus representing the synchronization status to set. |
| void pcpp::DoIpVehicleAnnouncementMessage::setVIN | ( | const std::array< uint8_t, DOIP_VIN_LEN > & | vin | ) |
Sets the Vehicle Identification Number (VIN).
| [in] | vin | A 17-byte Vehicle Identification Number (VIN). |