Reference Manual For QP/C++ 8.1.6
Loading...
Searching...
No Matches
qsafe.h File Reference

QP Functional Safety (FuSa) Subsystem. More...

Go to the source code of this file.

Macros

#define Q_ASSERT_INCRIT(id_, expr_)
 General-purpose assertion with user-specified ID number (in critical section).
#define Q_ERROR_INCRIT(id_)
 Assertion with user-specified ID for a wrong path through the code (in critical section).
#define Q_ASSERT_ID(id_, expr_)
 General-purpose assertion (with user-specified ID number).
#define Q_ERROR_ID(id_)
 Assertion for a wrong path through the code (with user-specified ID).
#define Q_ASSERT_LOCAL(id_, expr_)
 General-purpose assertion with user-specified ID number (local critical section).
#define Q_ASSERT(expr_)
 General-purpose assertion (with ID provided in LINE).
#define Q_ERROR()
 Assertion for a wrong path through the code (with ID provided in LINE).
#define Q_REQUIRE(expr_)
 Assertion for checking a precondition (with ID provided in LINE).
#define Q_REQUIRE_ID(id_, expr_)
 Assertion for checking a precondition (with user-specified ID number).
#define Q_REQUIRE_INCRIT(id_, expr_)
 Assertion for checking a precondition (in critical section).
#define Q_REQUIRE_LOCAL(id_, expr_)
 Assertion for checking a precondition (local critical section).
#define Q_ENSURE(expr_)
 Assertion for checking a postcondition.
#define Q_ENSURE_ID(id_, expr_)
 Assertion for checking a postcondition (with user-specified ID number).
#define Q_ENSURE_INCRIT(id_, expr_)
 Assertion for checking a postcondition (in critical section).
#define Q_ENSURE_LOCAL(id_, expr_)
 Assertion for checking a postcondition (local critical section).
#define Q_INVARIANT(expr_)
 Assertion for checking an invariant.
#define Q_INVARIANT_ID(id_, expr_)
 Assertion for checking an invariant (with user-specified ID number).
#define Q_INVARIANT_INCRIT(id_, expr_)
 Assertion for checking a postcondition (in critical section).
#define Q_INVARIANT_LOCAL(id_, expr_)
 Assertion for checking a postcondition (local critical section).
#define Q_ERROR_LOCAL(id_)
 Assertion with user-specified ID for a wrong path through the code (local critical section).

Functions

Q_NORETURN Q_onError (char const *const module, int_t const id)
 Custom error handler Callback function invoked after detecting an error (part of QP Functional Safety (FuSa) Subsystem).

Detailed Description

QP Functional Safety (FuSa) Subsystem.

Details

This header file is part of the QP Functional Safety (FuSa) Subsystem and contains the facilities for fault detection and safely transferring control to the central Custom Error Handler (see SSM_QP_ASR_123).

This header file defines elements of the Design by Contract (DbC) methodology, such as:

  • generic assertions
  • preconditions
  • postconditions
  • invariants
  • errors (incorrect flow of control)
Note
This header file can be used in C, C++, and mixed C/C++ programs.
Attention
The preprocessor switch Q_UNSAFE disables the QP Functional Safety (FuSa) Subsystem. It exists exclusively to verify that the Safety Functions are free of side effects on the normal functionality (SSRS_QP_SREQ_005), in a dedicated test build configuration, and shall not be defined in any other build configuration, including all production builds (see Q_UNSAFE, SSRS_QP_SREQ_001, and SSM_QP_ASR_120). The fault reaction shall instead be handled by the Q_onError() Custom Error Handler, which should be very carefully designed, implemented, and tested in various failure modes (see SSM_QP_ASR_127).

Backward Traceability

  • [SAS_QP_FUSA_00] Architectural view: QP/C++ Functional Safety Subsystem (fault management).
  • [SDS_QP_SST_03] Design view: QP/C++ Framework shall apply defensive programming to detect systematic faults in the QP/C++ Application.
  • [SSM_QP_ASR_123] QP/C++ Application shall implement the Custom Error Handler (Q_onError()) as the centralized and mandatory fault-reaction endpoint for all detected faults.

