cFSM Class Reference
[Utility classes]

#include <cfsm.h>

Inheritance diagram for cFSM:

cOwnedObject cNamedObject cObject

List of all members.


Detailed Description

Store the state of an FSM.

This class is used in conjunction with the FSM_Switch() and other FSM_ macros.

See also:
FSM_Switch, FSM_Transient, FSM_Steady, FSM_Enter, FSM_Exit, FSM_Goto

Public Member Functions

Constructors, destructor, assignment.
 cFSM (const char *name=NULL)
 cFSM (const cFSM &other)
cFSMoperator= (const cFSM &vs)
Redefined cObject member functions.
virtual cFSMdup () const
virtual std::string info () const
virtual void parsimPack (cCommBuffer *buffer)
virtual void parsimUnpack (cCommBuffer *buffer)
FSM functions.
int getState () const
const char * getStateName () const
int isInTransientState () const
void setState (int state, const char *stn=NULL)

Constructor & Destructor Documentation

cFSM::cFSM ( const char *  name = NULL  )  [explicit]

Constructor.

cFSM::cFSM ( const cFSM other  )  [inline]

Copy constructor.


Member Function Documentation

cFSM& cFSM::operator= ( const cFSM vs  ) 

Assignment operator.

The name member is not copied; see cOwnedObject's operator=() for more details.

virtual cFSM* cFSM::dup (  )  const [inline, virtual]

Creates and returns an exact copy of this object.

See cObject for more details.

Reimplemented from cObject.

virtual std::string cFSM::info (  )  const [virtual]

Produces a one-line description of the object's contents.

See cObject for more details.

Reimplemented from cObject.

virtual void cFSM::parsimPack ( cCommBuffer buffer  )  [virtual]

Serializes the object into an MPI send buffer.

Used by the simulation kernel for parallel execution. See cObject for more details.

Reimplemented from cOwnedObject.

virtual void cFSM::parsimUnpack ( cCommBuffer buffer  )  [virtual]

Deserializes the object from an MPI receive buffer Used by the simulation kernel for parallel execution.

See cObject for more details.

Reimplemented from cOwnedObject.

int cFSM::getState (  )  const [inline]

Returns the state the FSM is currently in.

const char* cFSM::getStateName (  )  const [inline]

Returns the name of the state the FSM is currently in.

int cFSM::isInTransientState (  )  const [inline]

Returns true if the FSM is currently in a transient state.

void cFSM::setState ( int  state,
const char *  stn = NULL 
) [inline]

Sets the state of the FSM.

This method is usually invoked through the FSM_Goto() macro.

The first arg is the state code. The second arg is the name of the state. setState() assumes this is pointer to a string literal (the string is not copied, only the pointer is stored).

See also:
FSM_Goto


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

Generated on Wed Apr 3 14:40:28 2013 for OMNeT++ Simulation Library by  doxygen 1.5.5