2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.modbus.discovery;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.binding.modbus.handler.ModbusEndpointThingHandler;
19 import org.openhab.core.thing.ThingTypeUID;
22 * Interface for participants of Modbus discovery
23 * This is an asynchronous process where a participant can discover
24 * multiple things on a Modbus endpoint.
26 * Results should be submitted using the ModbusDiscvoeryListener
27 * supplied at the begin of the scan.
29 * @author Nagy Attila Gabor - initial contribution
33 public interface ModbusDiscoveryParticipant {
36 * Defines the list of thing types that this participant can identify
38 * @return a set of thing type UIDs for which results can be created
40 public Set<ThingTypeUID> getSupportedThingTypeUIDs();
43 * Start an asynchronous discovery process of a Modbus endpoint
45 * @param handler the endpoint that should be discovered
47 public void startDiscovery(ModbusEndpointThingHandler handler, ModbusDiscoveryListener listener);