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.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.binding.ThingHandlerService;
19 * Implementation of this interface is responsible for discovery over
20 * a Modbus endpoint. Each time a supporting endpoint handler is created
21 * an instance of this service will be created as well and attached to the
24 * @author Nagy Attila Gabor - initial contribution
27 public interface ModbusThingHandlerDiscoveryService extends ThingHandlerService {
30 * Implementation should start a discovery when this method gets called
32 * @param service the discovery service that should be called when the discovery is finished
33 * @return returns true if discovery is enabled, false otherwise
35 public boolean startScan(ModbusDiscoveryService service);
38 * This method should return true, if an async scan is in progress
40 * @return true if a scan is in progress false otherwise
42 public boolean scanInProgress();