Emu8255
Class IO

java.lang.Object
  extended by Emu8255.IO

public class IO
extends java.lang.Object

This class provides methods for writing to and reading from file, as well as sending an InterruptRequest object to the PIC8259 through a socket and retrieving and setting value of XML configuration tags.

See Also:
InterruptRequest

Constructor Summary
IO()
          Default Constructor.
 
Method Summary
static int GetPort()
           
static java.lang.String GetXMLValueOf(java.lang.String tag)
          This method gets the value of the XML tag passed as argument.
static char ReadByte(java.lang.String file, int PortNo)
          This method returns one byte as a char at PortNo position within file.
static void SendInterrupt(int IRQId)
          This method sends an object InterruptRequest to the PIC8259 through a socket.
static void SetPort(int port)
           
static void SetXMLValueOf(java.lang.String tag, java.lang.String value)
          This method sets the value of the XML tag passed as argument.
static void WriteByte(java.lang.String file, int PortNo, char Value)
          This method writes one byte as a char at PortNo position within file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IO

public IO()
Default Constructor.

Method Detail

ReadByte

public static char ReadByte(java.lang.String file,
                            int PortNo)
This method returns one byte as a char at PortNo position within file.

Parameters:
file - File to read from.
PortNo - Offset from the beginning of the file.
Returns:
The character read.
Throws:
java.io.IOException

WriteByte

public static void WriteByte(java.lang.String file,
                             int PortNo,
                             char Value)
This method writes one byte as a char at PortNo position within file.

Parameters:
file - File to write to.
PortNo - Offset from the beginning of the file.
Value - Character to write.
Throws:
java.io.IOException

GetXMLValueOf

public static java.lang.String GetXMLValueOf(java.lang.String tag)
This method gets the value of the XML tag passed as argument.

Parameters:
tag - Tag whose value we're looking for.
Returns:
The value of the tag passed as argument
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException

SetXMLValueOf

public static void SetXMLValueOf(java.lang.String tag,
                                 java.lang.String value)
This method sets the value of the XML tag passed as argument.

Parameters:
tag - Tag whose value we want to set.
value - Value we want to set for the tag.
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
javax.xml.transform.TransformerConfigurationException

SendInterrupt

public static void SendInterrupt(int IRQId)
This method sends an object InterruptRequest to the PIC8259 through a socket.

Parameters:
IRQId - Line of interrupt within the 8259 where the IRQ is sent.
Throws:
java.lang.Exception
See Also:
InterruptRequest

GetPort

public static int GetPort()

SetPort

public static void SetPort(int port)