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

## mars.simulator
Class SimulatorNotice

    java.lang.Object
      mars.simulator.SimulatorNotice

    public class SimulatorNotice

extends Object

Object provided to Observers of the Simulator. They are notified at important phases of the runtime simulator, such as start and stop of simulation.

Author:
  Pete Sanderson

Field Summary
`static int` | `SIMULATOR_START`
`static int` | `SIMULATOR_STOP`

Constructor Summary
`SimulatorNotice(int action, int maxSteps, double runSpeed, int programCounter)` Constructor will be called only within this package, so assume address and length are in valid ranges.

Method Summary
`int` | `getAction()` Fetch the memory address that was accessed.
`int` | `getMaxSteps()` Fetch the length in bytes of the access operation (4,2,1).
`int` | `getProgramCounter()` Fetch the value of the access operation (the value read or written).
`double` | `getRunSpeed()` Fetch the value of the access operation (the value read or written).
`String` | `toString()` String representation indicates access type, address and length in bytes

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

Field Detail

### SIMULATOR_START

    public static final int SIMULATOR_START

See Also:
  Constant Field Values

### SIMULATOR_STOP

    public static final int SIMULATOR_STOP

See Also:
  Constant Field Values

Constructor Detail

### SimulatorNotice

    public SimulatorNotice(int action,
                           int maxSteps,
                           double runSpeed,
                           int programCounter)

  Constructor will be called only within this package, so assume address and length are in valid ranges.

Method Detail

### getAction

    public int getAction()

  Fetch the memory address that was accessed.

### getMaxSteps

    public int getMaxSteps()

  Fetch the length in bytes of the access operation (4,2,1).

### getRunSpeed

    public double getRunSpeed()

  Fetch the value of the access operation (the value read or written).

### getProgramCounter

    public int getProgramCounter()

  Fetch the value of the access operation (the value read or written).

### toString

    public String toString()

  String representation indicates access type, address and length in bytes

  Overrides:
    `toString` in class `Object`

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