Reference Manual For QP/C++ 8.1.5
Loading...
Searching...
No Matches
cmd_options.hpp File Reference

This file documents preprocessor macros that are usually defined on the command-line to the compiler . More...

Go to the source code of this file.

Macros

#define Q_UNSAFE
 Disable the QP Functional Safety (FuSa) Subsystem.
#define Q_SPY
 The preprocessor switch to activate the QS software tracing instrumentation in QP/C++ Framework and QP/C++ Application code.
#define Q_UTEST
 The preprocessor switch to activate the QUTest testing instrumentation in QP/C++ Framework and QP/C++ Application code.

Detailed Description

This file documents preprocessor macros that are usually defined on the command-line to the compiler .

Definition in file cmd_options.hpp.

Macro Definition Documentation

◆ Q_UNSAFE

#define Q_UNSAFE

Disable the QP Functional Safety (FuSa) Subsystem.

Details

Defining the macro Q_UNSAFE (in the application-specific qp_config.h header file) disables most of the QP FuSa Subsystem, affecting the following facilities:

The intent of the Q_UNSAFE macro is to support verification (during development) that assertions (and more generally, Safety Functions) have no side effects on the primary functionality are and are truly independent from the nominal flow of control.

However, quite specifically, the Q_UNSAFE macro should not be used to permanently disable the QP/C++ FuSa Subsystem in the final, production release of the QP/C++ Application, especially in the context of a safety-related system.

Attention
Disabling QP FuSa Subsystem (by defining the macro Q_UNSAFE) in the final production release, contradicts the most fundamental principles of functional safety and is not allowed in safety-related applications.

Definition at line 35 of file cmd_options.hpp.

◆ Q_SPY

#define Q_SPY

The preprocessor switch to activate the QS software tracing instrumentation in QP/C++ Framework and QP/C++ Application code.

Details

When defined, Q_SPY activates the QS software tracing instrumentation. When Q_SPY is not defined, the QS instrumentation in the code does not generate any code.

Note
The Q_SPY is typically defined only in the Spy build configuration and is not defined in other build configurations.

Definition at line 46 of file cmd_options.hpp.

◆ Q_UTEST

#define Q_UTEST

The preprocessor switch to activate the QUTest testing instrumentation in QP/C++ Framework and QP/C++ Application code.

Details

When defined, Q_UTEST activates the QUTest testing instrumentation, which also requires QS software tracing (see Q_SPY).

Also, the Q_UTEST macro can have a value that decides whether the QP/C++ Framework "stub" is included or not. The following values are supported:

#define Q_UTEST // the @QPX Framework testing "stub" is included
#define Q_UTEST 0 // the @QPX Framework testing "stub" is NOT included
Note
The Q_UTEST is typically defined only in the test fixtures.

Definition at line 64 of file cmd_options.hpp.