public class CompositeActorApplication extends CompositeActorSimpleApplication
The command-line arguments can also set parameter values for any parameter in the models, with the name given relative to the top-level entity. For example, to specify the iteration count in an SDF model, you can invoke this on the command line as follows:
java -classpath $PTII ptolemy.actor.gui.CompositeActorApplication \ -director.iterations 1000 \ -class ptolemy.domains.sdf.demo.Butterfly.ButterflyThis assumes that the model given by the specified class name has a director named "director" with a parameter named "iterations". If more than one model is given on the command line, then the parameter values will be set for all models that have such a parameter.
This class keeps count the number of open windows. The waitForFinish method can then be used to determine when all of the windows opened by this class have been closed. The main() method exits the application when all windows have been closed.
ModelFrame
_commandFlags, _commandOptions, _commandTemplate, _models, _openCount, _test
Constructor and Description |
---|
CompositeActorApplication() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close any ModeFrames opened in processArgs().
|
static void |
main(java.lang.String[] args)
Create a new application with the specified command-line arguments.
|
void |
processArgs(java.lang.String[] args)
Parse the command-line arguments, creating models as specified.
|
java.lang.Object |
startRun(CompositeActor model)
If the specified model has a manager and is not already running,
then execute the model in a new thread.
|
_parseArg, _parseArgs, _run, _usage, models, report, report, report, stopRun, waitForFinish
public void close()
public static void main(java.lang.String[] args)
args
- The command-line arguments.public void processArgs(java.lang.String[] args) throws java.lang.Exception
processArgs
in class CompositeActorSimpleApplication
args
- The command-line arguments.java.lang.Exception
- If something goes wrong.public java.lang.Object startRun(CompositeActor model)
We then start the model running.
startRun
in class CompositeActorSimpleApplication
model
- The model to execute.Manager.startRun()