![]() |
lingua-franca 0.10.1
Lingua Franca code generator
|
Interface for generating code for the body of reactions that handle connections with logical delays specified with the after keyword. More...
Inherited by org.lflang.generator.c.CDelayBodyGenerator.
Public Member Functions | |
| default void | finalizeReactions (Reaction delayReaction, Reaction forwardReaction) |
| Used to optionally apply additional transformations to the generated reactions. | |
| boolean | generateAfterDelaysWithVariableWidth () |
| Indicates whether delay banks generated from after delays should have a variable length width. | |
| String | generateDelayBody (Action action, VarRef port) |
| Generate code for the body of a reaction that takes an input and schedules an action with the value of that input. | |
| String | generateDelayGeneric () |
| Generate code for the generic type to be used in the class definition of a generated delay reactor. | |
| String | generateForwardBody (Action action, VarRef port) |
| Generate code for the body of a reaction that is triggered by the given action and writes its value to the given port. | |
Public Attributes | |
| String | GEN_DELAY_CLASS_NAME = "_lf_GenDelay" |
| Constant that specifies how to name generated delay reactors. | |
Interface for generating code for the body of reactions that handle connections with logical delays specified with the after keyword.
| default void org.lflang.generator.DelayBodyGenerator.finalizeReactions | ( | Reaction | delayReaction, |
| Reaction | forwardReaction ) |
Used to optionally apply additional transformations to the generated reactions.
Implemented in org.lflang.generator.python.PythonDelayBodyGenerator.
| boolean org.lflang.generator.DelayBodyGenerator.generateAfterDelaysWithVariableWidth | ( | ) |
Indicates whether delay banks generated from after delays should have a variable length width.
If this is true, any delay reactors that are inserted for after delays on multiport connections will have an unspecified variable length width. The code generator is then responsible for inferring the correct width of the delay bank, which is only possible if the precise connection width is known at compile time.
If this is false, the width specification of the generated bank will list all the ports listed on the right side of the connection. This gives the code generator the information needed to infer the correct width at runtime.
Implemented in org.lflang.generator.c.CDelayBodyGenerator.
| String org.lflang.generator.DelayBodyGenerator.generateDelayBody | ( | Action | action, |
| VarRef | port ) |
Generate code for the body of a reaction that takes an input and schedules an action with the value of that input.
| action | the action to schedule |
| port | the port to read from |
Implemented in org.lflang.generator.c.CDelayBodyGenerator, and org.lflang.generator.python.PythonDelayBodyGenerator.
| String org.lflang.generator.DelayBodyGenerator.generateDelayGeneric | ( | ) |
Generate code for the generic type to be used in the class definition of a generated delay reactor.
Implemented in org.lflang.generator.c.CDelayBodyGenerator.
| String org.lflang.generator.DelayBodyGenerator.generateForwardBody | ( | Action | action, |
| VarRef | port ) |
Generate code for the body of a reaction that is triggered by the given action and writes its value to the given port.
| action | the action that triggers the reaction |
| port | the port to write to |
Implemented in org.lflang.generator.c.CDelayBodyGenerator, and org.lflang.generator.python.PythonDelayBodyGenerator.
| String org.lflang.generator.DelayBodyGenerator.GEN_DELAY_CLASS_NAME = "_lf_GenDelay" |
Constant that specifies how to name generated delay reactors.