public interface ICatalystSmBusService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SERVICE_NAME |
Modifier and Type | Method and Description |
---|---|
int |
getLastError()
gets the last error provided by the SMBus native library
|
byte[] |
readBlock(byte slaveAddress,
byte command)
reads a block of bytes from the SMBus
|
byte |
readByte(byte slaveAddress,
byte command)
reads a byte from the SMBus
|
short |
readWord(byte slaveAddress,
byte command)
reads a 16 bit word from the SMBus
|
void |
setLastError(int error)
sets the last error in the SMBus native library
|
void |
write(byte slaveAddress,
byte command,
byte[] data)
writes data to the SMbus
|
void write(byte slaveAddress, byte command, byte[] data) throws java.lang.Exception
slaveAddress
- the slave address to write tocommand
- the command to writedata
- the data to writejava.lang.Exception
- if the write can not succeedbyte readByte(byte slaveAddress, byte command) throws java.lang.Exception
slaveAddress
- the slave address to read fromcommand
- the command to sendjava.lang.Exception
- if the read failsshort readWord(byte slaveAddress, byte command) throws java.lang.Exception
slaveAddress
- the slave address to read fromcommand
- the command to sendjava.lang.Exception
- if the read failsbyte[] readBlock(byte slaveAddress, byte command) throws java.lang.Exception
slaveAddress
- the slave address to read fromcommand
- the command to sendjava.lang.Exception
- if the read failsint getLastError() throws java.lang.Exception
java.lang.Exception
- if there is an error reading the last errorvoid setLastError(int error) throws java.lang.Exception
error
- the error code to set in the natvie libraryjava.lang.Exception
- if there is an error setting the error codeCopyright © 2009 Eurotech Inc. All rights reserved.