![]() |
lingua-franca 0.10.1
Lingua Franca code generator
|
Generate C code for watchdogs. More...
Static Public Member Functions | |
| static boolean | hasWatchdogs (Reactor reactor) |
| Return true if the given reactor has one or more watchdogs. | |
Static Protected Member Functions | |
| static void | generateInitializeWatchdogs (CodeBuilder code, ReactorInstance instance) |
| For the specified reactor instance, generate initialization code for each watchdog in the reactor. | |
| static void | generateWatchdogs (CodeBuilder src, CodeBuilder header, TypeParameterizedReactor tpr, boolean suppressLineDirectives, MessageReporter messageReporter) |
| Generate watchdog functions definition for a reactor. | |
| static void | generateWatchdogStruct (CodeBuilder body, TypeParameterizedReactor tpr, CodeBuilder constructorCode) |
| Generate watchdog definitions in the reactor's self struct. | |
Generate C code for watchdogs.
This class contains a collection of static methods supporting code generation in C for watchdogs. These methods are protected because they are intended to be used only within the same package.
|
staticprotected |
For the specified reactor instance, generate initialization code for each watchdog in the reactor.
This code initializes the watchdog-related fields on the self struct of the reactor instance. It also increments the watchdog count in the environment the parent reactor instance is within.
| code | The place to put the code |
| instance | The reactor instance |
|
staticprotected |
Generate watchdog functions definition for a reactor.
These functions have a single argument that is a void* pointing to the self struct of the reactor, which contains parameters, state variables, inputs (triggering or not), actions (triggering or produced), and outputs.
| src | The place to put the code |
| header | The place to put header code |
| tpr | The reactor declaration |
| suppressLineDirectives | Whether to suppress the generation of line directives. |
| messageReporter | Used to report errors and warnings. |
|
staticprotected |
Generate watchdog definitions in the reactor's self struct.
| body | The place to put the definitions |
| tpr | The concrete reactor class |
| constructorCode | The place to put initialization code. |
|
static |
Return true if the given reactor has one or more watchdogs.
| reactor | The reactor. |