|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectavrora.monitors.MonitorFactory
The MonitorFactory class represents a profiling utility
that is able to produce a Monitor for a simulation. The
monitor can use probes, watches, and events to monitor the execution
of the program and issue a report after the simulation is completed.
| Field Summary | |
java.lang.String |
help
The help field stores a reference to a string that
represents the contextual help from this monitor. |
Options |
options
The options field stores a reference to an instance
of the Options class that stores the command line
options to the monitor. |
java.lang.String |
shortName
The shortName field stores a reference to the short
name of the monitor. |
| Constructor Summary | |
protected |
MonitorFactory(java.lang.String sn,
java.lang.String h)
The constructor for the MonitorFactory class initializes
the options field, as well as the references to the
help string and the short name of the monitor. |
| Method Summary | |
java.lang.String |
getShortName()
The getShortName() method returns a shortened version of
the name of this monitor for more quick access at the command line. |
abstract Monitor |
newMonitor(Simulator s)
The newMonitor() method creates a new monitor for the
specified instance of Simulator. |
void |
processOptions(Options o)
The processOptions() method is called after the
MonitorFactory instance is created. |
protected void |
reportQuantity(java.lang.String name,
float val,
java.lang.String units)
The reportQuantity() method can be used by subclasses of
MonitorFactory to report various quantities such as
execution time, cycles spent sleeping, etc, to the terminal. |
protected void |
reportQuantity(java.lang.String name,
long val,
java.lang.String units)
The reportQuantity() method can be used by subclasses of
MonitorFactory to report various quantities such as
execution time, cycles spent sleeping, etc, to the terminal. |
protected void |
reportQuantity(java.lang.String name,
java.lang.String val,
java.lang.String units)
The reportQuantity() method can be used by subclasses of
MonitorFactory to report various quantities such as
execution time, cycles spent sleeping, etc, to the terminal. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public final java.lang.String help
help field stores a reference to a string that
represents the contextual help from this monitor.
public final java.lang.String shortName
shortName field stores a reference to the short
name of the monitor.
public final Options options
options field stores a reference to an instance
of the Options class that stores the command line
options to the monitor.
| Constructor Detail |
protected MonitorFactory(java.lang.String sn,
java.lang.String h)
MonitorFactory class initializes
the options field, as well as the references to the
help string and the short name of the monitor.
sn - the short name of the monitor as a stringh - the help item for the monitor as a string| Method Detail |
public abstract Monitor newMonitor(Simulator s)
newMonitor() method creates a new monitor for the
specified instance of Simulator. The resulting monitor
may insert probes, watches, or events into the simulation to collect
information and later report that information after the simulation is
complete.
s - the Simulator instance to create the monitor for
Monitor interface that represents
the monitor for the simulatorpublic void processOptions(Options o)
processOptions() method is called after the
MonitorFactory instance is created. These options are the
options left over from processing the command line, extracting
the parameters to the main program, extracting the parameters from
the action.
o - the options representing the known and unknown options from
the command linepublic java.lang.String getShortName()
getShortName() method returns a shortened version of
the name of this monitor for more quick access at the command line.
protected void reportQuantity(java.lang.String name,
long val,
java.lang.String units)
reportQuantity() method can be used by subclasses of
MonitorFactory to report various quantities such as
execution time, cycles spent sleeping, etc, to the terminal.
name - the name of the quantity being reportedval - the value to be reported as a long integerunits - the units for the quantity as a string
protected void reportQuantity(java.lang.String name,
float val,
java.lang.String units)
reportQuantity() method can be used by subclasses of
MonitorFactory to report various quantities such as
execution time, cycles spent sleeping, etc, to the terminal.
name - the name of the quantity being reportedval - the value to be reported as a floating point numberunits - the units for the quantity as a string
protected void reportQuantity(java.lang.String name,
java.lang.String val,
java.lang.String units)
reportQuantity() method can be used by subclasses of
MonitorFactory to report various quantities such as
execution time, cycles spent sleeping, etc, to the terminal.
name - the name of the quantity being reportedval - the value to be reported as a stringunits - the units for the quantity as a string
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||