Elma
An event loop manager for embedded systems
Public Member Functions | List of all members
microwave_example::DoorClosedOff Class Reference

The state in which the oven's door is closed and the oven is off. See examples/microwave.cc. More...

+ Inheritance diagram for microwave_example::DoorClosedOff:
+ Collaboration diagram for microwave_example::DoorClosedOff:

Public Member Functions

 DoorClosedOff ()
 Make a new state.
 
void entry (const Event &e)
 
void during ()
 Nothing to do in during.
 
void exit (const Event &e)
 
- Public Member Functions inherited from elma::State
 State ()
 Construct an unnamed State.
 
 State (std::string name)
 Construct a state with the given name.
 
std::string name ()
 
int id ()
 
void emit (const Event &e)
 
StateMachinestate_machine ()
 

Detailed Description

The state in which the oven's door is closed and the oven is off. See examples/microwave.cc.

Definition at line 56 of file microwave.cc.

Member Function Documentation

◆ entry()

void microwave_example::DoorClosedOff::entry ( const Event e)
inlinevirtual

If this state is entered via a "power level set" event from the user, then emit a "set power" event (to be) consumed by the power component.

Parameters
eA numerically valued event

Implements elma::State.

Definition at line 66 of file microwave.cc.

◆ exit()

void microwave_example::DoorClosedOff::exit ( const Event e)
inlinevirtual

If this state is left via an "on button pressed" event, then emit a "on" event.

Parameters
eAn event with no value

Implements elma::State.

Definition at line 78 of file microwave.cc.


The documentation for this class was generated from the following file: