Woman, Life, Freedom


DoIP Library
Diagnostics over Internet Protocol (DoIP) C++ library
DoipLib::VehicleIdResponse Class Reference

Vehicle announcement ID response message. More...

#include <vehicle_id_response.h>

Inheritance diagram for DoipLib::VehicleIdResponse:
DoipLib::Message

Public Member Functions

 VehicleIdResponse (uint8_t protocolVersion, const std::string &vin, uint16_t logicalAddress, std::array< uint8_t, cIdSize > eid, std::array< uint8_t, cIdSize > gid, uint8_t furtherAction)
 Constructor without optional VIN/GID synchronization. More...
 
 VehicleIdResponse (uint8_t protocolVersion, std::string &&vin, uint16_t logicalAddress, std::array< uint8_t, cIdSize > eid, std::array< uint8_t, cIdSize > gid, uint8_t furtherAction)
 Constructor without optional VIN/GID synchronization. More...
 
 VehicleIdResponse (uint8_t protocolVersion, const std::string &vin, uint16_t logicalAddress, std::array< uint8_t, cIdSize > eid, std::array< uint8_t, cIdSize > gid, uint8_t furtherAction, uint8_t vinGidStatus)
 Constructor using VIN/GID synchronization. More...
 
 VehicleIdResponse (uint8_t protocolVersion, std::string &&vin, uint16_t logicalAddress, std::array< uint8_t, cIdSize > eid, std::array< uint8_t, cIdSize > gid, uint8_t furtherAction, uint8_t vinGidStatus)
 Constructor using VIN/GID synchronization. More...
 
std::string GetVin () const
 Get VIN. More...
 
uint16_t GetLogicalAddress () const noexcept
 Get logical address. More...
 
std::array< uint8_t, cIdSize > GetEid () const
 Get EID. More...
 
std::array< uint8_t, cIdSize > GetGid () const
 Get GID. More...
 
uint8_t GetFurtherAction () const noexcept
 Get further action. More...
 
bool TryGetVinGinStatus (uint8_t &vinGinStatus) const noexcept
 Try to get the VIN/GIN status. More...
 
- Public Member Functions inherited from DoipLib::Message
void Serialize (std::vector< uint8_t > &serializedMessage) const
 Serialize DoIP message. More...
 
bool TryDeserialize (const std::vector< uint8_t > &serializedMessage, GenericNackType &nackCode)
 Try to deserialize DoIP message. More...
 

Protected Member Functions

void GetPayload (std::vector< uint8_t > &payload) const override
 Get message payload. More...
 
virtual bool TrySetPayload (const std::vector< uint8_t > &payload, uint32_t payloadLength) override
 Try to set message payload. More...
 
- Protected Member Functions inherited from DoipLib::Message
 Message (PayloadType payloadType) noexcept
 Constructor. More...
 
 Message (uint8_t protocolVersion, PayloadType payloadType) noexcept
 Constructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from DoipLib::Message
static bool TryExtractPayloadType (const std::vector< uint8_t > &serializedMessage, PayloadType &payloadType)
 Try to extract the payload type from the given serialized message. More...
 
- Static Protected Attributes inherited from DoipLib::Message
static const std::size_t cHeaderSize {8}
 DoIP message header size.
 

Detailed Description

Vehicle announcement ID response message.

Constructor & Destructor Documentation

◆ VehicleIdResponse() [1/4]

DoipLib::VehicleIdResponse::VehicleIdResponse ( uint8_t  protocolVersion,
const std::string &  vin,
uint16_t  logicalAddress,
std::array< uint8_t, cIdSize >  eid,
std::array< uint8_t, cIdSize >  gid,
uint8_t  furtherAction 
)

Constructor without optional VIN/GID synchronization.

Parameters
protocolVersionDoIP ISO protocol version
vinVehicle ID number (VIN)
logicalAddressEntity logical address
eidEntity ID
gidGroup ID (GID)
furtherActionFurther action byte
Exceptions
std::out_of_rangeThrows if the given VIN is invalid

◆ VehicleIdResponse() [2/4]

