Preprocessor directives for specification files
The preprocessor directives section of the specification file includes the element symbol check, include files, and event symbols.
Element symbol check
The #ifndef
and #endif
preprocessor directives
check whether a symbol is defined for the element being specified. If the symbol is not already
defined for the element, Rhapsody® defines
one. For example, a Display_H
symbol is defined for the Display
package.
A matching #endif
is generated at the end of the specification
file.
Include files
The file lists the necessary include files for the project, including the
appropriate framework (oxf
) header file for the language. For example, for the Ada
language, the following header file is included:
#include <oxf/Ric.h>
This file is located in the Share\C\oxf
directory for Ada
framework files. The Ric.h
file defines certain tracer and animation symbols and
includes the remaining C framework files, which provide predefined behaviors for real‑time
constructs such as events, event and message queues, tasks, and timers.
To specify additional include directives for header files, use the
C_CG::Class::SpecIncludes
property.
For example, if the element has dependencies to reference packages or other modules that are not part of the Rhapsody design, add the necessary include files to this property.
Event symbols
If the element being specified is a package, it defines symbols for the events in the package.
The event symbol name has the following format:
<event>_<package>_id <ID number>
Each event has an ID number, starting with one. Event ID numbers increment based on the order in which events were added to the model during design time. They have nothing to do with the order in which events are displayed in the browser.
For example, if the Foobar
package contained an
evStart
event, the following event symbol would be defined:
#define evStart_Foobar_id 1