Package org.intocps.maestro.plugin
Interface IMaestroExpansionPlugin
-
- All Superinterfaces:
IMaestroPlugin
- All Known Implementing Classes:
BasicMaestroExpansionPlugin
public interface IMaestroExpansionPlugin extends IMaestroPlugin
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIMaestroExpansionPlugin.ConfigOptionstatic classIMaestroExpansionPlugin.EmptyRuntimeConfig<R>An empty implementation of theIMaestroExpansionPlugin.RuntimeConfigAdditionstatic classIMaestroExpansionPlugin.RuntimeConfigAddition<T>
-
Field Summary
-
Fields inherited from interface org.intocps.maestro.plugin.IMaestroPlugin
FMI_STATUS_VARIABLE_NAME, GLOBAL_EXECUTION_CONTINUE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<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.<R> IMaestroExpansionPlugin.RuntimeConfigAddition<R>expandWithRuntimeAddition(AFunctionDeclaration declaredFunction, Fmi2Builder<org.intocps.maestro.ast.node.PStm,org.intocps.maestro.ast.node.ASimulationSpecificationCompilationUnit,org.intocps.maestro.ast.node.PExp,?> builder, List<Fmi2Builder.Variable<org.intocps.maestro.ast.node.PStm,?>> formalArguments, IPluginConfiguration config, ISimulationEnvironment env, IErrorReporter errorReporter)Expansion method of this plugin.IMaestroExpansionPlugin.ConfigOptiongetConfigRequirement()Get the configuration requirement for this expansion pluginorg.intocps.maestro.ast.node.AImportedModuleCompilationUnitgetDeclaredImportUnit()The import unit that is needed when this plugin is usedIPluginConfigurationparseConfig(InputStream is)booleanrequireConfig()-
Methods inherited from interface org.intocps.maestro.plugin.IMaestroPlugin
getName, getVersion
-
-
-
-
Method Detail
-
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, Fmi2Builder<org.intocps.maestro.ast.node.PStm,org.intocps.maestro.ast.node.ASimulationSpecificationCompilationUnit,org.intocps.maestro.ast.node.PExp,?> builder, List<Fmi2Builder.Variable<org.intocps.maestro.ast.node.PStm,?>> 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
-
getConfigRequirement
IMaestroExpansionPlugin.ConfigOption getConfigRequirement()
Get the configuration requirement for this expansion plugin- Returns:
- the requirement
-
requireConfig
boolean requireConfig()
-
parseConfig
IPluginConfiguration parseConfig(InputStream is) throws IOException
- Throws:
IOException
-
getDeclaredImportUnit
org.intocps.maestro.ast.node.AImportedModuleCompilationUnit getDeclaredImportUnit()
The import unit that is needed when this plugin is used- Returns:
- the unit
-
-