20#include <rclcpp/rclcpp.hpp>
Class defining the state transition table behavior for the ApproachingEmergencyVehiclePlugin.
ApproachingEmergencyVehicleState getState() const
Returns the current state.
void eventWhenSLOWING_DOWN_FOR_ERV(ApproachingEmergencyVehicleEvent event)
void eventWhenNO_APPROACHING_ERV(ApproachingEmergencyVehicleEvent event)
void logDebugEvent(ApproachingEmergencyVehicleEvent event) const
Helper function for logging the provide event.
void setAndLogState(ApproachingEmergencyVehicleState new_state, ApproachingEmergencyVehicleEvent source_event)
Function to change the current state and log the details of the transition.
ApproachingEmergencyVehicleTransitionTable()=default
ApproachingEmergencyVehicleTransitionTable Constructor.
void event(ApproachingEmergencyVehicleEvent event)
Trigger event for the transition table.
ApproachingEmergencyVehicleState state_
Current state. This state should only ever be set using the setAndLogState() function.
TransitionCallback transition_callback_
void setTransitionCallback(TransitionCallback cb)
Callback setting function. The provided callback will be triggered any time the current state changes...
void eventWhenMOVING_OVER_FOR_APPROACHING_ERV(ApproachingEmergencyVehicleEvent event)
std::function< void(ApproachingEmergencyVehicleState prev_state, ApproachingEmergencyVehicleState new_state, ApproachingEmergencyVehicleEvent event)> TransitionCallback
ApproachingEmergencyVehicleEvent
Enum describing the possible signals to change the current ApproachingEmergencyVehicleState.
ApproachingEmergencyVehicleState
Enum describing the possible states of the ApproachingEmergencyVehiclePlugin (Strategic Plugin)