public class ZtexScanBus1
extends java.lang.Object
ZtexDevice1
instances.ZtexDevice1
Constructor and Description |
---|
ZtexScanBus1(int usbVendorId,
int usbProductId,
boolean scanUnconfigured,
boolean quiet)
Scans the USB for suitable devices and constructs a list of them.
|
ZtexScanBus1(int usbVendorId,
int usbProductId,
boolean scanUnconfigured,
boolean quiet,
int interfaceVersion)
Scans the USB for suitable devices and constructs a list of them.
|
ZtexScanBus1(int usbVendorId,
int usbProductId,
boolean scanUnconfigured,
boolean quiet,
int interfaceVersion,
java.lang.String snString)
Scans the USB for suitable devices and constructs a list of them.
|
ZtexScanBus1(int usbVendorId,
int usbProductId,
boolean scanUnconfigured,
boolean quiet,
int interfaceVersion,
java.lang.String snString,
int productId0,
int productId1,
int productId2,
int productId3)
Scans the USB for suitable devices and constructs a list of them.
|
Modifier and Type | Method and Description |
---|---|
ZtexDevice1 |
device(int i)
Returns a device from the list of devices.
|
protected void |
finalize()
Releases all resources.
|
int |
numberOfDevices()
Returns the number of devices found.
|
void |
printBus(java.io.PrintStream out)
Prints out a list of devices found.
|
void |
ref()
Increases reference counter.
|
void |
unref()
Decreases reference counter and releases resources if 0 is reached.
|
public ZtexScanBus1(int usbVendorId, int usbProductId, boolean scanUnconfigured, boolean quiet, int interfaceVersion, java.lang.String snString, int productId0, int productId1, int productId2, int productId3)
ZtexDevice1.compatible(int,int,int,int)
. unref()
must be called if the class is not used anymore.usbVendorId
- USB vendor ID of the device to be searched forusbProductId
- USB product ID of the device to be searched forscanUnconfigured
- if true, scan for unconfigured devices and devices with Cypress EZ-USB USB ID'squiet
- if true, don't print any warningsinterfaceVersion
- The required interface version (<0 if no interface version is required)snString
- The serial number of the deviceproductId0
- Byte 0 of a given ZTEX product ID (≤0 if not to be considered)productId1
- Byte 1 of a given ZTEX product ID (≤0 if not to be considered)productId2
- Byte 2 of a given ZTEX product ID (≤0 if not to be considered)productId3
- Byte 3 of a given ZTEX product ID (≤0 if not to be considered)public ZtexScanBus1(int usbVendorId, int usbProductId, boolean scanUnconfigured, boolean quiet, int interfaceVersion, java.lang.String snString)
usbVendorId
- USB vendor ID of the device to be searched forusbProductId
- USB product ID of the device to be searched forscanUnconfigured
- if true, scan for unconfigured devices and devices with Cypress EZ-USB USB ID'squiet
- if true, don't print any warningsinterfaceVersion
- The required interface version (<0 if no interface version is required)snString
- The serial number of the devicepublic ZtexScanBus1(int usbVendorId, int usbProductId, boolean scanUnconfigured, boolean quiet, int interfaceVersion)
usbVendorId
- USB vendor ID of the device to be searched forusbProductId
- USB product ID of the device to be searched forscanUnconfigured
- if true, scan for unconfigured devices and devices with Cypress EZ-USB USB ID'squiet
- if true, don't print any warningsinterfaceVersion
- The required interface version (<0 if no interface version is required)public ZtexScanBus1(int usbVendorId, int usbProductId, boolean scanUnconfigured, boolean quiet)
usbVendorId
- USB vendor ID of the device to be searched forusbProductId
- USB product ID of the device to be searched forscanUnconfigured
- if true, scan for unconfigured devices and devices with Cypress EZ-USB USB ID'squiet
- if true, don't print any warningspublic void printBus(java.io.PrintStream out)
out
- Where the output is to be printed to.public final int numberOfDevices()
public final ZtexDevice1 device(int i) throws java.lang.IndexOutOfBoundsException
i
- The device index.java.lang.IndexOutOfBoundsException
- if i<0 or i≥numberOfDevices()
public void ref()
public void unref()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable