Package mars.simulator
Class SimulatorNotice
java.lang.Object
mars.simulator.SimulatorNotice
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 -
Constructor Summary
ConstructorsConstructorDescriptionSimulatorNotice(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 TypeMethodDescriptionint
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).toString()
String representation indicates access type, address and length in bytes
-
Field Details
-
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 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
String representation indicates access type, address and length in bytes
-