nl.kbna.dioscuri.module
Class ModuleDevice

java.lang.Object
  extended by nl.kbna.dioscuri.module.Module
      extended by nl.kbna.dioscuri.module.ModuleDevice
Direct Known Subclasses:
DeviceDummy, ModuleATA, ModuleDMA, ModuleFDC, ModuleKeyboard, ModuleMouse, ModuleParallelPort, ModulePIC, ModulePIT, ModuleRTC, ModuleSerialPort, ModuleVideo, PCI

public abstract class ModuleDevice
extends Module

Abstract class representing a generic hardware device module. This class defines all methods that are required for a device module, i.e. a module that is connected to the motherboard and requires I/O address space.


Constructor Summary
ModuleDevice()
           
 
Method Summary
abstract  byte getIOPortByte(int portAddress)
          Return a byte from I/O address space at given I/O port
abstract  byte[] getIOPortDoubleWord(int portAddress)
          Return a double word from I/O address space at given port
abstract  byte[] getIOPortWord(int portAddress)
          Return a word from I/O address space at given port
abstract  int getUpdateInterval()
          Retrieve the interval between subsequent updates
abstract  void setIOPortByte(int portAddress, byte data)
          Set a byte in I/O address space at given port
abstract  void setIOPortDoubleWord(int portAddress, byte[] dataDoubleWord)
          Set a double word in I/O address space at given port
abstract  void setIOPortWord(int portAddress, byte[] dataWord)
          Set a word in I/O address space at given port
abstract  void setUpdateInterval(int interval)
          Defines the interval between subsequent updates
abstract  void update()
          Update device
 
Methods inherited from class nl.kbna.dioscuri.module.Module
getConnection, getData, getDebugMode, getDump, getID, getName, getType, isConnected, isObserved, reset, setConnection, setData, setData, setDebugMode, setObserved, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleDevice

public ModuleDevice()
Method Detail

getUpdateInterval

public abstract int getUpdateInterval()
Retrieve the interval between subsequent updates

Returns:
int interval in microseconds

setUpdateInterval

public abstract void setUpdateInterval(int interval)
Defines the interval between subsequent updates

Parameters:
int - interval in microseconds

update

public abstract void update()
Update device


getIOPortByte

public abstract byte getIOPortByte(int portAddress)
                            throws ModuleException,
                                   ModuleUnknownPort,
                                   ModuleWriteOnlyPortException
Return a byte from I/O address space at given I/O port

Parameters:
int - portAddress containing the address of the I/O port
Returns:
byte containing the data at given I/O address port
Throws:
ModuleException, - ModuleUnknownPort, ModuleWriteOnlyPortException
ModuleException
ModuleUnknownPort
ModuleWriteOnlyPortException

setIOPortByte

public abstract void setIOPortByte(int portAddress,
                                   byte data)
                            throws ModuleException,
                                   ModuleUnknownPort
Set a byte in I/O address space at given port

Parameters:
int - portAddress containing the address of the I/O port
byte - data
Throws:
ModuleException, - ModuleUnknownPort, ModuleWriteOnlyPortException
ModuleException
ModuleUnknownPort

getIOPortWord

public abstract byte[] getIOPortWord(int portAddress)
                              throws ModuleException,
                                     ModuleUnknownPort,
                                     ModuleWriteOnlyPortException
Return a word from I/O address space at given port

Parameters:
int - portAddress containing the address of the I/O port
Returns:
byte[] containing the word at given I/O address port
Throws:
ModuleException, - ModuleWriteOnlyPortException
ModuleException
ModuleUnknownPort
ModuleWriteOnlyPortException

setIOPortWord

public abstract void setIOPortWord(int portAddress,
                                   byte[] dataWord)
                            throws ModuleException,
                                   ModuleUnknownPort
Set a word in I/O address space at given port

Parameters:
int - portAddress containing the address of the I/O port
byte[] - word
Throws:
ModuleException, - ModuleWriteOnlyPortException
ModuleException
ModuleUnknownPort

getIOPortDoubleWord

public abstract byte[] getIOPortDoubleWord(int portAddress)
                                    throws ModuleException,
                                           ModuleUnknownPort,
                                           ModuleWriteOnlyPortException
Return a double word from I/O address space at given port

Parameters:
int - portAddress containing the address of the I/O port
Returns:
byte[] containing the double word at given I/O address port
Throws:
ModuleException, - ModuleWriteOnlyPortException
ModuleException
ModuleUnknownPort
ModuleWriteOnlyPortException

setIOPortDoubleWord

public abstract void setIOPortDoubleWord(int portAddress,
                                         byte[] dataDoubleWord)
                                  throws ModuleException,
                                         ModuleUnknownPort
Set a double word in I/O address space at given port

Parameters:
int - portAddress containing the address of the I/O port
byte[] - double word
Throws:
ModuleException, - ModuleWriteOnlyPortException
ModuleException
ModuleUnknownPort