QP/C++ 6.9.3
qxk/qf_port.hpp File Reference

QF/C++ port to PC-Lint-Plus, Generic C++ compiler. More...

#include "qep_port.hpp"
#include "qxk_port.hpp"
#include "qf.hpp"
#include "qxthread.hpp"
Include dependency graph for qxk/qf_port.hpp:

Go to the source code of this file.

Macros

#define QF_MAX_ACTIVE   32U
 The maximum number of active objects in the application. More...
 
#define QF_MAX_EPOOL   3U
 The maximum number of event pools in the application. More...
 
#define QF_EVENT_SIZ_SIZE   2U
 The size (in bytes) of the event-size representation in the QF. Valid values: 1U, 2U, or 4U; default 2U. More...
 
#define QF_EQUEUE_CTR_SIZE   1U
 The size (in bytes) of the ring-buffer counters used in the native QF event queue implementation. Valid values: 1U, 2U, or 4U; default 1U. More...
 
#define QF_MPOOL_SIZ_SIZE   2U
 The size (in bytes) of the block-size representation in the native QF event pool. Valid values: 1U, 2U, or 4U; default 2U. QF_EVENT_SIZ_SIZE. More...
 
#define QF_MPOOL_CTR_SIZE   2U
 The size (in bytes) of the block-counter representation in the native QF event pool. Valid values: 1U, 2U, or 4U; default 2U. More...
 
#define QF_TIMEEVT_CTR_SIZE   2U
 The size (in bytes) of the time event -counter representation in the QP::QTimeEvt class. Valid values: 1U, 2U, or 4U; default 2U. More...
 
#define QF_INT_DISABLE()   intDisable()
 Define the interrupt disabling policy. More...
 
#define QF_INT_ENABLE()   intEnable()
 Define the interrupt enabling policy. More...
 
#define QF_CRIT_STAT_TYPE   unsigned
 Define the type of the critical section status. More...
 
#define QF_CRIT_ENTRY(stat_)   ((stat_) = critEntry())
 Define the critical section entry policy. More...
 
#define QF_CRIT_EXIT(stat_)   critExit(stat_)
 Define the critical section exit policy. More...
 
#define QF_ACTIVE_STOP
 Enable the QActive::stop() API in the QF port. More...
 

Functions

void intDisable (void)
 
void intEnable (void)
 
QF_CRIT_STAT_TYPE critEntry (void)
 
void critExit (QF_CRIT_STAT_TYPE stat)
 

Detailed Description

QF/C++ port to PC-Lint-Plus, Generic C++ compiler.

Definition in file qxk/qf_port.hpp.

Macro Definition Documentation

◆ QF_MAX_ACTIVE

#define QF_MAX_ACTIVE   32U

The maximum number of active objects in the application.

This macro must be defined in the QF port and should be in range of 1U..63U, 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.

Note
Once you choose a certain value of QF_MAX_ACTIVE, you must consistently use the same value in building all the QP component libraries and your own application code. The consistency is guaranteed if you define this macro only once in the qf_port.hpp header file and henceforth include this header file in all builds.

Definition at line 57 of file qxk/qf_port.hpp.

◆ QF_MAX_EPOOL

#define QF_MAX_EPOOL   3U

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

Note
Once you choose a certain value of QF_MAX_EPOOL, you must consistently use the same value in building all the QP component libraries and your own application code. The consistency is guaranteed if you define this macro only once in the qf_port.hpp header file and henceforth include this header file in all builds.

Definition at line 74 of file qxk/qf_port.hpp.

◆ QF_EVENT_SIZ_SIZE

#define QF_EVENT_SIZ_SIZE   2U

The size (in bytes) of the event-size representation in the QF. Valid values: 1U, 2U, or 4U; default 2U.

Description
This macro can be defined in the QF ports to configure the QP::QEvtSize type. If the macro is not defined, the default of 2 byte will be chosen in qf.hpp. The valid QF_EVENT_SIZ_SIZE values of 1, 2, or 4, correspond to QP::QEvtSize of uint8_t, uint16_t, and uint32_t, respectively. The QP::QEvtSize data type determines the dynamic range of event-sizes in your application.
See also
QP::QF::poolInit(), QP::QF::new_()
Note
Once you choose a certain value of QF_EVENT_SIZ_SIZE, you must consistently use the same value in building all the QP component libraries and your own application code. The consistency is guaranteed if you define this macro only once in the qf_port.hpp header file and henceforth include this header file in all builds.

Definition at line 93 of file qxk/qf_port.hpp.

◆ QF_EQUEUE_CTR_SIZE

#define QF_EQUEUE_CTR_SIZE   1U

The size (in bytes) of the ring-buffer counters used in the native QF event queue implementation. Valid values: 1U, 2U, or 4U; default 1U.

Description
This macro can be defined in the QF ports to configure the QP::QEQueueCtr type. If the macro is not defined, the default of 1 byte will be chosen in qequeue.hpp. The valid QF_EQUEUE_CTR_SIZE values of 1U, 2U, or 4U, correspond to QP::QEQueueCtr of uint8_t, uint16_t, and uint32_t, respectively. The QP::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.
See also
QP::QEQueue
Note
Once you choose a certain value of QF_EQUEUE_CTR_SIZE, you must consistently use the same value in building all the QP component libraries and your own application code. The consistency is guaranteed if you define this macro only once in the qf_port.hpp header file and henceforth include this header file in all builds.

