]> git.basschouten.com Git - openhab-addons.git/blob
eff4c7de3ea249719fda0531b23faedee99110e3
[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.sonyprojector.internal.communication;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * Represents the different kinds of commands
19  *
20  * @author Markus Wehrle - Initial contribution
21  * @author Laurent Garnier - Transform into an enum and rename it
22  */
23 @NonNullByDefault
24 public enum SonyProjectorItem {
25
26     // Not available for VW40, VW50, VW60, VW70, VW80, VW85, VW90, VW95, VW100, VW200, VW1000ES, VW1100ES,
27     // HW10, HW15, HW20, HW30ES, HW35ES, HW40ES, HW50ES, HW55ES, HW58ES
28     POWER("Power", new byte[] { 0x01, 0x30 }),
29
30     INPUT("Input", new byte[] { 0x00, 0x01 }),
31     CALIBRATION_PRESET("Calibration Preset", new byte[] { 0x00, 0x02 }),
32     CONTRAST("Contrast", new byte[] { 0x00, 0x10 }),
33     BRIGHTNESS("Brigtness", new byte[] { 0x00, 0x11 }),
34     COLOR("Color", new byte[] { 0x00, 0x12 }),
35     HUE("Hue", new byte[] { 0x00, 0x13 }),
36     SHARPNESS("Sharpness", new byte[] { 0x00, 0x14 }),
37     COLOR_TEMP("Color Temperature", new byte[] { 0x00, 0x17 }),
38
39     // Not available for VW100, VW200
40     LAMP_CONTROL("Lamp Control", new byte[] { 0x00, 0x1A }),
41
42     CONTRAST_ENHANCER("Contrast Enhancer", new byte[] { 0x00, 0x1C }),
43
44     // Not available for VW260, VW270, VW285, VW295, VW300, VW315, VW320, VW328, VW350, VW365, HW35ES, HW40ES, HW45ES,
45     // HW58ES
46     IRIS_MODE("Iris Mode", new byte[] { 0x00, 0x1D }),
47
48     // Not available for VW315, VW320, VW328, VW365, VW515, VW520, VW528, VW665, HW60, HW65, HW68
49     REAL_COLOR("Real Color Processing", new byte[] { 0x00, 0x1E }),
50
51     // Not available for VW40, VW50, VW60
52     FILM_MODE("Film Mode", new byte[] { 0x00, 0x1F }),
53
54     ASPECT("Aspect", new byte[] { 0x00, 0x20 }),
55     GAMMA_CORRECTION("Gamma Correction", new byte[] { 0x00, 0x22 }),
56     COLOR_SPACE("Color Space", new byte[] { 0x00, 0x3B }),
57     PICTURE_MUTING("Picture Muting", new byte[] { 0x00, 0x30 }),
58     NR("NR", new byte[] { 0x00, 0x25 }),
59
60     // Not available for VW40, VW50, VW60, VW100, VW200, VW260, VW270, VW285, VW295, VW300, VW315, VW320, VW328, VW350,
61     // VW365, VW385, VW500, VW515, VW520, VW528, VW550, VW570, VW600, VW665, VW675, VW760, VW870, VW885, VW995,
62     // VW1000ES, VW1100ES, HW35ES, HW40ES, HW45ES, HW50ES, HW55ES, HW58ES, HW60, HW65, HW68
63     BLOCK_NR("Block NR", new byte[] { 0x00, 0x26 }),
64     MOSQUITO_NR("Mosquito NR", new byte[] { 0x00, 0x27 }),
65
66     // Not available for VW40, VW50, VW60, VW70, VW80, VW85, VW90, VW95, VW100, VW200, HW10, HW15, HW20, HW30ES
67     MPEG_NR("MPEG NR", new byte[] { 0x00, 0x6C }),
68
69     // Not available for VW260, VW270, VW285, VW295, VW300, VW315, VW320, VW328, VW350, VW365, VW385, VW500, VW515,
70     // VW520, VW528, VW550, VW570, VW600, VW665, VW675, VW760, VW870, VW885, VW995, HW45ES, HW60, HW65, HW68
71     OVERSCAN("Overscan", new byte[] { 0x00, 0x23 }),
72
73     // Not available for VW100, VW260, VW270, VW285, VW295, VW300, VW315, VW320, VW328, VW350, VW365, VW385, VW500,
74     // VW515, VW520, VW528, VW550, VW570, VW600, VW665, VW675, VW760, VW870, VW885, VW995, VW1000ES, VW1100ES, HW35ES,
75     // HW40ES, HW45ES, HW50ES, HW55ES, HW58ES, HW60, HW65, HW68
76     IRIS_SENSITIVITY("Iris Sensitivity", new byte[] { 0x00, 0x56 }),
77
78     // Not available for VW100, VW260, VW270, VW285, VW295, VW300, VW315, VW320, VW328, VW350, VW365, VW760, VW870,
79     // VW885, VW995, HW35ES, HW40ES, HW45ES, HW58ES
80     IRIS_MANUAL("Iris Manual", new byte[] { 0x00, 0x57 }),
81
82     // Not available for VW40, VW50, VW60, VW70, VW100, VW260, VW270, VW285, VW295, VW300, VW315, VW320, VW328, VW350,
83     // VW365, VW385, VW500, VW515, VW520, VW528, VW570, VW600, VW665, VW675, VW695, VW760, VW870, VW885, VW995, HW10,
84     // HW15, HW20, HW30ES, HW45ES, HW60, HW65, HW68
85     FILM_PROJECTION("Film Projection", new byte[] { 0x00, 0x58 }),
86
87     // Not available for VW40, VW50, VW60, VW70, VW100, HW10, HW15, HW20, HW30ES
88     MOTION_ENHANCER("Motion Enhancer", new byte[] { 0x00, 0x59 }),
89
90     // Not available for VW40, VW50, VW60, VW100
91     XVCOLOR("xvColor", new byte[] { 0x00, 0x5A }),
92
93     // Not available for VW40, VW50, VW60, VW70, VW80, VW85, VW90, VW100, VW200, VW260, VW270, VW285, VW295, VW300,
94     // VW315, VW320, VW328, VW350, VW365, HW10, HW15, HW20, HW30ES, HW35ES, HW40ES, HW45ES, HW50ES, HW55ES, HW58ES,
95     // HW60, HW65, HW68
96     PICTURE_POSITION("Picture Position", new byte[] { 0x00, 0x66 }),
97
98     // Not available for VW40, VW50, VW60, VW70, VW85, VW95, VW100, HW15, HW20, HW30ES
99     REALITY_CREATION("Reality Creation", new byte[] { 0x00, 0x67 }),
100
101     // Not available for VW40, VW50, VW60, VW70, VW85, VW95, VW100, VW315, VW320, VW328, VW365, VW1000ES, VW1100ES
102     // HW15, HW20, HW30ES, HW35ES, HW40ES, HW50ES, HW55ES, HW58ES, HW60, HW65, HW68
103     HDR("HDR", new byte[] { 0x00, 0x7C }),
104
105     // Not available for VW40, VW50, VW60, VW70, VW85, VW95, VW100, VW1000ES, VW1100ES
106     // HW15, HW20, HW30ES, HW35ES, HW40ES, HW50ES, HW55ES, HW58ES
107     INPUT_LAG_REDUCTION("Input Lag Reduction", new byte[] { 0x00, (byte) 0x99 }),
108
109     STATUS_ERROR("Status Error", new byte[] { 0x01, 0x01 }),
110     STATUS_POWER("Status Power", new byte[] { 0x01, 0x02 }),
111     LAMP_USE_TIME("Lamp Use Time", new byte[] { 0x01, 0x13 }),
112
113     // Not available for VW40, VW50, VW60, VW70, VW100
114     STATUS_ERROR2("Status Error 2", new byte[] { 0x01, 0x25 }),
115
116     IR_POWER_ON("Power On", new byte[] { 0x17, 0x2E }),
117     IR_POWER_OFF("Power Off", new byte[] { 0x17, 0x2F }),
118
119     CATEGORY_CODE("Category Code", new byte[] { (byte) 0x80, 0x00 }),
120     MODEL_NAME("Model Name", new byte[] { (byte) 0x80, 0x01 }),
121     SERIAL_NUMBER("Serial Number", new byte[] { (byte) 0x80, 0x02 }),
122     INSTALLATION_LOCATION("Installation Location", new byte[] { (byte) 0x80, 0x03 });
123
124     private String name;
125     private byte[] code;
126
127     /**
128      *
129      * @param name the item name
130      * @param code the data code associated to the item
131      */
132     private SonyProjectorItem(String name, byte[] code) {
133         this.name = name;
134         this.code = code;
135     }
136
137     /**
138      * Get the data code associated to the current item
139      *
140      * @return the data code
141      */
142     public byte[] getCode() {
143         return code;
144     }
145
146     /**
147      * Get the item name
148      *
149      * @return the name
150      */
151     public String getName() {
152         return name;
153     }
154 }