Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
EventHandlerMock.hxx
Go to the documentation of this file.
1
37#ifndef _OPENLCB_EVENTHANDLERMOCK_HXX_
38#define _OPENLCB_EVENTHANDLERMOCK_HXX_
39
40#include "gmock/gmock.h"
42
43namespace openlcb {
44
48{
49public:
53#define DEFPROXYFN(FN) \
54 MOCK_METHOD3(FN, void(const EventRegistryEntry &, EventReport *event, \
55 BarrierNotifiable *done))
56
65
66#undef DEFPROXYFN
67};
68
69} // namespace openlcb
70
71#endif // _OPENLCB_EVENTHANDLERMOCK_HXX_
72
73
#define DEFPROXYFN(FN)
Proxies an event handler function to a gmock function.
Abstract base class for all event handlers.
virtual void handle_identify_global(const EventRegistryEntry &registry_entry, EventReport *event, BarrierNotifiable *done)=0
Called on the need of sending out identification messages.
virtual void handle_consumer_range_identified(const EventRegistryEntry &registry_entry, EventReport *event, BarrierNotifiable *done)
Called on another node sending ConsumerRangeIdentified.
virtual void handle_producer_range_identified(const EventRegistryEntry &registry_entry, EventReport *event, BarrierNotifiable *done)
Called on another node sending ProducerRangeIdentified for this event.
virtual void handle_event_report(const EventRegistryEntry &registry_entry, EventReport *event, BarrierNotifiable *done)=0
Called on incoming EventReport messages.
virtual void handle_identify_consumer(const EventRegistryEntry &registry_entry, EventReport *event, BarrierNotifiable *done)=0
Called on another node sending IdentifyConsumer.
virtual void handle_producer_identified(const EventRegistryEntry &registry_entry, EventReport *event, BarrierNotifiable *done)
Called on another node sending ProducerIdentified for this event.
virtual void handle_consumer_identified(const EventRegistryEntry &registry_entry, EventReport *event, BarrierNotifiable *done)
Called on another node sending ConsumerIdentified for this event.
virtual void handle_identify_producer(const EventRegistryEntry &registry_entry, EventReport *event, BarrierNotifiable *done)=0
Called on another node sending IdentifyProducer.
Test handler for receiving incoming event related messages via the EventService.