RDK Documentation (Open Sourced RDK Components)
testFrontPannel.cpp
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 // TODO: Include your class to test here.
21 
22 
23 /**
24 * @defgroup devicesettings
25 * @{
26 * @defgroup test
27 * @{
28 **/
29 
30 
31 #define BOOST_TEST_MODULE FrontPannel
32 #define BOOST_TEST_MAIN
33 #include "boost/test/included/unit_test.hpp"
34 #include <iostream>
35 #include "frontPanelConfig.hpp"
36 
37 BOOST_AUTO_TEST_CASE(test_hostPersistence)
38 {
39  try {
42  device::FrontPanelIndicator::Color c(rpFP_COLOR_GREEN);
43 
51 
61 
75 
76 
77  }
78  catch(...) {
79  BOOST_CHECK(0);
80  }
81 }
82 
83 BOOST_AUTO_TEST_CASE(testDummy)
84 {
85  BOOST_CHECK(1 == 1);
86 }
87 
88 
89 /** @} */
90 /** @} */
device::FrontPanelConfig::getTextDisplays
List< FrontPanelTextDisplay > getTextDisplays()
This API gets a list of text display supported by the front panels.
Definition: frontPanelConfig.cpp:309
device::FrontPanelTextDisplay::getScroll
const Scroll getScroll() const
This API gets the scroll parameters for front panel display like vertical & horizontal iterations and...
Definition: frontPanelTextDisplay.hpp:153
device::FrontPanelConfig::getTextDisplay
FrontPanelTextDisplay & getTextDisplay(int id)
This function gets the FrontPanelTextDisplay instance corresponding to the specified id,...
Definition: frontPanelConfig.cpp:224
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::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::getBlink
const Blink getBlink() const
This API gets the blink parameters of the front panel display like iterations and interval.
Definition: frontPanelIndicator.hpp:167
device::FrontPanelTextDisplay::Scroll
Definition: frontPanelTextDisplay.hpp:74
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
device::FrontPanelTextDisplay::setTime
void setTime(const int uiHours, const int uiMinutes)
This API sets the time of the LED display by switching the text display to time mode.
Definition: frontPanelTextDisplay.cpp:377
device::FrontPanelIndicator::getSupportedColors
const List< Color > getSupportedColors() const
This API gets the list of supported colors for front panel indicator.
Definition: frontPanelIndicator.cpp:549
frontPanelConfig.hpp
Structures and classes to manage front panel are defined here.
device::FrontPanelConfig::getIndicator
FrontPanelIndicator & getIndicator(int id)
This function gets an instance of the FrontPanelndicator with the specified id, only if the id passed...
Definition: frontPanelConfig.cpp:147
device::FrontPanelIndicator::getColor
uint32_t getColor()
This API gets the color of the front panel indicator/LED.
Definition: frontPanelIndicator.cpp:455
device::FrontPanelTextDisplay::setText
void setText(const std::string &text)
This API sets the text LED display, by switching the text display to text mode.
Definition: frontPanelTextDisplay.cpp:187
device::FrontPanelIndicator::setBlink
void setBlink(const Blink &blink)
This API sets the blink iteration and blink interval for the LED.
Definition: frontPanelIndicator.cpp:436
device::DSConstant::getName
virtual const std::string & getName() const
This function is used to the get the data member name.
Definition: dsConstant.hpp:141
device::FrontPanelTextDisplay::setTimeFormat
void setTimeFormat(const int iTimeFormat)
This API sets the time format of the LED display to either 12hr or 24hr format.
Definition: frontPanelTextDisplay.cpp:332
device::FrontPanelTextDisplay::getCurrentTimeFormat
int getCurrentTimeFormat()
This API Get the time format of the LED display.
Definition: frontPanelTextDisplay.cpp:320
device::FrontPanelIndicator::getMaxCycleRate
int getMaxCycleRate() const
This API get the rate at which the LED is rotating/glowing during scrolling.
Definition: frontPanelIndicator.hpp:176
device::FrontPanelConfig::getIndicators
List< FrontPanelIndicator > getIndicators()
This API gets a list of indicators on the front panel.
Definition: frontPanelConfig.cpp:291
device::FrontPanelIndicator::getBrightness
int getBrightness()
This API gets the brightness of the specified LED indicators.
Definition: frontPanelIndicator.cpp:374
device::FrontPanelIndicator::Color
Definition: frontPanelIndicator.hpp:67
device::DSConstant::getId
virtual int getId() const
This function is used to get the id.
Definition: dsConstant.hpp:130