Function to get DM conversation object based on conversation name.
36 std::string
const conversation_name_in_map{it->first};
37 it->second.conversation = std::visit(
39 [
this, &conversation_name_in_map](conversation::DMConversationType conversation_type) noexcept {
41 std::unique_ptr<diag::client::conversation::Conversation> conversation{
42 std::make_unique<diag::client::conversation::DmConversation>(conversation_name_in_map,
46 conversation->GetConversationHandler(), conversation_type.tcp_address, conversation_type.port_num));
49 [
this, &conversation_name_in_map](conversation::VDConversationType conversation_type) noexcept {
51 std::unique_ptr<diag::client::conversation::Conversation> conversation{
52 std::make_unique<diag::client::conversation::VdConversation>(conversation_name_in_map,
56 conversation->GetConversationHandler(), conversation_type.udp_address, conversation_type.port_num));
59 it->second.conversation_type);
62 __FILE__, __LINE__, __func__, [conversation_name](std::stringstream &msg) {
63 msg <<
"Invalid conversation name: '" << conversation_name <<
"', provide correct name as per config file";
66 return *(it->second.conversation);
std::unordered_map< std::string, ConversationStorage > conversation_map_
Map to store conversation object(dm) along with conversation name.
static auto GetDiagClientLogger() noexcept -> DiagClientLogger &
Get the diag client logger instance.
::uds_transport::UdsTransportProtocolHandler & GetTransportProtocolHandler()
virtual std::unique_ptr< Connection > CreateUdpConnection(ConversionHandler &conversion_handler, std::string_view udpIpaddress, uint16_t portNum)=0
Function to create a new Udp connection.
virtual std::unique_ptr< Connection > CreateTcpConnection(ConversionHandler &conversion_handler, std::string_view tcpIpaddress, uint16_t portNum)=0
Function to create a new Tcp connection.