|
|||||||||||
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
interface.
Field Summary | |
int |
MAX_I2C_LENGTH
|
Constructor Summary | |
AbstractI2CDevice(java.lang.String name,
int deviceClass,
int deviceAddress)
Constructor |
Method Summary | |
boolean |
equals(java.lang.Object o)
Indicates whether some other i2c device 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 i2c device 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(AbstractIowDevice iow)
Sets the reference to an IO-Warrior device for write report operations. |
void |
setMonitor(Monitor monitor)
Sets the reference to an i2c transaction 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 |
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public final int MAX_I2C_LENGTH
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
- Array of int, data to write.
java.lang.Exception
- If any error occured.public int[] readI2C(int[] in, int expected) throws java.lang.Exception
in
- (max 6 bytes long!)expected
-
java.lang.Exception
public void setMonitor(Monitor monitor)
monitor
- Instance of an i2c transaction monitor.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(AbstractIowDevice iow)
I2CDevice
setIowDevice
in interface I2CDevice
iow
- Instance of an IO-Warrior device.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |