RDK Documentation (Open Sourced RDK Components)
Device Settings - Front Panel Indicator APIs

Description

Configuration of individual indicators are managed here. The blink rate, color, and maximum cycle rate of the front panel indicator can be configured.

Functions

static const Colordevice::FrontPanelIndicator::Color::getInstance (int id)
 This function gets an instance of the Color with the specified id, only if the id passed is valid. More...
 
static const Colordevice::FrontPanelIndicator::Color::getInstance (const std::string &name)
 This function gets an instance of the Color corresponding to the specified name, only if the name passed is valid. More...
 
 device::FrontPanelIndicator::Color::Color (int id)
 
 device::FrontPanelIndicator::Blink::Blink (int interval=0, int iteration=0)
 This API is a parameterized constructor for the nested class Blink. More...
 
static FrontPanelIndicatordevice::FrontPanelIndicator::getInstance (int id)
 This function gets the FrontPanelIndicator instance corresponding to the id parameter, only if the id passed is valid. More...
 
static FrontPanelIndicatordevice::FrontPanelIndicator::getInstance (const std::string &name)
 This API gets the FrontPanelIndicator instance corresponding to the name parameter. More...
 
 device::FrontPanelIndicator::FrontPanelIndicator (int id, int maxBrightness, int maxCycleRate, int levels, int colorMode)
 This function is a parameterised constructor of FrontPanelIndicator. It creates and initializes the FrontPanelIndicator instance with the configurations/values specified as input parameters. More...
 
virtual device::FrontPanelIndicator::~FrontPanelIndicator ()
 This function is the default constructor for FrontPanelIndicator. More...
 
void device::FrontPanelIndicator::setBrightness (const int &brightness, const bool toPersist=true)
 This API sets the brightness or intensity of the front panel indicators. More...
 
bool device::FrontPanelIndicator::getState ()
 This API gets the State of the specified LED indicators. More...
 
void device::FrontPanelIndicator::setState (const bool &enable)
 This API is used to enable or disable the front panel indicator. More...
 
int device::FrontPanelIndicator::getBrightness ()
 This API gets the brightness of the specified LED indicators. More...
 
void device::FrontPanelIndicator::getBrightnessLevels (int &levels, int &min, int &max)
 This function gets the maximum brightness, minimum brightness and the brightness level set for the front panel indicator. More...
 
int device::FrontPanelIndicator::getColorMode ()
 This function is used to get the color mode of the front panel indicator. The color mode is device specific and can be single or multi color mode (RGB colors). By default the color mode is set to 0 to indicate single color mode. More...
 
void device::FrontPanelIndicator::setBlink (const Blink &blink)
 This API sets the blink iteration and blink interval for the LED. More...
 
uint32_t device::FrontPanelIndicator::getColor ()
 This API gets the color of the front panel indicator/LED. More...
 
void device::FrontPanelIndicator::setColor (const Color &newColor, const bool toPersist=true)
 This API sets the color of the front panel indicator. More...
 
void device::FrontPanelIndicator::setColor (const uint32_t color, const bool toPersist=true)
 This API sets the color of the front panel indicator. More...
 
const List< Colordevice::FrontPanelIndicator::getSupportedColors () const
 This API gets the list of supported colors for front panel indicator. More...
 

Function Documentation

◆ getInstance() [1/4]

const FrontPanelIndicator::Color & Color::getInstance ( int  id)
static

This function gets an instance of the Color with the specified id, only if the id passed is valid.

Parameters
[in]idIndicates the id of the color against which the Color instance is requested.
Returns
Returns Color instance corresponding to the id parameter else throws an IllegalArgumentException indicating that the instance corresponding to the id parameter is not found

Definition at line 145 of file frontPanelIndicator.cpp.

◆ getInstance() [2/4]

const FrontPanelIndicator::Color & Color::getInstance ( const std::string &  name)
static

This function gets an instance of the Color corresponding to the specified name, only if the name passed is valid.

Parameters
[in]nameIndicates the name against which the color instance is required.
Returns
Returns Color instance corresponding to the name parameter else throws an IllegalArgumentException indicating that the instance corresponding to the name parameter is not found

Definition at line 167 of file frontPanelIndicator.cpp.

◆ Blink()

Blink::Blink ( int  interval = 0,
int  iteration = 0 
)

This API is a parameterized constructor for the nested class Blink.

  • It initializes iteration and interval parameters. By default they are set to Zero
Parameters
[in]intervalSpecifies the blink intervals for front panel indicator
[in]iterationSpecifies the number of blink iterations for front panel indicator
Returns
None

Definition at line 202 of file frontPanelIndicator.cpp.

◆ getInstance() [3/4]

FrontPanelIndicator & device::FrontPanelIndicator::getInstance ( int  id)
static

This function gets the FrontPanelIndicator instance corresponding to the id parameter, only if the id passed is valid.

Parameters
[in]idIndicates the front panel indicator id whose instance has to be returned.
Returns
Returns FrontPanelIndicator instance corresponding to the name parameter else throws an IllegalArgumentException indicating that the instance corresponding to id parameter was not found.

Definition at line 208 of file frontPanelIndicator.cpp.

◆ getInstance() [4/4]

FrontPanelIndicator & device::FrontPanelIndicator::getInstance ( const std::string &  name)
static

This API gets the FrontPanelIndicator instance corresponding to the name parameter.

  • It gets the id corresponding to the front panel indicator name.
  • Then it gets the FrontPanelIndicator instance corresponding to the id.
Parameters
[in]nameIndicates the front panel indicator name whose instance has to be returned.
Returns
Returns FrontPanelIndicator instance corresponding to the name parameter else throws an IllegalArgumentException.

Definition at line 247 of file frontPanelIndicator.cpp.

◆ FrontPanelIndicator()

device::FrontPanelIndicator::FrontPanelIndicator ( int  id,
int  maxBrightness,
int  maxCycleRate,
int  levels,
int  colorMode 
)

This function is a parameterised constructor of FrontPanelIndicator. It creates and initializes the FrontPanelIndicator instance with the configurations/values specified as input parameters.

Parameters
[in]idIndicates the id for the FrontPanelIndicator instance created.
[in]maxBrightnessIndicates maximum brightness value for the front panel indicator.
[in]maxCycleRateIndicates maximum cycle rate for the front panel indicator.
[in]levelsIndicates brightness level for the front panel indicator.
[in]colorModeIndicates the color mode for the front panel indicator like single or multi color mode.
Returns
None

Definition at line 272 of file frontPanelIndicator.cpp.

◆ ~FrontPanelIndicator()

device::FrontPanelIndicator::~FrontPanelIndicator ( )
virtual

This function is the default constructor for FrontPanelIndicator.

Returns
None

Definition at line 292 of file frontPanelIndicator.cpp.

◆ setBrightness()

void device::FrontPanelIndicator::setBrightness ( const int &  brightness,
const bool  toPersist = true 
)

This API sets the brightness or intensity of the front panel indicators.

Parameters
[in]brightnessIndicates brightness value to be set.
[in]toPersistIf true, the value will also return in persistence memory.
Returns
None

Definition at line 306 of file frontPanelIndicator.cpp.

◆ getState()

bool device::FrontPanelIndicator::getState ( )

This API gets the State of the specified LED indicators.

Returns
_state State of the specified LED indicators.

Definition at line 325 of file frontPanelIndicator.cpp.

◆ setState()

void device::FrontPanelIndicator::setState ( const bool &  enable)

This API is used to enable or disable the front panel indicator.

Parameters
[in]enableTrue to enable front panel indicator else false.
Returns
None

Definition at line 350 of file frontPanelIndicator.cpp.

◆ getBrightness()

int device::FrontPanelIndicator::getBrightness ( )

This API gets the brightness of the specified LED indicators.

Returns
_brightness Brightness value of the specified LED indicators.

Definition at line 374 of file frontPanelIndicator.cpp.

◆ getBrightnessLevels()

void device::FrontPanelIndicator::getBrightnessLevels ( int &  levels,
int &  min,
int &  max 
)

This function gets the maximum brightness, minimum brightness and the brightness level set for the front panel indicator.

  • Note :
  • Brightness level indicates a step value at which the brightness/intensity of the indicator could be changed.

    Parameters
    [out]levelsIndicates brightness level set for the front panel indicator.
    [out]minIndicates minimum brightness of the front panel indicator.
    [out]maxIndicates maximum brightness of the front panel indicator.
    Returns
    None

Definition at line 406 of file frontPanelIndicator.cpp.

◆ getColorMode()

int device::FrontPanelIndicator::getColorMode ( )

This function is used to get the color mode of the front panel indicator. The color mode is device specific and can be single or multi color mode (RGB colors). By default the color mode is set to 0 to indicate single color mode.

Returns
None

Definition at line 422 of file frontPanelIndicator.cpp.

◆ setBlink()

void device::FrontPanelIndicator::setBlink ( const Blink blink)

This API sets the blink iteration and blink interval for the LED.

Parameters
[in]blinkIndicates the blink iteration and interval value to be set.
Returns
None

Definition at line 436 of file frontPanelIndicator.cpp.

◆ getColor()

uint32_t device::FrontPanelIndicator::getColor ( )

This API gets the color of the front panel indicator/LED.

Returns
_color_rgb32 Indicates the color of the LED in RGB format.

Definition at line 455 of file frontPanelIndicator.cpp.

◆ setColor() [1/2]

void device::FrontPanelIndicator::setColor ( const Color newColor,
const bool  toPersist = true 
)

This API sets the color of the front panel indicator.

Parameters
[in]colorThis parameter provides the color to be set in RGB format.
[in]toPersistIf true, the value will also return in persistence memory.
Returns
None

Definition at line 466 of file frontPanelIndicator.cpp.

◆ setColor() [2/2]

void device::FrontPanelIndicator::setColor ( const uint32_t  color,
const bool  toPersist = true 
)

This API sets the color of the front panel indicator.

Parameters
[in]colorIndicates the color to be set in RGB format.
[in]toPersistIf true, the value will also return in persistence memory.
Returns
None

Definition at line 523 of file frontPanelIndicator.cpp.

◆ getSupportedColors()

const List< FrontPanelIndicator::Color > device::FrontPanelIndicator::getSupportedColors ( ) const

This API gets the list of supported colors for front panel indicator.

  • The colors supported are platform specific and can be RGB combinations.
Returns
Returns a list of colors suppported.

Definition at line 549 of file frontPanelIndicator.cpp.