void enter(PlanControl& control) { // called on state activation
auto plan = control.plan(); // access the plan for the region
plan.change<Red, Yellow>(); // sequence plan steps, executed when the previous state succeeds
plan.change<Yellow, Green>();
plan.change<Green, Yellow>();
plan.change<Yellow, Red>();
void exit(PlanControl& /*control*/) {} // called on state deactivation
void planSucceeded(FullControl& control) { // called on the successful completion of all plan steps
control.changeTo<Done>();
void planFailed(FullControl& /*control*/) {} // called if any of the plan steps fails