Diag-Client-Lib
Public Member Functions | List of all members
doip_client::connection::DoipConnectionManager Class Referencefinal

Manages Doip tcp and udp connections. More...

#include <connection_manager.h>

Public Member Functions

 DoipConnectionManager ()=default
 Constructs an instance of DoipConnectionManager. More...
 
 ~DoipConnectionManager ()=default
 Destruct an instance of DoipConnectionManager. More...
 
std::unique_ptr< uds_transport::ConnectionFindOrCreateTcpConnection (uds_transport::ConversionHandler const &conversation, std::string_view tcp_ip_address, std::uint16_t port_num)
 Function to find or create a new Tcp connection. More...
 
std::unique_ptr< uds_transport::ConnectionFindOrCreateUdpConnection (uds_transport::ConversionHandler const &conversation, std::string_view udp_ip_address, std::uint16_t port_num)
 Function to find or create a new Udp connection. More...
 

Detailed Description

Manages Doip tcp and udp connections.

Definition at line 23 of file connection_manager.h.

Constructor & Destructor Documentation

◆ DoipConnectionManager()

doip_client::connection::DoipConnectionManager::DoipConnectionManager ( )
default

Constructs an instance of DoipConnectionManager.

◆ ~DoipConnectionManager()

doip_client::connection::DoipConnectionManager::~DoipConnectionManager ( )
default

Destruct an instance of DoipConnectionManager.

Member Function Documentation

◆ FindOrCreateTcpConnection()

std::unique_ptr< uds_transport::Connection > doip_client::connection::DoipConnectionManager::FindOrCreateTcpConnection ( uds_transport::ConversionHandler const &  conversation,
std::string_view  tcp_ip_address,
std::uint16_t  port_num 
)

Function to find or create a new Tcp connection.

Parameters
[in]conversationThe conversation handler used by tcp connection to communicate
[in]tcp_ip_addressThe local tcp ip address
[in]port_numThe local port number
Returns
The unique pointer to Connection created

Definition at line 283 of file connection_manager.cpp.

284  {
285  return (std::make_unique<DoipTcpConnection>(conversation, tcp_ip_address, port_num));
286 }

Referenced by doip_client::transport_protocol_handler::DoipTransportProtocolHandler::CreateTcpConnection().

Here is the caller graph for this function:

◆ FindOrCreateUdpConnection()

std::unique_ptr< uds_transport::Connection > doip_client::connection::DoipConnectionManager::FindOrCreateUdpConnection ( uds_transport::ConversionHandler const &  conversation,
std::string_view  udp_ip_address,
std::uint16_t  port_num 
)

Function to find or create a new Udp connection.

Parameters
[in]conversationThe conversation handler used by tcp connection to communicate
[in]udp_ip_addressThe local udp ip address
[in]port_numThe local port number
Returns
The unique pointer to Connection created

Definition at line 288 of file connection_manager.cpp.

289  {
290  return (std::make_unique<DoipUdpConnection>(conversation, udp_ip_address, port_num));
291 }

Referenced by doip_client::transport_protocol_handler::DoipTransportProtocolHandler::CreateUdpConnection().

Here is the caller graph for this function:

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