|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cardbus.CardBus
Constructor Summary | |
CardBus()
|
Method Summary | |
(package private) static void |
|
static void |
closeConnections()
Disposes a handle to the driver. |
static void |
connect()
Gets handle to the driver. |
static boolean |
connect(int device_number)
Gets handle to the driver. |
static java.lang.String[] |
getPortNames()
Finds the names of all the available CardBus devices on the computer in use. |
int |
readIoFixAddr8bit(int address,
int noOfBytesToRead,
byte[] bufferForReadValues)
Reads 8-bit words from I/O space at a fixed address. |
int |
readMemoryFixAddr32bit(int address,
int noOfBytesToRead,
byte[] bufferForReadValues)
Reads 32-bit words from memory space at a fixed address. |
java.lang.String |
sendAndReceiveData(java.lang.String messageToBeSent,
int timeOutValue)
Sends a String over an existing CardBus connection and
waits for a reply |
void |
sendData(java.lang.String messageToBeSent)
Sends a String over an existing CardBus connection |
int |
writeIoFixAddr8bit(int address,
int noOfBytesToWrite,
byte[] bufferWithValuesToWrite)
Writes 8-bit words to I/O space at a fixed address. |
int |
writeMemFixAddr32bit(int address,
int noOfBytesToWrite,
byte[] bufferWithValuesToWrite)
Writes 32-bit words to memory space at a fixed address. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CardBus()
Method Detail |
static void()
public static void closeConnections()
public static void connect() throws CardbusGetHandleException
CardbusGetHandleException
- if there was a problempublic static boolean connect(int device_number)
device_number
- for the appropriate devicepublic static java.lang.String[] getPortNames()
String[]
array containg the names of the CardBus devices foundpublic int readIoFixAddr8bit(int address, int noOfBytesToRead, byte[] bufferForReadValues) throws CardbusNoHandleException, CardbusBadParameterException, UnknownCardbusErrorException
address
- the address at which the access to the hardware
will take place at. The address
must be in the
asssigned I/O space.noOfBytesToRead
- the number of bytes to read.bufferForReadValues
- a buffer for the read data. The size of
the buffer in bytes must be equal to or greater than
noOfBytesToRead
.CardbusBadParameterException
- if one or several parameter have invalid
values.CardbusNoHandleException
- if there is currently no handle established
with the driver.UnknownCardbusErrorException
- if an unknown error occurred.public int readMemoryFixAddr32bit(int address, int noOfBytesToRead, byte[] bufferForReadValues) throws CardbusNoHandleException, CardbusBadParameterException, UnknownCardbusErrorException
address
- the address at which the access to the hardware
will take place at. The address
must be in the
asssigned memory space. Must be a multiple of 4.noOfBytesToRead
- the number of bytes to read. Must be a multiple of 4.bufferForReadValues
- a buffer for the read data.
The size of the buffer in bytes must be equal to or greater than
noOfBytesToRead
.CardbusBadParameterException
- if one or several parameter have invalid
values.CardbusNoHandleException
- if there is currently no handle established
with the driver.UnknownCardbusErrorException
- if an unknown error occurred.public java.lang.String sendAndReceiveData(java.lang.String messageToBeSent, int timeOutValue) throws UnknownCardbusErrorException
String
over an existing CardBus connection and
waits for a replymessageToBeSent
- a String
to be sent over the
existing CardBus connection, excluding the carriage return and the
linefeed at the endtimeOutValue
- specifies how many milli-seconds after the
message was sent the waiting for a reply will cease and Timeout will be
returnedString
Timeout will
be returned. Otherwise, the received reply message, excluding
the initial @ and the carriage return and linefeed at the end, will be
returned.UnknownCardbusErrorException
- if an I/O error occurs while trying to receive
data over the CardBus connectionpublic void sendData(java.lang.String messageToBeSent) throws UnknownCardbusErrorException
String
over an existing CardBus connectionmessageToBeSent
- a String
to be sent over the
existing CardBus connection, excluding the carriage return and the
linefeed at the endUnknownCardbusErrorException
- if an I/O error occurs while trying to send
data over the CardBus connectionpublic int writeIoFixAddr8bit(int address, int noOfBytesToWrite, byte[] bufferWithValuesToWrite) throws CardbusNoHandleException, CardbusBadParameterException, UnknownCardbusErrorException
address
- the address at which the access to the hardware
will take place at. The address
must be in the
asssigned I/O space.noOfBytesToWrite
- the number of bytes to write.bufferWithValuesToWrite
- a buffer containing the data to be stored
in the hardware. The size of the buffer in bytes must be equal to or greater than
noOfBytesToWrite
.CardbusBadParameterException
- if one or several parameter have invalid
values.CardbusNoHandleException
- if there is currently no handle established
with the driver.UnknownCardbusErrorException
- if an unknown error occurred.public int writeMemFixAddr32bit(int address, int noOfBytesToWrite, byte[] bufferWithValuesToWrite) throws CardbusNoHandleException, CardbusBadParameterException, UnknownCardbusErrorException
address
- the address at which the first access to the hardware
will take place at. The address
must be in the
asssigned memory space. Must be a multiple of 4.noOfBytesToWrite
- the number of bytes to write. Must be
a multiple of 4.bufferWithValuesToWrite
- a buffer containing the data to be stored
in the hardware. The size of the buffer in bytes must be equal to or greater than
noOfBytesToWrite
.CardbusBadParameterException
- if one or several parameter have invalid
values.CardbusNoHandleException
- if there is currently no handle established
with the driver.UnknownCardbusErrorException
- if an unknown error occurred.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |