MCPcopy Create free account
hub / github.com/digint/tinyfsm / DefectiveSwitch

Class DefectiveSwitch

examples/api/multiple_switch.cpp:30–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28//
29template<int inum>
30class DefectiveSwitch
31: public tinyfsm::Fsm< DefectiveSwitch<inum> >
32{
33public:
34 static constexpr unsigned int defect_level = (inum * 2);
35
36 static void reset(void) {
37 on_counter = 0;
38 }
39
40 /* default reaction for unhandled events */
41 void react(tinyfsm::Event const &) { };
42
43 virtual void react(Toggle const &) { };
44 virtual void entry(void) { }; /* entry actions in some states */
45 void exit(void) { }; /* no exit actions */
46
47protected:
48 static unsigned int on_counter;
49};
50
51// state variable definitions
52template<int inum>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected