Provides logic common to different system handlers to reduce code duplication.
More...
#include <common_system_handler.h>
template<class LogicStateMachineT, class EventManagerT, class RobotSystemT>
class CommonSystemHandler< LogicStateMachineT, EventManagerT, RobotSystemT >
Provides logic common to different system handlers to reduce code duplication.
- Template Parameters
-
| LogicStateMachineT | Logic state machine to use |
| EventManagerT | Event manager to use |
| RobotSystemT | robot system used by the state machine |
template<class LogicStateMachineT, class EventManagerT, class RobotSystemT>
Constructor.
Instantiates state machine, timers. Individual system handlers must call startTimers to start the state machine and status timers.
A convenience function isConnected is provided to check if the ros topics associated with state machine event processing are connected or not. The individual system handlers must extend this function if needed.
- Parameters
-
| nh | NodeHandle to use for event and command subscription |
| config | Proto configuration parameters |
| robot_system | robot system used to create logic state machine |
template<class LogicStateMachineT, class EventManagerT, class RobotSystemT>
template<class LogicStateMachineT, class EventManagerT, class RobotSystemT>
Checks if internal ROS topics are connected.
- Returns
- Returns true if connected and false otherwise
template<class LogicStateMachineT, class EventManagerT, class RobotSystemT>
Start state machine internal event processing and status timer.
template<class LogicStateMachineT, class EventManagerT, class RobotSystemT>
| EventManagerT CommonSystemHandler< LogicStateMachineT, EventManagerT, RobotSystemT >::event_manager_ |
|
protected |
Event manager used by the state machine.
template<class LogicStateMachineT, class EventManagerT, class RobotSystemT>
| LogicStateMachineT CommonSystemHandler< LogicStateMachineT, EventManagerT, RobotSystemT >::logic_state_machine_ |
|
protected |
State machine that gets run by the system.
template<class LogicStateMachineT, class EventManagerT, class RobotSystemT>
Timer for running state machine.
template<class LogicStateMachineT, class EventManagerT, class RobotSystemT>
template<class LogicStateMachineT, class EventManagerT, class RobotSystemT>
Connects event manager to the state machine
template<class LogicStateMachineT, class EventManagerT, class RobotSystemT>
Update uav status and state machine status.
template<class LogicStateMachineT, class EventManagerT, class RobotSystemT>
publishes status messages
The documentation for this class was generated from the following file: