RDK Documentation (Open Sourced RDK Components)
LED Data types

Description

Modules

 LED API
 

Data Structures

class  ledMgrBase
 

Macros

#define NUM_PATTERNS   3
 
#define IARMBUS_OWNER_NAME   "ledmgr"
 

Enumerations

enum  errorTypes_t
 
enum  blinkPatternType_t
 
enum  indicatorState_t
 

Functions

 ledMgrBase::ledMgrBase ()
 Constructor function performs initialization.
 
 ledMgrBase::~ledMgrBase ()
 Destructor API.
 
virtual int ledMgrBase::createBlinkPatterns ()
 This API creates blink patterns using the pattern type, duration, sequence … etc. as parameters.
 
void ledMgrBase::diagnostics ()
 This API prints pattern details include id, sequence.
 
virtual void ledMgrBase::handleCDLEvents (unsigned int event)
 
virtual void ledMgrBase::handleModeChange (unsigned int mode)
 
virtual void ledMgrBase::handleGatewayConnectionEvent (unsigned int state, unsigned int error)
 
virtual void ledMgrBase::handleDeviceReset (const unsigned int sequence)
 
virtual void ledMgrBase::handleDeviceResetAbort ()
 
virtual void ledMgrBase::handleKeyPress (int key_code, int key_type)
 
static ledMgrledMgr::getInstance ()
 

Variables

unsigned int blinkOp_t::length
 
bool blinkOp_t::isOn
 
unsigned int blinkPattern_t::id
 
unsigned char blinkPattern_t::num_sequences
 
blinkOp_tblinkPattern_t::sequence
 
int ledMgrBase::m_is_powered_on
 
unsigned int ledMgrBase::m_error_flags
 
pthread_mutex_t ledMgrBase::m_mutex
 
std::vector< blinkPattern_tledMgrBase::m_patterns
 
std::vector< indicatorledMgrBase::m_indicators
 
static ledMgr ledMgr::m_singleton
 

Data Structure Documentation

◆ blinkOp_t

struct blinkOp_t

Definition at line 53 of file ledmgr_types.hpp.

Collaboration diagram for blinkOp_t:
Collaboration graph
Data Fields
unsigned int length

milliseconds

bool isOn

◆ blinkPattern_t

struct blinkPattern_t

Definition at line 59 of file ledmgr_types.hpp.

Collaboration diagram for blinkPattern_t:
Collaboration graph
Data Fields
unsigned int id
unsigned char num_sequences
blinkOp_t * sequence

Array of {duration, intensity} values in a defined sequence

◆ ledMgrBase

class ledMgrBase

Definition at line 36 of file ledmgrbase.hpp.

Inheritance diagram for ledMgrBase:
Inheritance graph
Collaboration diagram for ledMgrBase:
Collaboration graph

Public Member Functions

 ledMgrBase ()
 Constructor function performs initialization.
 
 ~ledMgrBase ()
 Destructor API.
 
virtual int createBlinkPatterns ()
 This API creates blink patterns using the pattern type, duration, sequence … etc. as parameters.
 
const blinkPattern_tgetPattern (blinkPatternType_t pattern) const
 This API return the desired pattern info with respect to pattern type. More...
 
void diagnostics ()
 This API prints pattern details include id, sequence.
 
indicatorgetIndicator (const std::string &name)
 This API search for the matching indicator and return the indicator. More...
 
virtual void handleCDLEvents (unsigned int event)
 
virtual void handleModeChange (unsigned int mode)
 
virtual void handleGatewayConnectionEvent (unsigned int state, unsigned int error)
 
virtual void handleDeviceReset (const unsigned int sequence)
 
virtual void handleDeviceResetAbort ()
 
virtual void handleKeyPress (int key_code, int key_type)
 
void setPowerState (int state)
 This function sets the power state. More...
 
int getPowerState ()
 This function used to get the power state. More...
 
bool 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...
 

Protected Attributes

int m_is_powered_on
 
unsigned int m_error_flags
 
pthread_mutex_t m_mutex
 
std::vector< blinkPattern_tm_patterns
 
std::vector< indicatorm_indicators
 

Macro Definition Documentation

◆ NUM_PATTERNS

#define NUM_PATTERNS   3

Total number of blink patterns

Definition at line 26 of file fp_profile.hpp.

Enumeration Type Documentation

◆ blinkPatternType_t

Enumerator
STATE_SLOW_BLINK 

500ms ON, 1000ms OFF

STATE_DOUBLE_BLINK 

(200ms ON - 100ms OFF) x 2 - 1000ms OFF

STATE_FAST_BLINK 

200ms ON - 100ms OFF

Definition at line 28 of file fp_profile.hpp.

Variable Documentation

◆ length

unsigned int blinkOp_t::length

milliseconds

Definition at line 55 of file ledmgr_types.hpp.

◆ isOn

bool blinkOp_t::isOn

Definition at line 56 of file ledmgr_types.hpp.

◆ id

unsigned int blinkPattern_t::id

Definition at line 61 of file ledmgr_types.hpp.

◆ num_sequences

unsigned char blinkPattern_t::num_sequences

Definition at line 62 of file ledmgr_types.hpp.

◆ sequence

blinkOp_t* blinkPattern_t::sequence

Array of {duration, intensity} values in a defined sequence

Definition at line 63 of file ledmgr_types.hpp.