Tag broadcasted events with UUID and hop 97/21897/2
authorJosé Bollo <jose.bollo@iot.bzh>
Tue, 16 Jul 2019 21:39:27 +0000 (23:39 +0200)
committerJose Bollo <jose.bollo@iot.bzh>
Thu, 18 Jul 2019 13:39:52 +0000 (15:39 +0200)
When API have mutual dependencies, leading to
loops in dependecies, broadcasting an event
never ends because of the loop (see SPEC-2625).

To avoid that weird flood of events, a unic
identifier (UUID) is attached to broadcasted
event and a tiny memory records previously
broadcasted events to avoid re-sending an
already sent event.

The size of the memory can be set using the
macro variable EVENT_BROADCAST_MEMORY_COUNT
whose default value is 8. It can be reduced
to 0.

An other mecanism is added to limit the count
of hops that a broadcasted event can do. That
count can be set using the macro variable
EVENT_BROADCAST_HOP_MAX whose default value
is 10.

Bug-AGL: SPEC-2625

Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: I45877583dbf478a79d405c3650880a5579ac1f9e


No differences found