![]() |
RDK Documentation (Open Sourced RDK Components)
|
Functions | |
static gboolean | masterBlinkCallbackFunction (gpointer data) |
Callback function to perform indicator brightness with type "Blink". More... | |
static gboolean | masterFlareCallbackFunction (gpointer data) |
Callback function to preform indicator brightness with flare value. More... | |
void | trace_event (int state) |
This API is used to trace the debug logs prints. More... | |
void | toggleBrightness () |
This API toggles between two LED modes, such as Dimming the light and Setting full brightness. | |
void | keyEventHandler (const char *owner, IARM_EventId_t eventId, void *data, size_t len) |
This API receives the IR events from IR manager to handle the detected key pressed and give LED indication accordingly using received keycode and type. More... | |
void | powerEventHandler (const char *owner, IARM_EventId_t eventId, void *data, size_t len) |
This API handles power mode change events received from power manager. More... | |
IARM_Result_t | modeChangeHandler (void *arg) |
This callback notification received when there is a system mode change to handle from IARM manager. More... | |
void | sysEventHandler (const char *owner, IARM_EventId_t eventId, void *data, size_t len) |
To handle IARM BUS system state event callback. More... | |
int32_t | init_event_handlers () |
To Register required IARM event handlers with appropriate callback function to handle the event. | |
int32_t | term_event_handlers () |
This API UnRegister IARM event handlers in order to release bus-facing resources. | |
void | print_menu () |
This API prints the LED use-cases. | |
void * | command_line_prompt (void *ptr) |
This Thread launches command line interface. | |
static bool | drop_root () |
int | main (int argc, char *argv[]) |
virtual void | ledMgr::handleModeChange (unsigned int mode) |
Ths API shows a reference implementation for handles when there is a changes in system mode(IARM bus system modes: NORMAL, EAS, WAREHOUSE). More... | |
virtual void | ledMgr::handleGatewayConnectionEvent (unsigned int state, unsigned int error) |
This API shows a reference implementation of calling appropriate ledmgr indicator API depends of the gateway connection event. More... | |
virtual void | ledMgr::handleKeyPress (int key_code, int key_type) |
This API shows a reference implementation for handling key press and give LED indication accordingly. Indicator functions are called with the supported LED pattern or color. More... | |
indicator::indicator (const std::string &name) | |
const std::string & | indicator::getName () const |
API to return the indicator name. More... | |
void | indicator::setColor (const unsigned int color) |
This API sets the indicator color. More... | |
void | indicator::setBrightness (unsigned int intensity) |
This API sets the brightness of the specified LED. More... | |
int | indicator::setBlink (const blinkPattern_t *pattern, int repetitions=-1) |
This API enables the indicator to blink with the specified blinking pattern. More... | |
int | indicator::step () |
This API is to register timer callback function depends on iteration pattern(indefinite iteration and finite iteration). More... | |
int | indicator::timerCallback (void) |
This API requests to process the pattern iteration steps. | |
int | indicator::registerCallback (unsigned int milliseconds) |
This API register timer callback function in order to complete the blinking pattern iteration count. More... | |
int | indicator::setState (indicatorState_t state) |
This API cancel the current blinking indicator if any, to change the state . More... | |
int | indicator::enableIndicator (bool enable) |
This API sets the indicator state. More... | |
void | indicator::saveState () |
This API saves all the current indicator related properties. More... | |
void | indicator::restoreState () |
API to restore the indicator properties from saved indicator properties. More... | |
void | indicator::executeFlare (const unsigned int percentage_increase, const unsigned int length_ms) |
Register Flare callback function to set indicator brightness as flare. More... | |
void | indicator::flareCallback (void) |
API to perform indicator brightness with flare value. | |
indicator & | ledMgrBase::getIndicator (const std::string &name) |
This API search for the matching indicator and return the indicator. More... | |
void | ledMgrBase::setPowerState (int state) |
This function sets the power state. More... | |
int | ledMgrBase::getPowerState () |
This function used to get the power state. More... | |
bool | ledMgrBase::setError (unsigned int position, bool value) |
This API stores the error and returns the transition state in order to call appropriate ledmgr indicator api. More... | |
const blinkPattern_t * | ledMgrBase::getPattern (blinkPatternType_t pattern) const |
This API return the desired pattern info with respect to pattern type. More... | |
|
static |
Callback function to perform indicator brightness with type "Blink".
[in] | data | address of indicator class. |
Definition at line 36 of file indicator.cpp.
|
static |
Callback function to preform indicator brightness with flare value.
[in] | data | address of indicator class. |
Definition at line 51 of file indicator.cpp.
void trace_event | ( | int | state | ) |
This API is used to trace the debug logs prints.
[in] | state | system state |
Definition at line 66 of file ledmgrmain.cpp.
void keyEventHandler | ( | const char * | owner, |
IARM_EventId_t | eventId, | ||
void * | data, | ||
size_t | len | ||
) |
This API receives the IR events from IR manager to handle the detected key pressed and give LED indication accordingly using received keycode and type.
[in] | owner | owner of the event |
[in] | eventId | event ID |
[in] | data | event data |
[in] | len | event size |
Definition at line 150 of file ledmgrmain.cpp.
void powerEventHandler | ( | const char * | owner, |
IARM_EventId_t | eventId, | ||
void * | data, | ||
size_t | len | ||
) |
This API handles power mode change events received from power manager.
Power Manager monitors Power IR key events and reacts to power state changes.
[in] | owner | owner of the event |
[in] | eventId | power manager event ID |
[in] | data | event data |
[in] | len | event size |
Definition at line 171 of file ledmgrmain.cpp.
IARM_Result_t modeChangeHandler | ( | void * | arg | ) |
This callback notification received when there is a system mode change to handle from IARM manager.
[in] | arg | system mode change param |
Definition at line 204 of file ledmgrmain.cpp.
void sysEventHandler | ( | const char * | owner, |
IARM_EventId_t | eventId, | ||
void * | data, | ||
size_t | len | ||
) |
To handle IARM BUS system state event callback.
[in] | owner | owner of the event |
[in] | eventId | event ID |
[in] | data | event data |
[in] | len | event size |
Definition at line 218 of file ledmgrmain.cpp.
|
virtual |
Ths API shows a reference implementation for handles when there is a changes in system mode(IARM bus system modes: NORMAL, EAS, WAREHOUSE).
[in] | mode | IARM bus system mode. |
Reimplemented from ledMgrBase.
Definition at line 46 of file ledmgr.cpp.
|
virtual |
This API shows a reference implementation of calling appropriate ledmgr indicator API depends of the gateway connection event.
[in] | state | error state. |
[in] | error | error |
Reimplemented from ledMgrBase.
Definition at line 75 of file ledmgr.cpp.
|
virtual |
This API shows a reference implementation for handling key press and give LED indication accordingly. Indicator functions are called with the supported LED pattern or color.
[in] | key_code | key code. |
[in] | key_type | key type. |
Reimplemented from ledMgrBase.
Definition at line 105 of file ledmgr.cpp.
const std::string & indicator::getName | ( | ) | const |
API to return the indicator name.
Definition at line 98 of file indicator.cpp.
void indicator::setColor | ( | const unsigned int | color | ) |
This API sets the indicator color.
[in] | color | indicator color to be set. |
Definition at line 109 of file indicator.cpp.
|
private |
This API sets the brightness of the specified LED.
[in] | intensity | intensity value of brightness. |
Definition at line 127 of file indicator.cpp.
int indicator::setBlink | ( | const blinkPattern_t * | pattern, |
int | repetitions = -1 |
||
) |
This API enables the indicator to blink with the specified blinking pattern.
[in] | pattern | blink pattern. |
[in] | repetitions | number of repetition count. |
Definition at line 148 of file indicator.cpp.
|
private |
This API is to register timer callback function depends on iteration pattern(indefinite iteration and finite iteration).
Definition at line 188 of file indicator.cpp.
|
private |
This API register timer callback function in order to complete the blinking pattern iteration count.
[in] | milliseconds | time interval between calls to the callback function. |
Definition at line 263 of file indicator.cpp.
int indicator::setState | ( | indicatorState_t | state | ) |
This API cancel the current blinking indicator if any, to change the state .
[in] | state | indicator state. |
Definition at line 285 of file indicator.cpp.
|
private |
This API sets the indicator state.
[in] | enable | indicator state. |
Definition at line 326 of file indicator.cpp.
void indicator::saveState | ( | ) |
This API saves all the current indicator related properties.
When iterations >= 0 and the number of iterations has successfully completed, the LED will be left to the color/brightness as specified by the LAST element in the array
Definition at line 346 of file indicator.cpp.
void indicator::restoreState | ( | ) |
API to restore the indicator properties from saved indicator properties.
When iterations >= 0 and the number of iterations has successfully completed, the LED will be left to the color/brightness as specified by the LAST element in the array
Definition at line 378 of file indicator.cpp.
void indicator::executeFlare | ( | const unsigned int | percentage_increase, |
const unsigned int | length_ms | ||
) |
Register Flare callback function to set indicator brightness as flare.
[in] | percentage_increase | flare percentage to be increased. |
[in] | length_ms | time interval between calls to the callback function. |
Definition at line 431 of file indicator.cpp.
indicator & ledMgrBase::getIndicator | ( | const std::string & | name | ) |
This API search for the matching indicator and return the indicator.
Note: throws std::invalid_argument exception
Definition at line 51 of file ledmgrbase.cpp.
void ledMgrBase::setPowerState | ( | int | state | ) |
This function sets the power state.
[in] | state | power state. |
Definition at line 101 of file ledmgrbase.cpp.
int ledMgrBase::getPowerState | ( | ) |
This function used to get the power state.
Definition at line 113 of file ledmgrbase.cpp.
bool ledMgrBase::setError | ( | unsigned int | position, |
bool | value | ||
) |
This API stores the error and returns the transition state in order to call appropriate ledmgr indicator api.
[in] | position | error position which points to the error type. |
[in] | value | error state which points to true or false. |
Definition at line 130 of file ledmgrbase.cpp.
const blinkPattern_t * ledMgrBase::getPattern | ( | blinkPatternType_t | type | ) | const |
This API return the desired pattern info with respect to pattern type.
[in] | type | Blink pattern type. |
Definition at line 186 of file ledmgrbase.cpp.