|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.acces.aiousb.USBDevice
public abstract class USBDevice
Class USBDevice is the abstract super class of all USB device families.
Field Summary | |
---|---|
static int |
CLEAR_FIFO_METHOD_AUTO
Enable auto-clear FIFO every falling edge of DIO port D bit 1 (on digital boards, analog boards treat as 0). |
static int |
CLEAR_FIFO_METHOD_IMMEDIATE
Clear FIFO as soon as command received (and disable auto-clear). |
static int |
CLEAR_FIFO_METHOD_IMMEDIATE_AND_ABORT
Clear FIFO as soon as command received (and disable auto-clear), and abort stream. |
static int |
CLEAR_FIFO_METHOD_WAIT
Clear FIFO and wait for it to be emptied. |
static int |
CUSTOM_EEPROM_SIZE
Size of custom EEPROM area (bytes). |
Method Summary | |
---|---|
byte[] |
customEEPROMRead(int address,
int numBytes)
Reads data from the custom programming area of the device EEPROM. |
USBDevice |
customEEPROMWrite(int address,
byte[] data)
Writes data to the custom programming area of the device EEPROM. |
int |
getCommTimeout()
Gets the current timeout setting for USB communications. |
int |
getDeviceIndex()
Gets the device's index on the USB bus. |
java.lang.String |
getName()
Gets the device's name. |
int |
getProductID()
Gets the device's product ID. |
long |
getSerialNumber()
Gets the device's serial number. |
java.io.PrintStream |
print(java.io.PrintStream stream)
Prints the properties of this device and all of its subsystems. |
USBDevice |
reset()
Perform a USB port reset to reinitialize the device. |
USBDevice |
setCommTimeout(int timeout)
Sets the timeout for USB communications. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CUSTOM_EEPROM_SIZE
public static final int CLEAR_FIFO_METHOD_IMMEDIATE
public static final int CLEAR_FIFO_METHOD_AUTO
public static final int CLEAR_FIFO_METHOD_IMMEDIATE_AND_ABORT
public static final int CLEAR_FIFO_METHOD_WAIT
Method Detail |
---|
public java.io.PrintStream print(java.io.PrintStream stream)
stream
- the print stream where properties will be printed.
public int getDeviceIndex()
public int getProductID()
Product IDs
public java.lang.String getName()
public long getSerialNumber()
OperationFailedException
public int getCommTimeout()
setCommTimeout()
public USBDevice setCommTimeout(int timeout)
timeout
- the new timeout setting (in milliseconds; default is 5,000).
java.lang.IllegalArgumentException
OperationFailedException
public USBDevice reset()
OperationFailedException
public USBDevice customEEPROMWrite(int address, byte[] data)
setCommTimeout()
).
Otherwise, a timeout error will occur before the write procedure finishes. Once the write procedure
is finished, you can restore the timeout to a more reasonable value. If you are writing a smaller amount
of data to the EEPROM, you may reduce the timeout proportionately.
address
- starting address from 0x000 to 0x1FF within the EEPROM.data
- an array of bytes containing the data to write to the EEPROM, beginning at the starting address.
The starting address plus the data size may not exceed the maximum address of 0x1FF.
java.lang.IllegalArgumentException
OperationFailedException
public byte[] customEEPROMRead(int address, int numBytes)
address
- starting address from 0x000 to 0x1FF within the EEPROM.numBytes
- the number of bytes to read from the EEPROM, beginning at the starting address.
The starting address plus the number of bytes to read may not exceed the maximum address of 0x1FF.
java.lang.IllegalArgumentException
OperationFailedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |