|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.wagner_ibw.iow.i2c.I2CAddress
This class represents an i2c slave address. It contains the group 1 part (4 bit long, further called 'device class') and the group 2 part (3 bit long, further called device address) of the slave address.
Field Summary | |
private int |
deviceAddress
Group 2 part of i2c slave address (bit 3...1). |
private int |
deviceClass
Group 1 part of i2c slave address (bit 7...4). |
private int |
slaveAddress
Complete i2c slave address. |
Constructor Summary | |
I2CAddress(int deviceClass,
int deviceAddress)
Creates an new I2CAddress. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Indicates whether some other I2CAddress object is "equal to" this one. |
int |
getDeviceAddress()
Returns the device address. |
int |
getDeviceClass()
Returns the device class. |
int |
getReadAddress()
Returns the slave address for read operations (bit 0 is set). |
int |
getWriteAddress()
Returns the slave address for write operations (bit 0 is clear). |
int |
hashCode()
Returns a hash code value for this I2CAddress object. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private int deviceClass
private int deviceAddress
private int slaveAddress
Constructor Detail |
public I2CAddress(int deviceClass, int deviceAddress)
deviceClass
- Group 1 part (device class) of the i2c slave address.deviceAddress
- Group 2 part (device address) of the i2c slave address.Method Detail |
public int getDeviceClass()
public int getDeviceAddress()
public int getReadAddress()
public int getWriteAddress()
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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |