#include <cfsm.h>
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
◆ cFSM() [1/2]
cFSM |
( |
const char * |
name = nullptr | ) |
|
|
explicit |
◆ cFSM() [2/2]
◆ operator=()
◆ dup()
virtual cFSM* dup |
( |
| ) |
const |
|
inlineoverridevirtual |
Creates and returns an exact copy of this object. See cObject for more details.
Reimplemented from cObject.
◆ str()
virtual std::string str |
( |
| ) |
const |
|
overridevirtual |
Produces a one-line description of the object's contents. See cObject for more details.
Reimplemented from cObject.
◆ parsimPack()
Serializes the object into an MPI send buffer. Used by the simulation kernel for parallel execution. See cObject for more details.
Reimplemented from cOwnedObject.
◆ parsimUnpack()
Deserializes the object from an MPI receive buffer Used by the simulation kernel for parallel execution. See cObject for more details.
Reimplemented from cOwnedObject.
◆ getState()
Returns the state the FSM is currently in.
◆ getStateName()
const char* getStateName |
( |
| ) |
const |
|
inline |
Returns the name of the state the FSM is currently in.
◆ isInTransientState()
int isInTransientState |
( |
| ) |
const |
|
inline |
Returns true if the FSM is currently in a transient state.
◆ setState()
void setState |
( |
int |
state, |
|
|
const char * |
stateName = nullptr |
|
) |
| |
|
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: