|
RDK Documentation (Open Sourced RDK Components)
|
Go to the documentation of this file.
42 #include "illegalArgumentException.hpp"
51 std::string numToStr (
int number)
58 int strToNum (std::string text)
61 stringstream convert (text);
63 if (!(convert >> number) )
71 const char *_names[] = {
75 inline const bool isValid(
int id) {
86 const char * FrontPanelTextDisplay::kPropertyBrightness =
".brightness";
106 return FrontPanelConfig::getInstance().getTextDisplay(
id);
129 for (
size_t i = 0; i <
dsUTL_DIM(_names); i++) {
130 if (name.compare(_names[i]) == 0) {
131 return FrontPanelConfig::getInstance().getTextDisplay(i);
135 throw IllegalArgumentException();
157 FrontPanelTextDisplay::FrontPanelTextDisplay(
int id,
int maxBrightness,
int maxCycleRate,
int levels,
158 int maxHorizontalIterations,
int maxVerticalIterations,
159 const string &supportedCharacters,
int colorMode):
160 FrontPanelIndicator(id, maxBrightness, maxCycleRate, levels, colorMode)
164 _scroll =
Scroll(maxVerticalIterations, maxHorizontalIterations);
167 _name = std::string(_names[
id]);
170 throw IllegalArgumentException();
174 FrontPanelTextDisplay::~FrontPanelTextDisplay()
363 throw IllegalArgumentException();
379 if ((uiHours < 0 ) || (uiHours > 23) || (uiMinutes < 0) || (uiMinutes > 59)) {
404 if ((mode == 0) || (mode == 1) || (mode == 2)) {
int _id
Indicates the id of the instance inheriting this class.
void setTextBrightness(const int &brightness)
This API sets the brightness value for the front panel LED.
void enableDisplay(const int enable)
This function is used to enable or disable the display of clock on front panel.
dsError_t dsFPEnableCLockDisplay(int enable)
Use disable and enable display of clock.
int _maxBrightness
Indicates maximum brightness value for the FP indicators.
dsError_t dsSetFPDMode(dsFPDMode_t eMode)
This function sets the display mode of the FPD text display.
dsError_t dsSetFPText(const char *pText)
Set text on 7-Segment Display.
int getTextColorMode()
This function is used to get the color mode of the front panel text display.
dsError_t dsSetFPTime(dsFPDTimeFormat_t eTimeFormat, const unsigned int uHour, const unsigned int uMinutes)
Set time on 7-Segment Display.
Classes and structures for front panel text display are defined here.
Device Settings HAL types.
To manage front panel text display scrolling.
int getVerticalIteration() const
This API gets the vertical iterations for front panel text display scrolling.
dsError_t dsGetFPTimeFormat(dsFPDTimeFormat_t *pTimeFormat)
This function get the Current time zone format set on 7-segment display LEDs panel.
int getHorizontalIteration() const
This API gets the horizontal iterations for front panel text display scrolling.
enum __dsFPDTimeFormat_t dsFPDTimeFormat_t
uint32_t dsFPDBrightness_t
dsError_t dsSetFPTextBrightness(dsFPDTextDisplay_t eIndicator, dsFPDBrightness_t eBrightness)
Set brightness level of 7-Segment Display.
static bool isValid(int min, int max, int val)
This function checks if the given value lies between min and max values provided.
Device Settings HAL error codes.
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.
int _TextBrightness
Indicates text brightness.
static const int kModeClock24Hr
Indicates 24 hour time format.
void enable()
This function is used to indicate that the port or port attribute calling this function are enabled.
enum __dsFPDTextDisplay_t dsFPDTextDisplay_t
void setScroll(const Scroll &scroll)
This API sets the scroll parameters for text LED display like hold duration, vertical iterations and ...
Scroll _scroll
Indicates scroll properties.
Structures and classes to manage front panel are defined here.
dsError_t dsGetFPTextBrightness(dsFPDTextDisplay_t eIndicator, dsFPDBrightness_t *eBrightness)
Get the brightness of 7-Segment Display LEDs.
std::string _name
Indicates the name string of the instance inheriting this class.
int getHoldDuration() const
This API gets the hold duration for front panel text display scrolling.
void setText(const std::string &text)
This API sets the text LED display, by switching the text display to text mode.
void setMode(int mode)
This API sets the display mode of the LED display to any, text only or clock only.
void setTimeFormat(const int iTimeFormat)
This API sets the time format of the LED display to either 12hr or 24hr format.
int _levels
Indicates the brightness level.
This class handles exceptions occurring in DS module.
static const int kModeClock12Hr
Indicates 12 hour time format.
dsError_t dsSetFPScroll(unsigned int uScrollHoldOnDur, unsigned int uHorzScrollIterations, unsigned int uVertScrollIterations)
Scroll text on 7-Segment Display.
int getCurrentTimeFormat()
This API Get the time format of the LED display.
This class extents FrontPanelIndicator to manage front panel text display mode, scrolling and its bri...
enum __dsFPDMode_t dsFPDMode_t
int _colorMode
Indicates the color mode of the LED indicator (single or multicolor mode).
This class extends Exception class to manage the expections caused due to illegal arguments.
#define dsFPDTextDisplay_isValid(t)
int getTextBrightness()
This API gets the text LED brightness value.
#define dsUTL_DIM(arr)
Device Settings general Array dimension calculation inline definition.
dsError_t dsSetFPTimeFormat(dsFPDTimeFormat_t eTimeFormat)
This function sets the 7-segment display LEDs to show the specified time in specified format.
void getTextBrightnessLevels(int &levels, int &min, int &max)
This function is used to get maximum brightness, minimum brightness and brightness level of the front...
dsError_t
Device Settings API Error return codes.
int _timeFormat
Indicates time format for the clock display.