MCPcopy Create free account
hub / github.com/andrew-gresyk/HFSM2 / entryGuard

Method entryGuard

test/wiki_tutorial.cpp:60–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 : FSM::State
59{
60 void entryGuard(FullControl& control) { // called before state activation, use to re-route transitions
61 if (control.context().powerOn) // access shared data
62 control.changeTo<On>(); // initiate a transition into 'On' region
63 }
64
65 void exit(PlanControl& /*control*/) {} // called on state deactivation
66};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected