com.eurotech.framework.net.admin.modem.telit.he910
Interface ICatalystSmBusService

All Known Implementing Classes:
SmBus

public interface ICatalystSmBusService


Field Summary
static String SERVICE_NAME
           
 
Method Summary
 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
 

Field Detail

SERVICE_NAME

static final String SERVICE_NAME
Method Detail

write

void write(byte slaveAddress,
           byte command,
           byte[] data)
           throws Exception
writes data to the SMbus

Parameters:
slaveAddress - the slave address to write to
command - the command to write
data - the data to write
Throws:
Exception - if the write can not succeed

readByte

byte readByte(byte slaveAddress,
              byte command)
              throws Exception
reads a byte from the SMBus

Parameters:
slaveAddress - the slave address to read from
command - the command to send
Returns:
the byte read from the SMBus
Throws:
Exception - if the read fails

readWord

short readWord(byte slaveAddress,
               byte command)
               throws Exception
reads a 16 bit word from the SMBus

Parameters:
slaveAddress - the slave address to read from
command - the command to send
Returns:
the word read from the SMBus
Throws:
Exception - if the read fails

readBlock

byte[] readBlock(byte slaveAddress,
                 byte command)
                 throws Exception
reads a block of bytes from the SMBus

Parameters:
slaveAddress - the slave address to read from
command - the command to send
Returns:
an array of bytes read from the SMBus
Throws:
Exception - if the read fails

getLastError

int getLastError()
                 throws Exception
gets the last error provided by the SMBus native library

Returns:
an int representing the last error provided by the SMBus native library
Throws:
Exception - if there is an error reading the last error

setLastError

void setLastError(int error)
                  throws Exception
sets the last error in the SMBus native library

Parameters:
error - the error code to set in the natvie library
Throws:
Exception - if there is an error setting the error code


Copyright © 2013. All Rights Reserved.