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.
Version:
January 2009
Author:
Pete Sanderson
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static int
     
    static int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    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

    Modifier and Type
    Method
    Description
    int
    Fetch the memory address that was accessed.
    int
    Fetch the length in bytes of the access operation (4,2,1).
    int
    Fetch the value of the access operation (the value read or written).
    double
    Fetch the value of the access operation (the value read or written).
    String representation indicates access type, address and length in bytes

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • 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 Details

    • 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