Definition at line 113 of file qxk/qf_port.hpp.

◆ QF_MPOOL_SIZ_SIZE

#define QF_MPOOL_SIZ_SIZE   2U

The size (in bytes) of the block-size representation in the native QF event pool. Valid values: 1U, 2U, or 4U; default 2U. QF_EVENT_SIZ_SIZE.

Description
This macro can be defined in the QF ports to configure the QP::QMPoolSize type. If the macro is not defined, the default of QF_EVENT_SIZ_SIZE will be chosen in qmpool.hpp, because the memory pool is primarily used for implementing event pools.

The valid QF_MPOOL_SIZ_SIZE values of 1U, 2U, or 4U, correspond to QP::QMPoolSize of uint8_t, uint16_t, and uint32_t, respectively. The QP::QMPoolSize data type determines the dynamic range of block-sizes that the native QP::QMPool can hanle.

See also
QF_EVENT_SIZ_SIZE, QP::QMPool
Note
Once you choose a certain value of QF_MPOOL_SIZ_SIZE, you must consistently use the same value in building all the QP component libraries and your own application code. The consistency is guaranteed if you define this macro only once in the qf_port.hpp header file and henceforth include this header file in all builds.

Definition at line 135 of file qxk/qf_port.hpp.

◆ QF_MPOOL_CTR_SIZE

#define QF_MPOOL_CTR_SIZE   2U

The size (in bytes) of the block-counter representation in the native QF event pool. Valid values: 1U, 2U, or 4U; default 2U.

Description
This macro can be defined in the QF ports to configure the QP::QMPoolCtr type. If the macro is not defined, the default of 2 bytes will be chosen in qmpool.hpp. The valid QF_MPOOL_CTR_SIZE values of 1, 2, or 4, correspond to QP::QMPoolSize of uint8_t, uint16_t, and uint32_t, respectively. The QP::QMPoolCtr data type determines the dynamic range of block-counters that the native QP::QMPool can handle, or, in other words, the maximum number of blocks that the native QF event pool can manage.
See also
QP::QMPool
Note
Once you choose a certain value of QF_MPOOL_CTR_SIZE, you must consistently use the same value in building all the QP component libraries and your own application code. The consistency is guaranteed if you define this macro only once in the qf_port.hpp header file and henceforth include this header file in all builds.

Definition at line 154 of file qxk/qf_port.hpp.

◆ QF_TIMEEVT_CTR_SIZE

#define QF_TIMEEVT_CTR_SIZE   2U

The size (in bytes) of the time event -counter representation in the QP::QTimeEvt class. Valid values: 1U, 2U, or 4U; default 2U.

Description
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.hpp. The valid QF_TIMEEVT_CTR_SIZE values of 1U, 2U, or 4U, 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.
See also
QP::QTimeEvt
Note
Once you choose a certain value of QF_TIMEEVT_CTR_SIZE, you must consistently use the same value in building all the QP component libraries and your own application code. The consistency is guaranteed if you define this macro only once in the qf_port.hpp header file and henceforth include this header file in all builds.

Definition at line 172 of file qxk/qf_port.hpp.

◆ QF_INT_DISABLE

#define QF_INT_DISABLE ( )    intDisable()

Define the interrupt disabling policy.

Description
This macro encapsulates platform-specific way of disabling interrupts from C++ for a given CPU and compiler.
Note
the QF_INT_DISABLE macro should always be used in pair with the macro QF_INT_ENABLE.

Definition at line 182 of file qxk/qf_port.hpp.

◆ QF_INT_ENABLE

#define QF_INT_ENABLE ( )    intEnable()

Define the interrupt enabling policy.

Description
This macro encapsulates platform-specific way of enabling interrupts from "C" for a given CPU and compiler.
Note
the QF_INT_DISABLE macro should always be used in pair with the macro QF_INT_ENABLE.

Definition at line 192 of file qxk/qf_port.hpp.

◆ QF_CRIT_STAT_TYPE

#define QF_CRIT_STAT_TYPE   unsigned

Define the type of the critical section status.

Description
Defining this macro configures the "saving and restoring critical section status" policy. Conversely, if this macro is not defined, the simple "unconditional critical section exit" is used.

Definition at line 200 of file qxk/qf_port.hpp.

◆ QF_CRIT_ENTRY

#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.

Note
the QF_CRIT_ENTRY macro should always be used in pair with the macro QF_CRIT_EXIT.

Definition at line 214 of file qxk/qf_port.hpp.

◆ QF_CRIT_EXIT

#define QF_CRIT_EXIT (   stat_)    critExit(stat_)

Define the critical section exit policy.

Description
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).
Note
the QF_CRIT_ENTRY macro should always be used in pair with the macro QF_CRIT_EXIT.

Definition at line 229 of file qxk/qf_port.hpp.

◆ QF_ACTIVE_STOP

#define QF_ACTIVE_STOP

Enable the QActive::stop() API in the QF port.

Description
Defining this macro enables the QActive::stop() API in a given port. This feature should be used with caution, as stopping and re-starting active objects cleanly can be tricky.

Definition at line 238 of file qxk/qf_port.hpp.

Function Documentation

◆ intDisable()

void intDisable ( void  )

◆ intEnable()

void intEnable ( void  )

◆ critEntry()

QF_CRIT_STAT_TYPE critEntry ( void  )

◆ critExit()

void critExit ( QF_CRIT_STAT_TYPE  stat)