Definition in file qsafe.h.

Macro Definition Documentation

◆ Q_ASSERT_INCRIT

#define Q_ASSERT_INCRIT ( id_,
expr_ )
Value:
((expr_) ? (void)0 : Q_onError(&Q_this_module_[0], (id_)))
Q_NORETURN Q_onError(char const *const module, int_t const id)
Custom error handler Callback function invoked after detecting an error (part of QP Functional Safety...

General-purpose assertion with user-specified ID number (in critical section).

Details

Parameters
[in]id_ID number (unique within the module) of the assertion
[in]expr_Boolean expression to check
Attention
This macro must be called inside an already established critical section. The evaluation of the expression expr_ as well as calling of Q_onError() happens inside that critical section.
The assertion expression (expr_) must be possibly simple, have no side effects, and quick to evaluate because the evaluation happens inside a critical section. Also, the expression must NOT call any functions that might use critical sections inside (because this would cause nesting of critical sections, which might not be supported).

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [TUN_QP_qf_actq8] Unit test for qf_actq: QActive native event queue implementation based on QP::QEQueue (8-bit queue counters).
  • [TUN_QP_qf_defer] Unit test for qf_defer: event deferral for QP::QActive class.
  • [TUN_QP_qf_dyn] Unit test for qf_dyn: QF dynamic (mutable) event management.
  • [TUN_QP_qf_mem] Unit test for qf_mem: fixed-size memory pools.
  • [TUN_QP_qf_ps] Unit test for qf_ps: QActive publish-subscribe event delivery
  • [TUN_QP_qf_qact64] Unit test for qf_qact: QActive registration, priority management (64 configured AOs)
  • [TUN_QP_qf_qeq8] Unit test for qf_qeq: QEQueue native thread-safe event queue (8-bit queue counters)
  • [TUN_QP_qk] Unit test for qk: Preemptive QK kernel implementation
  • [TUN_QP_qv] Unit test for qv: Non-preemptive QV kernel implementation

Definition at line 54 of file qsafe.h.

◆ Q_ERROR_INCRIT

#define Q_ERROR_INCRIT ( id_)
Value:
(Q_onError(&Q_this_module_[0], (id_)))

Assertion with user-specified ID for a wrong path through the code (in critical section).

Details

Parameters
[in]id_ID number (unique within the module) of the assertion
Attention
This macro must be called inside a critical section.

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [STP_QP_NOTEST_CODE] Code elements verified other than by a direct test trace.

Definition at line 57 of file qsafe.h.

◆ Q_ASSERT_ID

#define Q_ASSERT_ID ( id_,
expr_ )
Value:
do { \
QF_CRIT_STAT \
QF_CRIT_ENTRY(); \
((expr_) ? (void)0 : Q_onError(&Q_this_module_[0], (id_))); \
QF_CRIT_EXIT(); \
} while (false)

General-purpose assertion (with user-specified ID number).

Details

Evaluates the Boolean expression expr_ and does nothing else when it evaluates to 'true'. However, when expr_ evaluates to 'false', the Q_ASSERT_ID() macro calls the no-return function Q_onError().

Parameters
[in]id_ID number (unique within the module) of the assertion
[in]expr_Boolean expression to check
Attention
This macro uses a critical section, and the evaluation of the expression expr_ as well as calling of Q_onError() happens inside the critical section.
The assertion expression (expr_) must be possibly simple, have no side effects, and quick to evaluate because the evaluation happens inside a critical section. Also, the expression must NOT call any functions that might use critical sections inside (because this would cause nesting of critical sections, which might not be supported).

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [TUN_QP_qutest] Infrastructure test for QUTest: self-check of the test harness.

Definition at line 60 of file qsafe.h.

◆ Q_ERROR_ID

#define Q_ERROR_ID ( id_)
Value:
do { \
QF_CRIT_EST(); \
Q_onError(&Q_this_module_[0], (id_)); \
} while (false)

Assertion for a wrong path through the code (with user-specified ID).

Details

