CORC Project
CANOpen Robot Controller Software Documentation
Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | List of all members
ExoTestMachine Class Reference

Example implementation of a StateMachine for the ExoRobot class. States should implemented ExoTestState. More...

#include <ExoTestMachine.h>

Inheritance diagram for ExoTestMachine:
Inheritance graph
Collaboration diagram for ExoTestMachine:
Collaboration graph

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...
 
StategettCurState ()
 
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...
 
StategetCurState (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
 
DummyTrajectoryGeneratortrajectoryGenerator
 
InitStateinitState
 
SittingDwnsittingDwn
 
StandingUpstandingUp
 
Sittingsitting
 
Standingstanding
 

Protected Attributes

ExoRobotrobot
 

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
 

Detailed Description

Example implementation of a StateMachine for the ExoRobot class. States should implemented ExoTestState.

Definition at line 54 of file ExoTestMachine.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

void ExoTestMachine::activate ( )
void ExoTestMachine::deactivate ( )
ExoTestMachine::EventObject ( EndTraj  )
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.

ExoTestMachine::EventObject ( IsAPressed  )
private
ExoTestMachine::EventObject ( StartButtonsPressed  )
private
ExoTestMachine::EventObject ( StartExo  )
private
ExoTestMachine::EventObject ( StartSit  )
private
ExoTestMachine::EventObject ( StartStand  )
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)

Member Data Documentation

InitState* ExoTestMachine::initState

Definition at line 69 of file ExoTestMachine.h.

ExoRobot* ExoTestMachine::robot
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.


The documentation for this class was generated from the following files: