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
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.openhab.core.config.discovery.addon.BaseAddonFinder
addonCandidates -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddUsbSerialDiscovery(UsbSerialDiscovery usbSerialDiscovery) The framework calls this method to scan through the candidate list ofAddonInfoand return a subset of those that it suggests to be installed.protected voidremoveUsbSerialDiscovery(UsbSerialDiscovery usbSerialDiscovery) voidusbSerialDeviceDiscovered(UsbSerialDeviceInformation discoveredInfo) Add the discovered USB device information record to our internal map.voidusbSerialDeviceRemoved(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:AddonFinderThe framework calls this method to scan through the candidate list ofAddonInfoand return a subset of those that it suggests to be installed.- Specified by:
getSuggestedAddonsin interfaceAddonFinder
-
getServiceName
- Specified by:
getServiceNamein 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:
usbSerialDeviceDiscoveredin interfaceUsbSerialDiscoveryListener- Parameters:
discoveredInfo- the newly discovered USB device information.
-
usbSerialDeviceRemoved
Description copied from interface:UsbSerialDiscoveryListenerCalled when a serial port provided by a USB device has been removed.- Specified by:
usbSerialDeviceRemovedin interfaceUsbSerialDiscoveryListener
-