|
RDK Documentation (Open Sourced RDK Components)
|
Go to the documentation of this file.
37 #include "illegalArgumentException.hpp"
45 const char *_names[] = {
50 inline const bool isValid(
int id) {
60 static std::vector<SleepMode> _vSleepModes;
76 static bool FirstTime =
true;
86 return _vSleepModes.at(
id);
103 for(std::vector<SleepMode>::const_iterator it = _vSleepModes.begin();
104 it != _vSleepModes.end(); it++)
106 #ifndef ENABLE_DEEP_SLEEP
127 for (
size_t i = 0; i <
dsUTL_DIM(_names); i++) {
128 if (name.compare(_names[i]) == 0) {
151 _name = std::string(_names[
id]);
int _id
Indicates the id of the instance inheriting this class.
This class is implemented using templates and it is used to maintain a container with the list of sup...
SleepMode(int id)
This function is a parameterised constructor of SleepMode class. It initializes the SleepMode instanc...
static SleepMode & getInstance(int id)
This function is used to get an instance of SleepMode against the specified id, only if the id passed...
Device Settings HAL types.
#define dsSleepMode_isValid(t)
static bool isValid(int min, int max, int val)
This function checks if the given value lies between min and max values provided.
static const int kLightSleep
Indicates light sleep mode.
Device Settings HAL utilities.
static const int kMax
Indicates maximum number of sleep modes supported.
std::string _name
Indicates the name string of the instance inheriting this class.
This class extends DSConstant to implement SleepMode. It is used to manage the sleep modes for device...
virtual ~SleepMode()
This function is the default destructor of SleepMode class.
static const int kDeepSleep
Indicates deep sleep mode.
@ dsHOST_SLEEP_MODE_LIGHT
void push_back(const T &x)
This is a template function used to push/store the ID of an instance x into the container.
List< SleepMode > getSleepModes()
This function is used to get all the platform supported types of sleep modes.
This class extends Exception class to manage the expections caused due to illegal arguments.
#define dsUTL_DIM(arr)
Device Settings general Array dimension calculation inline definition.
This file defines SleepMode class for device settings.