|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.wagner_ibw.iow.AbstractIowDevcie
This class represents the iow 40 device.
Nested Class Summary | |
class |
AbstractIowDevcie.SpecialModeReadThread
Read thread for special mode functions. |
Field Summary | |
protected boolean |
autonomous
|
protected sun.misc.Queue |
currentPinStatus
Queue for receiving the current pin status report |
protected long |
handle
Device handle of this iow device. |
protected int |
id
Device identifier of this iow device. |
static long |
IOW24ID
A constant for iow 24 device id. |
static java.lang.String |
IOW24NAME
A constant for iow 24 device name. |
static long |
IOW40ID
A constant for iow 40 device id. |
static java.lang.String |
IOW40NAME
A constant for iow 40 device name. |
protected Monitor |
monitor
Queue for receiving the current pin status report |
protected int |
portCount
|
protected IowPort[] |
ports
The ports. |
protected int |
rev
Revision identifier of this iow device. |
protected java.lang.String |
serial
Serial number of this iow device. |
protected java.util.Vector |
smfImplementations
Vector of special mode implementations. |
protected int |
specialMode
Flag for all special mode functions. |
Constructor Summary | |
AbstractIowDevcie()
Contructor. |
Method Summary | |
void |
addSpecialModeFunctionImpl(SpecialModeFunction impl)
|
void |
autonomous(boolean status)
Sets the autonomous mode either on or off. |
protected void |
checkPort(int port)
|
void |
clearBit(int port,
int bit)
Clear the given bit froma the given port. |
void |
close()
Close this iow device (Used by subclasses Iow40 and Iow24 only.) |
abstract boolean |
equals(java.lang.Object o)
Indicates whether some other Iow40 object is "equal to" this one. |
protected int[] |
getCurrentPinStatus()
Gets the current pin status. |
long |
getHandle()
Implementation for IowInterface method getHandle. |
int |
getId()
Implementation for IowInterface method getId. |
Monitor |
getMonitor()
|
abstract java.lang.String |
getName()
|
IowPort |
getPort(int port)
|
int |
getRev()
Implementation for IowInterface method getRev. |
java.lang.String |
getSerial()
Implementation for IowInterface method getSerial. |
SpecialModeFunction |
getSpecialModeFunctionImpl(java.lang.String smfName)
Returns the desired special mode function implementation. |
int |
hashCode()
Returns a hash code value for this Iow40 object. |
abstract long |
readIOPorts()
|
abstract long |
readIOPortsImmediate()
|
int[] |
readReport(int pipe)
Implementation for IowInterface method readReport. |
void |
removeSpecialModeFunctionImpl(SpecialModeFunction impl)
|
void |
run()
|
abstract long |
scanPorts()
Gets the current pin status. |
void |
setBit(int port,
int bit)
Set the given bit from the given port. |
void |
setDirection(int port,
int direction)
Set the direction mask to the given port. |
void |
setPort(int port,
int in)
Set the pattern to the given port. |
void |
setTimeout(long timeout)
Set timeout for read operations. |
void |
setWriteTimeout(long timeout)
Set timeout for write operations. |
abstract java.lang.String |
toString()
Returns a String object representing this Iow40 object.
|
abstract void |
writeIOPorts()
|
long |
writeReport(int pipe,
int[] wbuf)
Implementation for IowInterface method writeReport. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final long IOW40ID
public static final long IOW24ID
public static final java.lang.String IOW40NAME
public static final java.lang.String IOW24NAME
protected long handle
protected int id
protected int rev
protected java.lang.String serial
protected IowPort[] ports
protected sun.misc.Queue currentPinStatus
protected Monitor monitor
protected int specialMode
de.wagner_ibw.iow.SpecialModeFuntion
protected java.util.Vector smfImplementations
protected boolean autonomous
protected int portCount
Constructor Detail |
public AbstractIowDevcie()
Method Detail |
public void addSpecialModeFunctionImpl(SpecialModeFunction impl) throws java.lang.UnsupportedOperationException, java.lang.IllegalArgumentException
impl
-
java.lang.UnsupportedOperationException
java.lang.IllegalArgumentException
public void removeSpecialModeFunctionImpl(SpecialModeFunction impl)
impl
- public SpecialModeFunction getSpecialModeFunctionImpl(java.lang.String smfName) throws java.util.NoSuchElementException
smfName
- Name of the desired function.
java.util.NoSuchElementException
- if the desired function was not already added.public long getHandle()
public java.lang.String getSerial()
public int getId()
public int getRev()
public void close()
public void setTimeout(long timeout)
timeout
- Timeout value in ms.public void setWriteTimeout(long timeout)
timeout
- Timeout value in ms.public int[] readReport(int pipe)
pipe
-
public long writeReport(int pipe, int[] wbuf)
pipe
- wbuf
- Write buffer.
public abstract long readIOPorts()
public abstract long readIOPortsImmediate()
public abstract long scanPorts() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
protected int[] getCurrentPinStatus() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public abstract void writeIOPorts()
public void run()
run
in interface java.lang.Runnable
public void autonomous(boolean status)
status
- true switches the mode on, false switches the mod off.public abstract java.lang.String getName()
public IowPort getPort(int port) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void setBit(int port, int bit) throws java.lang.IllegalArgumentException
port
- Port number (0...3).bit
- Bit number (0...7).
java.lang.IllegalArgumentException
public void clearBit(int port, int bit) throws java.lang.IllegalArgumentException
port
- Port number (0...3).bit
- Bit number (0...7).
java.lang.IllegalArgumentException
public void setPort(int port, int in) throws java.lang.IllegalArgumentException
port
- Port number (0...3).
java.lang.IllegalArgumentException
public void setDirection(int port, int direction) throws java.lang.IllegalArgumentException
port
- Port number (0...3 or 0...1).direction
- 0-output, 1-input
java.lang.IllegalArgumentException
public Monitor getMonitor()
protected void checkPort(int port) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public int hashCode()
hashCode
in class java.lang.Object
public abstract java.lang.String toString()
String
object representing this Iow40 object.
It contains information about device handle, id , revision,
serial number and the status of port 0 ... port 3.
toString
in class java.lang.Object
public abstract boolean equals(java.lang.Object o)
equals
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |