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 StackMonitor.Monitor

    java.lang.Object
      avrora.monitors.StackMonitor.Monitor

All Implemented Interfaces:
  Monitor, Simulator.Probe

Enclosing class:
  StackMonitor

public class StackMonitor.Monitor
extends java.lang.Object
implements Monitor, Simulator.Probe

The `Monitor` class implements a monitor for the stack height that inserts a probe after every instruction in the program and checks the stack height after each instruction is executed.

Field Summary
`ProgramProfiler` | `profile`
`Program` | `program`
`Simulator` | `simulator`

Method Summary
`void` | `fireAfter(Instr i, int address, State s)` The `fireAfter()` method is called after the probed instruction executes.
`void` | `fireBefore(Instr i, int address, State s)` The `fireBefore()` method is called before the probed instruction executes.
`void` | `report()` The `report()` method generates a textual report after the simulation is complete.

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

Field Detail

### simulator

    public final Simulator simulator

### program

    public final Program program

### profile

    public final ProgramProfiler profile

Method Detail

### fireBefore

    public void fireBefore(Instr i,
                           int address,
                           State s)

  Description copied from interface: `Simulator.Probe`
  The `fireBefore()` method is called before the probed instruction executes.

  Specified by:
    `fireBefore` in interface `Simulator.Probe`
  Parameters:
    `i` - the instruction being probed
    `address` - the address at which this instruction resides
    `s` - the state of the simulation

### fireAfter

    public void fireAfter(Instr i,
                          int address,
                          State s)

  Description copied from interface: `Simulator.Probe`
  The `fireAfter()` method is called after the probed instruction executes.

  Specified by:
    `fireAfter` in interface `Simulator.Probe`
  Parameters:
    `i` - the instruction being probed
    `address` - the address at which this instruction resides
    `s` - the state of the simulation

### report

    public void report()

  The `report()` method generates a textual report after the simulation is complete. The text report contains the 3 smallest stack pointers encountered (tracking all three is necessary because the stack pointer begins at 0 and then is initialized one byte at a time).

  Specified by:
    `report` in interface `Monitor`

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