2 * Copyright (c) 2010-2024 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.kaleidescape.internal.communication;
15 import java.util.HashMap;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
21 * Provides mapping of various Kaleidescape status codes to plain language meanings
23 * @author Michael Lobstein - Initial contribution
26 public class KaleidescapeStatusCodes {
27 private static final String UNUSED = "unused";
28 private static final String UNKNOWN = "unknown";
29 private static final String RESERVED = "reserved";
31 // map to lookup play mode
32 public static final Map<String, String> PLAY_MODE = new HashMap<>();
34 PLAY_MODE.put("0", "Nothing playing");
35 PLAY_MODE.put("1", "Paused");
36 PLAY_MODE.put("2", "Playing");
37 PLAY_MODE.put("3", UNUSED);
38 PLAY_MODE.put("4", "Forward scan");
39 PLAY_MODE.put("5", UNUSED);
40 PLAY_MODE.put("6", "Reverse scan");
43 // map to lookup media type
44 public static final Map<String, String> MEDIA_TYPE = new HashMap<>();
46 MEDIA_TYPE.put("00", "Nothing playing");
47 MEDIA_TYPE.put("01", "DVD");
48 MEDIA_TYPE.put("02", "Video stream");
49 MEDIA_TYPE.put("03", "Blu-ray Disc");
52 // map to lookup movie location
53 public static final Map<String, String> MOVIE_LOCATION = new HashMap<>();
55 MOVIE_LOCATION.put("00", UNKNOWN);
56 MOVIE_LOCATION.put("01", UNUSED);
57 MOVIE_LOCATION.put("02", UNUSED);
58 MOVIE_LOCATION.put("03", "Main content");
59 MOVIE_LOCATION.put("04", "Intermission");
60 MOVIE_LOCATION.put("05", "End Credits");
61 MOVIE_LOCATION.put("06", "DVD/Blu-ray Disc Menu");
64 // map to lookup aspect ratio
65 public static final Map<String, String> ASPECT_RATIO = new HashMap<>();
67 ASPECT_RATIO.put("00", UNKNOWN);
68 ASPECT_RATIO.put("01", "1.33");
69 ASPECT_RATIO.put("02", "1.66");
70 ASPECT_RATIO.put("03", "1.78");
71 ASPECT_RATIO.put("04", "1.85");
72 ASPECT_RATIO.put("05", "2.35");
75 public static final Map<String, String> VIDEO_MODE = new HashMap<>();
78 VIDEO_MODE.put("00", "No output");
79 VIDEO_MODE.put("01", "480i60 4:3");
80 VIDEO_MODE.put("02", "480i60 16:9");
81 VIDEO_MODE.put("03", "480p60 4:3");
82 VIDEO_MODE.put("04", "480p60 16:9");
83 VIDEO_MODE.put("05", "576i50 4:3");
84 VIDEO_MODE.put("06", "576i50 16:9");
85 VIDEO_MODE.put("07", "576p50 4:3");
86 VIDEO_MODE.put("08", "576p50 16:9");
87 VIDEO_MODE.put("09", "720p60 NTSC HD");
88 VIDEO_MODE.put("10", "720p50 PAL HD");
89 VIDEO_MODE.put("11", "1080i60 16:9");
90 VIDEO_MODE.put("12", "1080i50 16:9");
91 VIDEO_MODE.put("13", "1080p60 16:9");
92 VIDEO_MODE.put("14", "1080p50 16:9");
93 VIDEO_MODE.put("15", RESERVED);
94 VIDEO_MODE.put("16", RESERVED);
95 VIDEO_MODE.put("17", "1080p24 16:9");
96 VIDEO_MODE.put("18", RESERVED);
97 VIDEO_MODE.put("19", "480i60 64:27");
98 VIDEO_MODE.put("20", "576i50 64:27");
99 VIDEO_MODE.put("21", "1080i60 64:27");
100 VIDEO_MODE.put("22", "1080i50 64:27");
101 VIDEO_MODE.put("23", "1080p60 64:27");
102 VIDEO_MODE.put("24", "1080p50 64:27");
103 VIDEO_MODE.put("25", "1080p24 64:27");
104 VIDEO_MODE.put("26", "1080p24 64:27");
105 VIDEO_MODE.put("27", "3840x 2160p24 16:9");
106 VIDEO_MODE.put("28", "3840x 2160p24 64:27");
107 VIDEO_MODE.put("29", "3840x 2160p30 16:9");
108 VIDEO_MODE.put("30", "3840x 2160p30 64:27");
109 VIDEO_MODE.put("31", "3840x 2160p60 16:9");
110 VIDEO_MODE.put("32", "3840x 2160p60 64:27");
111 VIDEO_MODE.put("33", "3840x 2160p25 16:9");
112 VIDEO_MODE.put("34", "3840x 2160p25 64:27");
113 VIDEO_MODE.put("35", "3840x 2160p50 16:9");
114 VIDEO_MODE.put("36", "3840x 2160p50 64:27");
115 VIDEO_MODE.put("37", "3840x 2160p24 16:9");
116 VIDEO_MODE.put("38", "3840x 2160p24 64:27");
119 // map to lookup eotf
120 public static final Map<String, String> EOTF = new HashMap<>();
122 EOTF.put("00", UNKNOWN);
123 EOTF.put("01", "SDR");
124 EOTF.put("02", "HDR");
125 EOTF.put("03", "SMTPE ST 2048");
128 // map to lookup readiness state
129 public static final Map<String, String> READINESS_STATE = new HashMap<>();
131 READINESS_STATE.put("0", "system is ready");
132 READINESS_STATE.put("1", "system is becoming ready");
133 READINESS_STATE.put("2", "system is idle");