Calls the Q_onError() callback if ever executed. This assertion takes the user-supplied parameter id_ to identify the location of this assertion within the file. This avoids the volatility of using line numbers, which change whenever a line of code is added or removed upstream from the assertion.

Parameters
[in]id_ID number (unique within the module) of the assertion

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [STP_QP_NOTEST_CODE] Code elements verified other than by a direct test trace.

Definition at line 67 of file qsafe.h.

◆ Q_ASSERT_LOCAL

#define Q_ASSERT_LOCAL ( id_,
expr_ )
Value:
do { \
if (!(expr_)) { \
QF_CRIT_EST(); \
Q_onError(&Q_this_module_[0], (id_)); \
} \
} while (false)

General-purpose assertion with user-specified ID number (local critical section).

Details

Parameters
[in]id_ID number (unique within the module) of the assertion
[in]expr_Boolean expression to check
Attention
This macro must be called without a critical section. The evaluation of the expression expr_ occurs outside the critical section. However, the critical section is established right before calling of Q_onError().
The assertion expression (expr_) must be of the "local" nature, meaning that it should consists of automatic variables only, which cannot be changed by interrupts or other concurrent threads. Also, the expression must NOT call any functions that might use critical sections inside (because this would cause nesting of critical sections, which might not be supported).

See also

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [TUN_QP_qep_hsm] Unit test for qep_hsm module: QHsm-based state machine implementation.
  • [TUN_QP_qep_msm] Unit test for qep_msm module: QMsm-based state machine implementation.

Definition at line 72 of file qsafe.h.

◆ Q_ASSERT

#define Q_ASSERT ( expr_)
Value:
Q_ASSERT_ID(__LINE__, (expr_))
#define Q_ASSERT_ID(id_, expr_)
General-purpose assertion (with user-specified ID number).
Definition qsafe.h:60

General-purpose assertion (with ID provided in LINE).

Details

Equivalent to Q_ASSERT_ID(), except it uses LINE to identify the assertion within a file.

Parameters
[in]expr_Boolean expression to check

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [STP_QP_NOTEST_CODE] Code elements verified other than by a direct test trace.

Definition at line 93 of file qsafe.h.

◆ Q_ERROR

#define Q_ERROR ( )
Value:
Q_ERROR_ID(__LINE__)
#define Q_ERROR_ID(id_)
Assertion for a wrong path through the code (with user-specified ID).
Definition qsafe.h:67

Assertion for a wrong path through the code (with ID provided in LINE).

Details

Calls the Q_onError() callback if ever executed.

Note
This macro identifies the problem location with the line number, which might change as the code is modified.

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [STP_QP_NOTEST_CODE] Code elements verified other than by a direct test trace.

Definition at line 94 of file qsafe.h.

◆ Q_REQUIRE

#define Q_REQUIRE ( expr_)
Value:
Q_ASSERT(expr_)
#define Q_ASSERT(expr_)
General-purpose assertion (with ID provided in LINE).
Definition qsafe.h:93

Assertion for checking a precondition (with ID provided in LINE).

Details

Equivalent to Q_ASSERT(), except the name provides a better documentation of the intention of this assertion.

Parameters
[in]expr_Boolean expression

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [STP_QP_NOTEST_CODE] Code elements verified other than by a direct test trace.

Definition at line 96 of file qsafe.h.

◆ Q_REQUIRE_ID

#define Q_REQUIRE_ID ( id_,
expr_ )
Value:
Q_ASSERT_ID((id_), (expr_))

Assertion for checking a precondition (with user-specified ID number).

Details

Equivalent to Q_ASSERT_ID(), except the name provides a better documentation of the intention of this assertion.

Parameters
[in]id_ID number (unique within the module) of the assertion
[in]expr_Boolean expression

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [STP_QP_NOTEST_CODE] Code elements verified other than by a direct test trace.

Definition at line 97 of file qsafe.h.

◆ Q_REQUIRE_INCRIT

#define Q_REQUIRE_INCRIT ( id_,
expr_ )
Value:
Q_ASSERT_INCRIT((id_), (expr_))
#define Q_ASSERT_INCRIT(id_, expr_)
General-purpose assertion with user-specified ID number (in critical section).
Definition qsafe.h:54

