|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectavrora.actions.Action
avrora.actions.SimAction
The SimAction is an abstract class that collects many of
the options common to single node and multiple-node simulations into
one place.
| Field Summary | |
Option.Str |
CHIP
|
Option.Long |
ICOUNT
|
protected java.util.LinkedList |
monitorFactoryList
|
protected java.util.HashMap |
monitorListMap
|
protected java.util.HashMap |
monitorNameMap
|
Option.List |
MONITORS
|
Option.Str |
PLATFORM
|
Option.Double |
SECONDS
|
Option.Long |
TIMEOUT
|
| Fields inherited from class avrora.actions.Action |
help, options, shortName |
| Constructor Summary | |
protected |
SimAction(java.lang.String sn,
java.lang.String h)
|
| Method Summary | |
protected MicrocontrollerFactory |
getMicrocontroller()
The getMicrocontroller() method is used to get the current
microcontroller from the library of implemented ones, based on the
command line option that was specified (-chip=xyz). |
protected PlatformFactory |
getPlatform()
The getPlatform() method is used to get the current
platform from the library of implemented ones, based on the command
line option that was specified (-platform=xyz). |
protected boolean |
hasMonitors(Simulator s)
|
protected Simulator |
newSimulator(Program p)
The newSimulator() method is used by subclasses of
this action to create a new instance of a simulator with the
correct platform. |
protected void |
processMonitorList()
The processMonitorList() method builds a list of
MonitorFactory instances from the list of strings
given as an option at the command line. |
protected void |
processTimeout(Simulator s)
|
protected void |
reportMonitors(Simulator s)
The reportMonitors() method gets a list of Monitor
instances attached to the simulator and calls each of their report()
methods. |
protected void |
reportQuantity(java.lang.String name,
float val,
java.lang.String units)
|
protected void |
reportQuantity(java.lang.String name,
long val,
java.lang.String units)
|
protected void |
reportQuantity(java.lang.String name,
java.lang.String val,
java.lang.String units)
|
| Methods inherited from class avrora.actions.Action |
getHelp, getShortName, newOption, newOption, newOption, newOption, newOption, newOptionList, run |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public final Option.Long ICOUNT
public final Option.Double SECONDS
public final Option.Long TIMEOUT
public final Option.Str CHIP
public final Option.Str PLATFORM
public final Option.List MONITORS
protected java.util.HashMap monitorNameMap
protected java.util.LinkedList monitorFactoryList
protected java.util.HashMap monitorListMap
| Constructor Detail |
protected SimAction(java.lang.String sn,
java.lang.String h)
| Method Detail |
protected MicrocontrollerFactory getMicrocontroller()
getMicrocontroller() method is used to get the current
microcontroller from the library of implemented ones, based on the
command line option that was specified (-chip=xyz).
MicrocontrollerFactory for the
microcontroller specified on the command line.protected PlatformFactory getPlatform()
getPlatform() method is used to get the current
platform from the library of implemented ones, based on the command
line option that was specified (-platform=xyz).
PlatformFactory for the
platform specified on the command line
protected void reportQuantity(java.lang.String name,
long val,
java.lang.String units)
protected void reportQuantity(java.lang.String name,
float val,
java.lang.String units)
protected void reportQuantity(java.lang.String name,
java.lang.String val,
java.lang.String units)
protected void processMonitorList()
processMonitorList() method builds a list of
MonitorFactory instances from the list of strings
given as an option at the command line. The list of
MonitorFactory instances is used to create monitors for
each simulator as it is created.
protected Simulator newSimulator(Program p)
newSimulator() method is used by subclasses of
this action to create a new instance of a simulator with the
correct platform. This method also creates monitors for the
simulator instance as specified from the command line.
p - the program to load onto the simulator
Simulator class that has
the specified programs loaded onto it and has monitors attached to
as specified on the command lineprotected void processTimeout(Simulator s)
protected void reportMonitors(Simulator s)
reportMonitors() method gets a list of Monitor
instances attached to the simulator and calls each of their report()
methods.
s - the simulator for which to report all the monitorsprotected boolean hasMonitors(Simulator s)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||