RDK Documentation (Open Sourced RDK Components)
frontPanelIndicator.cpp
Go to the documentation of this file.
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  * @file frontPanelIndicator.cpp
23  * @brief Configuration of individual indicators are managed here. The blink rate, color,
24  * and maximum cycle rate of the front panel indicator can be configured.
25  */
26 
27 
28 
29 /**
30 * @defgroup devicesettings
31 * @{
32 * @defgroup ds
33 * @{
34 **/
35 
36 
37 #include <iostream>
38 #include <sstream>
39 #include "frontPanelIndicator.hpp"
40 #include "frontPanelConfig.hpp"
41 #include "illegalArgumentException.hpp"
43 #include "host.hpp"
44 
45 #include "dslogger.h"
46 #include "dsError.h"
47 #include "dsTypes.h"
48 
49 using namespace std;
50 
51 std::string numberToString (int number)
52 {
53  stringstream convert;
54  convert << number;
55  return convert.str();
56 }
57 
58 int stringToNumber (std::string text)
59 {
60  int number;
61  stringstream convert (text);
62 
63  if (!(convert >> number) )
64  number = 0;
65 
66  return number;
67 }
68 
69 
70 namespace {
71  const char *_colorNames[] = {
72  "Blue",
73  "Green",
74  "Red",
75  "Yellow",
76  "Orange",
77  "White",
78  };
79 
80  const int _colorsValues[] = {
87  };
88 
89  inline const bool isColorValid(int id) {
90  return ((id >= 0) && (id < dsUTL_DIM(_colorNames)));
91  }
92 
93  const char *_indicatorNames[] = {
94  "Message",
95  "Power",
96  "Record",
97  "Remote",
98  "RfByPass",
99 
100  };
101 
102 
103  inline const bool isIndicatorValid(int id) {
104  return dsFPDIndicator_isValid(id);
105  }
106 }
107 
108 namespace device {
109 
110 typedef int _SafetyCheck[(dsUTL_DIM(_colorNames) == dsFPD_COLOR_MAX) ? 1 : -1];
111 typedef int _SafetyCheck[(dsUTL_DIM(_indicatorNames) == dsFPD_INDICATOR_MAX) ? 1 : -1];
112 
113 const int FrontPanelIndicator::Color::kBlue = dsFPD_COLOR_BLUE;
114 const int FrontPanelIndicator::Color::kGreen = dsFPD_COLOR_GREEN;
115 const int FrontPanelIndicator::Color::kRed = dsFPD_COLOR_RED;
116 const int FrontPanelIndicator::Color::kYellow = dsFPD_COLOR_YELLOW;
117 const int FrontPanelIndicator::Color::kOrange = dsFPD_COLOR_ORANGE;
118 const int FrontPanelIndicator::Color::kWhite = dsFPD_COLOR_WHITE;
119 const int FrontPanelIndicator::Color::kMax = dsFPD_COLOR_MAX;
120 
121 
122 const int FrontPanelIndicator::kMessage = dsFPD_INDICATOR_MESSAGE;
123 const int FrontPanelIndicator::kPower = dsFPD_INDICATOR_POWER;
124 const int FrontPanelIndicator::kRecord = dsFPD_INDICATOR_RECORD;
125 const int FrontPanelIndicator::kRemote = dsFPD_INDICATOR_REMOTE;
126 const int FrontPanelIndicator::kRFBypass = dsFPD_INDICATOR_RFBYPASS;
127 const int FrontPanelIndicator::kMax = dsFPD_INDICATOR_MAX;
128 
129 /**
130  * @addtogroup dssettingsfpindicatorapi
131  * @{
132  */
133 
134 /**
135  * @fn FrontPanelIndicator::Color::getInstance(int id)
136  * @brief This function gets an instance of the Color with the specified id, only if the id
137  * passed is valid.
138  *
139  * @param[in] id Indicates the id of the color against which the Color instance is requested.
140  *
141  * @return Returns Color instance corresponding to the id parameter else throws an
142  * IllegalArgumentException indicating that the instance corresponding to the id
143  * parameter is not found
144  */
145 const FrontPanelIndicator::Color & FrontPanelIndicator::Color::getInstance(int id)
146 {
147  if (::isColorValid(id)) {
148  return FrontPanelConfig::getInstance().getColor(id);
149  }
150  else {
151  throw IllegalArgumentException("Bad color id");
152  }
153 }
154 
155 
156 /**
157  * @fn FrontPanelIndicator::Color::getInstance(const std::string &name)
158  * @brief This function gets an instance of the Color corresponding to the specified name,
159  * only if the name passed is valid.
160  *
161  * @param[in] name Indicates the name against which the color instance is required.
162  *
163  * @return Returns Color instance corresponding to the name parameter else throws an
164  * IllegalArgumentException indicating that the instance corresponding to the name
165  * parameter is not found
166  */
167 const FrontPanelIndicator::Color & FrontPanelIndicator::Color::getInstance(const std::string &name)
168 {
169  for (size_t i = 0; i < dsUTL_DIM(_colorNames); i++) {
170  if (name.compare(_colorNames[i]) == 0) {
171  return FrontPanelConfig::getInstance().getColor(i);
172  }
173  }
174  throw IllegalArgumentException("Bad color name");
175 }
176 
177 FrontPanelIndicator::Color::Color(int id)
178 {
179 
180  if (::isColorValid(id)) {
181  _id = id;
182  _name = std::string(_colorNames[id]);
183  }
184  else {
185  throw IllegalArgumentException("Constructor for color: bad color id");
186  }
187 }
188 
189 
190 /**
191  * @fn FrontPanelIndicator::Blink::Blink(int interval, int iteration)
192  * @brief This API is a parameterized constructor for the nested class Blink
193  * <ul>
194  * <li> It initializes iteration and interval parameters. By default they are set to Zero
195  * </ul>
196  *
197  * @param[in] interval Specifies the blink intervals for front panel indicator
198  * @param[in] iteration Specifies the number of blink iterations for front panel indicator
199  *
200  * @return None
201  */
202 FrontPanelIndicator::Blink::Blink(int interval, int iteration)
203 {
204  if(interval < 0 || iteration < 0)
205  throw IllegalArgumentException();
206  _interval = interval;
207  _iteration = iteration;
208 };
209 
210 
211 /**
212  * @fn FrontPanelIndicator::getInstance(int id)
213  * @brief This function gets the FrontPanelIndicator instance corresponding to the id parameter,
214  * only if the id passed is valid.
215  *
216  * @param[in] id Indicates the front panel indicator id whose instance has to be returned.
217  *
218  * @return Returns FrontPanelIndicator instance corresponding to the name parameter else throws
219  * an IllegalArgumentException indicating that the instance corresponding to id parameter was
220  * not found.
221  */
222 FrontPanelIndicator & FrontPanelIndicator::getInstance(int id)
223 {
224  if (::isIndicatorValid(id)) {
225  return FrontPanelConfig::getInstance().getIndicator(id);
226  }
227  else {
228  throw IllegalArgumentException("Bad front panel indicator id");
229  }
230 
231 }
232 
233 
234 /**
235  * @fn FrontPanelIndicator::getInstance(const std::string &name)
236  * @brief This API gets the FrontPanelIndicator instance corresponding to the name parameter.
237  * <ul>
238  * <li> It gets the id corresponding to the front panel indicator name.
239  * <li> Then it gets the FrontPanelIndicator instance corresponding to the id.
240  * </ul>
241  *
242  * @param[in] name Indicates the front panel indicator name whose instance has to be returned.
243  *
244  * @return Returns FrontPanelIndicator instance corresponding to the name parameter else
245  * throws an IllegalArgumentException.
246  */
247 FrontPanelIndicator & FrontPanelIndicator::getInstance(const std::string &name)
248 {
249  for (size_t i = 0; i < dsUTL_DIM(_indicatorNames); i++) {
250  if (name.compare(_indicatorNames[i]) == 0) {
251  return FrontPanelConfig::getInstance().getIndicator(i);
252  }
253  }
254 
255  throw IllegalArgumentException("Bad frontpanel indicator name");
256 }
257 
258 
259 /**
260  * @fn FrontPanelIndicator::FrontPanelIndicator(int id, int maxBrightness, int maxCycleRate, int levels , int colorMode)
261  * @brief This function is a parameterised constructor of FrontPanelIndicator. It creates and initializes the
262  * FrontPanelIndicator instance with the configurations/values specified as input parameters.
263  *
264  * @param[in] id Indicates the id for the FrontPanelIndicator instance created.
265  * @param[in] maxBrightness Indicates maximum brightness value for the front panel indicator.
266  * @param[in] maxCycleRate Indicates maximum cycle rate for the front panel indicator.
267  * @param[in] levels Indicates brightness level for the front panel indicator.
268  * @param[in] colorMode Indicates the color mode for the front panel indicator like single or multi color mode.
269  *
270  * @return None
271  */
272 FrontPanelIndicator::FrontPanelIndicator(int id, int maxBrightness, int maxCycleRate, int levels , int colorMode):
273  _maxBrightness(maxBrightness), _maxCycleRate(maxCycleRate), _levels(levels),_colorMode(colorMode)
274 {
275  _brightness = 0;
276  _state = 0;
277  _color = 0;
278  _color_rgb32 = 0; //CID:88908 - Uninit_ctor
279  if (::isIndicatorValid(id)) {
280  _id = id;
281  _name = std::string(_indicatorNames[id]);
282  }
283 }
284 
285 
286 /**
287  * @fn FrontPanelIndicator::~FrontPanelIndicator()
288  * @brief This function is the default constructor for FrontPanelIndicator.
289  *
290  * @return None
291  */
293 {
294 }
295 
296 
297 /**
298  * @fn FrontPanelIndicator::setBrightness(const int &brightness,bool toPersist)
299  * @brief This API sets the brightness or intensity of the front panel indicators.
300  *
301  * @param[in] brightness Indicates brightness value to be set.
302  * @param[in] toPersist If true, the value will also return in persistence memory.
303  *
304  * @return None
305  */
306 void FrontPanelIndicator::setBrightness(const int &brightness,bool toPersist)
307 {
308  bool IsPersist = toPersist;
309 
310  if (dsERR_NONE != dsSetFPDBrightness((dsFPDIndicator_t)_id, brightness,IsPersist) )
311  {
312  throw IllegalArgumentException();
313  }
314  _brightness = brightness;
315 }
316 
317 
318 
319 /**
320  * @fn FrontPanelIndicator::getState()
321  * @brief This API gets the State of the specified LED indicators.
322  *
323  * @return _state State of the specified LED indicators.
324  */
326 {
327  dsFPDState_t state;
328 
329  if (dsERR_NONE == dsGetFPState((dsFPDIndicator_t)_id,&state))
330  {
331  return state == dsFPD_STATE_ON;
332  }
333  else
334  {
335  throw IllegalArgumentException();
336  }
337  return false; //CID:82714 - Missing return
338 }
339 
340 
341 
342 /**
343  * @fn FrontPanelIndicator::setState(const bool &enable)
344  * @brief This API is used to enable or disable the front panel indicator.
345  *
346  * @param[in] enable True to enable front panel indicator else false.
347  *
348  * @return None
349  */
350 void FrontPanelIndicator::setState(const bool &enable)
351 {
352  _state = enable;
353  dsError_t ret = dsERR_NONE;
354  if (_state)
355  {
356  ret = dsSetFPState((dsFPDIndicator_t)_id,dsFPD_STATE_ON);
357  }
358  else
359  {
360  ret = dsSetFPState((dsFPDIndicator_t)_id,dsFPD_STATE_OFF);
361  }
362  if (ret != dsERR_NONE) {
363  throw Exception(ret);
364  }
365 }
366 
367 
368 /**
369  * @fn FrontPanelIndicator::getBrightness()
370  * @brief This API gets the brightness of the specified LED indicators.
371  *
372  * @return _brightness Brightness value of the specified LED indicators.
373  */
375 {
376  dsFPDBrightness_t brightness;
377 
378  dsError_t ret = dsGetFPBrightness((dsFPDIndicator_t)_id,&brightness);
379  if (ret != dsERR_NONE) {
380  throw Exception(ret);
381  }
382  else
383  {
384  _brightness = brightness;
385  }
386  return _brightness;
387 }
388 
389 
390 /**
391  * @fn FrontPanelIndicator::getBrightnessLevels(int &levels, int &min, int &max)
392  * @brief This function gets the maximum brightness, minimum brightness and the brightness level
393  * set for the front panel indicator.
394  * <ul>
395  * <li> Note :
396  * <li> Brightness level indicates a step value at which the brightness/intensity of the indicator
397  * could be changed.
398  * <ul/>
399  *
400  * @param[out] levels Indicates brightness level set for the front panel indicator.
401  * @param[out] min Indicates minimum brightness of the front panel indicator.
402  * @param[out] max Indicates maximum brightness of the front panel indicator.
403  *
404  * @return None
405  */
406 void FrontPanelIndicator::getBrightnessLevels(int &levels, int &min, int &max)
407 {
408  max = _maxBrightness;
409  levels = _levels;
410  min = 0;
411 }
412 
413 
414 /**
415  * @fn FrontPanelIndicator::getColorMode()
416  * @brief This function is used to get the color mode of the front panel indicator.
417  * The color mode is device specific and can be single or multi color mode (RGB colors).
418  * By default the color mode is set to 0 to indicate single color mode.
419  *
420  * @return None
421  */
423 {
424  return _colorMode;
425 }
426 
427 
428 /**
429  * @fn FrontPanelIndicator::setBlink(const Blink &blink)
430  * @brief This API sets the blink iteration and blink interval for the LED.
431  *
432  * @param[in] blink Indicates the blink iteration and interval value to be set.
433  *
434  * @return None
435  */
437 {
438  dsError_t ret = dsSetFPBlink((dsFPDIndicator_t)_id, blink.getIteration(), blink.getInterval());
439  if (ret != dsERR_NONE) {
440  throw Exception(ret);
441  }
442  else
443  {
444  _blink = blink;
445  }
446 }
447 
448 
449 /**
450  * @fn FrontPanelIndicator::getColor()
451  * @brief This API gets the color of the front panel indicator/LED.
452  *
453  * @return _color_rgb32 Indicates the color of the LED in RGB format.
454  */
456 {
457  dsFPDColor_t color;
458 
459  if (dsERR_NONE != dsGetFPColor((dsFPDIndicator_t)_id,&color) )
460  {
461  throw IllegalArgumentException("dsGetFPColor failed.");
462  }
463  _color_rgb32 = color;
464 
465  return _color_rgb32;
466 };
467 
468 
469 /**
470  * @fn FrontPanelIndicator::setColor(const FrontPanelIndicator::Color & color,bool toPersist)
471  * @brief This API sets the color of the front panel indicator.
472  *
473  * @param[in] color This parameter provides the color to be set in RGB format.
474  * @param[in] toPersist If true, the value will also return in persistence memory.
475  *
476  * @return None
477  */
478 void FrontPanelIndicator::setColor(const FrontPanelIndicator::Color & color,bool toPersist)
479 {
480 
481  bool IsPersist = toPersist;
482  if(_colorMode == 0 || _colorMode == 1)
483  {
484  throw UnsupportedOperationException("This API not supported for the color mode");
485  }
486  else if(_colorMode == 2)
487  {
488  bool isValidColor = false;
489  const List<FrontPanelIndicator::Color> supportedColors = FrontPanelConfig::getInstance().getColors();
490  for (uint j = 0; j < supportedColors.size(); j++)
491  {
492  if( supportedColors.at(j).getId() == color.getId())
493  {
494  isValidColor = true;
495  break;
496  }
497  }
498  if(!isValidColor)
499  {
500  throw IllegalArgumentException("Invalid color object");
501  }
502  }
503  dsFPDColor_t colorValue = _colorsValues[color.getId()];
504 
505  if (dsERR_NONE != dsSetFPDColor((dsFPDIndicator_t)_id, (dsFPDColor_t)colorValue,IsPersist) )
506  {
507  throw IllegalArgumentException("dsSetFPDColor failed");
508  }
509  _color_rgb32 = colorValue;
510  //std::cout << "_color_rgb32 = " << _color_rgb32 << std::endl;
511 }
512 
513 
514 /**
515  * @fn FrontPanelIndicator::setColor(uint32_t color,bool toPersist)
516  * @brief This API sets the color of the front panel indicator
517  *
518  * @param[in] color Indicates the color to be set in RGB format.
519  * @param[in] toPersist If true, the value will also return in persistence memory.
520  *
521  * @return None
522  */
523 void FrontPanelIndicator::setColor(uint32_t color,bool toPersist)
524 {
525  bool IsPersist = toPersist;
526  bool isValidColor = false;
527  if(_colorMode == 0 || _colorMode == 2)
528  {
529  throw UnsupportedOperationException("This API not supported for the color mode");
530  }
531  if (dsERR_NONE != dsSetFPDColor((dsFPDIndicator_t)_id, (dsFPDColor_t) color,IsPersist) )
532  {
533  throw IllegalArgumentException();
534  }
535  _color_rgb32 = (dsFPDColor_t) color;
536  //std::cout << "UINT _color_rgb32 = " << _color_rgb32 << std::endl;
537 }
538 
539 
540 /**
541  * @fn FrontPanelIndicator::getSupportedColors() const
542  * @brief This API gets the list of supported colors for front panel indicator.
543  * <ul>
544  * <li> The colors supported are platform specific and can be RGB combinations.
545  * </ul>
546  *
547  * @return Returns a list of colors suppported.
548  */
550 {
552 }
553 
554 }
555 
556 /** @} */
557 
558 /** @} */
559 /** @} */
device::DSConstant::_id
int _id
Indicates the id of the instance inheriting this class.
Definition: dsConstant.hpp:57
device::FrontPanelIndicator::_maxBrightness
int _maxBrightness
Indicates maximum brightness value for the FP indicators.
Definition: frontPanelIndicator.hpp:132
device::FrontPanelIndicator::~FrontPanelIndicator
virtual ~FrontPanelIndicator()
This function is the default constructor for FrontPanelIndicator.
Definition: frontPanelIndicator.cpp:292
device::FrontPanelIndicator::_blink
Blink _blink
A Blink instance to control blink iterations and intervals of the LED.
Definition: frontPanelIndicator.hpp:138
dsSetFPState
dsError_t dsSetFPState(dsFPDIndicator_t eIndicator, dsFPDState_t state)
This function will enable or disable the specified discrete LED on the front panel display.
Definition: dsFPD.c:410
device::FrontPanelConfig::getInstance
static FrontPanelConfig & getInstance()
This API gets the instance of the FrontPanelConfig. When called for the first time,...
Definition: frontPanelConfig.cpp:82
device::List
This class is implemented using templates and it is used to maintain a container with the list of sup...
Definition: list.hpp:51
device::FrontPanelIndicator::setColor
void setColor(const Color &newColor, const bool toPersist=true)
This API sets the color of the front panel indicator.
Definition: frontPanelIndicator.cpp:466
device::FrontPanelIndicator::getBrightnessLevels
void getBrightnessLevels(int &levels, int &min, int &max)
This function gets the maximum brightness, minimum brightness and the brightness level set for the fr...
Definition: frontPanelIndicator.cpp:406
device::FrontPanelConfig::getColors
List< FrontPanelIndicator::Color > getColors()
This API gets the list of colors supported by front panel indicators.
Definition: frontPanelConfig.cpp:273
device::FrontPanelIndicator::getColorMode
int getColorMode()
This function is used to get the color mode of the front panel indicator. The color mode is device sp...
Definition: frontPanelIndicator.cpp:422
dsTypes.h
Device Settings HAL types.
dsGetFPState
dsError_t dsGetFPState(dsFPDIndicator_t eIndicator, dsFPDState_t *state)
This function will Get the ON or OFF state of Specified LEDs.
Definition: dsFPD.c:480
dsSetFPBlink
dsError_t dsSetFPBlink(dsFPDIndicator_t eIndicator, unsigned int uBlinkDuration, unsigned int uBlinkIterations)
Set LED blinking mode.
Definition: dsFPD.c:161
device::FrontPanelIndicator::_state
int _state
Indicates the FP indicator is enabled if true.
Definition: frontPanelIndicator.hpp:137
dsFPDBrightness_t
uint32_t dsFPDBrightness_t
Definition: dsTypes.h:862
dsSetFPDBrightness
dsError_t dsSetFPDBrightness(dsFPDIndicator_t eIndicator, dsFPDBrightness_t eBrightness, bool toPersist)
This function will set the brightness of the specified discrete LED on the front panel display to the...
Definition: dsFPD.c:242
dsGetFPBrightness
dsError_t dsGetFPBrightness(dsFPDIndicator_t eIndicator, dsFPDBrightness_t *pBrightness)
Get the brightness level for Front Panel Display LEDs.
Definition: dsFPD.c:187
dsGetFPColor
dsError_t dsGetFPColor(dsFPDIndicator_t eIndicator, dsFPDColor_t *pColor)
Get LED color.
Definition: dsFPD.c:317
frontPanelIndicator.hpp
Structures and classes for front panel indicator are defined here.
device::FrontPanelIndicator::setBrightness
void setBrightness(const int &brightness, const bool toPersist=true)
This API sets the brightness or intensity of the front panel indicators.
Definition: frontPanelIndicator.cpp:306
dsFPD_STATE_ON
@ dsFPD_STATE_ON
Definition: dsTypes.h:821
dsFPD_COLOR_BLUE
#define dsFPD_COLOR_BLUE
Definition: dsTypes.h:765
dsError.h
Device Settings HAL error codes.
dsFPD_COLOR_GREEN
#define dsFPD_COLOR_GREEN
Definition: dsTypes.h:766
device::DSConstant::enable
void enable()
This function is used to indicate that the port or port attribute calling this function are enabled.
Definition: dsConstant.hpp:164
dsERR_NONE
@ dsERR_NONE
Definition: dsError.h:85
dsFPD_INDICATOR_RECORD
#define dsFPD_INDICATOR_RECORD
Definition: dsTypes.h:791
dsFPD_INDICATOR_MESSAGE
#define dsFPD_INDICATOR_MESSAGE
Definition: dsTypes.h:789
device::FrontPanelIndicator::_brightness
int _brightness
Indicates the brightness of the LED indicator.
Definition: frontPanelIndicator.hpp:134
dsFPDState_t
enum __dsFPDState_t dsFPDState_t
dsFPD_COLOR_YELLOW
#define dsFPD_COLOR_YELLOW
Definition: dsTypes.h:768
device::FrontPanelIndicator::getSupportedColors
const List< Color > getSupportedColors() const
This API gets the list of supported colors for front panel indicator.
Definition: frontPanelIndicator.cpp:549
dsFPDIndicator_isValid
#define dsFPDIndicator_isValid(t)
Definition: dsTypes.h:798
device::FrontPanelIndicator::getState
bool getState()
This API gets the State of the specified LED indicators.
Definition: frontPanelIndicator.cpp:325
frontPanelConfig.hpp
Structures and classes to manage front panel are defined here.
device::DSConstant::_name
std::string _name
Indicates the name string of the instance inheriting this class.
Definition: dsConstant.hpp:58
device::FrontPanelIndicator::getColor
uint32_t getColor()
This API gets the color of the front panel indicator/LED.
Definition: frontPanelIndicator.cpp:455
device::FrontPanelIndicator::setBlink
void setBlink(const Blink &blink)
This API sets the blink iteration and blink interval for the LED.
Definition: frontPanelIndicator.cpp:436
dsFPD_COLOR_ORANGE
#define dsFPD_COLOR_ORANGE
Definition: dsTypes.h:769
dsFPD_INDICATOR_REMOTE
#define dsFPD_INDICATOR_REMOTE
Definition: dsTypes.h:792
device::UnsupportedOperationException
This class extends Exception class to manage unsupported operations in devicesettings.
Definition: unsupportedOperationException.hpp:50
device::FrontPanelIndicator::_levels
int _levels
Indicates the brightness level.
Definition: frontPanelIndicator.hpp:135
device::Exception
This class handles exceptions occurring in DS module.
Definition: exception.hpp:52
device::FrontPanelIndicator
This class extents DSConstant to manage front panel indicators color, blink sequence and brightness.
Definition: frontPanelIndicator.hpp:55
dsFPD_COLOR_RED
#define dsFPD_COLOR_RED
Definition: dsTypes.h:767
dsFPD_COLOR_MAX
#define dsFPD_COLOR_MAX
Definition: dsTypes.h:771
device::FrontPanelIndicator::_colorMode
int _colorMode
Indicates the color mode of the LED indicator (single or multicolor mode).
Definition: frontPanelIndicator.hpp:136
device::IllegalArgumentException
This class extends Exception class to manage the expections caused due to illegal arguments.
Definition: illegalArgumentException.hpp:51
dsSetFPDColor
dsError_t dsSetFPDColor(dsFPDIndicator_t eIndicator, dsFPDColor_t eColor, bool toPersist)
This function sets the color of the specified LED on the front panel in multi-app mode using iarmbus ...
Definition: dsFPD.c:367
dsFPD_INDICATOR_RFBYPASS
#define dsFPD_INDICATOR_RFBYPASS
Definition: dsTypes.h:793
dsUTL_DIM
#define dsUTL_DIM(arr)
Device Settings general Array dimension calculation inline definition.
Definition: dsUtl.h:85
unsupportedOperationException.hpp
This file defines UnsupportedOperationException class.
device::FrontPanelIndicator::getBrightness
int getBrightness()
This API gets the brightness of the specified LED indicators.
Definition: frontPanelIndicator.cpp:374
dsError_t
dsError_t
Device Settings API Error return codes.
Definition: dsError.h:84
device::FrontPanelIndicator::Color
Definition: frontPanelIndicator.hpp:67
dsFPD_COLOR_WHITE
#define dsFPD_COLOR_WHITE
Definition: dsTypes.h:770
device::FrontPanelIndicator::setState
void setState(const bool &enable)
This API is used to enable or disable the front panel indicator.
Definition: frontPanelIndicator.cpp:350
device::DSConstant::getId
virtual int getId() const
This function is used to get the id.
Definition: dsConstant.hpp:130
device::FrontPanelIndicator::_color_rgb32
uint32_t _color_rgb32
Indicates the color id of the LED.
Definition: frontPanelIndicator.hpp:140
dsFPD_INDICATOR_POWER
#define dsFPD_INDICATOR_POWER
Definition: dsTypes.h:790
dsFPD_STATE_OFF
@ dsFPD_STATE_OFF
Definition: dsTypes.h:820