Diag-Client-Lib
doip_vehicle_identification_handler.h
Go to the documentation of this file.
1 /* Diagnostic Client library
2 * Copyright (C) 2024 Avijit Dey
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 */
8 #ifndef DIAG_CLIENT_LIB_LIB_DOIP_CLIENT_CHANNEL_UDP_CHANNEL_DOIP_VEHICLE_IDENTIFICATION_HANDLER_H_
9 #define DIAG_CLIENT_LIB_LIB_DOIP_CLIENT_CHANNEL_UDP_CHANNEL_DOIP_VEHICLE_IDENTIFICATION_HANDLER_H_
10 
11 #include "common/doip_message.h"
15 
16 namespace doip_client {
17 namespace channel {
18 namespace udp_channel {
19 
20 // Forward declaration
21 class DoipUdpChannel;
22 
27  public:
32 
37 
38  public:
47 
52 
59  auto HandleVehicleIdentificationRequest(uds_transport::UdsMessageConstPtr vehicle_identification_request) noexcept
61 
67  void ProcessVehicleIdentificationResponse(DoipMessage &doip_payload) noexcept;
68 
69  private:
76  auto SendVehicleIdentificationRequest(uds_transport::UdsMessageConstPtr vehicle_identification_request) noexcept
78 
79  private:
84 
88  std::unique_ptr<VehicleIdentificationHandlerImpl> handler_impl_;
89 };
90 
91 } // namespace udp_channel
92 } // namespace channel
93 } // namespace doip_client
94 #endif //DIAG_CLIENT_LIB_LIB_DOIP_CLIENT_CHANNEL_UDP_CHANNEL_DOIP_VEHICLE_IDENTIFICATION_HANDLER_H_
Immutable class to store received udp message.
Definition: udp_message.h:31
Immutable class to store received doip message.
Definition: doip_message.h:21
Class to manage a udp channel as per DoIP protocol.
Class used as a handler to process vehicle identification req/ res messages.
std::unique_ptr< VehicleIdentificationHandlerImpl > handler_impl_
Stores the Handler implementation.
auto SendVehicleIdentificationRequest(uds_transport::UdsMessageConstPtr vehicle_identification_request) noexcept -> uds_transport::UdsTransportProtocolMgr::TransmissionResult
Function to send vehicle identification request.
~VehicleIdentificationHandler()
Destruct an instance of VehicleIdentificationHandler.
auto HandleVehicleIdentificationRequest(uds_transport::UdsMessageConstPtr vehicle_identification_request) noexcept -> uds_transport::UdsTransportProtocolMgr::TransmissionResult
Function to handle sending of vehicle identification request.
void ProcessVehicleIdentificationResponse(DoipMessage &doip_payload) noexcept
Function to process received vehicle identification response.
VehicleIdentificationHandler(sockets::UdpSocketHandler &udp_socket_handler, DoipUdpChannel &channel)
Constructs an instance of VehicleIdentificationHandler.
sockets::UdpSocketHandler::UdpMessagePtr UdpMessagePtr
Type alias for Tcp message pointer.
Class used to create a udp socket for handling transmission and reception of udp message from driver.
boost_support::socket::udp::UdpMessagePtr UdpMessagePtr
Type alias for Udp message pointer.
boost_support::socket::udp::UdpMessage UdpMessage
Type alias for Udp message.
std::unique_ptr< const UdsMessage > UdsMessageConstPtr
Definition: uds_message.h:69