#include <csignal>
Go to the source code of this file.
|
void * | coffeeThread (void *threadid) |
| Thread for the finite state machine It represents the current state of the machine and handles signals coming from the pressure control, buttons, the brew switch and the proximity sensor. More...
|
|
void | coffeeHandler (int signum, siginfo_t *siginfo, void *context) |
| Handler for the Signal send to this thread It saves the type of signal received and tracks the time between a push and release event of up to 4 signals The time is stored in the HalEvent variable when a release event is received. More...
|
|
int | getSigValue (void) |
| returns the Signal value from the last received Signal and clears the variable More...
|
|
bool | SigValueEmpty (void) |
|
void | changeState (int newState) |
| Changes the state of the machine to newState prints the change to the logger. More...
|
|
int | getState (void) |
| Returns the current state of the FSM. More...
|
|
void | brewTimeHandler (void) |
| Counter for the brew time refresh every 200ms. More...
|
|
void | coffeeTerminate (void) |
| handles program termination More...
|
|
void | coffeeBrew (void) |
| Brewing process. More...
|
|
void | coffeeIncreaseBrewCounter (void) |
|
void | coffeeIncreaseHeatingTime (uint64_t heatingTime) |
|
#define AMOUNT_DBLESPRESSO 25.0 |
#define AMOUNT_PREINFUSION 3 |
#define STATE_BREWMANUAL 5 |
#define STATE_INITALHEATING 2 |
#define TIME_INFUSION 25000 |
void brewTimeHandler |
( |
void |
| ) |
|
Counter for the brew time refresh every 200ms.
void changeState |
( |
int |
newState | ) |
|
Changes the state of the machine to newState prints the change to the logger.
- Parameters
-
void coffeeHandler |
( |
int |
signum, |
|
|
siginfo_t * |
siginfo, |
|
|
void * |
context |
|
) |
| |
Handler for the Signal send to this thread It saves the type of signal received and tracks the time between a push and release event of up to 4 signals The time is stored in the HalEvent variable when a release event is received.
- Parameters
-
void coffeeIncreaseBrewCounter |
( |
void |
| ) |
|
void coffeeIncreaseHeatingTime |
( |
uint64_t |
heatingTime | ) |
|
void coffeeTerminate |
( |
void |
| ) |
|
handles program termination
void* coffeeThread |
( |
void * |
threadid | ) |
|
Thread for the finite state machine It represents the current state of the machine and handles signals coming from the pressure control, buttons, the brew switch and the proximity sensor.
- Parameters
-
threadid | the ID of the thread |
returns the Signal value from the last received Signal and clears the variable
- Returns
- value sent with the last signal
Returns the current state of the FSM.
bool SigValueEmpty |
( |
void |
| ) |
|