|
|||||||||||
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
This is the abtract implementation of the I2CDevice.java interface
Field Summary | |
private static boolean |
CLASS_DEBUG
|
protected I2CAddress |
devAdr
Slave address of this i2c device. |
private int |
GENERATE_START
|
private int |
GENERATE_STOP
|
protected AbstractIowDevcie |
iow
Reference to the underlying IOW device. |
int |
MAX_I2C_LENGTH
|
protected Monitor |
monitor
Reference to the i2ctransaction monitor. |
private java.lang.String |
name
Device name. |
protected sun.misc.Queue |
readQueue
|
protected sun.misc.Queue |
writeAckQueue
|
Constructor Summary | |
AbstractI2CDevice(java.lang.String name,
int deviceClass,
int deviceAddress)
Constructor |
Method Summary | |
private void |
debug(java.lang.String msg)
|
boolean |
equals(java.lang.Object o)
Indicates whether some other LM75 object is "equal to" this one. |
I2CAddress |
getI2cAddress()
Returns the i2c device slave address. |
java.lang.String |
getName()
Returns the name of the i2c device. |
int |
hashCode()
Returns a hash code value for this LM75 object. |
int[] |
readI2C(int[] in,
int expected)
Read operation from an i2c devices. |
void |
reportReceived(int[] readBuffer)
Callback method is called when a matching report was received. |
abstract void |
setIowDevice(AbstractIowDevcie iow)
Sets the reference to an iow device for write report operations. |
void |
setMonitor(Monitor monitor)
|
java.lang.String |
toString()
Returns Information about this i2c device as String. |
void |
writeI2C(int[] in)
Write operation to an i2c device. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private final int GENERATE_START
private final int GENERATE_STOP
public final int MAX_I2C_LENGTH
protected AbstractIowDevcie iow
protected Monitor monitor
protected I2CAddress devAdr
private java.lang.String name
protected sun.misc.Queue writeAckQueue
protected sun.misc.Queue readQueue
private static final boolean CLASS_DEBUG
Constructor Detail |
public AbstractI2CDevice(java.lang.String name, int deviceClass, int deviceAddress) throws java.lang.Exception
deviceClass
- Group 1 part of slave address.deviceAddress
- Group 2 part of slave address (possible values 0...7).
java.lang.Exception
- If anything goes wrong.Method Detail |
public void writeI2C(int[] in) throws java.lang.Exception
in
-
java.lang.Exception
public int[] readI2C(int[] in, int expected) throws java.lang.Exception
in
- (max 6 bytes long!)expected
-
java.lang.Exception
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public I2CAddress getI2cAddress()
I2CDevice
getI2cAddress
in interface I2CDevice
public java.lang.String getName()
I2CDevice
getName
in interface I2CDevice
public void reportReceived(int[] readBuffer)
I2CDevice
reportReceived
in interface I2CDevice
readBuffer
- Read buffer from a received report.public abstract void setIowDevice(AbstractIowDevcie iow)
I2CDevice
setIowDevice
in interface I2CDevice
iow
- Instance of an iow device.public void setMonitor(Monitor monitor)
private void debug(java.lang.String msg)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |