]> git.basschouten.com Git - openhab-addons.git/blob
f543aeed6b2c583ec185ec4f3bbd582cb73fb192
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2020 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.pioneeravr.internal.protocol.avr;
14
15 /**
16  * The base interface for an AVR command.
17  *
18  * @author Antoine Besnard - Initial contribution
19  */
20 public interface AvrCommand {
21
22     /**
23      * Represent a CommandType of command requests
24      */
25     public interface CommandType {
26
27         /**
28          * Return the command of this command type for the given zone.
29          *
30          * The first zone number is 1.
31          *
32          * @return
33          */
34         public String getCommand(int zone);
35
36         /**
37          * Return the name of the command type
38          *
39          * @return
40          */
41         public String name();
42     }
43
44     /**
45      * Return the command to send to the AVR.
46      *
47      * @return
48      */
49     public String getCommand();
50
51     /**
52      * Return the number of the zone this command will be sent to.
53      *
54      * @return
55      */
56     public int getZone();
57
58     /**
59      * Return the the command type of this command.
60      *
61      * @return
62      */
63     public CommandType getCommandType();
64 }