Diag-Client-Lib
Public Member Functions | Private Attributes | List of all members
diag::client::conversation::DiagClientConversation::DiagClientConversationImpl Class Referencefinal
Collaboration diagram for diag::client::conversation::DiagClientConversation::DiagClientConversationImpl:
Collaboration graph
[legend]

Public Member Functions

 DiagClientConversationImpl (std::string_view conversation_name) noexcept
 Constructor an instance of DiagClientConversationImpl. More...
 
 ~DiagClientConversationImpl () noexcept=default
 Destructor an instance of DiagClientConversationImpl. More...
 
void Startup () noexcept
 Function to startup the Diagnostic Client Conversation. More...
 
void Shutdown () noexcept
 Function to shutdown the Diagnostic Client Conversation. More...
 
ConnectResult ConnectToDiagServer (std::uint16_t target_address, IpAddress host_ip_addr) noexcept
 Function to connect to Diagnostic Server. More...
 
DisconnectResult DisconnectFromDiagServer () noexcept
 Function to disconnect from Diagnostic Server. More...
 
Result< uds_message::UdsResponseMessagePtr, DiagClientConversation::DiagErrorSendDiagnosticRequest (uds_message::UdsRequestMessageConstPtr message) noexcept
 Function to send Diagnostic Request and get Diagnostic Response. More...
 

Private Attributes

Conversationinternal_conversation_
 Reference to valid conversation created. More...
 

Detailed Description

Definition at line 19 of file diagnostic_client_conversation.cpp.

Constructor & Destructor Documentation

◆ DiagClientConversationImpl()

diag::client::conversation::DiagClientConversation::DiagClientConversationImpl::DiagClientConversationImpl ( std::string_view  conversation_name)
inlineexplicitnoexcept

Constructor an instance of DiagClientConversationImpl.

Parameters
[in]conversation_nameThe name of conversation configured as json parameter under "ConversationName"

Definition at line 26 of file diagnostic_client_conversation.cpp.

27  : internal_conversation_{dcm::GetConversationManager().GetDiagnosticClientConversation(conversation_name)} {}
auto GetConversationManager() noexcept -> conversation_manager::ConversationManager &
Function to get the reference to conversation manager.
Definition: dcm_client.cpp:83

References diag::client::dcm::GetConversationManager().

Here is the call graph for this function:

◆ ~DiagClientConversationImpl()

diag::client::conversation::DiagClientConversation::DiagClientConversationImpl::~DiagClientConversationImpl ( )
defaultnoexcept

Destructor an instance of DiagClientConversationImpl.

Member Function Documentation

◆ ConnectToDiagServer()

ConnectResult diag::client::conversation::DiagClientConversation::DiagClientConversationImpl::ConnectToDiagServer ( std::uint16_t  target_address,
IpAddress  host_ip_addr 
)
inlinenoexcept

Function to connect to Diagnostic Server.

Parameters
[in]target_addressLogical address of the Remote server
[in]host_ip_addrIP address of the Remote server
Returns
ConnectResult Connection result returned

Definition at line 56 of file diagnostic_client_conversation.cpp.

56  {
57  return internal_conversation_.ConnectToDiagServer(target_address, host_ip_addr);
58  }
virtual ConnectResult ConnectToDiagServer(std::uint16_t, IpAddress) noexcept
Function to connect to Diagnostic Server.
Definition: conversation.h:101

References diag::client::conversation::Conversation::ConnectToDiagServer(), and internal_conversation_.

Here is the call graph for this function:

◆ DisconnectFromDiagServer()

DisconnectResult diag::client::conversation::DiagClientConversation::DiagClientConversationImpl::DisconnectFromDiagServer ( )
inlinenoexcept

Function to disconnect from Diagnostic Server.

Returns
DisconnectResult Disconnection result returned

Definition at line 65 of file diagnostic_client_conversation.cpp.

virtual DisconnectResult DisconnectFromDiagServer() noexcept
Function to disconnect from Diagnostic Server.
Definition: conversation.h:108

References diag::client::conversation::Conversation::DisconnectFromDiagServer(), and internal_conversation_.

Here is the call graph for this function:

◆ SendDiagnosticRequest()

Result<uds_message::UdsResponseMessagePtr, DiagClientConversation::DiagError> diag::client::conversation::DiagClientConversation::DiagClientConversationImpl::SendDiagnosticRequest ( uds_message::UdsRequestMessageConstPtr  message)
inlinenoexcept

Function to send Diagnostic Request and get Diagnostic Response.

Parameters
[in]messageThe diagnostic request message wrapped in a unique pointer
Returns
DiagResult The result returned
uds_message::UdsResponseMessagePtr Diagnostic Response message received, null_ptr in case of error

Definition at line 76 of file diagnostic_client_conversation.cpp.

77  {
78  return internal_conversation_.SendDiagnosticRequest(std::move(message));
79  }
virtual Result< uds_message::UdsResponseMessagePtr, DiagError > SendDiagnosticRequest(uds_message::UdsRequestMessageConstPtr) noexcept
Function to send Diagnostic Request and get Diagnostic Response.
Definition: conversation.h:158

References internal_conversation_, and diag::client::conversation::Conversation::SendDiagnosticRequest().

Here is the call graph for this function:

◆ Shutdown()

void diag::client::conversation::DiagClientConversation::DiagClientConversationImpl::Shutdown ( )
inlinenoexcept

Function to shutdown the Diagnostic Client Conversation.

Must be called during shutdown phase, no further processing of any function will be allowed after this call

Definition at line 45 of file diagnostic_client_conversation.cpp.

virtual void Shutdown() noexcept=0
Function to shutdown the Conversation.

References internal_conversation_, and diag::client::conversation::Conversation::Shutdown().

Here is the call graph for this function:

◆ Startup()

void diag::client::conversation::DiagClientConversation::DiagClientConversationImpl::Startup ( )
inlinenoexcept

Function to startup the Diagnostic Client Conversation.

Must be called once and before using any other functions of DiagClientConversation

Definition at line 38 of file diagnostic_client_conversation.cpp.

virtual void Startup() noexcept=0
Function to start the Conversation.

References internal_conversation_, and diag::client::conversation::Conversation::Startup().

Here is the call graph for this function:

Member Data Documentation

◆ internal_conversation_

Conversation& diag::client::conversation::DiagClientConversation::DiagClientConversationImpl::internal_conversation_
private

Reference to valid conversation created.

Definition at line 85 of file diagnostic_client_conversation.cpp.

Referenced by ConnectToDiagServer(), DisconnectFromDiagServer(), SendDiagnosticRequest(), Shutdown(), and Startup().


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