Class UsbAddonFinder
java.lang.Object
org.openhab.core.config.discovery.addon.BaseAddonFinder
org.openhab.core.config.discovery.addon.usb.UsbAddonFinder
- All Implemented Interfaces:
AddonFinder
,UsbSerialDiscoveryListener
@NonNullByDefault
public class UsbAddonFinder
extends BaseAddonFinder
implements UsbSerialDiscoveryListener
This is a product - match on the product description text
manufacturer - match on the device manufacturer text
chipId - match on the chip vendor id plus product id
remote - match on whether the device is connected remotely or locally
AddonFinder
for finding suggested add-ons related to USB devices.
It supports the following values for the 'match-property' 'name' element:
- Author:
- Andrew Fiddian-Green - Initial contribution
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class org.openhab.core.config.discovery.addon.BaseAddonFinder
addonCandidates
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addUsbSerialDiscovery
(UsbSerialDiscovery usbSerialDiscovery) The framework calls this method to scan through the candidate list ofAddonInfo
and return a subset of those that it suggests to be installed.protected void
removeUsbSerialDiscovery
(UsbSerialDiscovery usbSerialDiscovery) void
usbSerialDeviceDiscovered
(UsbSerialDeviceInformation discoveredInfo) Add the discovered USB device information record to our internal map.void
usbSerialDeviceRemoved
(UsbSerialDeviceInformation removedInfo) Called when a serial port provided by a USB device has been removed.Methods inherited from class org.openhab.core.config.discovery.addon.BaseAddonFinder
propertyMatches, setAddonCandidates, unsetAddonCandidates
-
Field Details
-
SERVICE_TYPE
- See Also:
-
SERVICE_NAME
- See Also:
-
PRODUCT
- See Also:
-
MANUFACTURER
- See Also:
-
CHIP_ID
- See Also:
-
REMOTE
- See Also:
-
SUPPORTED_PROPERTIES
-
-
Constructor Details
-
UsbAddonFinder
public UsbAddonFinder()
-
-
Method Details
-
addUsbSerialDiscovery
-
removeUsbSerialDiscovery
-
getSuggestedAddons
Description copied from interface:AddonFinder
The framework calls this method to scan through the candidate list ofAddonInfo
and return a subset of those that it suggests to be installed.- Specified by:
getSuggestedAddons
in interfaceAddonFinder
-
getServiceName
- Specified by:
getServiceName
in classBaseAddonFinder
-
usbSerialDeviceDiscovered
Add the discovered USB device information record to our internal map. If there is already an entry in the map then merge the two sets of data.- Specified by:
usbSerialDeviceDiscovered
in interfaceUsbSerialDiscoveryListener
- Parameters:
discoveredInfo
- the newly discovered USB device information.
-
usbSerialDeviceRemoved
Description copied from interface:UsbSerialDiscoveryListener
Called when a serial port provided by a USB device has been removed.- Specified by:
usbSerialDeviceRemoved
in interfaceUsbSerialDiscoveryListener
-