Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## avrora.monitors
Class MonitorFactory

    java.lang.Object
      avrora.util.help.HelpCategory
          avrora.monitors.MonitorFactory

All Implemented Interfaces:
  HelpItem

Direct Known Subclasses:
  CallMonitor, EnergyMonitor, EnergyProfiler, GDBServer, InteractiveMonitor, InterruptMonitor, IORegMonitor, MemoryMonitor, PacketMonitor, ProfileMonitor, RealTimeMonitor, SerialMonitor, SimPerfMonitor, SleepMonitor, StackMonitor, TraceMonitor, TripTimeMonitor, VisualRadioMonitor, VisualRegMonitor

public abstract class MonitorFactory
extends HelpCategory

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
`Options` | `options` The `options` field stores a reference to an instance of the `Options` class that stores the command line options to the monitor.

Fields inherited from class avrora.util.help.HelpCategory
`COMPARATOR, help, name`

Constructor Summary
`protected` | `MonitorFactory(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
`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.

Methods inherited from class avrora.util.help.HelpCategory
`addCommandExample, addListSection, addOptionSection, addSection, addSubcategorySection, getHelp, getName, printHelp, setName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### options

    public final Options options

  The `options` field stores a reference to an instance of the `Options` class that stores the command line options to the monitor.

Constructor Detail

### MonitorFactory

    protected MonitorFactory(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.

Parameters:
  `h` - the help item for the monitor as a string

Method Detail

### newMonitor

    public abstract Monitor newMonitor(Simulator s)

  The `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.

  Parameters:
    `s` - the `Simulator` instance to create the monitor for
  Returns:
    an instance of the `Monitor` interface that represents the monitor for the simulator

### processOptions

    public void processOptions(Options o)

  The `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.

  Parameters:
    `o` - the options representing the known and unknown options from the command line

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD