Diag-Client-Lib
Classes | Public Member Functions | Private Attributes | List of all members
doip_client::channel::udp_channel::VehicleDiscoveryHandler Class Referencefinal

Class used as a handler to process vehicle announcement messages. More...

#include <doip_vehicle_discovery_handler.h>

Classes

class  VehicleDiscoveryHandlerImpl
 Class implements vehicle discovery handler. More...
 

Public Member Functions

 VehicleDiscoveryHandler (sockets::UdpSocketHandler &udp_socket_handler, DoipUdpChannel &channel)
 Constructs an instance of VehicleDiscoveryHandler. More...
 
 ~VehicleDiscoveryHandler ()
 Destruct an instance of VehicleDiscoveryHandler. More...
 
void ProcessVehicleAnnouncementResponse (DoipMessage &doip_payload) noexcept
 Function to process received vehicle announcement response. More...
 

Private Attributes

std::unique_ptr< VehicleDiscoveryHandlerImplhandler_impl_
 Stores the Handler implementation. More...
 

Detailed Description

Class used as a handler to process vehicle announcement messages.

Definition at line 26 of file doip_vehicle_discovery_handler.h.

Constructor & Destructor Documentation

◆ VehicleDiscoveryHandler()

doip_client::channel::udp_channel::VehicleDiscoveryHandler::VehicleDiscoveryHandler ( sockets::UdpSocketHandler udp_socket_handler,
DoipUdpChannel channel 
)

Constructs an instance of VehicleDiscoveryHandler.

Parameters
[in]udp_socket_handlerThe reference to socket handler
[in]channelThe reference to doip udp channel

Definition at line 150 of file doip_vehicle_discovery_handler.cpp.

152  : handler_impl_{std::make_unique<VehicleDiscoveryHandlerImpl>(udp_socket_handler)} {}
std::unique_ptr< VehicleDiscoveryHandlerImpl > handler_impl_
Stores the Handler implementation.

◆ ~VehicleDiscoveryHandler()

doip_client::channel::udp_channel::VehicleDiscoveryHandler::~VehicleDiscoveryHandler ( )
default

Destruct an instance of VehicleDiscoveryHandler.

Member Function Documentation

◆ ProcessVehicleAnnouncementResponse()

void doip_client::channel::udp_channel::VehicleDiscoveryHandler::ProcessVehicleAnnouncementResponse ( DoipMessage doip_payload)
noexcept

Function to process received vehicle announcement response.

Parameters
[in]doip_payloadThe doip message received

Definition at line 156 of file doip_vehicle_discovery_handler.cpp.

156  {
157  if (handler_impl_->GetStateContext().GetActiveState().GetState() ==
158  VehicleDiscoveryState::kWaitForVehicleAnnouncement) {
159  // Deserialize and Add to task executor
160  logger::DoipClientLogger::GetDiagClientLogger().GetLogger().LogWarn(
161  __FILE__, __LINE__, __func__,
162  [](std::stringstream &msg) { msg << "Processing of vehicle announcement is not implemented"; });
163  } else {
164  // ignore
165  }
166 }
static auto GetDiagClientLogger() noexcept -> DoipClientLogger &
Definition: logger.h:20

References doip_client::logger::DoipClientLogger::GetDiagClientLogger().

Here is the call graph for this function:

Member Data Documentation

◆ handler_impl_

std::unique_ptr<VehicleDiscoveryHandlerImpl> doip_client::channel::udp_channel::VehicleDiscoveryHandler::handler_impl_
private

Stores the Handler implementation.

Definition at line 58 of file doip_vehicle_discovery_handler.h.


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