Dataflow Runtime API
4.0.1.0
|
Interface for callback about the event pool capacity. More...
#include <Imt.Base.Dff.Runtime/EventPoolCapacityCallbackIfc.h>
Public Member Functions | |
virtual | ~EventPoolCapacityCallbackIfc () |
Destructor. More... | |
virtual bool | onEventPoolCapacityCritical (uint16_t const protocolIdentifier, ::imt::base::core::serialization::SerializableIfc const *const pEventData)=0 |
Is called continuously by the core as long as the critical event pool capacity is below (event pool size / EVENTPOOL_THRESHOLD_DIVISOR_CRITICAL) of the total event pool size. More... | |
virtual void | onEventPoolCapacityRecovered ()=0 |
Is called by the core when the event pool capacity is again above (event pool size / EVENTPOOL_THRESHOLD_DIVISOR_RECOVERED) of the total event pool size. More... | |
Static Public Attributes | |
static size_t const | EVENTPOOL_THRESHOLD_DIVISOR_CRITICAL = 10U |
Lower threshold for critical: 10% capacity remaining. More... | |
static size_t const | EVENTPOOL_THRESHOLD_DIVISOR_RECOVERED = 5U |
Upper threshold for recovered: 20% capacity remaining. More... | |
Interface for callback about the event pool capacity.
This is called when the number of available messages in the event pool has reached the EVENTPOOL_THRESHOLD_SIZE_CRITICAL. The reason is usually because the system is overloaded or the defined EVENTPOOL_SIZE is too small. It is now the responsibility of the callback to decide if the given message (identifier by the message identifier) is critical and has to be enqueued, or non-critical and can be discarded. Once the event pool capacity is recovered (number of available messages in the event pool above EVENTPOOL_THRESHOLD_SIZE_RECOVERED).
|
inlinevirtual |
Destructor.
|
pure virtual |
Is called continuously by the core as long as the critical event pool capacity is below (event pool size / EVENTPOOL_THRESHOLD_DIVISOR_CRITICAL) of the total event pool size.
This callback gives the application an opportunity to decide if the given message is critical and has to be queued, or non-critical and can be discarded. Additionally it can disable non-critical peripheral interrupts to reduce the system load. Notes: is invoked with interrupts locked and must also return with interrupts locked.
protocolIdentifier | Identifier of the protocol. |
pEventData | Event data. |
|
pure virtual |
Is called by the core when the event pool capacity is again above (event pool size / EVENTPOOL_THRESHOLD_DIVISOR_RECOVERED) of the total event pool size.
This callback gives the application an opportunity to re-enable non-critical peripheral interrupts. Notes: is invoked with interrupts locked and must also return with interrupts locked.
|
static |
Lower threshold for critical: 10% capacity remaining.
|
static |
Upper threshold for recovered: 20% capacity remaining.