Package io.helins.linux.i2c
Class I2CMessage
- java.lang.Object
-
- io.helins.linux.i2c.I2CMessage
-
public class I2CMessage extends Object
Class representing a message in an I2C transaction.- See Also:
I2CTransaction
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAddress()Retrieves the address of the slave device this message is intented for.I2CBuffergetBuffer()Retrieves the buffer of this message.I2CFlagsgetFlags()Retrieves the flags describing this message.I2CMessagesetAddress(int address)Sets the address of the slave device this message is intended for.I2CMessagesetBuffer(I2CBuffer buffer)Sets the buffer of this message.I2CMessagesetFlags(I2CFlags flags)Sets the flags for describing this message.
-
-
-
Method Detail
-
getAddress
public int getAddress()
Retrieves the address of the slave device this message is intented for.- Returns:
- The address.
-
setAddress
public I2CMessage setAddress(int address)
Sets the address of the slave device this message is intended for.- Parameters:
address- The address of the slave.- Returns:
- This instance.
-
getFlags
public I2CFlags getFlags()
Retrieves the flags describing this message.- Returns:
- The flags.
-
setFlags
public I2CMessage setFlags(I2CFlags flags)
Sets the flags for describing this message.- Parameters:
flags- The flags.- Returns:
- This instance.
-
getBuffer
public I2CBuffer getBuffer()
Retrieves the buffer of this message.- Returns:
- The buffer.
-
setBuffer
public I2CMessage setBuffer(I2CBuffer buffer)
Sets the buffer of this message.- Parameters:
buffer- The buffer.- Returns:
- This instance.
-
-