RDK Documentation (Open Sourced RDK Components)
frontPanelConfig.hpp
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 
23 /**
24 * @defgroup devicesettings
25 * @{
26 * @defgroup ds
27 * @{
28 **/
29 
30 
31 #ifndef _DS_FRONTPANELCONFIG_HPP_
32 #define _DS_FRONTPANELCONFIG_HPP_
33 
34 #include "frontPanelIndicator.hpp"
36 
37 #include <string>
38 
39 
40 /**
41  * @file frontPanelConfig.hpp
42  * @brief Structures and classes to manage front panel are defined here.
43  * @ingroup frontPanelConfig
44  */
45 using namespace std;
46 
47 namespace device {
48 
49 
50 /**
51  * @class FrontPanelConfig
52  * @brieif To manage front panel text display and indicators
53  * @ingroup devicesettingsclass
54  */
56 private:
57 
58  std::vector<FrontPanelIndicator> _indicators; //!< Container to hold all the FrontPanelIndicator instances.
59  std::vector<FrontPanelTextDisplay> _textDisplays; //!< Container to hold all the FrontPanelTextDisplay instances.
60  std::vector<FrontPanelIndicator::Color> _colors; //!< Container to hold all the Color instances.
61 
63  virtual ~FrontPanelConfig();
64 
65  void load();
66 
67 public:
68  static FrontPanelConfig & getInstance();
69 
71  FrontPanelIndicator &getIndicator(int id);
72  FrontPanelTextDisplay &getTextDisplay(int id);
73 
74  FrontPanelIndicator::Color &getColor(const string &name);
75  FrontPanelIndicator &getIndicator(const string &name);
76  FrontPanelTextDisplay &getTextDisplay(const string &name);
77 
79  List<FrontPanelIndicator> getIndicators();
80  List<FrontPanelTextDisplay> getTextDisplays();
81 
82  /* Initialize Front Panel */
83  void fPInit();
84  /* Terminate Front Panel */
85  void fPTerm();
86 
87 };
88 
89 }
90 
91 #endif /* _DS_FRONTPANELCONFIG_HPP_ */
92 
93 
94 /** @} */
95 /** @} */
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
frontPanelTextDisplay.hpp
Classes and structures for front panel text display are defined here.
device::FrontPanelConfig::_colors
std::vector< FrontPanelIndicator::Color > _colors
Container to hold all the Color instances.
Definition: frontPanelConfig.hpp:60
getColor
static int getColor(gsw_CcAttribType attributeIndex, gsw_CcType ccType, std::string input, gsw_CcColor *colorOut)
Get color option from input string.
Definition: AampCCManager.cpp:95
device::FrontPanelConfig::_textDisplays
std::vector< FrontPanelTextDisplay > _textDisplays
Container to hold all the FrontPanelTextDisplay instances.
Definition: frontPanelConfig.hpp:59
frontPanelIndicator.hpp
Structures and classes for front panel indicator are defined here.
device::FrontPanelIndicator
This class extents DSConstant to manage front panel indicators color, blink sequence and brightness.
Definition: frontPanelIndicator.hpp:55
device::FrontPanelTextDisplay
This class extents FrontPanelIndicator to manage front panel text display mode, scrolling and its bri...
Definition: frontPanelTextDisplay.hpp:53
device::FrontPanelConfig::_indicators
std::vector< FrontPanelIndicator > _indicators
Container to hold all the FrontPanelIndicator instances.
Definition: frontPanelConfig.hpp:58
device::FrontPanelIndicator::Color
Definition: frontPanelIndicator.hpp:67
device::FrontPanelConfig
Definition: frontPanelConfig.hpp:55