nachos.machine
Class GraphicalConsole
java.lang.Object
|
+--nachos.machine.GraphicalConsole
- public final class GraphicalConsole
- extends Object
- implements SerialConsole
A graphical console that uses the AWT to put a console in a window.
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
GraphicalConsole
public GraphicalConsole()
- Allocate a new graphical console.
init
public void init(Privilege privilege)
setInterruptHandlers
public void setInterruptHandlers(Runnable receiveInterruptHandler,
Runnable sendInterruptHandler)
- Description copied from interface: SerialConsole
- Set this console's receive and send interrupt handlers.
The receive interrupt handler is called every time another byte arrives
and can be read using readByte().
The send interrupt handler is called every time a byte sent with
writeByte() is finished being sent. This means that another
byte can be sent.
- Specified by:
- setInterruptHandlers in interface SerialConsole
- Tags copied from interface: SerialConsole
- Parameters:
receiveInterruptHandler - the callback to call when a byte
arrives.sendInterruptHandler - the callback to call when another byte
can be sent.
readByte
public int readByte()
- Description copied from interface: SerialConsole
- Return the next unsigned byte received (in the range 0 through
255).
- Specified by:
- readByte in interface SerialConsole
- Tags copied from interface: SerialConsole
- Returns:
- the next byte read, or -1 if no byte is available.
writeByte
public void writeByte(int value)
- Description copied from interface: SerialConsole
- Send another byte. If a byte is already being sent, the result is not
defined.
- Specified by:
- writeByte in interface SerialConsole
- Tags copied from interface: SerialConsole
- Parameters:
value - the byte to be sent (the upper 24 bits are ignored).