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

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

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

Public Member Functions

 VdConversationHandler (::uds_transport::conversion_manager::ConversionHandlerID handler_id, VdConversation &vd_conversion)
 Constructs an instance of VdConversationHandler. More...
 
 VdConversationHandler (const VdConversationHandler &other) noexcept=delete
 Deleted copy assignment and copy constructor. More...
 
VdConversationHandleroperator= (const VdConversationHandler &other) noexcept=delete
 
 VdConversationHandler (VdConversationHandler &&other) noexcept=delete
 Deleted move assignment and move constructor. More...
 
VdConversationHandleroperator= (VdConversationHandler &&other) noexcept=delete
 
 ~VdConversationHandler () 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 > payloadInfo) 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

VdConversationvd_conversation_
 Store the reference of vd 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 vd connection handler.

Definition at line 105 of file vd_conversation.cpp.

Constructor & Destructor Documentation

◆ VdConversationHandler() [1/3]

diag::client::conversation::VdConversationHandler::VdConversationHandler ( ::uds_transport::conversion_manager::ConversionHandlerID  handler_id,
VdConversation vd_conversion 
)
inline

Constructs an instance of VdConversationHandler.

Parameters
[in]handler_idThe handle id of conversation
[in]vd_conversionThe reference of vd conversation

Definition at line 114 of file vd_conversation.cpp.

117  vd_conversation_{vd_conversion} {}
VdConversation & vd_conversation_
Store the reference of vd conversation.
Class to manage reception from transport protocol handler to connection handler.

◆ VdConversationHandler() [2/3]

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

Deleted copy assignment and copy constructor.

◆ VdConversationHandler() [3/3]

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

Deleted move assignment and move constructor.

◆ ~VdConversationHandler()

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

Destructs an instance of DmConversationHandler.

Member Function Documentation

◆ HandleMessage()

void diag::client::conversation::VdConversationHandler::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 176 of file vd_conversation.cpp.

176  {
177  vd_conversation_.HandleMessage(std::move(message));
178  }
void HandleMessage(::uds_transport::UdsMessagePtr message) noexcept override
Function to Hands over a valid received Uds message.

References diag::client::conversation::VdConversation::HandleMessage(), and vd_conversation_.

Here is the call graph for this function:

◆ IndicateMessage()

std::pair<::uds_transport::UdsTransportProtocolMgr::IndicationResult, ::uds_transport::UdsMessagePtr> diag::client::conversation::VdConversationHandler::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 >  payloadInfo 
) 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 161 of file vd_conversation.cpp.

165  {
166  return (vd_conversation_.IndicateMessage(source_addr, target_addr, type, channel_id, size, priority, protocol_kind,
167  payloadInfo));
168  }
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 > payloadInfo) noexcept override
Function to indicate a start of reception of message.

References diag::client::conversation::VdConversation::IndicateMessage(), and vd_conversation_.

Here is the call graph for this function:

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Member Data Documentation

◆ vd_conversation_

VdConversation& diag::client::conversation::VdConversationHandler::vd_conversation_
private

Store the reference of vd conversation.

Definition at line 184 of file vd_conversation.cpp.

Referenced by HandleMessage(), and IndicateMessage().


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