Alex exoskeleton
ALEX SoftwareDocumentation
Classes | Macros
StateMachine.h File Reference
#include "State.h"
Include dependency graph for StateMachine.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  StateMachine
 Abstract class representing a state machine. Includes a number of State and Transition objects. More...
 

Macros

#define EventObject(_name_)
 Macros to quickly create event objects given their names as input. useage: EventObject ( MyEvent ) * myEvent;. More...
 
#define NewTransition(_from_, _event_, _to_)   _from_->addArc(new Transition(_to_, _event_))
 Macro to create statemachine transitions. Add a tranition object to the from states arch list to a specific state object, triggered by the occurence of event. More...
 

Detailed Description

Author
William Campbell
Version
0.1
Date
2020-09-24 For more detail on the architecture and mechanics of the state machine class see: https://embeded.readthedocs.io/en/latest/StaeMachines/.

Definition in file StateMachine.h.

Macro Definition Documentation

#define EventObject (   _name_)
Value:
class _name_; \
friend class _name_; \
class _name_ : public Event { \
public: \
_name_(StateMachine *m, \
const char *name = NULL) \
: Event(m, name){}; \
bool check(void); \
}; \
_name_
Abstract class representing a state machine. Includes a number of State and Transition objects...
Definition: StateMachine.h:26
Abstract class for events used as StateMachine triggers to transition between states. Events must be explicitly tied to a current State and state to transition to once the event has been triggered. This is done using a Transition object in a designed StateMachine.
Definition: Event.h:23

Macros to quickly create event objects given their names as input. useage: EventObject ( MyEvent ) * myEvent;.

Definition at line 73 of file StateMachine.h.

#define NewTransition (   _from_,
  _event_,
  _to_ 
)    _from_->addArc(new Transition(_to_, _event_))

Macro to create statemachine transitions. Add a tranition object to the from states arch list to a specific state object, triggered by the occurence of event.

Definition at line 90 of file StateMachine.h.