|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--de.wagner_ibw.iow.i2c.AbstractI2CDevice
|
+--de.wagner_ibw.iow.i2c.DS1803
Implemenation of the DS1803 device, "Two independently controlled Potentiometers". Each
patentiometer's wiper can be set to one of 256 positions.
Standard resistance values:
| Field Summary | |
static int |
CLASS
Group 1 part of slave address for PCF8570 (PCF8570 device specific constant). |
static int |
CMD_BOTH_POTS
Command "Write Both Pots". |
static int |
CMD_POT_0
Command "Write Pot 0". |
static int |
CMD_POT_1
Command "Write Pot 1". |
int |
MAX_POSITION_VALUE
Maximum position value. |
static java.lang.String |
NAME
PCF8570 device specific constants. |
| Fields inherited from class de.wagner_ibw.iow.i2c.AbstractI2CDevice |
MAX_I2C_LENGTH |
| Constructor Summary | |
DS1803(int deviceAddress)
Constructor |
|
| Method Summary | |
boolean |
equals(java.lang.Object o)
Indicates whether some other DS1803 object is "equal to" this one. |
int |
hashCode()
Returns a hash code value for this DS1803 object. |
int |
readPot0()
Reads the pot 0 position. |
int |
readPot1()
Reads the pot 1 position. |
void |
setIowDevice(AbstractIowDevice iow)
Sets the reference to an IO-Warrior device for write report operations. |
java.lang.String |
toString()
Returns Information about this DS1803 as String. |
void |
writeBothPots(int position)
Sets the both pots position (same value). |
void |
writeBothPots(int position0,
int position1)
Sets the both pots position (different value). |
void |
writePot0(int position)
Sets the pot 0 position. |
void |
writePot1(int position)
Sets the pot 1 position. |
| Methods inherited from class de.wagner_ibw.iow.i2c.AbstractI2CDevice |
getI2cAddress, getName, readI2C, reportReceived, setMonitor, writeI2C |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String NAME
public final int MAX_POSITION_VALUE
public static final int CMD_POT_0
public static final int CMD_POT_1
public static final int CMD_BOTH_POTS
public static final int CLASS
| Constructor Detail |
public DS1803(int deviceAddress)
throws java.lang.Exception
deviceAddress - Group 2 part of slave address (possible values 0...7).
java.lang.Exception - If anything goes wrong.| Method Detail |
public int readPot0()
throws java.lang.Exception
java.lang.Exception - If any transmission error occurred.
public int readPot1()
throws java.lang.Exception
java.lang.Exception - If any transmission error occurred.
public void writePot0(int position)
throws java.lang.Exception,
java.lang.IllegalArgumentException
position -
java.lang.Exception - If any transmission error occurred.
java.lang.IllegalArgumentException - if the position value is out of range
public void writePot1(int position)
throws java.lang.Exception,
java.lang.IllegalArgumentException
position -
java.lang.Exception - If any transmission error occurred.
java.lang.IllegalArgumentException - if the position value is out of range
public void writeBothPots(int position)
throws java.lang.Exception,
java.lang.IllegalArgumentException
position -
java.lang.Exception - If any transmission error occurred.
java.lang.IllegalArgumentException - if the position value is out of range
public void writeBothPots(int position0,
int position1)
throws java.lang.Exception,
java.lang.IllegalArgumentException
java.lang.Exception - If any transmission error occurred.
java.lang.IllegalArgumentException - if the position value is out of rangepublic void setIowDevice(AbstractIowDevice iow)
I2CDevice
setIowDevice in interface I2CDevicesetIowDevice in class AbstractI2CDeviceiow - Instance of an IO-Warrior device.public java.lang.String toString()
toString in class AbstractI2CDevicepublic boolean equals(java.lang.Object o)
equals in class AbstractI2CDevicepublic int hashCode()
hashCode in class AbstractI2CDevice
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||