Generates code for actions (logical or physical) for the C and CCpp target.
More...
|
| static String | generateAuxiliaryStruct (TypeParameterizedReactor tpr, Action action, Target target, CTypes types, CodeBuilder federatedExtension, boolean userFacing) |
| | Generate the struct type definitions for the action of the reactor.
|
| static void | generateDeclarations (TypeParameterizedReactor tpr, CodeBuilder body, CodeBuilder constructorCode) |
| | Generate the declarations of actions in the self struct.
|
| static String | generateInitializers (ReactorInstance instance) |
| | For each action of the specified reactor instance, generate initialization code for the offset and period fields.
|
| static String | generateTokenInitializer (String selfStruct, String actionName, String payloadSize) |
| | Create a template token initialized to the payload size.
|
Generates code for actions (logical or physical) for the C and CCpp target.
- Author
- Edward A. Lee
-
Marten Lohstroh
-
Mehrdad Niknami
-
Christian Menard
-
Matt Weber
-
{Soroush Bateni
-
Alexander Schulz-Rosengarten
-
Hou Seng Wong
◆ generateAuxiliaryStruct()
Generate the struct type definitions for the action of the reactor.
- Parameters
-
| tpr | The type-parameterized reactor. |
| action | The action to generate the struct for |
| target | The target of the code generation (C, CCpp or Python) |
| types | The helper object for types related stuff |
| federatedExtension | The code needed to support federated execution |
| userFacing | Whether this is user-facing code. |
- Returns
- The auxiliary struct for the port as a string
◆ generateDeclarations()
Generate the declarations of actions in the self struct.
- Parameters
-
| tpr | The type-parameterized reactor. |
| body | The content of the self struct |
| constructorCode | The constructor code of the reactor |
◆ generateInitializers()
| String org.lflang.generator.c.CActionGenerator.generateInitializers |
( |
ReactorInstance | instance | ) |
|
|
static |
For each action of the specified reactor instance, generate initialization code for the offset and period fields.
- Parameters
-
◆ generateTokenInitializer()
| String org.lflang.generator.c.CActionGenerator.generateTokenInitializer |
( |
String | selfStruct, |
|
|
String | actionName, |
|
|
String | payloadSize ) |
|
static |
Create a template token initialized to the payload size.
This token is marked to not be freed so that the trigger_t struct always has a template token. At the start of each time step, we need to initialize the is_present field of each action's trigger object to false and free a previously allocated token if appropriate. This code sets up the table that does that.
- Parameters
-
| selfStruct | The variable name of the self struct |
| actionName | The action name |
| payloadSize | The code that returns the size of the action's payload in C. |
The documentation for this class was generated from the following file:
- /Users/runner/work/lingua-franca/lingua-franca/core/src/main/java/org/lflang/generator/c/CActionGenerator.java