|
Diag-Client-Lib
|
Class used as a handler to process routing activation messages. More...
#include <doip_routing_activation_handler.h>
Classes | |
| class | RoutingActivationHandlerImpl |
| Class implements routing activation handler. More... | |
Public Types | |
| using | TcpMessagePtr = sockets::TcpSocketHandler::MessagePtr |
| Type alias for Tcp message pointer. More... | |
| using | TcpMessage = sockets::TcpSocketHandler::Message |
| Type alias for Tcp message. More... | |
Public Member Functions | |
| RoutingActivationHandler (sockets::TcpSocketHandler &tcp_socket_handler) | |
| Constructs an instance of RoutingActivationHandler. More... | |
| ~RoutingActivationHandler () | |
| Destruct an instance of RoutingActivationHandler. More... | |
| void | Start () |
| Function to start the handler. More... | |
| void | Stop () |
| Function to stop the handler. More... | |
| void | Reset () |
| Function to reset the handler. More... | |
| void | ProcessDoIPRoutingActivationResponse (DoipMessage &doip_payload) noexcept |
| Function to process received routing activation response. More... | |
| auto | HandleRoutingActivationRequest (uds_transport::UdsMessageConstPtr routing_activation_request) noexcept -> uds_transport::UdsTransportProtocolMgr::ConnectionResult |
| Function to handle sending of routing activation request. More... | |
| auto | IsRoutingActivated () noexcept -> bool |
| Check if routing activation is active for this handler. More... | |
Private Member Functions | |
| auto | SendRoutingActivationRequest (uds_transport::UdsMessageConstPtr routing_activation_request) noexcept -> uds_transport::UdsTransportProtocolMgr::TransmissionResult |
| Function to send routing activation request. More... | |
Private Attributes | |
| std::unique_ptr< RoutingActivationHandlerImpl > | handler_impl_ |
| Stores the Handler implementation. More... | |
Class used as a handler to process routing activation messages.
Definition at line 29 of file doip_routing_activation_handler.h.
| using doip_client::channel::tcp_channel::RoutingActivationHandler::TcpMessage = sockets::TcpSocketHandler::Message |
Type alias for Tcp message.
Definition at line 39 of file doip_routing_activation_handler.h.
| using doip_client::channel::tcp_channel::RoutingActivationHandler::TcpMessagePtr = sockets::TcpSocketHandler::MessagePtr |
Type alias for Tcp message pointer.
Definition at line 34 of file doip_routing_activation_handler.h.
|
explicit |
Constructs an instance of RoutingActivationHandler.
| [in] | tcp_socket_handler | The reference to socket handler |
Definition at line 334 of file doip_routing_activation_handler.cpp.
|
default |
Destruct an instance of RoutingActivationHandler.
|
noexcept |
Function to handle sending of routing activation request.
| [in] | routing_activation_request | The routing activation request |
Definition at line 387 of file doip_routing_activation_handler.cpp.
References FILE_NAME, doip_client::logger::DoipClientLogger::GetDiagClientLogger(), uds_transport::UdsTransportProtocolMgr::kConnectionFailed, uds_transport::UdsTransportProtocolMgr::kConnectionOk, uds_transport::UdsTransportProtocolMgr::kConnectionTimeout, doip_client::channel::tcp_channel::anonymous_namespace{doip_routing_activation_handler.cpp}::kDoIPRoutingActivationTimeout, and uds_transport::UdsTransportProtocolMgr::kTransmitOk.

|
noexcept |
Check if routing activation is active for this handler.
Definition at line 445 of file doip_routing_activation_handler.cpp.
References handler_impl_.
Referenced by doip_client::channel::tcp_channel::DoipTcpChannelHandler::IsRoutingActivated().

|
noexcept |
Function to process received routing activation response.
| [in] | doip_payload | The doip message received |
Definition at line 345 of file doip_routing_activation_handler.cpp.
References FILE_NAME, doip_client::logger::DoipClientLogger::GetDiagClientLogger(), doip_client::channel::tcp_channel::anonymous_namespace{doip_routing_activation_handler.cpp}::kDoipRoutingActivationResCodeConfirmtnRequired, and doip_client::channel::tcp_channel::anonymous_namespace{doip_routing_activation_handler.cpp}::kDoipRoutingActivationResCodeRoutingSuccessful.

| void doip_client::channel::tcp_channel::RoutingActivationHandler::Reset | ( | ) |
Function to reset the handler.
This will reset all the internal handler back to default state
Definition at line 343 of file doip_routing_activation_handler.cpp.
References handler_impl_.
Referenced by doip_client::channel::tcp_channel::DoipTcpChannelHandler::Reset().

|
privatenoexcept |
Function to send routing activation request.
| [in] | routing_activation_request | The routing activation request |
Definition at line 450 of file doip_routing_activation_handler.cpp.
References doip_client::channel::tcp_channel::anonymous_namespace{doip_routing_activation_handler.cpp}::CreateDoipGenericHeader(), doip_client::channel::tcp_channel::anonymous_namespace{doip_routing_activation_handler.cpp}::kDoip_RoutingActivation_ReqActType_Default, doip_client::channel::tcp_channel::anonymous_namespace{doip_routing_activation_handler.cpp}::kDoip_RoutingActivation_ReqType, doip_client::kDoipheadrSize, doip_client::channel::tcp_channel::anonymous_namespace{doip_routing_activation_handler.cpp}::kDoipRoutingActivationReqMinLen, uds_transport::UdsTransportProtocolMgr::kTransmitFailed, and uds_transport::UdsTransportProtocolMgr::kTransmitOk.

| void doip_client::channel::tcp_channel::RoutingActivationHandler::Start | ( | ) |
Function to start the handler.
Definition at line 339 of file doip_routing_activation_handler.cpp.
References handler_impl_.
Referenced by doip_client::channel::tcp_channel::DoipTcpChannelHandler::Start().

| void doip_client::channel::tcp_channel::RoutingActivationHandler::Stop | ( | ) |
Function to stop the handler.
This will reset all the internal handler back to default state
Definition at line 341 of file doip_routing_activation_handler.cpp.
References handler_impl_.
Referenced by doip_client::channel::tcp_channel::DoipTcpChannelHandler::Stop().

|
private |
Stores the Handler implementation.
Definition at line 114 of file doip_routing_activation_handler.h.
Referenced by IsRoutingActivated(), Reset(), Start(), and Stop().