|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.eurotech.framework.net.admin.modem.telit.de910.SmBus
public class SmBus
Field Summary | |
---|---|
static int |
ERR_SMBUS_ACCESS_DENIED
|
static int |
ERR_SMBUS_COPYING_DRIVER
|
static int |
ERR_SMBUS_DRIVER_OPEN
|
static int |
ERR_SMBUS_INVALID_HANDLE
|
static int |
ERR_SMBUS_SERVICE_ALREADY_RUNNING
|
static int |
ERR_SMBUS_SERVICE_DOES_NOT_EXIST
|
static int |
ERR_SMBUS_SERVICE_EXISTS
|
static int |
ERR_SMBUS_SERVICE_NAME_INVALID
|
static int |
ERR_SMBUS_TIMEOUT
|
static int |
ERR_SMBUS_TIMEOUT_WAITING_FOR_MUTEX
|
static int |
ERR_SMBUS_UNKNOWN_ERROR
|
static int |
ERR_SMBUS_UNKNOWN_EXCEPTION
|
static int |
SMBUS_1_KHZ
|
static int |
SMBUS_1_MHZ
|
static int |
SMBUS_10_KHZ
|
static int |
SMBUS_100_KHZ
|
static int |
SMBUS_400_KHZ
|
static int |
SMBUS_50_KHZ
|
static int |
SMBUS_ERROR_BASE
|
Fields inherited from interface com.eurotech.framework.net.admin.modem.telit.de910.ICatalystSmBusService |
---|
SERVICE_NAME |
Method Summary | |
---|---|
static SmBus |
getInstance()
|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SMBUS_1_KHZ
public static final int SMBUS_10_KHZ
public static final int SMBUS_50_KHZ
public static final int SMBUS_100_KHZ
public static final int SMBUS_400_KHZ
public static final int SMBUS_1_MHZ
public static final int SMBUS_ERROR_BASE
public static final int ERR_SMBUS_UNKNOWN_ERROR
public static final int ERR_SMBUS_DRIVER_OPEN
public static final int ERR_SMBUS_UNKNOWN_EXCEPTION
public static final int ERR_SMBUS_ACCESS_DENIED
public static final int ERR_SMBUS_SERVICE_NAME_INVALID
public static final int ERR_SMBUS_SERVICE_DOES_NOT_EXIST
public static final int ERR_SMBUS_SERVICE_ALREADY_RUNNING
public static final int ERR_SMBUS_COPYING_DRIVER
public static final int ERR_SMBUS_SERVICE_EXISTS
public static final int ERR_SMBUS_INVALID_HANDLE
public static final int ERR_SMBUS_TIMEOUT_WAITING_FOR_MUTEX
public static final int ERR_SMBUS_TIMEOUT
Method Detail |
---|
public static SmBus getInstance()
public void write(byte slaveAddress, byte command, byte[] data) throws Exception
ICatalystSmBusService
write
in interface ICatalystSmBusService
slaveAddress
- the slave address to write tocommand
- the command to writedata
- the data to write
Exception
- if the write can not succeedpublic byte readByte(byte slaveAddress, byte command) throws Exception
ICatalystSmBusService
readByte
in interface ICatalystSmBusService
slaveAddress
- the slave address to read fromcommand
- the command to send
Exception
- if the read failspublic short readWord(byte slaveAddress, byte command) throws Exception
ICatalystSmBusService
readWord
in interface ICatalystSmBusService
slaveAddress
- the slave address to read fromcommand
- the command to send
Exception
- if the read failspublic byte[] readBlock(byte slaveAddress, byte command) throws Exception
ICatalystSmBusService
readBlock
in interface ICatalystSmBusService
slaveAddress
- the slave address to read fromcommand
- the command to send
Exception
- if the read failspublic int getLastError() throws Exception
ICatalystSmBusService
getLastError
in interface ICatalystSmBusService
Exception
- if there is an error reading the last errorpublic void setLastError(int error) throws Exception
ICatalystSmBusService
setLastError
in interface ICatalystSmBusService
error
- the error code to set in the natvie library
Exception
- if there is an error setting the error code
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |