46 using OnEventReceived = function<void(uint8_t, uint8_t)>;
56 OnEventReceived onEventReceived)
57 : broker(broker), onEventReceived(onEventReceived)
59 for (uint8_t t : topics)
60 sniffers.push_back(
new Sniffer(*
this, t));
69 : broker(broker), onEventReceived(onEventReceived)
71 for (
int t = 0; t <= 255; t++)
72 sniffers.push_back(
new Sniffer(*
this, (uint8_t)t));
77 for (Sniffer* s : sniffers)
86 : parent(parent), topic(topic)
91 void postEvent(
const Event& ev) { parent.onEventReceived(ev, topic); }
100 vector<Sniffer*> sniffers;
103 OnEventReceived onEventReceived;