14 #ifndef BOXLEVELCTRL_H__ 15 #define BOXLEVELCTRL_H__ 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 LB2
Pin IR sensor LightBarrier 2.
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.
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.
const int LB3
Pin IR sensor LightBarrier 3.
void entryAction_emptyState()
executes the entry action of the emptyState
void exitAction_checking()
executes the exit action of the checking
Contains Pre-Compiler directives for diffent Serialprints for Datalogin.
The Class SensorArray detects the box fill level.
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
const int LB1
Pin IR sensor LightBarrier 1.
void exitAction_fullState()
executes the exit action of the fullState
Event(BoxLevelCtrl::* doActionFPtr)(void)
Functionpointer to call the current states do-function.
The Sensor Array detects the box fill level.
File that contains the default sensor configuration.