Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
EventHandlerTemplates.hxx
Go to the documentation of this file.
1
36#ifndef _OPENLCB_EVENTHANDLERTEMPLATES_HXX_
37#define _OPENLCB_EVENTHANDLERTEMPLATES_HXX_
38
41#include "os/Gpio.hxx"
42
43namespace openlcb
44{
45
50uint64_t EncodeRange(uint64_t begin, unsigned size);
51
56{
57public:
58 virtual ~ProxyEventHandler()
59 {
60 }
61
64 virtual void HandlerFn(EventHandlerFunction fn,
65 const EventRegistryEntry &registry_entry,
66 EventReport *event, BarrierNotifiable *done) = 0;
67
72#define DEFPROXYFN(FN) \
73 virtual void FN(const EventRegistryEntry &registry_entry, \
74 EventReport *event, BarrierNotifiable *done) override \
75 { \
76 HandlerFn(&EventHandler::FN, registry_entry, event, done); \
77 }
78
87
88#undef DEFPROXYFN
89};
90
95{
96public:
100#define IGNOREFN(FN) \
101 virtual void FN(const EventRegistryEntry &registry_entry, \
102 EventReport *event, BarrierNotifiable *done) override \
103 { \
104 done->notify(); \
105 }
106
114
115#undef IGNOREFN
116};
117
129template <uint64_t EVENT_ID>
131{
132public:
133 FixedEventProducer(Node *node) : node_(node)
134 {
138 EventRegistry::instance()->register_handler(
139 EventRegistryEntry(this, EVENT_ID), 0);
140 }
141
143 {
144 EventRegistry::instance()->unregister_handler(this);
145 }
146
149 {
150 if (event->dst_node && event->dst_node != node_)
151 {
152 return done->notify();
153 }
154 event->event_write_helper<1>()->WriteAsync(node_,
156 WriteHelper::global(), openlcb::eventid_to_buffer(EVENT_ID), done);
157 }
158
161 {
162 return handle_identify_global(registry_entry, event, done);
163 }
164
165private:
166 Node *node_;
167};
168
182{
183public:
184 BitEventInterface(uint64_t event_on, uint64_t event_off)
185 : event_on_(event_on)
186 , event_off_(event_off)
187 {
188 }
189
192
197 {
198 return get_current_state();
199 }
200
204 virtual void set_state(bool new_value) = 0;
205
207 uint64_t event_on()
208 {
209 return event_on_;
210 }
211
213 uint64_t event_off()
214 {
215 return event_off_;
216 }
217
220 virtual Node *node() = 0;
221
222private:
223 uint64_t event_on_;
224 uint64_t event_off_;
225
227};
228
232{
233public:
234 DistributedBit(Node *node, uint64_t event_on, uint64_t event_off)
236 , node_(node)
237 , state_(EventState::UNKNOWN)
238 , requested_(EventState::INVALID)
239 {
240 }
241
244 {
245 }
246
249 Node *node() override
250 {
251 return node_;
252 }
253
257 {
258 return state_;
259 }
260
264 {
265 return requested_;
266 }
267
270 void set_state(bool new_value) override
271 {
272 state_ = new_value ? EventState::VALID : EventState::INVALID;
273 }
274
277 void set_requested_state(bool new_value)
278 {
279 requested_ = new_value ? EventState::VALID : EventState::INVALID;
280 }
281
284 {
285 requested_ = state_ == EventState::UNKNOWN ? EventState::VALID :
287 }
288
289private:
292
295
298
300};
301
309public:
319 bool default_local_state)
321 , node_(node)
322 , isKnown_(0)
323 , localState_(default_local_state ? 1 : 0)
324 {
325 }
326
329 Node *node() override
330 {
331 return node_;
332 }
333
337 {
338 if (!isKnown_) return EventState::UNKNOWN;
339 if (localState_) return EventState::VALID;
340 return EventState::INVALID;
341 }
342
346 return localState_;
347 }
348
352 return isKnown_;
353 }
354
361 void set_state(bool new_value) override
362 {
363 isKnown_ = 1;
364 localState_ = new_value ? 1 : 0;
365 }
366
374 {
376 }
377
378protected:
379 Node* node_;
381 uint8_t isKnown_ : 1;
384 uint8_t localState_ : 1;
385};
386
390{
391public:
401 uint64_t event_off, bool default_local_state)
402 : NetworkInitializedBit(node, event_on, event_off, default_local_state)
403 {
404 }
405
409 void set_change_callback(std::function<void()> cb)
410 {
411 callback_ = std::move(cb);
412 }
413
420 void set_state(bool new_value) override
421 {
423 if (callback_)
424 {
425 callback_();
426 }
427 }
428
430 void reset()
431 {
432 isKnown_ = 0;
433 }
434
435private:
437 std::function<void()> callback_;
438};
439
440
447template <class T> class MemoryBit : public BitEventInterface
448{
449public:
456 MemoryBit(Node *node, uint64_t event_on, uint64_t event_off, T *ptr, T mask)
458 , node_(node)
459 , ptr_(ptr)
460 , mask_(mask)
461 {
462 }
463
464 Node *node() override
465 {
466 return node_;
467 }
469 {
470 return ((*ptr_) & mask_) ? EventState::VALID : EventState::INVALID;
471 }
472 void set_state(bool new_value) override
473 {
474 if (new_value)
475 {
476 *ptr_ |= mask_;
477 }
478 else
479 {
480 *ptr_ &= ~mask_;
481 }
482 }
483
484private:
485 Node *node_;
486 T *ptr_;
487 T mask_;
488
490};
491
495{
496public:
497 GPIOBit(Node *node, EventId event_on, EventId event_off, const Gpio *gpio)
499 , node_(node)
500 , gpio_(gpio)
501 {
502 }
503
504 template <class HW>
505 GPIOBit(Node *node, EventId event_on, EventId event_off, const HW &, const Gpio* g = HW::instance(), decltype(HW::instance)* = 0)
507 {
508 }
509
511 {
512 return gpio_->is_set() ? EventState::VALID : EventState::INVALID;
513 }
514 void set_state(bool new_value) OVERRIDE
515 {
516 gpio_->write(new_value);
517 }
519 {
520 return node_;
521 }
522
523public:
524 Node *node_;
525 const Gpio *gpio_;
526};
527
532{
533public:
535
543 void SendEventReport(WriteHelper *writer, Notifiable *done);
544
545protected:
548 void register_handler(uint64_t event_on, uint64_t event_off);
551 void unregister_handler();
552
561
570
575 void HandlePCIdentify(Defs::MTI mti_valid, EventReport *event,
576 BarrierNotifiable *done);
577
578 BitEventInterface *bit_;
579
580private:
583 enum {
594 };
595
597};
598
610{
611public:
619 {
621 }
622
634 void Update(WriteHelper *writer, Notifiable *done)
635 {
636 SendEventReport(writer, done);
637 }
638
640 void SendQuery(WriteHelper *writer, BarrierNotifiable *done);
641
643 EventReport *event,
644 BarrierNotifiable *done) override;
646 EventReport *event,
647 BarrierNotifiable *done) override;
648
649private:
651};
652
666{
667public:
669 {
670 register_handler(bit->event_on(), bit->event_off());
671 }
673 {
675 }
676
678 void SendQuery(WriteHelper *writer, BarrierNotifiable *done);
679
680 void handle_event_report(const EventRegistryEntry &entry, EventReport *event,
681 BarrierNotifiable *done) override;
683 EventReport *event,
684 BarrierNotifiable *done) override;
686 EventReport *event,
687 BarrierNotifiable *done) override;
689 EventReport *event,
690 BarrierNotifiable *done) override;
691};
692
705{
706public:
712
715 {
716 SendQuery(writer, done);
717 }
718
721
723 EventReport *event,
724 BarrierNotifiable *done) override;
726 EventReport *event,
727 BarrierNotifiable *done) override;
729 EventReport *event,
730 BarrierNotifiable *done) override;
731};
732
736{
737public:
745 BitRangeEventPC(Node *node, uint64_t event_base, uint32_t *backing_store,
746 unsigned size);
747 virtual ~BitRangeEventPC();
748
762 void Set(unsigned bit, bool new_value, WriteHelper *writer,
763 BarrierNotifiable *done);
764
766 bool Get(unsigned bit) const;
767
769 void SendIdentified(WriteHelper *writer, BarrierNotifiable *done);
770
771 void handle_event_report(const EventRegistryEntry &entry, EventReport *event,
772 BarrierNotifiable *done) override;
774 EventReport *event,
775 BarrierNotifiable *done) override;
777 EventReport *event,
778 BarrierNotifiable *done) override;
780 EventReport *event,
781 BarrierNotifiable *done) override;
782
784 unsigned size() { return size_; }
785
786protected:
787 void HandleIdentifyBase(Defs::MTI mti_valid, EventReport *event,
788 BarrierNotifiable *done);
789 void GetBitAndMask(unsigned bit, uint32_t **data, uint32_t *mask) const;
790
791 uint64_t event_base_;
792 Node *node_;
793 uint32_t *data_;
794 unsigned size_; //< number of bits stored.
795};
796
800{
801public:
807 BitRangeEventP(Node *node, uint64_t event_base, uint32_t *backing_store,
808 unsigned size)
809 : BitRangeEventPC(node, event_base, backing_store, size)
810 {
811 }
812
815 {
816 }
817
819 BarrierNotifiable *done) override
820 {
821 // Nothing to do for producers.
822 done->notify();
823 }
824
826 EventReport *event,
827 BarrierNotifiable *done) override
828 {
829 // Nothing to do for producers.
830 done->notify();
831 }
832
834 EventReport *event,
835 BarrierNotifiable *done) override;
836};
837
841{
842public:
849 ByteRangeEventC(Node *node, uint64_t event_base, uint8_t *backing_store,
850 unsigned size);
851 virtual ~ByteRangeEventC();
852
854 void SendIdentified(WriteHelper *writer, BarrierNotifiable *done);
855
858 virtual void notify_changed(unsigned offset)
859 {
860 }
861
862 void handle_event_report(const EventRegistryEntry &entry, EventReport *event,
863 BarrierNotifiable *done) override;
865 EventReport *event,
866 BarrierNotifiable *done) override;
868 EventReport *event,
869 BarrierNotifiable *done) override;
870
871protected:
875 bool DecodeEventId(uint64_t event_id, uint8_t **data, uint8_t *value);
876
877 uint64_t event_base_;
878 Node *node_;
879 uint8_t *data_;
880 unsigned size_; //< number of bytes consumed.
881};
882
890{
891public:
897 ByteRangeEventP(Node *node, uint64_t event_base, uint8_t *backing_store,
898 unsigned size);
899
909 void Update(unsigned byte, WriteHelper *writer, BarrierNotifiable *done);
910
912 void SendIdentified(WriteHelper *writer, BarrierNotifiable *done);
913
914 // Need to override C behavior.
915 void handle_event_report(const EventRegistryEntry &entry, EventReport *event,
916 BarrierNotifiable *done) override;
918 EventReport *event,
919 BarrierNotifiable *done) override;
920 // Own behavior.
922 EventReport *event,
923 BarrierNotifiable *done) override;
925 EventReport *event,
926 BarrierNotifiable *done) override;
927 // Responses to possible queries.
929 EventReport *event,
930 BarrierNotifiable *done) override;
932 EventReport *event,
933 BarrierNotifiable *done) override;
934
935private:
937 uint64_t CurrentEventId(unsigned byte);
938};
939
940} // namespace openlcb
941
942#endif // _OPENLCB_EVENTHANDLERTEMPLATES_HXX_
#define DEFPROXYFN(FN)
Proxies an event handler function to a gmock function.
#define IGNOREFN(FN)
Defines an event handler function as ignored.
A BarrierNotifiable allows to create a number of child Notifiable and wait for all of them to finish.
void notify() override
Implementation of the barrier semantics.
OS-independent abstraction for GPIO.
Definition Gpio.hxx:43
virtual void write(Value new_state) const =0
Writes a GPIO output pin (set or clear to a specific state).
bool is_set() const
Tests the GPIO input pin to see if it is set.
Definition Gpio.hxx:105
An object that can schedule itself on an executor to run.
static EventRegistry * instance()
Definition Singleton.hxx:77
Event handler for a single-bit consumer, e.g.
void handle_identify_global(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on the need of sending out identification messages.
void handle_event_report(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on incoming EventReport messages.
void handle_identify_consumer(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on another node sending IdentifyConsumer.
void SendQuery(WriteHelper *writer, BarrierNotifiable *done)
Queries producers and acquires the current state of the bit.
void handle_producer_identified(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on another node sending ProducerIdentified for this event.
Base class for single-bit producer and consumer objects.
void SendConsumerIdentified(EventReport *event, BarrierNotifiable *done)
Sends off two packets using event_write_helper{3,4} of ConsumerIdentified for handling a global ident...
void unregister_handler()
Removes this event handler from the global event manager.
void register_handler(uint64_t event_on, uint64_t event_off)
Registers this event handler with the global event manager.
void SendEventReport(WriteHelper *writer, Notifiable *done)
Requests the event associated with the current value of the bit to be produced (unconditionally): sen...
void SendProducerIdentified(EventReport *event, BarrierNotifiable *done)
Sends off two packets using event_write_helper{1,2} of ProducerIdentified for handling a global ident...
void HandlePCIdentify(Defs::MTI mti_valid, EventReport *event, BarrierNotifiable *done)
Checks if the event in the report is something we are interested in, and if so, sends off a {Producer...
@ BOTH_ON_IS_ZERO
This registration is for two events, and the lower numbered is the event on.
@ EVENT_ON
This registration is for a single event_on.
@ EVENT_OFF
This registration is for a single event_off.
@ BOTH_OFF_IS_ZERO
This registration is for two events, and the lower numbered is the event off.
Represents a bit of state using two events.
uint64_t event_on()
returns the event ID for representing the state transition OFF->ON.
virtual void set_state(bool new_value)=0
Updates the hardware for the new event state.
virtual EventState get_requested_state()
Get the requested state.
uint64_t event_off()
returns the event ID for representing the state transition ON->OFF.
virtual Node * node()=0
returns the OpenLCB virtual node from which to send the respective events when the bit changes.
virtual EventState get_current_state()=0
returns the current hardware state: true for ON, false for OFF.
Producer-Consumer event handler for a single bit represented by two event IDs.
void handle_identify_global(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on the need of sending out identification messages.
void SendQueryConsumer(WriteHelper *writer, BarrierNotifiable *done)
Queries consumer and acquires the current state of the bit.
void handle_identify_producer(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on another node sending IdentifyProducer.
void SendQueryProducer(WriteHelper *writer, BarrierNotifiable *done)
Queries producers and acquires the current state of the bit.
void handle_consumer_identified(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on another node sending ConsumerIdentified for this event.
BitEventPC(BitEventInterface *bit)
Event handler for a single-bit producer, e.g.
void Update(WriteHelper *writer, Notifiable *done)
Requests the event associated with the current value of the bit to be produced (unconditionally).
void SendQuery(WriteHelper *writer, BarrierNotifiable *done)
Queries consumers and acquires the current state of the bit.
void handle_identify_producer(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on another node sending IdentifyProducer.
void handle_identify_global(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on the need of sending out identification messages.
BitEventProducer(BitEventInterface *bit)
Producer-Consumer event handler for a sequence of bits represented by a dense block of consecutive ev...
void handle_identify_producer(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on another node sending IdentifyProducer.
void handle_identify_consumer(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on another node sending IdentifyConsumer.
void handle_identify_global(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on the need of sending out identification messages.
bool Get(unsigned bit) const
void SendIdentified(WriteHelper *writer, BarrierNotifiable *done)
Sends out a ProducerRangeIdentified.
void handle_event_report(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on incoming EventReport messages.
void Set(unsigned bit, bool new_value, WriteHelper *writer, BarrierNotifiable *done)
Requests the event associated with the current value of the bit to be produced (unconditionally).
Producer event handler for a sequence of bits represented by a dense block of consecutive event IDs.
virtual ~BitRangeEventP()
Destructor.
void handle_event_report(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on incoming EventReport messages.
BitRangeEventP(Node *node, uint64_t event_base, uint32_t *backing_store, unsigned size)
Creates a new bit range producer.
void handle_identify_consumer(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on another node sending IdentifyConsumer.
void handle_identify_global(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on the need of sending out identification messages.
Consumer event handler for a sequence of bytes represented by a dense block of consecutive event IDs.
void handle_event_report(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on incoming EventReport messages.
void handle_identify_consumer(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on another node sending IdentifyConsumer.
bool DecodeEventId(uint64_t event_id, uint8_t **data, uint8_t *value)
takes an event ID and checks if we are responsible for it.
void handle_identify_global(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on the need of sending out identification messages.
void SendIdentified(WriteHelper *writer, BarrierNotifiable *done)
Sends out a ConsumerRangeIdentified.
virtual void notify_changed(unsigned offset)
This function is called by the handler when a data value overwrite event arrives.
TODO(balazs.racz): Add another class here, ByteRangeEventPC.
void handle_identify_consumer(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on another node sending IdentifyConsumer.
void handle_identify_global(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on the need of sending out identification messages.
void Update(unsigned byte, WriteHelper *writer, BarrierNotifiable *done)
Requests the event associated with the current value of a specific byte to be produced (unconditional...
uint64_t CurrentEventId(unsigned byte)
Creates the eventid of the currently valid value of a given byte.
void SendIdentified(WriteHelper *writer, BarrierNotifiable *done)
Sends out a ProducerRangeIdentified.
void handle_identify_producer(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on another node sending IdentifyProducer.
void handle_consumer_identified(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on another node sending ConsumerIdentified for this event.
void handle_event_report(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on incoming EventReport messages.
void handle_consumer_range_identified(const EventRegistryEntry &entry, EventReport *event, BarrierNotifiable *done) override
Called on another node sending ConsumerRangeIdentified.
Speciallization of NetworkInitializedBit that adds callback support when the state changes.
void reset()
Call this function in order to reset the network state to unknown.
void set_state(bool new_value) override
Call from the network stack (or the client before notifying the network stack) to set the state.
std::function< void()> callback_
This function is invoked when the state of the bit changes.
void set_change_callback(std::function< void()> cb)
Specifies the change notifier.
CallbackNetworkInitializedBit(openlcb::Node *node, uint64_t event_on, uint64_t event_off, bool default_local_state)
Constructor.
Implementation of the BitEventInterface that has accessors to the desired and actual state,...
EventState get_requested_state() override
Get the requested state.
EventState get_current_state() override
Get the current state.
void set_state(bool new_value) override
Set the current state.
Node * node_
node that this interface is bound to
EventState requested_
Event state reauested.
void toggle_state()
Invert the requested state from the current state.
void set_requested_state(bool new_value)
Set the requested state.
EventState state_
Event state.
Node * node() override
Get a refference to the owning Node.
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.
Structure used in registering event handlers.
Class that advertises an event ID to be produced.
void handle_identify_producer(const EventRegistryEntry &registry_entry, EventReport *event, BarrierNotifiable *done) OVERRIDE
Called on another node sending IdentifyProducer.
void handle_identify_global(const EventRegistryEntry &registry_entry, EventReport *event, BarrierNotifiable *done) OVERRIDE
Called on the need of sending out identification messages.
Simple implementation of the BitEventInterface for going through GPIO ports.
void set_state(bool new_value) OVERRIDE
Updates the hardware for the new event state.
EventState get_current_state() OVERRIDE
returns the current hardware state: true for ON, false for OFF.
Node * node() OVERRIDE
returns the OpenLCB virtual node from which to send the respective events when the bit changes.
Simple implementation of a BitEventInterface when the true state ofthe variable is mapped in memory (...
MemoryBit(Node *node, uint64_t event_on, uint64_t event_off, T *ptr, T mask)
EventState get_current_state() override
returns the current hardware state: true for ON, false for OFF.
void set_state(bool new_value) override
Updates the hardware for the new event state.
Node * node() override
returns the OpenLCB virtual node from which to send the respective events when the bit changes.
A network-initialized bit is a tri-state bit implementation that starts up in the UNKNOWN state until...
void set_state(bool new_value) override
Call from the network stack (or the client before notifying the network stack) to set the state.
NetworkInitializedBit(Node *node, uint64_t event_on, uint64_t event_off, bool default_local_state)
Constructs a NetworkInitializedBit.
EventState get_current_state() override
Accessor from the network stack to return the current state.
Node * node() override
Get a reference to the owning Node.
void toggle_state()
Invert the current state.
uint8_t localState_
local state; either matches the network state or is the constructor-default local state.
uint8_t isKnown_
true when we knowthe network state
Base class for NMRAnet nodes conforming to the asynchronous interface.
Definition Node.hxx:52
A proxy event handler has a single helper function that gets every event handler call with an indicat...
virtual void HandlerFn(EventHandlerFunction fn, const EventRegistryEntry &registry_entry, EventReport *event, BarrierNotifiable *done)=0
This function will be called for any other incoming event handler function.
SimpleEventHandler ignores all non-essential callbacks.
A statically allocated buffer for sending one message to the OpenLCB bus.
#define OVERRIDE
Function attribute for virtual functions declaring that this funciton is overriding a funciton that s...
Definition macros.h:180
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Removes default copy-constructor and assignment added by C++.
Definition macros.h:171
uint64_t EncodeRange(uint64_t begin, unsigned size)
Creates a single encoded event range from the beginning of the range and the number fo events to cove...
EventState invert_event_state(EventState state)
Returns the inverted event state, switching valid and invalid, but not changing unknown and reserved.
EventState
Allowed states of producers and consumers.
Payload eventid_to_buffer(uint64_t eventid)
Converts an Event ID to a Payload suitable to be sent as an event report.
Definition If.cxx:72
MTI
Known Message type indicators.
@ MTI_PRODUCER_IDENTIFIED_UNKNOWN
producer broadcast, validity unknown
Shared notification structure that is assembled for each incoming event-related message,...