149 DBERROR(
"BL Entering State: errorState");
171 return "State::emptyState";
174 return "State::fullState";
177 return "State::checking";
180 return "State::errorState";
183 return "ERROR: No matching state";
191 return "Event::PackageDetected";
194 return "Event::NoPackageDetected";
197 return "Event::CheckForPackage";
200 return "Event::Error";
203 return "Event::Resume";
206 return "Event::NoEvent";
209 return "ERROR: No matching event";
State lastStateBevorError
holds the last state of the FSM so it's possible to resume after error
The BoxLevel Controll class contains the FSM for the BoxLevel.
void exitAction_emptyState()
executes the exit action of the emptyState
String decodeEvent(Event event)
Decodes the Event-Enum and returns a description.
void exitAction_errorState()
exit action of the errorState
Event
Enum holds all possible events.
String decodeState(State state)
Decodes the State-Enum and returns a description.
const int LOADINDICATOR_LED
PIn for Loadindicator LED.
void entryAction_fullState()
executes the entry action of the fullState
BoxLevelCtrl::Event doAction_checking()
executes the main action of the checking
BoxLevelCtrl()
Construct a new Box Level Ctrl object and initailize the currentState with emptyState.
bool getSensorData()
Read the Sensor Values.
void process(Event e)
changes the state of the FSM based on the event
BoxLevelCtrl::Event doAction_errorState()
main action of the errorState
void loop()
Calls the do-function of the active state and hence generates Events.
void entryAction_emptyState()
executes the entry action of the emptyState
void exitAction_checking()
executes the exit action of the checking
The BoxLevel Controll class contains the FSM for the BoxLevel.
Ext.:Resume after Error occured.
State
Enum holds all possible states.
BoxLevelCtrl::Event doAction_emptyState()
executes the main action of the emptyState
BoxLevelCtrl::Event doAction_fullState()
executes the main action of the fullState
void entryAction_errorState()
entry action of the errorState
const State getcurrentState()
Get the current State.
Event currentEvent
holds the current event of the FSM
SensorArray pSensorArray
SensorArray Object.
State currentState
holds the current state of the FSM
void entryAction_checking()
executes the entry action of the checking
void exitAction_fullState()
executes the exit action of the fullState
Event(BoxLevelCtrl::* doActionFPtr)(void)
Functionpointer to call the current states do-function.