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.sim.Simulator.Probe.Empty
          avrora.monitors.StackMonitor.Monitor

All Implemented Interfaces:
  Monitor, Simulator.Probe

Enclosing class:
  StackMonitor

public class StackMonitor.Monitor
extends Simulator.Probe.Empty
implements Monitor

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.

Nested Class Summary

Nested classes inherited from class avrora.sim.Simulator.Probe
`Simulator.Probe.Empty`

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

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

Methods inherited from class avrora.sim.Simulator.Probe.Empty
`fireBefore`

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

Method Detail

### fireAfter

    public void fireAfter(State s,
                          int pc)

  Description copied from class: `Simulator.Probe.Empty`
  The `fireAfter()` method is called after the probed instruction executes. In the implementation of the `Empty` probe, this method is empty.

  Specified by:
    `fireAfter` in interface `Simulator.Probe`
  Overrides:
    `fireAfter` in class `Simulator.Probe.Empty`
  Parameters:
    `s` - the state of the simulation
    `pc` - the address at which this instruction resides

### 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