#include <qf.hpp>
Static Public Member Functions | |
static char_t const * | getVersion (void) noexcept |
get the current QF version number string of the form X.Y.Z More... | |
static void | init (void) |
QF initialization. More... | |
static void | psInit (QSubscrList *const subscrSto, enum_t const maxSignal) noexcept |
Publish-subscribe initialization. More... | |
static void | poolInit (void *const poolSto, std::uint_fast32_t const poolSize, std::uint_fast16_t const evtSize) noexcept |
Event pool initialization for dynamic allocation of events. More... | |
static std::uint_fast16_t | poolGetMaxBlockSize (void) noexcept |
Obtain the block size of any registered event pools. More... | |
static int_t | run (void) |
Transfers control to QF to run the application. More... | |
static void | onStartup (void) |
Startup QF callback. More... | |
static void | onCleanup (void) |
Cleanup QF callback. More... | |
static void | stop (void) |
Function invoked by the application layer to stop the QF application and return control to the OS/Kernel. More... | |
static void | publish_ (QEvt const *const e, void const *const sender, std::uint_fast8_t const qs_id) noexcept |
Publish event to the framework. More... | |
static void | tickX_ (std::uint_fast8_t const tickRate, void const *const sender) noexcept |
Processes all armed time events at every clock tick. More... | |
static bool | noTimeEvtsActiveX (std::uint_fast8_t const tickRate) noexcept |
Returns true if all time events are inactive and false any time event is active. More... | |
static std::uint_fast16_t | getPoolMin (std::uint_fast8_t const poolId) noexcept |
This function returns the minimum of free entries of the given event pool. More... | |
static std::uint_fast16_t | getQueueMin (std::uint_fast8_t const prio) noexcept |
This function returns the minimum of free entries of the given event queue. More... | |
static QEvt * | newX_ (std::uint_fast16_t const evtSize, std::uint_fast16_t const margin, enum_t const sig) noexcept |
Internal QF implementation of creating new dynamic event. More... | |
static void | gc (QEvt const *const e) noexcept |
Recycle a dynamic event. More... | |
static QEvt const * | newRef_ (QEvt const *const e, QEvt const *const evtRef) noexcept |
Internal QF implementation of creating new event reference. More... | |
static void | deleteRef_ (QEvt const *const evtRef) noexcept |
Internal QF implementation of deleting event reference. More... | |
static void | remove_ (QActive *const a) noexcept |
Remove the active object from the framework. More... | |
static void | thread_ (QActive *act) |
Thread routine for executing an active object act . More... | |
static void | add_ (QActive *const a) noexcept |
Register an active object to be managed by the framework. More... | |
static void | bzero (void *const start, std::uint_fast16_t const len) noexcept |
Clear a specified region of memory to zero. More... | |
Static Public Attributes | |
static QActive * | active_ [QF_MAX_ACTIVE+1U] |
array of registered active objects More... | |
Static Private Attributes | |
static QTimeEvt | timeEvtHead_ [QF_MAX_TICK_RATE] |
heads of linked lists of time events, one for every clock tick rate More... | |
Friends | |
class | QActive |
class | QTimeEvt |
class | QS |
QF services.
|
inlinestaticnoexcept |
|
static |
QF initialization.
Clear the internal QF variables, so that the framework can start correctly even if the startup code fails to clear the uninitialized data (as is required by the C++ Standard).
|
staticnoexcept |
Publish-subscribe initialization.
[in] | subscrSto | pointer to the array of subscriber lists |
[in] | maxSignal | the dimension of the subscriber array and at the same time the maximum signal that can be published or subscribed. |
The array of subscriber-lists is indexed by signals and provides a mapping between the signals and subscriber-lists. The subscriber-lists are bitmasks of type QP::QSubscrList, each bit in the bit mask corresponding to the unique priority of an active object. The size of the QP::QSubscrList bitmask depends on the value of the QF_MAX_ACTIVE macro.
|
staticnoexcept |
Event pool initialization for dynamic allocation of events.
[in] | poolSto | pointer to the storage for the event pool |
[in] | poolSize | size of the storage for the pool in bytes |
[in] | evtSize | the block-size of the pool in bytes, which determines the maximum size of events that can be allocated from the pool |
poolSize
/ evtSize
) due to the internal alignment of the blocks that the pool might perform. You can always check the capacity of the pool by calling QF_getPoolMin().Definition at line 84 of file qf_dyn.cpp.
|
staticnoexcept |
Obtain the block size of any registered event pools.
Definition at line 345 of file qf_dyn.cpp.
|
static |
Transfers control to QF to run the application.
QP::QF::run() is typically called from your startup code after you initialize the QF and start at least one active object with QP::QActive::start().
|
static |
Startup QF callback.
|
static |
Cleanup QF callback.
|
static |
Function invoked by the application layer to stop the QF application and return control to the OS/Kernel.
|
staticnoexcept |
Publish event to the framework.
|
staticnoexcept |
Processes all armed time events at every clock tick.
[in] | tickRate | system clock tick rate serviced in this call [1..15]. |
[in] | sender | pointer to a sender object (used in QS only). |
tickRate
parameter can preempt each other. For example, higher clock tick rates might be serviced from interrupts while others from tasks (active objects).Definition at line 78 of file qf_time.cpp.
|
staticnoexcept |
Returns true if all time events are inactive and false any time event is active.
[in] | tickRate | system clock tick rate to find out about. |
Definition at line 206 of file qf_time.cpp.
|
staticnoexcept |
This function returns the minimum of free entries of the given event pool.
[in] | poolId | event pool ID in the range 1..QF_maxPool_, where QF_maxPool_ is the number of event pools initialized with the function QP::QF::poolInit(). |
Definition at line 303 of file qf_mem.cpp.
|
staticnoexcept |
This function returns the minimum of free entries of the given event queue.
prio
, since the active object was started.[in] | prio | Priority of the active object, whose queue is queried |
prio
, since the active object was started. Definition at line 378 of file qf_actq.cpp.
|
staticnoexcept |
Internal QF implementation of creating new dynamic event.
[in] | evtSize | the size (in bytes) of the event to allocate |
[in] | margin | the number of un-allocated events still available in a given event pool after the allocation completes The special value QP::QF_NO_MARGIN means that this function will assert if allocation fails. |
[in] | sig | the signal to be assigned to the allocated event |
Definition at line 140 of file qf_dyn.cpp.
|
staticnoexcept |
Recycle a dynamic event.
[in] | e | pointer to the event to recycle |
Definition at line 219 of file qf_dyn.cpp.
Internal QF implementation of creating new event reference.
[in] | e | pointer to the current event |
[in] | evtRef | the event reference |
e
Definition at line 291 of file qf_dyn.cpp.
|
staticnoexcept |
Internal QF implementation of deleting event reference.
[in] | evtRef | the event reference |
Definition at line 327 of file qf_dyn.cpp.
|
staticnoexcept |
Remove the active object from the framework.
[in] | a | pointer to the active object to remove from the framework. |
Definition at line 103 of file qf_act.cpp.
|
static |
Thread routine for executing an active object act
.
|
staticnoexcept |
Register an active object to be managed by the framework.
[in] | a | pointer to the active object to add to the framework. |
a
should be set before calling this function.Definition at line 79 of file qf_act.cpp.
|
staticnoexcept |
Clear a specified region of memory to zero.
[in] | start | pointer to the beginning of a memory buffer. |
[in] | len | length of the memory buffer to clear (in bytes) |
Definition at line 129 of file qf_act.cpp.
|
staticprivate |