]> git.basschouten.com Git - openhab-addons.git/blob
a0af3be66bbc66224e4ca424394edb8c991fd40a
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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          * Return the command of this command type.
28          *
29          * @return
30          */
31         public String getCommand();
32
33         /**
34          * Return the command of this command type for the given zone.
35          *
36          * The first zone number is 1.
37          *
38          * @return
39          */
40         public String getCommand(int zone);
41
42         /**
43          * Return the name of the command type
44          *
45          * @return
46          */
47         public String name();
48     }
49
50     /**
51      * Return the command to send to the AVR.
52      *
53      * @return
54      */
55     public String getCommand();
56
57     /**
58      * Return the number of the zone this command will be sent to.
59      *
60      * @return
61      */
62     public int getZone();
63
64     /**
65      * Return the the command type of this command.
66      *
67      * @return
68      */
69     public CommandType getCommandType();
70 }