mars.mips.hardware
Class AccessNotice

java.lang.Object
  extended by mars.mips.hardware.AccessNotice
Direct Known Subclasses:
MemoryAccessNotice, RegisterAccessNotice

public abstract class AccessNotice
extends Object

Object provided to Observers of runtime access to MIPS memory or registers. The access types READ and WRITE defined here; use subclasses defined for MemoryAccessNotice and RegisterAccessNotice. This is abstract class.

Author:
Pete Sanderson

Field Summary
static int READ
          Indicates the purpose of access was to read.
static int WRITE
          Indicates the purpose of access was to write.
 
Constructor Summary
protected AccessNotice(int type)
           
 
Method Summary
 boolean accessIsFromGUI()
          Query whether the access originated from MARS GUI (AWT event queue)
 boolean accessIsFromMIPS()
          Query whether the access originated from executing MIPS program
 int getAccessType()
          Get the access type: READ or WRITE.
 Thread getThread()
          Get reference to thread that created this notice
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

READ

public static final int READ
Indicates the purpose of access was to read.

See Also:
Constant Field Values

WRITE

public static final int WRITE
Indicates the purpose of access was to write.

See Also:
Constant Field Values
Constructor Detail

AccessNotice

protected AccessNotice(int type)
Method Detail

getAccessType

public int getAccessType()
Get the access type: READ or WRITE.

Returns:
Access type, either AccessNotice.READ or AccessNotice.WRITE

getThread

public Thread getThread()
Get reference to thread that created this notice

Returns:
Return reference to the thread that created this notice.

accessIsFromGUI

public boolean accessIsFromGUI()
Query whether the access originated from MARS GUI (AWT event queue)

Returns:
true if this access originated from MARS GUI, false otherwise

accessIsFromMIPS

public boolean accessIsFromMIPS()
Query whether the access originated from executing MIPS program

Returns:
true if this access originated from executing MIPS program, false otherwise