Diag-Client-Lib
Public Member Functions | Protected Attributes | List of all members
uds_transport::ConversionHandler Class Referenceabstract

Class to manage reception from transport protocol handler to connection handler. More...

#include <conversation_handler.h>

Inheritance diagram for uds_transport::ConversionHandler:
Inheritance graph
[legend]

Public Member Functions

 ConversionHandler (conversion_manager::ConversionHandlerID handler_id)
 Constructs an instance of ConversionHandler. More...
 
 ConversionHandler (const ConversionHandler &other) noexcept=default
 Default copy assignment and copy constructor. More...
 
ConversionHandleroperator= (const ConversionHandler &other) noexcept=default
 
 ConversionHandler (ConversionHandler &&other) noexcept=default
 Default move assignment and move constructor. More...
 
ConversionHandleroperator= (ConversionHandler &&other) noexcept=default
 
virtual ~ConversionHandler () noexcept=default
 Destructs an instance of ConversionHandler. More...
 
virtual std::pair< UdsTransportProtocolMgr::IndicationResult, UdsMessagePtrIndicateMessage (UdsMessage::Address source_addr, UdsMessage::Address target_addr, UdsMessage::TargetAddressType type, ChannelID channel_id, std::size_t size, Priority priority, ProtocolKind protocol_kind, core_type::Span< std::uint8_t > payload_info) const noexcept=0
 Function to indicate a start of reception of message. More...
 
virtual void HandleMessage (UdsMessagePtr message) const noexcept=0
 Function to Hands over a valid received Uds message. More...
 

Protected Attributes

conversion_manager::ConversionHandlerID handler_id_
 Store the conversation handle id. More...
 

Detailed Description

Class to manage reception from transport protocol handler to connection handler.

Definition at line 19 of file conversation_handler.h.

Constructor & Destructor Documentation

◆ ConversionHandler() [1/3]

uds_transport::ConversionHandler::ConversionHandler ( conversion_manager::ConversionHandlerID  handler_id)
inlineexplicit

Constructs an instance of ConversionHandler.

Parameters
[in]handler_idThe handle id of conversation

Definition at line 26 of file conversation_handler.h.

26 : handler_id_{handler_id} {}
conversion_manager::ConversionHandlerID handler_id_
Store the conversation handle id.

◆ ConversionHandler() [2/3]

uds_transport::ConversionHandler::ConversionHandler ( const ConversionHandler other)
defaultnoexcept

Default copy assignment and copy constructor.

◆ ConversionHandler() [3/3]

uds_transport::ConversionHandler::ConversionHandler ( ConversionHandler &&  other)
defaultnoexcept

Default move assignment and move constructor.

◆ ~ConversionHandler()

virtual uds_transport::ConversionHandler::~ConversionHandler ( )
virtualdefaultnoexcept

Destructs an instance of ConversionHandler.

Member Function Documentation

◆ HandleMessage()

virtual void uds_transport::ConversionHandler::HandleMessage ( UdsMessagePtr  message) const
pure virtualnoexcept

Function to Hands over a valid received Uds message.

Parameters
[in]messageThe Uds message ptr (unique_ptr semantics) with the request. Ownership of the UdsMessage is given back to the conversation here

Referenced by doip_client::connection::DoipTcpConnection::HandleMessage(), and doip_client::connection::DoipUdpConnection::HandleMessage().

Here is the caller graph for this function:

◆ IndicateMessage()

virtual std::pair<UdsTransportProtocolMgr::IndicationResult, UdsMessagePtr> uds_transport::ConversionHandler::IndicateMessage ( UdsMessage::Address  source_addr,
UdsMessage::Address  target_addr,
UdsMessage::TargetAddressType  type,
ChannelID  channel_id,
std::size_t  size,
Priority  priority,
ProtocolKind  protocol_kind,
core_type::Span< std::uint8_t >  payload_info 
) const
pure virtualnoexcept

Function to indicate a start of reception of message.

This is called to indicate the reception of new message by underlying transport protocol handler

Parameters
[in]source_addrThe UDS source address of message
[in]target_addrThe UDS target address of message
[in]typeThe indication whether its is phys/func request
[in]channel_idThe transport protocol channel on which message start happened
[in]sizeThe size in bytes of the UdsMessage starting from SID
[in]priorityThe priority of the given message, used for prioritization of conversations
[in]protocol_kindThe identifier of protocol kind associated to message
[in]payload_infoThe view onto the first received payload bytes, if any. This view shall be used only within this function call. It is recommended that the TP provides at least the first two bytes of the request message, so the DM can identify a functional TesterPresent
Returns
std::pair< IndicationResult, UdsMessagePtr > The pair of IndicationResult and a pointer to UdsMessage owned/created by DM core and returned to the handler to get filled

Referenced by doip_client::connection::DoipTcpConnection::IndicateMessage(), and doip_client::connection::DoipUdpConnection::IndicateMessage().

Here is the caller graph for this function:

◆ operator=() [1/2]

ConversionHandler& uds_transport::ConversionHandler::operator= ( const ConversionHandler other)
defaultnoexcept

◆ operator=() [2/2]

ConversionHandler& uds_transport::ConversionHandler::operator= ( ConversionHandler &&  other)
defaultnoexcept

Member Data Documentation

◆ handler_id_

conversion_manager::ConversionHandlerID uds_transport::ConversionHandler::handler_id_
protected

Store the conversation handle id.

Definition at line 87 of file conversation_handler.h.


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