|
QP/C++
|
QF port to QK for a "generic" C++ compiler. More...
Go to the source code of this file.
Defines | |
| #define | QF_MAX_ACTIVE 63 |
| The maximum number of active objects in the application. | |
| #define | QF_MAX_EPOOL 3 |
| The maximum number of event pools in the application. | |
| #define | QF_EVENT_SIZ_SIZE 2 |
| The size (in bytes) of the event-size representation in the QF. Valid values: 1, 2, or 4; default 2. | |
| #define | QF_EQUEUE_CTR_SIZE 1 |
| The size (in bytes) of the ring-buffer counters used in the native QF event queue implementation. Valid values: 1, 2, or 4; default 1. | |
| #define | QF_MPOOL_SIZ_SIZE 2 |
| The size (in bytes) of the block-size representation in the native QF event pool. Valid values: 1, 2, or 4; default QF_EVENT_SIZ_SIZE. | |
| #define | QF_MPOOL_CTR_SIZE 2 |
| The size (in bytes) of the block-counter representation in the native QF event pool. Valid values: 1, 2, or 4; default 2. | |
| #define | QF_TIMEEVT_CTR_SIZE 2 |
| The size (in bytes) of the time event -counter representation in the QTimeEvt class. Valid values: 1, 2, or 4; default 2. | |
| #define | QF_ACTIVE_BASE QHsm |
| The macro defining the base class for QActive. | |
| #define | QF_INT_DISABLE() intDisable() |
| Define the interrupt disabling policy. | |
| #define | QF_INT_ENABLE() intEnable() |
| Define the interrupt enabling policy. | |
| #define | QF_CRIT_STAT_TYPE crit_stat_t |
| Define the type of the critical section status. | |
| #define | QF_CRIT_ENTRY(stat_) ((stat_) = critEntry()) |
| Define the critical section entry policy. | |
| #define | QF_CRIT_EXIT(stat_) critExit(stat_) |
| Define the critical section exit policy. | |
QF port to QK for a "generic" C++ compiler.
Definition in file qf_port.h.
| #define QF_ACTIVE_BASE QHsm |
The macro defining the base class for QActive.
By default, the QActive class is derived from QHsm. However, if the macro QF_ACTIVE_BASE is defined, QActive is derived from QF_ACTIVE_BASE.
Clients might choose, for example, to define QF_ACTIVE_BASE as QFsm to avoid the 1-2KB overhead of the hierarchical event processor.
Clients might also choose to define QF_ACTIVE_BASE as their own completely customized class that has nothing to do with QHsm or QFsm. The QF_ACTIVE_BASE class must provide member functions init() and dispatch(), consistent with the signatures of QHsm and QFsm. But the implementatin of these functions is completely open.
| #define QF_CRIT_ENTRY | ( | stat_ | ) | ((stat_) = critEntry()) |
Define the critical section entry policy.
This macro enters a critical section (often by means of disabling interrupts). When the "saving and restoring critical section status" policy is used, the macro sets the status_ argument to the critical section status just before the entry. When the policy of "unconditional critical section exit" is used, the macro does not use the status_ argument.
| #define QF_CRIT_EXIT | ( | stat_ | ) | critExit(stat_) |
Define the critical section exit policy.
This macro enters a critical section (often by means of disabling interrupts). When the "saving and restoring critical section status" policy is used, the macro restores the critical section status from the status_ argument. When the policy of "unconditional critical section exit" is used, the macro does not use the status argument and exits the critical section unconditionally (often by means of enabling interrupts).
| #define QF_CRIT_STAT_TYPE crit_stat_t |
| #define QF_EQUEUE_CTR_SIZE 1 |
The size (in bytes) of the ring-buffer counters used in the native QF event queue implementation. Valid values: 1, 2, or 4; default 1.
This macro can be defined in the QF ports to configure the QEQueueCtr type. If the macro is not defined, the default of 1 byte will be chosen in qequeue.h. The valid QF_EQUEUE_CTR_SIZE values of 1, 2, or 4, correspond to QEQueueCtr of uint8_t, uint16_t, and uint32_t, respectively. The QEQueueCtr data type determines the dynamic range of numerical values of ring-buffer counters inside event queues, or, in other words, the maximum number of events that the native QF event queue can manage.
| #define QF_EVENT_SIZ_SIZE 2 |
The size (in bytes) of the event-size representation in the QF. Valid values: 1, 2, or 4; default 2.
This macro can be defined in the QF ports to configure the ::QEvtSize type. If the macro is not defined, the default of 2 byte will be chosen in qf.h. The valid QF_EVENT_SIZ_SIZE values of 1, 2, or 4, correspond to ::QEvtSize of uint8_t, uint16_t, and uint32_t, respectively. The ::QEvtSize data type determines the dynamic range of event-sizes in your application.
| #define QF_INT_DISABLE | ( | ) | intDisable() |
Define the interrupt disabling policy.
This macro encapsulates platform-specific way of disabling interrupts from C++ for a given CPU and compiler.
Definition at line 206 of file qf_port.h.
Referenced by QK_sched_(), QK_schedExt_(), and QF::run().
| #define QF_INT_ENABLE | ( | ) | intEnable() |
Define the interrupt enabling policy.
This macro encapsulates platform-specific way of enabling interrupts from "C" for a given CPU and compiler.
Definition at line 216 of file qf_port.h.
Referenced by QK_sched_(), QK_schedExt_(), and QF::run().
| #define QF_MAX_ACTIVE 63 |
The maximum number of active objects in the application.
This macro *must* be defined in the QF port and should be in range of 1..63, inclusive. The value of this macro determines the maximum priority level of an active object in the system. Not all priority levels must be used, but the maximum priority cannot exceed QF_MAX_ACTIVE.
Definition at line 60 of file qf_port.h.
Referenced by QF::getQueueMargin(), QF::remove_(), QActive::start(), QActive::subscribe(), QActive::unsubscribe(), and QActive::unsubscribeAll().
| #define QF_MAX_EPOOL 3 |
The maximum number of event pools in the application.
This macro should be defined in the QF port and should be in range of 1..255, inclusive. The value of this macro determines the maximum number of event pools in the system. Not all all these event pools must actually be used by the applications, but the maximum number of pools cannot exceed QF_MAX_EPOOL.
If the macro is not defined, the default value is 3
| #define QF_MPOOL_CTR_SIZE 2 |
The size (in bytes) of the block-counter representation in the native QF event pool. Valid values: 1, 2, or 4; default 2.
This macro can be defined in the QF ports to configure the ::QMPoolCtr type. If the macro is not defined, the default of 2 bytes will be chosen in qmpool.h. The valid QF_MPOOL_CTR_SIZE values of 1, 2, or 4, correspond to ::QMPoolSize of uint8_t, uint16_t, and uint32_t, respectively. The ::QMPoolCtr data type determines the dynamic range of block-counters that the native QMPool can handle, or, in other words, the maximum number of blocks that the native QF event pool can manage.
| #define QF_MPOOL_SIZ_SIZE 2 |
The size (in bytes) of the block-size representation in the native QF event pool. Valid values: 1, 2, or 4; default QF_EVENT_SIZ_SIZE.
This macro can be defined in the QF ports to configure the ::QMPoolSize type. If the macro is not defined, the default of QF_EVENT_SIZ_SIZE will be chosen in qmpool.h, because the memory pool is primarily used for implementing event pools.
The valid QF_MPOOL_SIZ_SIZE values of 1, 2, or 4, correspond to ::QMPoolSize of uint8_t, uint16_t, and uint32_t, respectively. The ::QMPoolSize data type determines the dynamic range of block-sizes that the native QMPool can hanle.
| #define QF_TIMEEVT_CTR_SIZE 2 |
The size (in bytes) of the time event -counter representation in the QTimeEvt class. Valid values: 1, 2, or 4; default 2.
This macro can be defined in the QF ports to configure the internal tick counters of Time Events. If the macro is not defined, the default of 2 bytes will be chosen in qf.h. The valid QF_TIMEEVT_CTR_SIZE values of 1, 2, or 4, correspond to tick counters of uint8_t, uint16_t, and uint32_t, respectively. The tick counter representation determines the dynamic range of time delays that a Time Event can handle.
1.7.6.1