QP/C++  7.0.1
Real-Time Embedded Framework
qf_pkg.hpp File Reference

Internal (package scope) QF/C++ interface. More...

Go to the source code of this file.

Data Structures

struct  QFreeBlock
 Structure representing a free block in the Native QF Memory Pool. More...
 

Namespaces

namespace  QP
 namespace associated with the QP/C++ framework
 

Macros

#define QF_EVT_CONST_CAST_(e_)   const_cast<QEvt *>(e_)
 helper macro to cast const away from an event pointer e_ More...
 
#define QF_CRIT_STAT_
 This is an internal macro for defining the critical section status type. More...
 
#define QF_CRIT_E_()   QF_CRIT_ENTRY(dummy)
 This is an internal macro for entering a critical section. More...
 
#define QF_CRIT_X_()   QF_CRIT_EXIT(dummy)
 This is an internal macro for exiting a critical section. More...
 
#define Q_ASSERT_CRIT_(id_, test_)
 
#define Q_REQUIRE_CRIT_(id_, test_)   Q_ASSERT_CRIT_((id_), (test_))
 
#define Q_ERROR_CRIT_(id_)
 
#define QF_PTR_RANGE_(x_, min_, max_)   (((min_) <= (x_)) && ((x_) <= (max_)))
 macro to test that a pointer x_ is in range between min_ and max_ More...
 

Functions

std::uint8_t QF_EVT_POOL_ID_ (QEvt const *const e) noexcept
 return the Pool-ID of an event e More...
 
std::uint8_t QF_EVT_REF_CTR_ (QEvt const *const e) noexcept
 return the Reference Conter of an event e More...
 
void QF_EVT_REF_CTR_INC_ (QEvt const *const e) noexcept
 increment the refCtr_ of an event e More...
 
void QF_EVT_REF_CTR_DEC_ (QEvt const *const e) noexcept
 decrement the refCtr_ of an event e More...
 

Variables

constexpr std::uint8_t TE_IS_LINKED = 1U << 7U
 
constexpr std::uint8_t TE_WAS_DISARMED = 1U << 6U
 
constexpr std::uint8_t TE_TICK_RATE = 0x0FU
 

Detailed Description

Date
Last updated on: 2022-05-13
Version
Last updated for: Version 7.0.1, 2022-05-14

Definition in file qf_pkg.hpp.


Data Structure Documentation

◆ QP::QFreeBlock

struct QP::QFreeBlock
See also
QP::QMPool

Definition at line 114 of file qf_pkg.hpp.

Data Fields
QFreeBlock *volatile m_next link to the next free block

Macro Definition Documentation

◆ QF_EVT_CONST_CAST_

#define QF_EVT_CONST_CAST_ (   e_)    const_cast<QEvt *>(e_)

Definition at line 35 of file qf_pkg.hpp.

◆ QF_CRIT_STAT_

#define QF_CRIT_STAT_
Description
The purpose of this macro is to enable writing the same code for the case when critical section status type is defined and when it is not. If the macro QF_CRIT_STAT_TYPE is defined, this internal macro provides the definition of the critical section status variable. Otherwise this macro is empty.
See also
QF_CRIT_STAT_TYPE

Definition at line 48 of file qf_pkg.hpp.

◆ QF_CRIT_E_

#define QF_CRIT_E_ ( )    QF_CRIT_ENTRY(dummy)
Description
The purpose of this macro is to enable writing the same code for the case when critical section status type is defined and when it is not. If the macro QF_CRIT_STAT_TYPE is defined, this internal macro invokes QF_CRIT_ENTRY() passing the key variable as the parameter. Otherwise QF_CRIT_ENTRY() is invoked with a dummy parameter.
See also
QF_CRIT_ENTRY()

Definition at line 58 of file qf_pkg.hpp.

◆ QF_CRIT_X_

#define QF_CRIT_X_ ( )    QF_CRIT_EXIT(dummy)
Description
The purpose of this macro is to enable writing the same code for the case when critical section status type is defined and when it is not. If the macro QF_CRIT_STAT_TYPE is defined, this internal macro invokes QF_CRIT_EXIT() passing the key variable as the parameter. Otherwise QF_CRIT_EXIT() is invoked with a dummy parameter.
See also
QF_CRIT_EXIT()

Definition at line 69 of file qf_pkg.hpp.

◆ Q_ASSERT_CRIT_

#define Q_ASSERT_CRIT_ (   id_,
  test_ 
)
Value:
do {\
if ((test_)) {} else { \
QF_CRIT_X_(); \
Q_onAssert(&Q_this_module_[0], static_cast<int_t>(id_)); \
} \
} while (false)
int int_t
alias for line numbers in assertions and return from QF::run()
Definition: qep.hpp:63

Definition at line 86 of file qf_pkg.hpp.

◆ Q_REQUIRE_CRIT_

#define Q_REQUIRE_CRIT_ (   id_,
  test_ 
)    Q_ASSERT_CRIT_((id_), (test_))

Definition at line 93 of file qf_pkg.hpp.

◆ Q_ERROR_CRIT_

#define Q_ERROR_CRIT_ (   id_)
Value:
do { \
QF_CRIT_X_(); \
Q_onAssert(&Q_this_module_[0], static_cast<int_t>(id_)); \
} while (false)

Definition at line 95 of file qf_pkg.hpp.

◆ QF_PTR_RANGE_

#define QF_PTR_RANGE_ (   x_,
  min_,
  max_ 
)    (((min_) <= (x_)) && ((x_) <= (max_)))
Description
This macro is specifically and exclusively used for checking the range of a block pointer returned to the pool. Such a check must rely on the pointer arithmetic not compliant with the [AUTOSAR Rule M5-0-18]. Defining a specific macro for this purpose allows to selectively disable the warnings for this particular case.

Definition at line 160 of file qf_pkg.hpp.