]> git.basschouten.com Git - openhab-addons.git/blob
772d1bb644bdddf2dc41d1b0cb49f9060e78199c
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.modbus.discovery.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.binding.ThingHandlerService;
17
18 /**
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
22  * thing handler.
23  *
24  * @author Nagy Attila Gabor - initial contribution
25  */
26 @NonNullByDefault
27 public interface ModbusThingHandlerDiscoveryService extends ThingHandlerService {
28
29     /**
30      * Implementation should start a discovery when this method gets called
31      *
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
34      */
35     public boolean startScan(ModbusDiscoveryService service);
36
37     /**
38      * This method should return true, if an async scan is in progress
39      *
40      * @return true if a scan is in progress false otherwise
41      */
42     public boolean scanInProgress();
43 }