Package org.intocps.maestro.plugin
Interface IMaestroExpansionPlugin
- All Superinterfaces:
IMaestroPlugin
- All Known Implementing Classes:
BasicMaestroExpansionPlugin
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic classAn empty implementation of theIMaestroExpansionPlugin.RuntimeConfigAdditionstatic class -
Field Summary
Fields inherited from interface org.intocps.maestro.plugin.IMaestroPlugin
FMI_STATUS_VARIABLE_NAME, GLOBAL_EXECUTION_CONTINUE -
Method Summary
Modifier and TypeMethodDescriptionList<org.intocps.maestro.ast.node.PStm> expand(AFunctionDeclaration declaredFunction, List<org.intocps.maestro.ast.node.PExp> formalArguments, IPluginConfiguration config, ISimulationEnvironment env, IErrorReporter errorReporter) Expansion method of this plugin.<R> Map.Entry<List<org.intocps.maestro.ast.node.PStm>, IMaestroExpansionPlugin.RuntimeConfigAddition<R>> expandWithRuntimeAddition(AFunctionDeclaration declaredFunction, List<org.intocps.maestro.ast.node.PExp> formalArguments, IPluginConfiguration config, ISimulationEnvironment env, IErrorReporter errorReporter) Expansion method of this plugin.expandWithRuntimeAddition(AFunctionDeclaration declaredFunction, FmiBuilder<org.intocps.maestro.ast.node.PStm, org.intocps.maestro.ast.node.ASimulationSpecificationCompilationUnit, org.intocps.maestro.ast.node.PExp, ?> builder, List<FmiBuilder.Variable<org.intocps.maestro.ast.node.PStm, ?>> formalArguments, IPluginConfiguration config, ISimulationEnvironment env, IErrorReporter errorReporter) Expansion method of this plugin.Get the configuration requirement for this expansion pluginorg.intocps.maestro.ast.node.AImportedModuleCompilationUnitThe import unit that is needed when this plugin is usedbooleanMethods inherited from interface org.intocps.maestro.plugin.IMaestroPlugin
getName, getVersion
-
Method Details
-
expand
List<org.intocps.maestro.ast.node.PStm> expand(AFunctionDeclaration declaredFunction, List<org.intocps.maestro.ast.node.PExp> formalArguments, IPluginConfiguration config, ISimulationEnvironment env, IErrorReporter errorReporter) throws ExpandException Expansion method of this plugin. It should generate a list of statements based on the provided arguments and potentially also the config given.- Parameters:
declaredFunction- the function within the plugin that is selected to be expandedformalArguments- the formal arguements given to the expansion. these will match the function signatures formalsconfig- the configuration of null is not requiredenv- the runtime environmenterrorReporter- the error reported that must be used for reporting any errors or warnings- Returns:
- a list of statements produced as the result of expansion
- Throws:
ExpandException- if generation fails
-
expandWithRuntimeAddition
<R> Map.Entry<List<org.intocps.maestro.ast.node.PStm>,IMaestroExpansionPlugin.RuntimeConfigAddition<R>> expandWithRuntimeAddition(AFunctionDeclaration declaredFunction, List<org.intocps.maestro.ast.node.PExp> formalArguments, IPluginConfiguration config, ISimulationEnvironment env, IErrorReporter errorReporter) throws ExpandException Expansion method of this plugin. It should generate a list of statements based on the provided arguments and potentially also the config given.- Parameters:
declaredFunction- the function within the plugin that is selected to be expandedformalArguments- the formal arguements given to the expansion. these will match the function signatures formalsconfig- the configuration of null is not requiredenv- the runtime environmenterrorReporter- the error reported that must be used for reporting any errors or warnings- Returns:
- a list of statements produced as the result of expansion and the runtime addition
- Throws:
ExpandException- if generation fails
-
expandWithRuntimeAddition
<R> IMaestroExpansionPlugin.RuntimeConfigAddition<R> expandWithRuntimeAddition(AFunctionDeclaration declaredFunction, FmiBuilder<org.intocps.maestro.ast.node.PStm, org.intocps.maestro.ast.node.ASimulationSpecificationCompilationUnit, throws ExpandExceptionorg.intocps.maestro.ast.node.PExp, ?> builder, List<FmiBuilder.Variable<org.intocps.maestro.ast.node.PStm, ?>> formalArguments, IPluginConfiguration config, ISimulationEnvironment env, IErrorReporter errorReporter) Expansion method of this plugin. It should generate a list of statements based on the provided arguments and potentially also the config given.- Parameters:
declaredFunction- the function within the plugin that is selected to be expandedformalArguments- the formal arguements given to the expansion. these will match the function signatures formalsconfig- the configuration of null is not requiredenv- the runtime environmenterrorReporter- the error reported that must be used for reporting any errors or warnings- Returns:
- a list of statements produced as the result of expansion and the runtime addition
- Throws:
ExpandException- if generation fails
-
getConfigRequirement
IMaestroExpansionPlugin.ConfigOption getConfigRequirement()Get the configuration requirement for this expansion plugin- Returns:
- the requirement
-
requireConfig
boolean requireConfig() -
parseConfig
- Throws:
IOException
-
getDeclaredImportUnit
org.intocps.maestro.ast.node.AImportedModuleCompilationUnit getDeclaredImportUnit()The import unit that is needed when this plugin is used- Returns:
- the unit
-