10 #include "common/logger.h"
14 namespace transport_protocol_handler {
19 :
uds_transport::UdsTransportProtocolHandler(handler_id, transport_protocol_mgr),
20 doip_connection_mgr_{} {}
35 __FILE__, __LINE__, __func__, [tcp_ip_address](std::stringstream &msg) {
36 msg <<
"Doip Tcp protocol requested with local endpoint : "
37 <<
"<Tcp: " << tcp_ip_address <<
">";
45 __FILE__, __LINE__, __func__, [udp_ip_address](std::stringstream &msg) {
46 msg <<
"Doip Udp protocol requested with local endpoint : "
47 <<
"<Udp: " << udp_ip_address <<
">";
std::unique_ptr< uds_transport::Connection > 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.
std::unique_ptr< uds_transport::Connection > 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.
static auto GetDiagClientLogger() noexcept -> DoipClientLogger &
void Stop() override
Function to stop the protocol handler.
DoipTransportProtocolHandler(UdsTransportProtocolHandlerId handler_id, uds_transport::UdsTransportProtocolMgr const &transport_protocol_mgr)
Constructs an instance of DoipTransportProtocolHandler.
void Start() override
Function to start the protocol handler.
connection::DoipConnectionManager doip_connection_mgr_
Store Doip Connection manager.
std::unique_ptr< uds_transport::Connection > CreateTcpConnection(uds_transport::ConversionHandler &conversation, std::string_view tcp_ip_address, std::uint16_t port_num) override
Function to create a new Tcp connection.
std::unique_ptr< uds_transport::Connection > CreateUdpConnection(uds_transport::ConversionHandler &conversion_handler, std::string_view udp_ip_address, std::uint16_t port_num) override
Function to create a new Udp connection.
InitializationResult Initialize() override
Function to initialize the handler.
uds_transport::UdsTransportProtocolHandler::UdsTransportProtocolHandlerId UdsTransportProtocolHandlerId
Type alias for handler id.
~DoipTransportProtocolHandler() final
Destruct an instance of DoipTransportProtocolHandler.
Class to manage reception from transport protocol handler to connection handler.
InitializationResult
Definitions of different initialization result.