Assertion for checking a precondition (in critical section).

Details

Equivalent to Q_ASSERT_INCRIT(), except the name provides a better documentation of the intention of this assertion.

Parameters
[in]id_ID number (unique within the module) of the assertion
[in]expr_Boolean expression

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [TUN_QP_qf_act] Unit test for qf_act: QEvt creation, management, integrity checking.
  • [TUN_QP_qf_actq8] Unit test for qf_actq: QActive native event queue implementation based on QP::QEQueue (8-bit queue counters).
  • [TUN_QP_qf_dyn] Unit test for qf_dyn: QF dynamic (mutable) event management.
  • [TUN_QP_qf_mem] Unit test for qf_mem: fixed-size memory pools.
  • [TUN_QP_qf_ps] Unit test for qf_ps: QActive publish-subscribe event delivery
  • [TUN_QP_qf_qact64] Unit test for qf_qact: QActive registration, priority management (64 configured AOs)
  • [TUN_QP_qf_qeq8] Unit test for qf_qeq: QEQueue native thread-safe event queue (8-bit queue counters)
  • [TUN_QP_qf_time16] Unit test for qf_time: QTimeEvt class implementation (16-bit time-event counters)
  • [TUN_QP_qk] Unit test for qk: Preemptive QK kernel implementation
  • [TUN_QP_qv] Unit test for qv: Non-preemptive QV kernel implementation

Definition at line 98 of file qsafe.h.

◆ Q_REQUIRE_LOCAL

#define Q_REQUIRE_LOCAL ( id_,
expr_ )
Value:
Q_ASSERT_LOCAL((id_), (expr_))
#define Q_ASSERT_LOCAL(id_, expr_)
General-purpose assertion with user-specified ID number (local critical section).
Definition qsafe.h:72

Assertion for checking a precondition (local critical section).

Details

Equivalent to Q_ASSERT_LOCAL(), except the name provides a better documentation of the intention of this assertion.

Parameters
[in]id_ID number (unique within the module) of the assertion
[in]expr_Boolean expression

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [TUN_QP_qep_hsm] Unit test for qep_hsm module: QHsm-based state machine implementation.
  • [TUN_QP_qep_msm] Unit test for qep_msm module: QMsm-based state machine implementation.

Definition at line 99 of file qsafe.h.

◆ Q_ENSURE

#define Q_ENSURE ( expr_)
Value:
Q_ASSERT(expr_)

Assertion for checking a postcondition.

Details

Equivalent to Q_ASSERT(), except the name provides a better documentation of the intention of this assertion.

Parameters
[in]expr_Boolean expression

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [STP_QP_NOTEST_CODE] Code elements verified other than by a direct test trace.

Definition at line 101 of file qsafe.h.

◆ Q_ENSURE_ID

#define Q_ENSURE_ID ( id_,
expr_ )
Value:
Q_ASSERT_ID((id_), (expr_))

Assertion for checking a postcondition (with user-specified ID number).

Details

Equivalent to Q_ASSERT_ID(), except the name provides a better documentation of the intention of this assertion.

Parameters
[in]id_ID number (unique within the module) of the assertion
[in]expr_Boolean expression

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [STP_QP_NOTEST_CODE] Code elements verified other than by a direct test trace.

Definition at line 102 of file qsafe.h.

◆ Q_ENSURE_INCRIT

#define Q_ENSURE_INCRIT ( id_,
expr_ )
Value:
Q_ASSERT_INCRIT((id_), (expr_))

Assertion for checking a postcondition (in critical section).

Details

Equivalent to Q_ASSERT_INCRIT(), except the name provides a better documentation of the intention of this assertion.

Parameters
[in]id_ID number (unique within the module) of the assertion
[in]expr_Boolean expression

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [STP_QP_NOTEST_CODE] Code elements verified other than by a direct test trace.

Definition at line 103 of file qsafe.h.

◆ Q_ENSURE_LOCAL

#define Q_ENSURE_LOCAL ( id_,
expr_ )
Value:
Q_ASSERT_LOCAL((id_), (expr_))

Assertion for checking a postcondition (local critical section).

