Method / Process / Runnable Implementations
In ASCET, it is possible to have implementations not only for elements and components, but also for the methods, processes and runnables defined in modules, classes and software components. With that, you can improve the overall behavior of your system.
The implementation of methods, processes and runnables is edited from the specification editor. It cannot be edited from the project editor directly. Method/process/runnable implementations are available for block diagram, ESDL and C code components, state machines, conditional tables and AUTOSAR software components.
The implementation of a method, process or runnable determines how the method/process/runnable is represented in the C code generated and where it is located during execution of the program. Method/process/runnable implementations are edited in a special implementation editor.
The following rules apply for the Inlining implementation setting:
- The Inlining setting is only available for methods and processes, not for runnables.
The following values are available for the Inlining setting: Automatic, None, Preprocessor Evaluation, Component
See Implementation Editor for Methods/Processes/Runnables for more information on these values.
If a process is assigned to a task, no inlining is allowed. You must select None or Automatic for Inline.
If you select Compiler or Preprocessor Evaluation, an error is issued:
selection
error No
error message
Compiler
MMdl356
process <process_name> is used in task <task_name> and can there not be inlined
Preprocessor
EvaluationMMdl97
method "<methodName>" declared with preprocessor inlining, but
<reason>Preprocessor Evaluation can be used only by methods that are marked as side-effect-free and that belong to a class specified as prototype implementation (see the ASCET‑SE user guide).
For all other methods and processes, an error (MMdl97) is issued during code generation:
method "<methodName>" declared with preprocessor inlining, but
<reason>- If a method is marked with Preprocessor Evaluation, and all arguments can be evaluated by the preprocessor, a method call will be treated as a macro call that can be used in #if conditions.
See also
Editing a Process/Method Implementation
Editing the Implementation of a Runnable