2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.sonyprojector.internal.communication;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * Represents the different kinds of commands
20 * @author Markus Wehrle - Initial contribution
21 * @author Laurent Garnier - Transform into an enum and rename it
24 public enum SonyProjectorItem {
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 }),
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 }),
39 // Not available for VW100, VW200
40 LAMP_CONTROL("Lamp Control", new byte[] { 0x00, 0x1A }),
42 CONTRAST_ENHANCER("Contrast Enhancer", new byte[] { 0x00, 0x1C }),
44 // Not available for VW260, VW270, VW285, VW295, VW300, VW315, VW320, VW328, VW350, VW365, HW35ES, HW40ES, HW45ES,
46 IRIS_MODE("Iris Mode", new byte[] { 0x00, 0x1D }),
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 }),
51 // Not available for VW40, VW50, VW60
52 FILM_MODE("Film Mode", new byte[] { 0x00, 0x1F }),
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 }),
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 }),
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 }),
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 }),
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 }),
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 }),
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 }),
87 // Not available for VW40, VW50, VW60, VW70, VW100, HW10, HW15, HW20, HW30ES
88 MOTION_ENHANCER("Motion Enhancer", new byte[] { 0x00, 0x59 }),
90 // Not available for VW40, VW50, VW60, VW100
91 XVCOLOR("xvColor", new byte[] { 0x00, 0x5A }),
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,
96 PICTURE_POSITION("Picture Position", new byte[] { 0x00, 0x66 }),
98 // Not available for VW40, VW50, VW60, VW70, VW85, VW95, VW100, HW15, HW20, HW30ES
99 REALITY_CREATION("Reality Creation", new byte[] { 0x00, 0x67 }),
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 }),
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 }),
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 }),
113 // Not available for VW40, VW50, VW60, VW70, VW100
114 STATUS_ERROR2("Status Error 2", new byte[] { 0x01, 0x25 }),
116 IR_POWER_ON("Power On", new byte[] { 0x17, 0x2E }),
117 IR_POWER_OFF("Power Off", new byte[] { 0x17, 0x2F }),
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 });
129 * @param name the item name
130 * @param code the data code associated to the item
132 private SonyProjectorItem(String name, byte[] code) {
138 * Get the data code associated to the current item
140 * @return the data code
142 public byte[] getCode() {
151 public String getName() {