| 41 | } |
| 42 | |
| 43 | struct EventHandler { |
| 44 | Plugin* plugin; |
| 45 | typedef void (*callback_t)(color_ostream&, void*); //called when the event happens |
| 46 | callback_t eventHandler; |
| 47 | int32_t freq; //how often event is allowed to fire (in ticks) use 0 to always fire when possible |
| 48 | |
| 49 | EventHandler(Plugin* pluginIn, callback_t eventHandlerIn, int32_t freqIn) |
| 50 | : plugin(pluginIn), eventHandler(eventHandlerIn), freq(freqIn) |
| 51 | { } |
| 52 | |
| 53 | bool operator==(const EventHandler& handle) const { |
| 54 | return plugin == handle.plugin && eventHandler == handle.eventHandler && freq == handle.freq; |
| 55 | } |
| 56 | bool operator!=(const EventHandler& handle) const { |
| 57 | return !( *this == handle); |
| 58 | } |
| 59 | }; |
| 60 | |
| 61 | struct SyndromeData { |
| 62 | int32_t unitId; |
no outgoing calls
no test coverage detected