61 Lock<FastMutex> l(mutex);
74 Lock<FastMutex> l(mutex);
76 if (mapCounter.count(ev) == 1)
77 return mapCounter.at(ev);
101 map<uint8_t, unsigned int> mapCounter;
104 unsigned int totalCount = 0;
void __attribute__((naked)) CAN1_RX0_IRQHandler()
void subscribe(EventHandlerBase *subscriber, uint8_t topic)
void unsubscribe(EventHandlerBase *subscriber, uint8_t topic)
Unsubscribe an EventHandler from a specific topic This function should be used only for testing purpo...
Helper class to count how many events are sent to the topic(s) it is registered to.
unsigned int getTotalCount()
Returns how many events have been received in total.
EventCounter(EventBroker &broker)
Construct a new Event Counter object.
uint8_t getLastEvent()
Returns the signature of the last event received (ev)
void subscribe(uint8_t topic)
Subscribes to a topic in the EventBroker.
void postEvent(const Event &ev) override
unsigned int getCount(const Event &ev)
Returns the number of times a specific event has been received.
void handleEvent(const Event &ev __attribute__((unused))) override
This file includes all the types the logdecoder script will decode.