Class UsbSerialDeviceInformation
java.lang.Object
org.openhab.core.config.discovery.usbserial.UsbSerialDeviceInformation
This is a data container for information about a USB device and the serial port that can be
used to access the device using a serial interface.
It contains, on the one hand, information from the USB standard device descriptor and standard interface descriptor,
and, on
the other hand, the name of the serial port (for Linux, this would be, e.g., '/dev/ttyUSB0', for Windows, e.g.,
'COM4').
- Author:
- Henning Sudbrock - Initial contribution
-
Constructor Details
-
UsbSerialDeviceInformation
-
-
Method Details
-
getVendorId
public int getVendorId()- Returns:
- The vendor ID of the USB device (field 'idVendor' in the USB standard device descriptor).
-
getProductId
public int getProductId()- Returns:
- The product ID of the USB device (field 'idProduct' in the USB standard device descriptor).
-
getSerialNumber
- Returns:
- The serial number of the USB device (field 'iSerialNumber' in the USB standard device descriptor).
-
getManufacturer
- Returns:
- The manufacturer of the USB device (field 'iManufacturer' in the USB standard device descriptor).
-
getProduct
- Returns:
- The product description of the USB device (field 'iProduct' in the USB standard device descriptor).
-
getInterfaceNumber
public int getInterfaceNumber()- Returns:
- The interface number of the used USB interface (field 'bInterfaceNumber' in the USB standard interface descriptor).
-
getInterfaceDescription
- Returns:
- Description of the used USB interface (field 'iInterface' in the USB standard interface descriptor).
-
getSerialPort
- Returns:
- The name of the serial port assigned to the USB device. Examples: /dev/ttyUSB1, COM4
-
getRemote
public boolean getRemote()- Returns:
- if the serial device is remote or local.
-
setRemote
Set the remote flag -
hashCode
public int hashCode() -
equals
-
toString
-