Details

Equivalent to Q_ASSERT_LOCAL(), except the name provides a better documentation of the intention of this assertion.

Parameters
[in]id_ID number (unique within the module) of the assertion
[in]expr_Boolean expression

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [TUN_QP_qep_hsm] Unit test for qep_hsm module: QHsm-based state machine implementation.
  • [TUN_QP_qep_msm] Unit test for qep_msm module: QMsm-based state machine implementation.

Definition at line 104 of file qsafe.h.

◆ Q_INVARIANT

#define Q_INVARIANT ( expr_)
Value:
Q_ASSERT(expr_)

Assertion for checking an invariant.

Details

Equivalent to Q_ASSERT(), except the name provides a better documentation of the intention of this assertion.

Parameters
[in]expr_Boolean expression

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [STP_QP_NOTEST_CODE] Code elements verified other than by a direct test trace.

Definition at line 106 of file qsafe.h.

◆ Q_INVARIANT_ID

#define Q_INVARIANT_ID ( id_,
expr_ )
Value:
Q_ASSERT_ID((id_), (expr_))

Assertion for checking an invariant (with user-specified ID number).

Details

Equivalent to Q_ASSERT_ID(), except the name provides a better documentation of the intention of this assertion.

Parameters
[in]id_ID number (unique within the module) of the assertion
[in]expr_Boolean expression

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [STP_QP_NOTEST_CODE] Code elements verified other than by a direct test trace.

Definition at line 107 of file qsafe.h.

◆ Q_INVARIANT_INCRIT

#define Q_INVARIANT_INCRIT ( id_,
expr_ )
Value:
Q_ASSERT_INCRIT((id_), (expr_))

Assertion for checking a postcondition (in critical section).

Details

Equivalent to Q_ASSERT_INCRIT(), except the name provides a better documentation of the intention of this assertion.

Parameters
[in]id_ID number (unique within the module) of the assertion
[in]expr_Boolean expression

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [TUN_QP_qf_actq8] Unit test for qf_actq: QActive native event queue implementation based on QP::QEQueue (8-bit queue counters).
  • [TUN_QP_qf_dyn] Unit test for qf_dyn: QF dynamic (mutable) event management.
  • [TUN_QP_qf_mem] Unit test for qf_mem: fixed-size memory pools.
  • [TUN_QP_qf_ps] Unit test for qf_ps: QActive publish-subscribe event delivery
  • [TUN_QP_qf_qact64] Unit test for qf_qact: QActive registration, priority management (64 configured AOs)
  • [TUN_QP_qf_qeq8] Unit test for qf_qeq: QEQueue native thread-safe event queue (8-bit queue counters)
  • [TUN_QP_qf_time16] Unit test for qf_time: QTimeEvt class implementation (16-bit time-event counters)
  • [TUN_QP_qk] Unit test for qk: Preemptive QK kernel implementation
  • [TUN_QP_qv] Unit test for qv: Non-preemptive QV kernel implementation

Definition at line 108 of file qsafe.h.

◆ Q_INVARIANT_LOCAL

#define Q_INVARIANT_LOCAL ( id_,
expr_ )
Value:
Q_ASSERT_LOCAL((id_), (expr_))

Assertion for checking a postcondition (local critical section).

Details

Equivalent to Q_ASSERT_LOCAL(), except the name provides a better documentation of the intention of this assertion.

Parameters
[in]id_ID number (unique within the module) of the assertion
[in]expr_Boolean expression

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [TUN_QP_qep_hsm] Unit test for qep_hsm module: QHsm-based state machine implementation.
  • [TUN_QP_qep_msm] Unit test for qep_msm module: QMsm-based state machine implementation.

Definition at line 109 of file qsafe.h.

◆ Q_ERROR_LOCAL

#define Q_ERROR_LOCAL ( id_)
Value:

Assertion with user-specified ID for a wrong path through the code (local critical section).

Details

Parameters
[in]id_ID number (unique within the module) of the assertion
Attention
This macro must be called outside a critical section. The macro establishes critical section right before calling Q_onError().

See also

