friendev EtherDune TCP/IP library
|
Maintains a state variable and allows to pull out a state string representation for debugging. More...
#include <Stateful.h>
Public Member Functions | |
uint8_t | getState () |
Protected Member Functions | |
void | setState (uint8_t newState, uint8_t timeout) |
Changes to a new state More... | |
Protected Attributes | |
uint8_t | stateTimer |
state timer, in ticks More... | |
uint8_t | state |
state code More... | |
Maintains a state variable and allows to pull out a state string representation for debugging.
Complements other classes by adding a state variable and providing a way to obtain a string representation of the current state when debugging. This class also allows to keep a timer variable associated with the state in case the state has to time out.
Definition at line 31 of file Stateful.h.
|
inline |
Definition at line 41 of file Stateful.h.
|
protected |
Changes to a new state
newState | The new state. |
timeout | The timeout, in ticks |
Definition at line 28 of file Stateful.cpp.
|
protected |
state code
Definition at line 35 of file Stateful.h.
|
protected |
state timer, in ticks
Definition at line 34 of file Stateful.h.