Diag-Client-Lib
Public Types | Public Member Functions | List of all members
diag::client::uds_message::UdsMessage Class Referenceabstract

Class represents an UDS message exchanged between User of diag-client-lib and implementation of diag-client-lib on diagnostic request reception path or diagnostic response transmission path. UdsMessage provides the storage for UDS requests/responses. More...

#include <diagnostic_client_uds_message_type.h>

Inheritance diagram for diag::client::uds_message::UdsMessage:
Inheritance graph
[legend]

Public Types

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...
 

Public Member Functions

 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...
 
UdsMessageoperator= (const UdsMessage &other)=default
 Copy assignment of UdsMessage. More...
 
UdsMessageoperator= (UdsMessage &&other) noexcept=default
 Move assignment of UdsMessage. More...
 
virtual ~UdsMessage ()=default
 Destructs an instance of UdsMessage. More...
 
virtual const ByteVectorGetPayload () const =0
 Get the UDS message data starting with the SID (A_Data as per ISO) More...
 
virtual ByteVectorGetPayload ()=0
 Return the underlying buffer for write access. More...
 
virtual IpAddress GetHostIpAddress () const noexcept=0
 Get the remote ip address present. More...
 

Detailed Description

Class represents an UDS message exchanged between User of diag-client-lib and implementation of diag-client-lib on diagnostic request reception path or diagnostic response transmission path. UdsMessage provides the storage for UDS requests/responses.

Definition at line 26 of file diagnostic_client_uds_message_type.h.

Member Typedef Documentation

◆ ByteVector

using diag::client::uds_message::UdsMessage::ByteVector = std::vector<std::uint8_t>

Type alias of byte vector type.

Definition at line 36 of file diagnostic_client_uds_message_type.h.

◆ IpAddress

Type alias of ip address type.

Definition at line 31 of file diagnostic_client_uds_message_type.h.

Constructor & Destructor Documentation

◆ UdsMessage() [1/3]

diag::client::uds_message::UdsMessage::UdsMessage ( )
default

Default constructs an instance of UdsMessage.

◆ UdsMessage() [2/3]

diag::client::uds_message::UdsMessage::UdsMessage ( const UdsMessage other)
default

Copy constructs an instance of UdsMessage.

◆ UdsMessage() [3/3]

diag::client::uds_message::UdsMessage::UdsMessage ( UdsMessage &&  other)
defaultnoexcept

Move constructs an instance of UdsMessage.

◆ ~UdsMessage()

virtual diag::client::uds_message::UdsMessage::~UdsMessage ( )
virtualdefault

Destructs an instance of UdsMessage.

Member Function Documentation

◆ GetHostIpAddress()

virtual IpAddress diag::client::uds_message::UdsMessage::GetHostIpAddress ( ) const
pure virtualnoexcept

Get the remote ip address present.

Returns
IpAddress Ip address stored

Implemented in diag::client::uds_message::DmUdsResponse.

◆ GetPayload() [1/2]

virtual const ByteVector& diag::client::uds_message::UdsMessage::GetPayload ( ) const
pure virtual

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

Returns
const ByteVector& The entire payload (A_Data)

Implemented in diag::client::uds_message::DmUdsResponse.

◆ GetPayload() [2/2]

virtual ByteVector& diag::client::uds_message::UdsMessage::GetPayload ( )
pure virtual

Return the underlying buffer for write access.

Returns
ByteVector& payload of the UDSMessage starting from SID.

Implemented in diag::client::uds_message::DmUdsResponse.

◆ operator=() [1/2]

UdsMessage& diag::client::uds_message::UdsMessage::operator= ( const UdsMessage other)
default

Copy assignment of UdsMessage.

◆ operator=() [2/2]

UdsMessage& diag::client::uds_message::UdsMessage::operator= ( UdsMessage &&  other)
defaultnoexcept

Move assignment of UdsMessage.


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