Forward Traceability

  • [MISRA_QP_DVR_MP2_R19_0_2] MISRA-C++:2023 Rule 19.0.2(Required): Function-like macros shall not be defined
  • [TUN_QP_qep_hsm] Unit test for qep_hsm module: QHsm-based state machine implementation.
  • [TUN_QP_qep_msm] Unit test for qep_msm module: QMsm-based state machine implementation.

Definition at line 111 of file qsafe.h.

Function Documentation

◆ Q_onError()

Q_NORETURN Q_onError ( char const *const module,
int_t const id )

Custom error handler Callback function invoked after detecting an error (part of QP Functional Safety (FuSa) Subsystem).

Details

This callback function needs to be defined in the application to perform any corrective action after an unrecoverable error has been detected. The Q_onError() function is the last line of defense after the system failure, and its implementation should be very carefully designed and tested under various fault conditions, including but not limited to: stack overflow/corruption, calling Q_onError() from an ISR or other hardware exception, etc.

Attention
The Q_onError() Custom Error Handler is the central error management element of the QP Functional Safety (FuSa) Subsystem. The error handler must establish the Safe State of the system and should not return.
Parameters
[in]modulename of the file/module in which the assertion failed (constant, zero-terminated C string)
[in]idID of the assertion within the module. This could be a line number or a user-specified ID-number.
Return values
no-returnThis callback function should not return (see Q_NORETURN), as continuation after an unrecoverable error makes no sense.
Attention
Q_onError() must be called within a critical section (typically with interrupts disabled).
Note
During debugging, Q_onError() is an ideal place to put a breakpoint. For deployment, it is NOT RECOMMENDED to implement Q_onError() as an endless loop that ties up the CPU (denial of service).

Backward Traceability

  • [SSRS_QP_SREQ_003] QP/C++ fault management shall be based on the Crash-Only model.
  • [SAS_QP_FUSA_00] Architectural view: QP/C++ Functional Safety Subsystem (fault management).
  • [SSM_QP_ASR_123] QP/C++ Application shall implement the Custom Error Handler (Q_onError()) as the centralized and mandatory fault-reaction endpoint for all detected faults.
  • [SSM_QP_ASR_124] QP/C++ Application shall ensure that the Custom Error Handler (Q_onError()) does not return.
  • [SSM_QP_ASR_127] QP/C++ Application shall extensively test the Custom Error Handler (Q_onError()) under several fault conditions.
  • [SDS_QP_CB_ERR] Design view: Custom Error Handler callback.

Forward Traceability

  • [TUN_QP_qutest] Infrastructure test for QUTest: self-check of the test harness.
  • [TUN_QP_qep_hsm] Unit test for qep_hsm module: QHsm-based state machine implementation.
  • [TUN_QP_qep_msm] Unit test for qep_msm module: QMsm-based state machine implementation.
  • [TUN_QP_qf_act] Unit test for qf_act: QEvt creation, management, integrity checking.
  • [TUN_QP_qf_actq8] Unit test for qf_actq: QActive native event queue implementation based on QP::QEQueue (8-bit queue counters).
  • [TUN_QP_qf_defer] Unit test for qf_defer: event deferral for QP::QActive class.
  • [TUN_QP_qf_dyn] Unit test for qf_dyn: QF dynamic (mutable) event management.
  • [TUN_QP_qf_mem] Unit test for qf_mem: fixed-size memory pools.
  • [TUN_QP_qf_ps] Unit test for qf_ps: QActive publish-subscribe event delivery
  • [TUN_QP_qf_qact64] Unit test for qf_qact: QActive registration, priority management (64 configured AOs)
  • [TUN_QP_qf_qeq8] Unit test for qf_qeq: QEQueue native thread-safe event queue (8-bit queue counters)
  • [TUN_QP_qf_qmact] Unit test for qf_qmact: QMActive class implementation
  • [TUN_QP_qf_time16] Unit test for qf_time: QTimeEvt class implementation (16-bit time-event counters)
  • [TUN_QP_qk] Unit test for qk: Preemptive QK kernel implementation
  • [TUN_QP_qv] Unit test for qv: Non-preemptive QV kernel implementation