statemap::FSMContext Class Reference

#include <statemap.h>

List of all members.

Classes

class  StateEntry

Public Member Functions

def __init__
def clearState
void clearState ()
def emptyStateStack
void emptyStateStack ()
virtual void enterStartState ()=0
def getDebugFlag
bool getDebugFlag ()
def getDebugStream
def getPreviousState
StategetPreviousState ()
def getState
def getStateStackDepth
int getStateStackDepth () const
def getTransition
char * getTransition ()
def isInTransition
bool isInTransition () const
def isStateStackEmpty
bool isStateStackEmpty () const
FSMContextoperator= (const FSMContext &fsm)
def popState
void popState ()
def pushState
void pushState (const State &state)
int same (const FSMContext &fsm) const
def setDebugFlag
void setDebugFlag (bool flag)
def setDebugStream
def setState
void setState (const State &state)
void setTransition (const char *transition)
virtual ~FSMContext ()

Protected Member Functions

 FSMContext (const State &state)

Protected Attributes

State_previous_state
State_state
StateEntry_state_stack
char * _transition

Private Member Functions

 FSMContext (const FSMContext &)

Private Attributes

 _debug_flag
bool _debug_flag
 _debug_stream
 _previous_state
 _state
 _state_stack
 _transition

Detailed Description

The user can derive FSM contexts from this class and interface
to them with the methods of this class.

The finite state machine needs to be initialized to the starting
state of the FSM.  This must be done manually in the constructor
of the derived class.

Definition at line 456 of file statemap.h.


Constructor & Destructor Documentation

virtual statemap::FSMContext::~FSMContext (  )  [inline, virtual]

Definition at line 517 of file statemap.h.

statemap::FSMContext::FSMContext ( const State state  )  [inline, protected]

Definition at line 754 of file statemap.h.

statemap::FSMContext::FSMContext ( const FSMContext  )  [inline, private]

Definition at line 776 of file statemap.h.


Member Function Documentation

def statemap::FSMContext::__init__ (   self,
  state 
)

Definition at line 76 of file statemap.py.

def statemap::FSMContext::clearState (   self  ) 
Clears the current state.

Definition at line 120 of file statemap.py.

void statemap::FSMContext::clearState (  )  [inline]

Definition at line 619 of file statemap.h.

def statemap::FSMContext::emptyStateStack (   self  ) 
Remove all states from the state stack.

Definition at line 170 of file statemap.py.

void statemap::FSMContext::emptyStateStack (  )  [inline]

Definition at line 735 of file statemap.h.

virtual void statemap::FSMContext::enterStartState (  )  [pure virtual]
def statemap::FSMContext::getDebugFlag (   self  ) 
Returns the debug flag's current setting.

Definition at line 84 of file statemap.py.

bool statemap::FSMContext::getDebugFlag (  )  [inline]

Definition at line 561 of file statemap.h.

def statemap::FSMContext::getDebugStream (   self  ) 
Returns the stream to which debug output is written.

Definition at line 93 of file statemap.py.

def statemap::FSMContext::getPreviousState (   self  ) 
Returns the state which a transition left.
May be None

Definition at line 126 of file statemap.py.

State* statemap::FSMContext::getPreviousState (  )  [inline]

Definition at line 627 of file statemap.h.

def statemap::FSMContext::getState (   self  ) 
Returns the current state.

Definition at line 101 of file statemap.py.

def statemap::FSMContext::getStateStackDepth (   self  ) 
Returns the state stack's depth.

Definition at line 144 of file statemap.py.

int statemap::FSMContext::getStateStackDepth (  )  const [inline]

Definition at line 658 of file statemap.h.

def statemap::FSMContext::getTransition (   self  ) 
Returns the current transition's name.
Used only for debugging purposes.

Definition at line 115 of file statemap.py.

char* statemap::FSMContext::getTransition (  )  [inline]

Definition at line 598 of file statemap.h.

def statemap::FSMContext::isInTransition (   self  ) 
Is this state machine already inside a transition?
True if state is undefined.

Definition at line 107 of file statemap.py.

bool statemap::FSMContext::isInTransition (  )  const [inline]

Definition at line 591 of file statemap.h.

def statemap::FSMContext::isStateStackEmpty (   self  ) 
Returns True if the state stack is empty and False otherwise.

Definition at line 140 of file statemap.py.

bool statemap::FSMContext::isStateStackEmpty (  )  const [inline]

Definition at line 652 of file statemap.h.

FSMContext& statemap::FSMContext::operator= ( const FSMContext fsm  )  [inline]

Definition at line 538 of file statemap.h.

def statemap::FSMContext::popState (   self  ) 
Make the state on top of the state stack the current state.

Definition at line 159 of file statemap.py.

void statemap::FSMContext::popState (  )  [inline]

Definition at line 702 of file statemap.h.

def statemap::FSMContext::pushState (   self,
  state 
)
Push the current state on top of the state stack
and make the specified state the current state.

Definition at line 148 of file statemap.py.

void statemap::FSMContext::pushState ( const State state  )  [inline]

Definition at line 673 of file statemap.h.

int statemap::FSMContext::same ( const FSMContext fsm  )  const [inline]

Definition at line 555 of file statemap.h.

def statemap::FSMContext::setDebugFlag (   self,
  flag 
)
Sets the debug flag.
A true value means debugging is on and false means off.

Definition at line 88 of file statemap.py.

void statemap::FSMContext::setDebugFlag ( bool  flag  )  [inline]

Definition at line 568 of file statemap.h.

def statemap::FSMContext::setDebugStream (   self,
  stream 
)
Sets the debug output stream.

Definition at line 97 of file statemap.py.

def statemap::FSMContext::setState (   self,
  state 
)
Sets the current state to the specified state.

Definition at line 132 of file statemap.py.

void statemap::FSMContext::setState ( const State state  )  [inline]

Definition at line 633 of file statemap.h.

void statemap::FSMContext::setTransition ( const char *  transition  )  [inline]

Definition at line 605 of file statemap.h.


Member Data Documentation

Definition at line 81 of file statemap.py.

Definition at line 802 of file statemap.h.

Definition at line 82 of file statemap.py.

Definition at line 78 of file statemap.py.

Definition at line 789 of file statemap.h.

Definition at line 77 of file statemap.py.

Definition at line 777 of file statemap.h.

Definition at line 79 of file statemap.py.

Definition at line 792 of file statemap.h.

Definition at line 80 of file statemap.py.

Definition at line 796 of file statemap.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Friends Defines


smclib
Author(s): Various, ROS package maintained by Stuart Glaser
autogenerated on Fri Jan 11 10:00:26 2013