Diag-Client-Lib
Public Member Functions | Private Member Functions | Private Attributes | List of all members
diag::client::uds_message::DmUdsResponse Class Referencefinal

#include <dm_uds_message.h>

Inheritance diagram for diag::client::uds_message::DmUdsResponse:
Inheritance graph
[legend]
Collaboration diagram for diag::client::uds_message::DmUdsResponse:
Collaboration graph
[legend]

Public Member Functions

 DmUdsResponse (ByteVector &payload)
 
 ~DmUdsResponse () noexcept override=default
 
- Public Member Functions inherited from diag::client::uds_message::UdsMessage
 UdsMessage ()=default
 Default constructs an instance of UdsMessage. More...
 
 UdsMessage (const UdsMessage &other)=default
 Copy constructs an instance of UdsMessage. More...
 
 UdsMessage (UdsMessage &&other) noexcept=default
 Move constructs an instance of UdsMessage. More...
 
UdsMessage & operator= (const UdsMessage &other)=default
 Copy assignment of UdsMessage. More...
 
UdsMessage & operator= (UdsMessage &&other) noexcept=default
 Move assignment of UdsMessage. More...
 
virtual ~UdsMessage ()=default
 Destructs an instance of UdsMessage. More...
 

Private Member Functions

const ByteVector & GetPayload () const override
 Get the UDS message data starting with the SID (A_Data as per ISO) More...
 
ByteVector & GetPayload () override
 Return the underlying buffer for write access. More...
 
IpAddress GetHostIpAddress () const noexcept override
 Get the remote ip address present. More...
 

Private Attributes

ByteVector & uds_payload_
 
IpAddress host_ip_address_
 

Additional Inherited Members

- Public Types inherited from diag::client::uds_message::UdsMessage
using IpAddress = std::string_view
 Type alias of ip address type. More...
 
using ByteVector = std::vector< std::uint8_t >
 Type alias of byte vector type. More...
 

Detailed Description

Definition at line 71 of file dm_uds_message.h.

Constructor & Destructor Documentation

◆ DmUdsResponse()

diag::client::uds_message::DmUdsResponse::DmUdsResponse ( ByteVector &  payload)
explicit

Definition at line 22 of file dm_uds_message.cpp.

22 : uds_payload_{payload} {}

◆ ~DmUdsResponse()

diag::client::uds_message::DmUdsResponse::~DmUdsResponse ( )
overridedefaultnoexcept

Member Function Documentation

◆ GetHostIpAddress()

IpAddress diag::client::uds_message::DmUdsResponse::GetHostIpAddress ( ) const
inlineoverrideprivatevirtualnoexcept

Get the remote ip address present.

Returns
IpAddress Ip address stored

Implements diag::client::uds_message::UdsMessage.

Definition at line 90 of file dm_uds_message.h.

References host_ip_address_.

◆ GetPayload() [1/2]

const ByteVector& diag::client::uds_message::DmUdsResponse::GetPayload ( ) const
inlineoverrideprivatevirtual

Get the UDS message data starting with the SID (A_Data as per ISO)

Returns
const ByteVector& The entire payload (A_Data)

Implements diag::client::uds_message::UdsMessage.

Definition at line 84 of file dm_uds_message.h.

84 { return uds_payload_; }

References uds_payload_.

◆ GetPayload() [2/2]

ByteVector& diag::client::uds_message::DmUdsResponse::GetPayload ( )
inlineoverrideprivatevirtual

Return the underlying buffer for write access.

Returns
ByteVector& payload of the UDSMessage starting from SID.

Implements diag::client::uds_message::UdsMessage.

Definition at line 87 of file dm_uds_message.h.

87 { return uds_payload_; }

References uds_payload_.

Member Data Documentation

◆ host_ip_address_

IpAddress diag::client::uds_message::DmUdsResponse::host_ip_address_
private

Definition at line 81 of file dm_uds_message.h.

Referenced by GetHostIpAddress().

◆ uds_payload_

ByteVector& diag::client::uds_message::DmUdsResponse::uds_payload_
private

Definition at line 79 of file dm_uds_message.h.

Referenced by GetPayload().


The documentation for this class was generated from the following files: