]> git.basschouten.com Git - openhab-addons.git/blob
373cf415e41daefb050d2336dda0d81872411986
[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.epsonprojector.internal.connector;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.epsonprojector.internal.EpsonProjectorException;
17
18 /**
19  * Base class for Epson projector communication.
20  *
21  * @author Pauli Anttila - Initial contribution
22  */
23 @NonNullByDefault
24 public interface EpsonProjectorConnector {
25
26     /**
27      * Procedure for connecting to projector.
28      *
29      * @throws EpsonProjectorException
30      */
31     void connect() throws EpsonProjectorException;
32
33     /**
34      * Procedure for disconnecting to projector controller.
35      *
36      * @throws EpsonProjectorException
37      */
38     void disconnect() throws EpsonProjectorException;
39
40     /**
41      * Procedure for send raw data to projector.
42      *
43      * @param data
44      *            Message to send.
45      *
46      * @param timeout
47      *            timeout to wait response in milliseconds.
48      *
49      * @throws EpsonProjectorException
50      */
51     String sendMessage(String data, int timeout) throws EpsonProjectorException;
52 }