#include <BaseState.h>
Public Member Functions | |
BaseState () | |
std::string | getName () |
StateInterface * | getStateInterface () |
virtual void | onActive ()=0 |
virtual void | onEntry () |
virtual void | onExit () |
virtual void | onExplorationStart (bool &success, std::string &message) |
virtual void | onExplorationStop (bool &success, std::string &message) |
virtual void | onInterrupt (int interrupt) |
Called when an operation mode interrupt was received. More... | |
virtual void | onSetup () |
virtual void | onWaypointFollowingStart (bool &success, std::string &message) |
virtual void | onWaypointFollowingStop (bool &success, std::string &message) |
void | setStateInterface (StateInterface *stateinterface) |
virtual | ~BaseState () |
Protected Attributes | |
bool | _interrupt_occured |
Shows if an interupt occured. More... | |
std::string | _name |
Name of the state. More... | |
StateInterface * | _stateinterface |
Pointer to State Interface handling all state transitions. More... | |
Definition at line 26 of file BaseState.h.
rsm::BaseState::BaseState | ( | ) |
Constructor
Definition at line 5 of file BaseState.cpp.
|
virtual |
Default destructor
Definition at line 10 of file BaseState.cpp.
std::string rsm::BaseState::getName | ( | ) |
StateInterface * rsm::BaseState::getStateInterface | ( | ) |
Get state interface of state. Default is NULL, when no state interface is assigned.
Definition at line 18 of file BaseState.cpp.
|
pure virtual |
Called while active
Implemented in rsm::WaypointFollowingState, rsm::BootState, rsm::IdleState, rsm::TeleoperationState, and rsm::EmergencyStopState.
|
inlinevirtual |
Called once when activated
Reimplemented in rsm::WaypointFollowingState, rsm::BootState, rsm::IdleState, rsm::TeleoperationState, and rsm::EmergencyStopState.
Definition at line 61 of file BaseState.h.
|
inlinevirtual |
Called once when left
Reimplemented in rsm::WaypointFollowingState, rsm::BootState, rsm::IdleState, rsm::TeleoperationState, and rsm::EmergencyStopState.
Definition at line 73 of file BaseState.h.
|
inlinevirtual |
Called when exploration was started manually
Reimplemented in rsm::WaypointFollowingState, rsm::BootState, rsm::IdleState, rsm::TeleoperationState, and rsm::EmergencyStopState.
Definition at line 80 of file BaseState.h.
|
inlinevirtual |
Called when exploration was stopped manually
Reimplemented in rsm::WaypointFollowingState, rsm::BootState, rsm::IdleState, rsm::TeleoperationState, and rsm::EmergencyStopState.
Definition at line 88 of file BaseState.h.
|
inlinevirtual |
Called when an operation mode interrupt was received.
interrupt | Kind of interrupt (1=EmergencyStop, 2=TeleoperationInterupt) |
Reimplemented in rsm::WaypointFollowingState, rsm::IdleState, rsm::TeleoperationState, rsm::EmergencyStopState, and rsm::BootState.
Definition at line 110 of file BaseState.h.
|
inlinevirtual |
Called once when registered at StateInterface
Reimplemented in rsm::WaypointFollowingState, rsm::BootState, rsm::IdleState, rsm::TeleoperationState, and rsm::EmergencyStopState.
Definition at line 54 of file BaseState.h.
|
inlinevirtual |
Called when waypoint following was started/paused manually
Reimplemented in rsm::WaypointFollowingState, rsm::IdleState, rsm::TeleoperationState, and rsm::EmergencyStopState.
Definition at line 95 of file BaseState.h.
|
inlinevirtual |
Called when waypoint following was stopped manually
Reimplemented in rsm::WaypointFollowingState, rsm::IdleState, rsm::TeleoperationState, and rsm::EmergencyStopState.
Definition at line 102 of file BaseState.h.
void rsm::BaseState::setStateInterface | ( | StateInterface * | stateinterface | ) |
Set state interface of state. This is called by the state interface at state transitions.
StateInterface | Instance |
Definition at line 14 of file BaseState.cpp.
|
protected |
Shows if an interupt occured.
Definition at line 129 of file BaseState.h.
|
protected |
Name of the state.
Definition at line 133 of file BaseState.h.
|
protected |
Pointer to State Interface handling all state transitions.
Definition at line 125 of file BaseState.h.