intr
Class InterruptRequest

java.lang.Object
  extended by intr.InterruptRequest
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class InterruptRequest
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

This class describes and Interrupt Request that is sent to the PIC8259.

See Also:
Serialized Form

Constructor Summary
InterruptRequest(int ir_id, java.lang.String device)
          Parameterized constructor.
 
Method Summary
 int compareTo(java.lang.Object anotherInterrupt)
          This method compares two InterruptRequest objects.
 java.lang.String getDevice()
          Returns the description associated to the device.
 int getIrId()
          Return the Id of the IRQ.
 java.sql.Timestamp getTimeStamp()
          Return the timestamp of when the IRQ was sent.
 void setTimeStamp()
          Set the current timestamp to this Interrupt Request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterruptRequest

public InterruptRequest(int ir_id,
                        java.lang.String device)
Parameterized constructor.

Parameters:
ir_id - Line Id of the Interrupt Request.
device - A brief description of the device sending the IRQ.
Method Detail

getIrId

public int getIrId()
Return the Id of the IRQ.

Returns:
Id of the IRQ.

getDevice

public java.lang.String getDevice()
Returns the description associated to the device.

Returns:
The description of the device.

getTimeStamp

public java.sql.Timestamp getTimeStamp()
Return the timestamp of when the IRQ was sent.

Returns:
The timestamp of the IRQ.

setTimeStamp

public void setTimeStamp()
Set the current timestamp to this Interrupt Request.


compareTo

public int compareTo(java.lang.Object anotherInterrupt)
This method compares two InterruptRequest objects. It returns a positive value if this InterruptRequest's id is greater than the InterruptRequest's id object
passed as argument, a negative value otherwise, 0 if the InterruptRequest id is the same.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
anotherInterrupt - An InterruptRequest object we want this InterruptRequest to be compared with.
Returns:
A positive number, a negative number or 0.