RDK Documentation (Open Sourced RDK Components)
frontPanelSettings.hpp
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 
20 
21 
22 
23 /**
24 * @defgroup devicesettings
25 * @{
26 * @defgroup ds
27 * @{
28 **/
29 
30 
31 #ifndef _DS_FRONTPANELSETTINGS_H_
32 #define _DS_FRONTPANELSETTINGS_H_
33 
34 #warning "CONFIGING GENERIC FRONTPANELSETTINGS"
35 
36 #include "dsTypes.h"
37 #define _MAX_BRIGHTNESS 100
38 #define _MIN_BRIGHTNESS 0
39 #define _DEFAULT_LEVELS 10
40 #define _MAX_CYCLERATE 2
41 #define _MAX_HORZ_COLS 0
42 #define _MAX_VERT_ROWS 0
43 #define _MAX_HORZ_ITER 0
44 #define _MAX_VERT_ITER 0
45 #define _DEFAULT_COLOR_MODE 0
46 
47 
48 typedef struct _dsFPDColorConfig_t {
49  int id;
50  dsFPDColor_t color;
52 
53 
54 typedef struct _dsFPDIndicatorConfig_t {
55  dsFPDIndicator_t id;
56  dsFPDColorConfig_t * supportedColors;
57  int maxBrightness;
58  int maxCycleRate;
59  int minBrightness;
60  int levels;
61  int colorMode;
63 
64 typedef struct _dsFPDTextDisplayConfig_t {
66  const char * name;
67  dsFPDColorConfig_t * supportedColors;
68  int maxBrightness;
69  int maxCycleRate;
70  const char * supportedCharacters;
71  int columns;
72  int rows;
73  int maxHorizontalIterations;
74  int maxVerticalIterations;
75  int levels;
76  int colorMode;
78 
79 static dsFPDColorConfig_t kIndicatorColors[dsFPD_COLOR_MAX] = {
80  {
81  /*.Id = */ 0,
82  /*.color = */ dsFPD_COLOR_BLUE,
83  },
84  {
85  /*.Id = */ 1,
86  /*.color = */ dsFPD_COLOR_GREEN,
87  },
88  {
89  /*.Id = */ 2,
90  /*.color = */ dsFPD_COLOR_RED,
91  },
92  {
93  /*.Id = */ 3,
94  /*.color = */ dsFPD_COLOR_YELLOW,
95  },
96  {
97  /*.Id = */ 4,
98  /*.color = */ dsFPD_COLOR_ORANGE,
99  },
100  {
101  /*.Id = */ 5,
102  /*.color = */ dsFPD_COLOR_WHITE,
103  },
104 
105 };
106 
107 static const dsFPDIndicatorConfig_t kIndicators[] = {
108  {
109  /*.id = */ dsFPD_INDICATOR_MESSAGE,
110  /*.supportedColors = */ kIndicatorColors,
111  /*.maxBrightness = */ _MAX_BRIGHTNESS,
112  /*.maxCycleRate = */ _MAX_CYCLERATE,
113  /*.minBrightness = */ _MIN_BRIGHTNESS,
114  /*.levels = */ _DEFAULT_LEVELS,
115  /*.colorMode = */ _DEFAULT_COLOR_MODE,
116 
117  },
118  {
119  /*.id = */ dsFPD_INDICATOR_POWER,
120  /*.supportedColors = */ kIndicatorColors,
121  /*.maxBrightness = */ _MAX_BRIGHTNESS,
122  /*.maxCycleRate = */ _MAX_CYCLERATE,
123  /*.minBrightness = */ _MIN_BRIGHTNESS,
124  /*.levels = */ _DEFAULT_LEVELS,
125  /*.colorMode = */ _DEFAULT_COLOR_MODE,
126 
127 
128  },
129  {
130  /*.id = */ dsFPD_INDICATOR_RECORD,
131  /*.supportedColors = */ kIndicatorColors,
132  /*.maxBrightness = */ _MAX_BRIGHTNESS,
133  /*.maxCycleRate = */ _MAX_CYCLERATE,
134  /*.minBrightness = */ _MIN_BRIGHTNESS,
135  /*.levels = */ _DEFAULT_LEVELS,
136  /*.colorMode = */ _DEFAULT_COLOR_MODE,
137 
138  },
139  {
140  /*.id = */ dsFPD_INDICATOR_REMOTE,
141  /*.supportedColors = */ kIndicatorColors,
142  /*.maxBrightness = */ _MAX_BRIGHTNESS,
143  /*.maxCycleRate = */ _MAX_CYCLERATE,
144  /*.minBrightness = */ _MIN_BRIGHTNESS,
145  /*.levels = */ _DEFAULT_LEVELS,
146  /*.colorMode = */ _DEFAULT_COLOR_MODE,
147 
148  },
149 };
150 
151 static const dsFPDTextDisplayConfig_t kTextDisplays[dsFPD_TEXTDISP_MAX] = {
152  {
153  /*.id = */ dsFPD_TEXTDISP_TEXT,
154  /*.name = */ "Text",
155  /*.supportedColors = */ kIndicatorColors,
156  /*.maxBrightness = */ _MAX_BRIGHTNESS,
157  /*.maxCycleRate = */ _MAX_CYCLERATE,
158  /*.supportedCharacters=*/ "ABCDEFG",
159  /*.columns = */ _MAX_HORZ_COLS,
160  /*.rows= */ _MAX_VERT_ROWS,
161  /*.horizontal iterations =*/_MAX_HORZ_ITER,
162  /*.vertical iterations */ _MAX_VERT_ITER,
163  /*.levels */ _DEFAULT_LEVELS,
164  /*.colorMode = */ _DEFAULT_COLOR_MODE
165  },
166 };
167 
168 #endif /* RPFRONTPANELSETTINGS_H_ */
169 
170 
171 /** @} */
172 /** @} */
_dsFPDTextDisplayConfig_t
Definition: frontPanelSettings.hpp:64
dsTypes.h
Device Settings HAL types.
dsFPD_COLOR_BLUE
#define dsFPD_COLOR_BLUE
Definition: dsTypes.h:765
dsFPD_COLOR_GREEN
#define dsFPD_COLOR_GREEN
Definition: dsTypes.h:766
_dsFPDColorConfig_t
Definition: frontPanelSettings.hpp:48
dsFPDTextDisplay_t
enum __dsFPDTextDisplay_t dsFPDTextDisplay_t
dsFPD_INDICATOR_RECORD
#define dsFPD_INDICATOR_RECORD
Definition: dsTypes.h:791
dsFPD_INDICATOR_MESSAGE
#define dsFPD_INDICATOR_MESSAGE
Definition: dsTypes.h:789
dsFPD_COLOR_YELLOW
#define dsFPD_COLOR_YELLOW
Definition: dsTypes.h:768
dsFPD_COLOR_ORANGE
#define dsFPD_COLOR_ORANGE
Definition: dsTypes.h:769
dsFPD_INDICATOR_REMOTE
#define dsFPD_INDICATOR_REMOTE
Definition: dsTypes.h:792
dsFPD_TEXTDISP_MAX
@ dsFPD_TEXTDISP_MAX
Definition: dsTypes.h:806
dsFPD_COLOR_RED
#define dsFPD_COLOR_RED
Definition: dsTypes.h:767
dsFPD_TEXTDISP_TEXT
@ dsFPD_TEXTDISP_TEXT
Definition: dsTypes.h:805
dsFPD_COLOR_MAX
#define dsFPD_COLOR_MAX
Definition: dsTypes.h:771
_dsFPDIndicatorConfig_t
Definition: frontPanelSettings.hpp:54
dsFPD_COLOR_WHITE
#define dsFPD_COLOR_WHITE
Definition: dsTypes.h:770
dsFPD_INDICATOR_POWER
#define dsFPD_INDICATOR_POWER
Definition: dsTypes.h:790