Interface UsbSerialDiscoveryParticipant


@NonNullByDefault public interface UsbSerialDiscoveryParticipant
A UsbSerialDiscoveryParticipant that is registered as a component is picked up by the UsbSerialDiscoveryService and can thus contribute DiscoveryResults from scans for USB devices with an associated serial port.
Author:
Henning Sudbrock - Initial contribution
  • Method Details

    • getSupportedThingTypeUIDs

      Set<ThingTypeUID> getSupportedThingTypeUIDs()
      Defines the list of thing types that this participant can identify.
      Returns:
      a set of thing type UIDs for which results can be created
    • createResult

      @Nullable DiscoveryResult createResult(UsbSerialDeviceInformation deviceInformation)
      Creates a discovery result for a USB device with corresponding serial port.
      Parameters:
      deviceInformation - information about the USB device and the corresponding serial port
      Returns:
      the according discovery result or null if the device is not supported by this participant
    • getThingUID

      @Nullable ThingUID getThingUID(UsbSerialDeviceInformation deviceInformation)
      Returns the thing UID for a USB device with corresponding serial port.
      Parameters:
      deviceInformation - information about the USB device and the corresponding serial port
      Returns:
      a thing UID or null if the device is not supported by this participant