dioscuri.module.mouse
Class Mouse

java.lang.Object
  extended by dioscuri.module.AbstractModule
      extended by dioscuri.module.ModuleMouse
          extended by dioscuri.module.mouse.Mouse
All Implemented Interfaces:
Module, UART

public class Mouse
extends ModuleMouse
implements UART

An implementation of a mouse module.

See Also:

Metadata module ******************************************** general.type : mouse general.name : Serial mouse general.architecture : Von Neumann general.description : Models a serial mouse general.creator : Koninklijke Bibliotheek, Nationaal Archief of the Netherlands general.version : 1.0 general.keywords : Mouse, Keyboard, serial, PS/2 general.relations : Serialport, Keyboard general.yearOfIntroduction : 1987 general.yearOfEnding : general.ancestor : DE-9 RS-232 serial mouse general.successor : USB mouse

Notes: - mouse can use one of the following connection types: + serial port + PS/2 via keyboard controller - all controller aspects are implemented in keyboard: (mouse is only pointing device but not controller) + I/O ports + IRQ handling


Nested Class Summary
 
Nested classes/interfaces inherited from interface dioscuri.interfaces.Module
Module.Type
 
Field Summary
 
Fields inherited from class dioscuri.module.AbstractModule
type
 
Constructor Summary
Mouse(Emulator owner)
          Class constructor
 
Method Summary
 void controlMouse(byte value)
          
 byte getDataFromBuffer()
          Returns the head of the buffer FIFO, data is automatically removed from buffer
 java.lang.String getDump()
          Return a dump of module status
 byte getSerialData()
           
 boolean isBufferEmpty()
          
 boolean isDataAvailable()
           
 void mouseMotion(java.awt.event.MouseEvent event)
          
 boolean reset()
          Reset all parameters of module.
 void setMouseEnabled(boolean status)
          
 void setMouseType(java.lang.String type)
          
 void setSerialData(byte data)
           
 void storeBufferData(boolean forceEnqueue)
          
 
Methods inherited from class dioscuri.module.AbstractModule
getConnection, getConnections, getDebugMode, getExpectedConnections, getType, isConnected, setConnection, setDebugMode, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mouse

public Mouse(Emulator owner)
Class constructor

Method Detail

reset

public boolean reset()
Reset all parameters of module.

Specified by:
reset in interface Module
Specified by:
reset in class AbstractModule
Returns:
true iff the AbstractModule was reset properly.
See Also:
AbstractModule

getDump

public java.lang.String getDump()
Return a dump of module status

Provides a dummy implementation since many of the subclasses of this abstract module class do not need or use a getDump() implementation. The ones that do, can override this method.

Specified by:
getDump in interface Module
Overrides:
getDump in class AbstractModule
Returns:
string containing a dump of this module
See Also:
AbstractModule

setMouseEnabled

public void setMouseEnabled(boolean status)

Specified by:
setMouseEnabled in class ModuleMouse
See Also:
ModuleMouse

setMouseType

public void setMouseType(java.lang.String type)

Specified by:
setMouseType in class ModuleMouse
See Also:
ModuleMouse

isBufferEmpty

public boolean isBufferEmpty()

Specified by:
isBufferEmpty in class ModuleMouse
Returns:
See Also:
ModuleMouse

storeBufferData

public void storeBufferData(boolean forceEnqueue)

Specified by:
storeBufferData in class ModuleMouse
See Also:
ModuleMouse

getDataFromBuffer

public byte getDataFromBuffer()
Returns the head of the buffer FIFO, data is automatically removed from buffer

Specified by:
getDataFromBuffer in class ModuleMouse
Returns:
the head of the buffer FIFO, data is automatically removed from buffer
See Also:
ModuleMouse

controlMouse

public void controlMouse(byte value)

Specified by:
controlMouse in class ModuleMouse
See Also:
ModuleMouse

mouseMotion

public void mouseMotion(java.awt.event.MouseEvent event)

Specified by:
mouseMotion in class ModuleMouse
See Also:
ModuleMouse

isDataAvailable

public boolean isDataAvailable()
Specified by:
isDataAvailable in interface UART
Returns:
-

getSerialData

public byte getSerialData()
Specified by:
getSerialData in interface UART
Returns:
-

setSerialData

public void setSerialData(byte data)
Specified by:
setSerialData in interface UART