|
CORC Project
CANOpen Robot Controller Software Documentation
|
Example implementation of a StateMachine for the ExoRobot class. States should implemented ExoTestState. More...
#include <ExoTestMachine.h>


Public Member Functions | |
| ExoTestMachine () | |
| void | init () |
| start function for running any designed statemachine specific functions for example initialising robot objects. More... | |
| void | activate () |
| void | deactivate () |
| void | hwStateUpdate () |
| Statemachine to hardware interface method. Run any hardware update methods that need to run every program loop update cycle. More... | |
| State * | gettCurState () |
| void | initRobot (ExoRobot *rb) |
Public Member Functions inherited from StateMachine | |
| StateMachine (void) | |
| Construct a new State Machine object. More... | |
| void | initialize (State *i) |
| Sets the current state. Note: No check made. More... | |
| State * | getCurState (void) |
| Returns a pointer to the current state. More... | |
| void | activate (void) |
| Calls the entry method of the current state. More... | |
| virtual void | update (void) |
| Processes the state machine. For each possible transition, checks if that transition should be made If no, calls during() on the current state If yes, calls exit() on the current state, entry() and then during() on the new state. More... | |
Public Attributes | |
| bool | running = false |
| bool | trajComplete |
| DummyTrajectoryGenerator * | trajectoryGenerator |
| InitState * | initState |
| SittingDwn * | sittingDwn |
| StandingUp * | standingUp |
| Sitting * | sitting |
| Standing * | standing |
Protected Attributes | |
| ExoRobot * | robot |
Private Member Functions | |
| EventObject (EndTraj)*endTraj | |
| Event Objects defined using Macro defined in StateMachine.h Defines the Class itself, as well as initialises an object of that class An events check function are defined in the .cpp file. More... | |
| EventObject (IsAPressed)*isAPressed | |
| EventObject (StartButtonsPressed)*startButtonsPressed | |
| EventObject (StartExo)*startExo | |
| EventObject (StartSit)*startSit | |
| EventObject (StartStand)*startStand | |
Example implementation of a StateMachine for the ExoRobot class. States should implemented ExoTestState.
Definition at line 54 of file ExoTestMachine.h.
| ExoTestMachine::ExoTestMachine | ( | ) |
add a tranisition object to the arch list of the first state in the NewTransition MACRO. Effectively creating a statemachine transition from State A to B in the event of event c. NewTranstion(State A,Event c, State B)
Definition at line 6 of file ExoTestMachine.cpp.
| void ExoTestMachine::activate | ( | ) |
| void ExoTestMachine::deactivate | ( | ) |
|
private |
Event Objects defined using Macro defined in StateMachine.h Defines the Class itself, as well as initialises an object of that class An events check function are defined in the .cpp file.
|
private |
|
private |
|
private |
|
private |
|
private |
| State* ExoTestMachine::gettCurState | ( | ) |
| void ExoTestMachine::hwStateUpdate | ( | void | ) |
Statemachine to hardware interface method. Run any hardware update methods that need to run every program loop update cycle.
Definition at line 95 of file ExoTestMachine.cpp.
| void ExoTestMachine::init | ( | ) |
start function for running any designed statemachine specific functions for example initialising robot objects.
Definition at line 42 of file ExoTestMachine.cpp.
| void ExoTestMachine::initRobot | ( | ExoRobot * | rb | ) |
| InitState* ExoTestMachine::initState |
Definition at line 69 of file ExoTestMachine.h.
|
protected |
Definition at line 76 of file ExoTestMachine.h.
| bool ExoTestMachine::running = false |
Definition at line 56 of file ExoTestMachine.h.
| Sitting* ExoTestMachine::sitting |
Definition at line 72 of file ExoTestMachine.h.
| SittingDwn* ExoTestMachine::sittingDwn |
Definition at line 70 of file ExoTestMachine.h.
| Standing* ExoTestMachine::standing |
Definition at line 73 of file ExoTestMachine.h.
| StandingUp* ExoTestMachine::standingUp |
Definition at line 71 of file ExoTestMachine.h.
| bool ExoTestMachine::trajComplete |
Definition at line 65 of file ExoTestMachine.h.
| DummyTrajectoryGenerator* ExoTestMachine::trajectoryGenerator |
Definition at line 66 of file ExoTestMachine.h.
1.8.11