]> git.basschouten.com Git - openhab-addons.git/blob
a43920c2a543c64b2557865cd43b5b8636d5f978
[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.yamahareceiver.internal.protocol;
14
15 import java.io.IOException;
16
17 import org.openhab.binding.yamahareceiver.internal.state.ZoneControlState;
18
19 /**
20  * The zone control protocol interface
21  *
22  * @author David Graeff - Initial contribution
23  */
24 public interface ZoneControl extends IStateUpdatable {
25     /**
26      * Switches the zone on/off (off equals network standby here).
27      *
28      * @param on The new power state
29      *
30      * @throws IOException
31      * @throws ReceivedMessageParseException
32      */
33     void setPower(boolean on) throws IOException, ReceivedMessageParseException;
34
35     /**
36      * Sets the absolute volume in decibel.
37      *
38      * @param volume Absolute value in decibel ([-80,+12]).
39      * @throws IOException
40      */
41     void setVolumeDB(float volume) throws IOException, ReceivedMessageParseException;
42
43     /**
44      * Sets the volume in percent
45      *
46      * @param volume
47      * @throws IOException
48      */
49     void setVolume(float volume) throws IOException, ReceivedMessageParseException;
50
51     /**
52      * Increase or decrease the volume by the given percentage.
53      *
54      * @param percent
55      * @throws IOException
56      */
57     void setVolumeRelative(ZoneControlState state, float percent) throws IOException, ReceivedMessageParseException;
58
59     void setMute(boolean mute) throws IOException, ReceivedMessageParseException;
60
61     void setInput(String name) throws IOException, ReceivedMessageParseException;
62
63     void setSurroundProgram(String name) throws IOException, ReceivedMessageParseException;
64
65     void setDialogueLevel(int level) throws IOException, ReceivedMessageParseException;
66
67     /**
68      * Switches the HDMI1 output on or off.
69      *
70      * @param on The new state
71      *
72      * @throws IOException
73      * @throws ReceivedMessageParseException
74      */
75     void setHDMI1Out(boolean on) throws IOException, ReceivedMessageParseException;
76
77     /**
78      * Switches the HDMI2 output on or off.
79      *
80      * @param on The new state
81      *
82      * @throws IOException
83      * @throws ReceivedMessageParseException
84      */
85     void setHDMI2Out(boolean on) throws IOException, ReceivedMessageParseException;
86
87     /**
88      * Sets the active scene for the zone.
89      *
90      * @param scene
91      * @throws IOException
92      * @throws ReceivedMessageParseException
93      */
94     void setScene(String scene) throws IOException, ReceivedMessageParseException;
95 }