![]() |
lingua-franca 0.10.1
Lingua Franca code generator
|
Generate Python code for reactions. More...
Static Public Member Functions | |
| static String | generateCPythonDeadlineCaller (TypeParameterizedReactor r, int reactionIndex, List< String > pyObjects) |
| Generate code to call deadline function numbered "reactionIndex" in reactor "r". | |
| static String | generateCPythonDeadlineFunctionName (int reactionIndex) |
| Return the function name of the deadline function inside the self struct in the .c file. | |
| static String | generateCPythonReactionCaller (TypeParameterizedReactor reactor, int reactionIndex, List< String > pyObjects, String inits) |
| Generate code to call reaction numbered "reactionIndex" in reactor "reactor". | |
| static String | generateCPythonReactionFunctionName (int reactionIndex) |
| Return the function name of the reaction inside the self struct in the .c file. | |
| static String | generateCPythonReactionLinker (ReactorInstance instance, ReactionInstance reaction, String nameOfSelfStruct) |
| Generate Python code to link cpython functions to python functions for a reaction. | |
| static String | generateCPythonReactionLinkers (ReactorInstance instance, Instantiation mainDef) |
| Generate Python code to link cpython functions to python functions for each reaction. | |
| static String | generateCPythonSTPCaller (TypeParameterizedReactor r, int reactionIndex, List< String > pyObjects) |
| Generate code to call deadline function numbered "reactionIndex" in reactor "r". | |
| static String | generateCPythonSTPFunctionName (int reactionIndex) |
| Return the function name of the STP violation handler function inside the self struct in the .c file. | |
| static String | generateCReaction (Reaction reaction, TypeParameterizedReactor tpr, Reactor r, int reactionIndex, Instantiation mainDef, MessageReporter messageReporter, CTypes types) |
| Generate the reaction in the .c file, which calls the Python reaction through the CPython interface. | |
| static String | generateFunction (String header, String init, Code code, String pyCaller) |
| static String | generatePythonDeadlineFunctionName (int reactionIndex) |
| Return the function name of the deadline function in the .py file. | |
| static String | generatePythonFunction (String pythonFunctionName, String inits, String reactionBody, List< String > reactionParameters) |
| Generate the function that is executed whenever the deadline of the reaction with the given reaction index is missed. | |
| static String | generatePythonReaction (Reactor reactor, Reaction reaction, int reactionIndex) |
| Generate the Python code for reaction in reactor. | |
| static String | generatePythonReactionFunctionName (int reactionIndex) |
| Return the function name of the reaction in the .py file. | |
| static void | generatePythonReactionParametersAndInitializations (List< String > parameters, CodeBuilder inits, ReactorDecl decl, Reaction reaction) |
| Generate parameters and their respective initialization code for a reaction function The initialization code is put at the beginning of the reaction before user code. | |
| static String | generatePythonReactions (Reactor reactor, List< Reaction > reactions) |
| Generate the Python code for reactions in reactor. | |
| static String | generatePythonSTPFunctionName (int reactionIndex) |
| Return the function name of the STP violation handler function in the .py file. | |
Generate Python code for reactions.
|
static |
Generate code to call deadline function numbered "reactionIndex" in reactor "r".
| r | The reactor containing the reaction |
| reactionIndex | The index of the reaction |
| pyObjects | CPython related objects |
|
static |
Return the function name of the deadline function inside the self struct in the .c file.
| reactionIndex | The reaction index. |
|
static |
Generate code to call reaction numbered "reactionIndex" in reactor "reactor".
| reactor | The reactor containing the reaction |
| reactionIndex | The index of the reaction |
| pyObjects | CPython related objects |
| inits | Initialization code. |
|
static |
Return the function name of the reaction inside the self struct in the .c file.
| reactionIndex | The reaction index. |
|
static |
Generate Python code to link cpython functions to python functions for a reaction.
| instance | The reactor instance. |
| reaction | The reaction of this instance to link. |
| nameOfSelfStruct | The name of the self struct in cpython. |
|
static |
Generate Python code to link cpython functions to python functions for each reaction.
| instance | The reactor instance. |
| mainDef | The definition of the main reactor |
|
static |
Generate code to call deadline function numbered "reactionIndex" in reactor "r".
| r | The reactor containing the reaction |
| reactionIndex | The index of the reaction |
| pyObjects | CPython related objects |
|
static |
Return the function name of the STP violation handler function inside the self struct in the .c file.
| reactionIndex | The reaction index. |
|
static |
Generate the reaction in the .c file, which calls the Python reaction through the CPython interface.
| reaction | The reaction to generate Python-specific initialization for. |
| tpr | The type-parameterized reactor. |
| r | The reactor to which reaction belongs to. |
| reactionIndex | The index number of the reaction in decl. |
| mainDef | The main reactor. |
| messageReporter | An error reporter. |
| types | A helper class for type-related stuff. |
|
static |
|
static |
Return the function name of the deadline function in the .py file.
| reactionIndex | The reaction index. |
|
static |
Generate the function that is executed whenever the deadline of the reaction with the given reaction index is missed.
| pythonFunctionName | The name of the Python function. |
| inits | Initialization code. |
| reactionBody | The body of the reaction. |
| reactionParameters | The parameters to the deadline violation function, which are the same as the reaction function |
|
static |
Generate the Python code for reaction in reactor.
| reactor | The reactor |
| reaction | The reaction of reactor |
| reactionIndex | The index of the reaction. |
|
static |
Return the function name of the reaction in the .py file.
| reactionIndex | The reaction index. |
|
static |
Generate parameters and their respective initialization code for a reaction function The initialization code is put at the beginning of the reaction before user code.
| parameters | The parameters used for function definition |
| inits | The initialization code for those paramters |
| decl | Reactor declaration |
| reaction | The reaction to be used to generate parameters for |
|
static |
Generate the Python code for reactions in reactor.
| reactor | The reactor |
| reactions | The reactions of reactor |
|
static |
Return the function name of the STP violation handler function in the .py file.
| reactionIndex | The reaction index. |