de.wagner_ibw.iow
Class Iow24

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

public class Iow24
extends AbstractIowDevice

This class represents the IO-Warrior 24 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
Iow24(long handle, java.lang.String serial, int rev)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other Iow24 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 Iow24 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

Iow24

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

Parameters:
handle - device handle of this IO-Warrior 24 device .
serial - serial number of this IO-Warrior 24 device.
rev - revision of this IO-Warrior 24 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()
Description copied from class: AbstractIowDevice
Gets the current pin status.

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

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

toString

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

Specified by:
toString in class AbstractIowDevice

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.

equals

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

Specified by:
equals in class AbstractIowDevice
Parameters:
obj - The reference object with which to compare.
Returns:
True if this object is the same as the obj argument; false otherwise.
Since:
0.9.4