|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--de.wagner_ibw.iow.IowPort
A BinaryPort represents an IO-Warrior port consists of 8 bits.
The IO-Warrior 24 contains two of them, the IO-Warrior 40 four and
the IO-Warrior 56 seven of them (port 6 only bit 0 and 7).
| Constructor Summary | |
IowPort(int index,
int ioMask)
Simple constructor (io mask as int). |
|
IowPort(int index,
int ioMask,
int initialData)
Simple constructor (io mask as int) with initial data. |
|
IowPort(int index,
java.lang.String ioMask)
Simple constructor (io mask as String). |
|
IowPort(int index,
java.lang.String ioMask,
java.lang.String initialData)
Simple constructor (io mask as String) with initial data as String. |
|
| Method Summary | |
void |
addPortChangeListener(IowPortChangeListener pcl)
Adds an IowPortChangeListener to the internal list. |
void |
clearBit(int num)
Sets the given bit to 0 (clear). |
int |
getData()
Returns the integer representation of this port. |
int |
getDataToWrite()
Returns the content of this port prepared for write operation. |
int |
getIndex()
Returns the port index of this port. |
int |
getSpecial()
Getter for special bit mask. |
boolean |
isBitClear(int num)
Returns true, if the given bit is clear (0). |
boolean |
isBitSet(int num)
Returns true, if the given bit is set (1). |
void |
removePortChangeListener(IowPortChangeListener pcl)
Removes an IowPortChangeListener from the internal list. |
void |
setBit(int num)
Sets the given bit to 1 (set). |
void |
setData(int value)
Sets the entire port's dtat to the given integer value. |
void |
setData(java.lang.String value)
Sets the entire port's data to the given String value. |
void |
setDataFromRead(int readData)
Sets the port's data register after read report received. |
void |
setDirection(int ioMask)
Sets the direction for the port's pins (io mask as int). |
void |
setDirection(java.lang.String ioMask)
Sets the direction for the port's pins (io mask as String). |
void |
setSpecial(int specialMask)
Setter for special bit mask. |
java.lang.String |
toString()
Returns the String represenation of this port. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public IowPort(int index,
int ioMask)
index - index for this port.ioMask - io mask for this port.
public IowPort(int index,
int ioMask,
int initialData)
index - index for this port.ioMask - io mask for this port.initialData - initial data fro this port.
public IowPort(int index,
java.lang.String ioMask)
throws java.lang.IllegalArgumentException
index - index for this port.ioMask - io mask for this port.
java.lang.IllegalArgumentException - if string ioMask is invalid.
public IowPort(int index,
java.lang.String ioMask,
java.lang.String initialData)
throws java.lang.IllegalArgumentException
index - index for this port.ioMask - io mask for this port.initialData - initial data fro this port.
java.lang.IllegalArgumentException - if string ioMask is invalid.| Method Detail |
public void setDirection(java.lang.String ioMask)
throws java.lang.IllegalArgumentException
ioMask - Describes the pin direction (MSB first):
java.lang.IllegalArgumentException - If ioMask's length != 8 or if ioMask
contains invalid chars (valid are 'iIoO')public void setDirection(int ioMask)
ioMask - public void setData(int value)
writeIOPorts() additionally to do this.
value -
public void setData(java.lang.String value)
throws java.lang.IllegalArgumentException
writeIOPorts() additionally to do this.
value -
java.lang.IllegalArgumentException
public void setBit(int num)
throws java.lang.IllegalArgumentException
writeIOPorts() additionally to do this.
num - Number of the bit which is set (1).
java.lang.IllegalArgumentException - Is thrown if num contains an
invalid bit number (valid numbers are 0...7).
public void clearBit(int num)
throws java.lang.IllegalArgumentException
writeIOPorts() additionally to do this.
num - Number of the bit which is clear (0).
java.lang.IllegalArgumentException - Is thrown if num contains an
invalid bit number (valid numbers are 0...7).
public boolean isBitSet(int num)
throws java.lang.IllegalArgumentException
num - Number of the desired bit.
java.lang.IllegalArgumentException - Is thrown if num contains an
invalid bit number (valid numbers are 0...7).
public boolean isBitClear(int num)
throws java.lang.IllegalArgumentException
num - Number of the desired bit.
java.lang.IllegalArgumentException - Is thrown if num contains an
invalid bit number (valid numbers are 0...7).public int getDataToWrite()
public void setDataFromRead(int readData)
readData - appropriate byte from read report.public void setSpecial(int specialMask)
specialMask - special bit mask to set.public int getSpecial()
public int getData()
public int getIndex()
public void addPortChangeListener(IowPortChangeListener pcl)
IowPortChangeListener to the internal list.
pcl - IowPortChangeListener that has added to the list.public void removePortChangeListener(IowPortChangeListener pcl)
IowPortChangeListener from the internal list.
pcl - IowPortChangeListener that has removed from the list.public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||