DoipLib::VehicleIdResponse::VehicleIdResponse ( uint8_t  protocolVersion,
std::string &&  vin,
uint16_t  logicalAddress,
std::array< uint8_t, cIdSize >  eid,
std::array< uint8_t, cIdSize >  gid,
uint8_t  furtherAction 
)

Constructor without optional VIN/GID synchronization.

Parameters
protocolVersionDoIP ISO protocol version
vinVehicle ID number (VIN)
logicalAddressEntity logical address
eidEntity ID
gidGroup ID (GID)
furtherActionFurther action byte
Exceptions
std::out_of_rangeThrows if the given VIN is invalid

◆ VehicleIdResponse() [3/4]

DoipLib::VehicleIdResponse::VehicleIdResponse ( uint8_t  protocolVersion,
const std::string &  vin,
uint16_t  logicalAddress,
std::array< uint8_t, cIdSize >  eid,
std::array< uint8_t, cIdSize >  gid,
uint8_t  furtherAction,
uint8_t  vinGidStatus 
)

Constructor using VIN/GID synchronization.

Parameters
protocolVersionDoIP ISO protocol version
vinVehicle ID number (VIN)
logicalAddressEntity logical address
eidEntity ID
gidGroup ID (GID)
furtherActionFurther action byte
vinGidStatusVIN/GID synchronization status
Exceptions
std::out_of_rangeThrows if the given VIN is invalid

◆ VehicleIdResponse() [4/4]

DoipLib::VehicleIdResponse::VehicleIdResponse ( uint8_t  protocolVersion,
std::string &&  vin,
uint16_t  logicalAddress,
std::array< uint8_t, cIdSize >  eid,
std::array< uint8_t, cIdSize >  gid,
uint8_t  furtherAction,
uint8_t  vinGidStatus 
)

Constructor using VIN/GID synchronization.

Parameters
protocolVersionDoIP ISO protocol version
vinVehicle ID number (VIN)
logicalAddressEntity logical address
eidEntity ID
gidGroup ID (GID)
furtherActionFurther action byte
vinGidStatusVIN/GID synchronization status
Exceptions
std::out_of_rangeThrows if the given VIN is invalid

Member Function Documentation

◆ GetEid()

std::array< uint8_t, cIdSize > DoipLib::VehicleIdResponse::GetEid ( ) const

Get EID.

Returns
Entity ID

◆ GetFurtherAction()

uint8_t DoipLib::VehicleIdResponse::GetFurtherAction ( ) const
noexcept

Get further action.

Returns
Further action byte

◆ GetGid()

std::array< uint8_t, cIdSize > DoipLib::VehicleIdResponse::GetGid ( ) const

Get GID.

Returns
Group ID

◆ GetLogicalAddress()

uint16_t DoipLib::VehicleIdResponse::GetLogicalAddress ( ) const
noexcept

Get logical address.

Returns
Entity logical address

◆ GetPayload()

void DoipLib::VehicleIdResponse::GetPayload ( std::vector< uint8_t > &  payload) const
overrideprotectedvirtual

Get message payload.

Parameters
[out]payloadPayload byte array

Implements DoipLib::Message.

◆ GetVin()

std::string DoipLib::VehicleIdResponse::GetVin ( ) const

Get VIN.

Returns
Vehicle ID number

◆ TryGetVinGinStatus()

bool DoipLib::VehicleIdResponse::TryGetVinGinStatus ( uint8_t &  vinGinStatus) const
noexcept

Try to get the VIN/GIN status.

Parameters
[out]vinGinStatusVIN/GIN synchronization status
Returns
True if the VIN/GIN synchronization status is being used, otherwise false

◆ TrySetPayload()

virtual bool DoipLib::VehicleIdResponse::TrySetPayload ( const std::vector< uint8_t > &  payload,
uint32_t  payloadLength 
)
overrideprotectedvirtual

Try to set message payload.

Parameters
[in]payloadPayload byte array
[in]payloadLengthPayload length from the message header
Returns
True if the payload is set successfully, otherwise false

Implements DoipLib::Message.