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

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

Inheritance diagram for diag::client::conversation::DmConversationHandler:
Inheritance graph
[legend]
Collaboration diagram for diag::client::conversation::DmConversationHandler:
Collaboration graph
[legend]

Public Member Functions

 DmConversationHandler (::uds_transport::conversion_manager::ConversionHandlerID handler_id, DmConversation &dm_conversion)
 Constructs an instance of DmConversationHandler. More...
 
 DmConversationHandler (const DmConversationHandler &other) noexcept=delete
 Deleted copy assignment and copy constructor. More...
 
DmConversationHandleroperator= (const DmConversationHandler &other) noexcept=delete
 
 DmConversationHandler (DmConversationHandler &&other) noexcept=delete
 Deleted move assignment and move constructor. More...
 
DmConversationHandleroperator= (DmConversationHandler &&other) noexcept=delete
 
 ~DmConversationHandler () override=default
 Destructs an instance of DmConversationHandler. More...
 
std::pair<::uds_transport::UdsTransportProtocolMgr::IndicationResult, ::uds_transport::UdsMessagePtrIndicateMessage (::uds_transport::UdsMessage::Address source_addr, ::uds_transport::UdsMessage::Address target_addr, ::uds_transport::UdsMessage::TargetAddressType type, ::uds_transport::ChannelID channel_id, std::size_t size, ::uds_transport::Priority priority, ::uds_transport::ProtocolKind protocol_kind, core_type::Span< std::uint8_t > payload_info) const noexcept override
 Function to indicate a start of reception of message. More...
 
void HandleMessage (::uds_transport::UdsMessagePtr message) const noexcept override
 Function to Hands over a valid received Uds message. More...
 
- Public Member Functions inherited from uds_transport::ConversionHandler
 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...
 

Private Attributes

DmConversationdm_conversation_
 Store the reference of dm conversation. More...
 

Additional Inherited Members

- Protected Attributes inherited from uds_transport::ConversionHandler
conversion_manager::ConversionHandlerID handler_id_
 Store the conversation handle id. More...
 

Detailed Description

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

Definition at line 23 of file dm_conversation.cpp.

Constructor & Destructor Documentation

◆ DmConversationHandler() [1/3]

diag::client::conversation::DmConversationHandler::DmConversationHandler ( ::uds_transport::conversion_manager::ConversionHandlerID  handler_id,
DmConversation dm_conversion 
)
inline

Constructs an instance of DmConversationHandler.

Parameters
[in]handler_idThe handle id of conversation
[in]dm_conversionThe reference of dm conversation

Definition at line 32 of file dm_conversation.cpp.

35  dm_conversation_{dm_conversion} {}
DmConversation & dm_conversation_
Store the reference of dm conversation.
Class to manage reception from transport protocol handler to connection handler.

◆ DmConversationHandler() [2/3]

diag::client::conversation::DmConversationHandler::DmConversationHandler ( const DmConversationHandler other)
deletenoexcept

Deleted copy assignment and copy constructor.

◆ DmConversationHandler() [3/3]

diag::client::conversation::DmConversationHandler::DmConversationHandler ( DmConversationHandler &&  other)
deletenoexcept

Deleted move assignment and move constructor.

◆ ~DmConversationHandler()

diag::client::conversation::DmConversationHandler::~DmConversationHandler ( )
overridedefault

Destructs an instance of DmConversationHandler.

Member Function Documentation

◆ HandleMessage()

void diag::client::conversation::DmConversationHandler::HandleMessage ( ::uds_transport::UdsMessagePtr  message) const
inlineoverridenoexcept

Function to Hands over a valid received Uds message.

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

Definition at line 94 of file dm_conversation.cpp.

94  {
95  dm_conversation_.HandleMessage(std::move(message));
96  }
void HandleMessage(::uds_transport::UdsMessagePtr message) noexcept override
Function to Hands over a valid received Uds message.

References dm_conversation_, and diag::client::conversation::DmConversation::HandleMessage().

Here is the call graph for this function:

◆ IndicateMessage()

std::pair<::uds_transport::UdsTransportProtocolMgr::IndicationResult, ::uds_transport::UdsMessagePtr> diag::client::conversation::DmConversationHandler::IndicateMessage ( ::uds_transport::UdsMessage::Address  source_addr,
::uds_transport::UdsMessage::Address  target_addr,
::uds_transport::UdsMessage::TargetAddressType  type,
::uds_transport::ChannelID  channel_id,
std::size_t  size,
::uds_transport::Priority  priority,
::uds_transport::ProtocolKind  protocol_kind,
core_type::Span< std::uint8_t >  payload_info 
) const
inlineoverridenoexcept

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

Definition at line 79 of file dm_conversation.cpp.

83  {
84  return (dm_conversation_.IndicateMessage(source_addr, target_addr, type, channel_id, size, priority, protocol_kind,
85  payload_info));
86  }
std::pair<::uds_transport::UdsTransportProtocolMgr::IndicationResult, ::uds_transport::UdsMessagePtr > IndicateMessage(::uds_transport::UdsMessage::Address source_addr, ::uds_transport::UdsMessage::Address target_addr, ::uds_transport::UdsMessage::TargetAddressType type, ::uds_transport::ChannelID channel_id, std::size_t size, ::uds_transport::Priority priority, ::uds_transport::ProtocolKind protocol_kind, core_type::Span< std::uint8_t > payload_info) noexcept override
Function to indicate a start of reception of message.

References dm_conversation_, and diag::client::conversation::DmConversation::IndicateMessage().

Here is the call graph for this function:

◆ operator=() [1/2]

DmConversationHandler& diag::client::conversation::DmConversationHandler::operator= ( const DmConversationHandler other)
deletenoexcept

◆ operator=() [2/2]

DmConversationHandler& diag::client::conversation::DmConversationHandler::operator= ( DmConversationHandler &&  other)
deletenoexcept

Member Data Documentation

◆ dm_conversation_

DmConversation& diag::client::conversation::DmConversationHandler::dm_conversation_
private

Store the reference of dm conversation.

Definition at line 102 of file dm_conversation.cpp.

Referenced by HandleMessage(), and IndicateMessage().


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