mirror of
https://github.com/QuantumLeaps/qpcpp.git
synced 2025-01-14 05:42:57 +08:00
19 lines
432 B
C++
19 lines
432 B
C++
#include "qep.h" // QEP public interface
|
|
#include "calc.h" // Calc HSM derived from QHsm
|
|
|
|
static Calc l_calc; // an instance of Calc HSM
|
|
|
|
int main() {
|
|
|
|
l_calc.init(); // trigger initial transition
|
|
|
|
for (;;) { // event loop
|
|
QEvt e;
|
|
. . .
|
|
// wait for the next event and assign it to the event object e
|
|
. . .
|
|
l_calc.dispatch(&e); // dispatch the event
|
|
}
|
|
return 0;
|
|
}
|