Diag-Client-Lib
|
#include <state.h>
Public Member Functions | |
StateContext () | |
~StateContext ()=default | |
void | AddState (EnumState state, std::unique_ptr< State< EnumState >> state_ptr) |
auto | GetActiveState () noexcept -> State< EnumState > & |
void | TransitionTo (EnumState state) |
auto | GetContext () noexcept -> StateContext * |
Private Member Functions | |
void | Start () |
void | Stop () |
void | Update (EnumState state) |
Private Attributes | |
std::mutex | state_lock |
State< EnumState > * | current_state_ |
std::map< EnumState, std::unique_ptr< State< EnumState > > > | state_map_ |
|
inline |
Definition at line 52 of file state.h.
|
default |
|
inline |
Definition at line 58 of file state.h.
References utility::state::StateContext< EnumState >::state_map_.
Referenced by doip_client::channel::tcp_channel::DiagnosticMessageHandler::DiagnosticMessageHandlerImpl::DiagnosticMessageHandlerImpl(), doip_client::channel::tcp_channel::RoutingActivationHandler::RoutingActivationHandlerImpl::RoutingActivationHandlerImpl(), doip_client::channel::udp_channel::VehicleDiscoveryHandler::VehicleDiscoveryHandlerImpl::VehicleDiscoveryHandlerImpl(), and doip_client::channel::udp_channel::VehicleIdentificationHandler::VehicleIdentificationHandlerImpl::VehicleIdentificationHandlerImpl().
|
inlinenoexcept |
Definition at line 64 of file state.h.
References utility::state::StateContext< EnumState >::current_state_, and utility::state::StateContext< EnumState >::state_lock.
|
inlinenoexcept |
|
inlineprivate |
Definition at line 84 of file state.h.
References utility::state::StateContext< EnumState >::current_state_.
Referenced by utility::state::StateContext< EnumState >::TransitionTo().
|
inlineprivate |
Definition at line 89 of file state.h.
References utility::state::StateContext< EnumState >::current_state_.
Referenced by utility::state::StateContext< EnumState >::TransitionTo().
|
inline |
Definition at line 70 of file state.h.
References utility::state::StateContext< EnumState >::Start(), utility::state::StateContext< EnumState >::Stop(), and utility::state::StateContext< EnumState >::Update().
Referenced by doip_client::channel::tcp_channel::DiagnosticMessageHandler::DiagnosticMessageHandlerImpl::DiagnosticMessageHandlerImpl(), doip_client::channel::tcp_channel::RoutingActivationHandler::RoutingActivationHandlerImpl::RoutingActivationHandlerImpl(), doip_client::channel::tcp_channel::DiagnosticMessageHandler::DiagnosticMessageHandlerImpl::Stop(), doip_client::channel::tcp_channel::RoutingActivationHandler::RoutingActivationHandlerImpl::Stop(), doip_client::channel::udp_channel::VehicleDiscoveryHandler::VehicleDiscoveryHandlerImpl::VehicleDiscoveryHandlerImpl(), and doip_client::channel::udp_channel::VehicleIdentificationHandler::VehicleIdentificationHandlerImpl::VehicleIdentificationHandlerImpl().
|
inlineprivate |
Definition at line 94 of file state.h.
References utility::state::StateContext< EnumState >::current_state_, utility::state::StateContext< EnumState >::state_lock, and utility::state::StateContext< EnumState >::state_map_.
Referenced by utility::state::StateContext< EnumState >::TransitionTo().
|
private |
Definition at line 108 of file state.h.
Referenced by utility::state::StateContext< EnumState >::GetActiveState(), utility::state::StateContext< EnumState >::Start(), utility::state::StateContext< EnumState >::Stop(), and utility::state::StateContext< EnumState >::Update().
|
private |
Definition at line 105 of file state.h.
Referenced by utility::state::StateContext< EnumState >::GetActiveState(), and utility::state::StateContext< EnumState >::Update().
|
private |
Definition at line 110 of file state.h.
Referenced by utility::state::StateContext< EnumState >::AddState(), and utility::state::StateContext< EnumState >::Update().