![]() |
Imt.Base C++ API V4.1.1.0
|
Interface for callback about the event pool capacity. More...
#include <Imt.Base.Dff.Runtime/inc/Imt.Base.Dff.Runtime/EventPoolCapacityCallbackIfc.h>
Public Member Functions | |
EventPoolCapacityCallbackIfc (EventPoolCapacityCallbackIfc const &)=delete | |
EventPoolCapacityCallbackIfc (EventPoolCapacityCallbackIfc &&)=delete | |
EventPoolCapacityCallbackIfc & | operator= (EventPoolCapacityCallbackIfc const &) &=delete |
EventPoolCapacityCallbackIfc & | operator= (EventPoolCapacityCallbackIfc &&) &=delete |
virtual bool | onEventPoolCapacityCritical (uint16_t const protocolID, ::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. | |
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. | |
Static Public Attributes | |
static constexpr size_t | EVENTPOOL_THRESHOLD_DIVISOR_CRITICAL {10U} |
Lower threshold for critical: 10% capacity remaining. | |
static constexpr size_t | EVENTPOOL_THRESHOLD_DIVISOR_RECOVERED {5U} |
Upper threshold for recovered: 20% capacity remaining. | |
Protected Member Functions | |
EventPoolCapacityCallbackIfc () noexcept=default | |
Default constructor. | |
~EventPoolCapacityCallbackIfc () noexcept=default | |
Destructor. | |
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).
This interface does not provide ownership on the callback object.
Definition at line 59 of file EventPoolCapacityCallbackIfc.h.
|
delete |
|
delete |
|
protecteddefaultnoexcept |
Default constructor.
|
protecteddefaultnoexcept |
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.
protocolID | 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.
|
delete |
|
delete |
|
staticconstexpr |
Lower threshold for critical: 10% capacity remaining.
Definition at line 66 of file EventPoolCapacityCallbackIfc.h.
|
staticconstexpr |
Upper threshold for recovered: 20% capacity remaining.
Definition at line 71 of file EventPoolCapacityCallbackIfc.h.