de.wagner_ibw.iow
Class Iow40

java.lang.Object
  |
  +--de.wagner_ibw.iow.AbstractIowDevice
        |
        +--de.wagner_ibw.iow.Iow40

public class Iow40
extends AbstractIowDevice

This class represents the IO-Warrior 40 device.

Author:
Thomas Wagner

Field Summary
 
Fields inherited from class de.wagner_ibw.iow.AbstractIowDevice
IOW24_SMF_REPORT_LENGTH, IOW24ID, IOW24NAME, IOW40_SMF_REPORT_LENGTH, IOW40ID, IOW40NAME, IOW56_SMF_REPORT_LENGTH, IOW56ID, IOW56NAME
 
Constructor Summary
Iow40(long handle, java.lang.String serial, int rev)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether some other Iow40 object is "equal to" this one.
 java.lang.String getName()
          Returns the name of this IO-Warrior device.
 long readIOPortsImmediate()
          Reads the iow ports and store them in the internal port array (none blocking).
 long scanPorts()
          Gets the current pin status.
 java.lang.String toString()
          Returns a String object representing this Iow40 object.
 void writeIOPorts()
          Writes the presetted ports to this IO-Warrior device.
 void writeIOPorts(long value)
          Writes the value to this IO-Warrior device's ports.
 
Methods inherited from class de.wagner_ibw.iow.AbstractIowDevice
addIowChangeListener, addSpecialModeFunctionImpl, autonomous, clearBit, close, getHandle, getId, getMonitor, getPort, getPortCount, getRev, getSerial, getSmfReportLength, getSpecialModeFunctionImpl, hashCode, readIOPorts, readIOPortsNonBlocking, removeIowChangeListener, removeSpecialModeFunctionImpl, setBit, setDirection, setPort, setTimeout, setWriteTimeout, writeReport
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Iow40

public Iow40(long handle,
             java.lang.String serial,
             int rev)
Constructor.

Parameters:
handle - device handle of this IO-Warrior 40 device.
serial - serial number of this IO-Warrior 40 device.
rev - revision of this IO-Warrior 40 device.
Method Detail

readIOPortsImmediate

public long readIOPortsImmediate()
Description copied from class: AbstractIowDevice
Reads the iow ports and store them in the internal port array (none blocking).

Specified by:
readIOPortsImmediate in class AbstractIowDevice
Returns:
Port status in long representation.

scanPorts

public long scanPorts()
               throws java.lang.UnsupportedOperationException
Description copied from class: AbstractIowDevice
Gets the current pin status.

Specified by:
scanPorts in class AbstractIowDevice
Returns:
Port status in long representation.
Throws:
java.lang.UnsupportedOperationException - if this IO-Warrior device does not support the get curent pin status special mode function.

writeIOPorts

public void writeIOPorts()
Description copied from class: AbstractIowDevice
Writes the presetted ports to this IO-Warrior device.

Specified by:
writeIOPorts in class AbstractIowDevice

writeIOPorts

public void writeIOPorts(long value)
Description copied from class: AbstractIowDevice
Writes the value to this IO-Warrior device's ports.

Specified by:
writeIOPorts in class AbstractIowDevice
Parameters:
value - output pattern

getName

public java.lang.String getName()
Description copied from class: AbstractIowDevice
Returns the name of this IO-Warrior device.

Specified by:
getName in class AbstractIowDevice
Returns:
Returns the name of this IO-Warrior device.

toString

public java.lang.String toString()
Returns a String object representing this Iow40 object. It contains information about device handle, id , revision, serial number and the status of port 0 ... port 3.

Specified by:
toString in class AbstractIowDevice

equals

public boolean equals(java.lang.Object o)
Indicates whether some other Iow40 object is "equal to" this one. Criteria is the serial number.

Specified by:
equals in class AbstractIowDevice
Returns:
True if this object is the same as the obj argument; false otherwise.
Since:
0.9.4