From 73f2ccbf49cced1bb66371d1ba12ce23fd8eae5b Mon Sep 17 00:00:00 2001 From: Sooraj Sasindran Date: Wed, 8 Apr 2015 17:23:07 -0700 Subject: [PATCH] RIL: Interface to retrieve power stats info Introduce interface to retrieve modem power stats info Change-Id: I7ed89e754f733a93e430d64dfe28d7fbed1d4d75 --- include/telephony/ril.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/include/telephony/ril.h b/include/telephony/ril.h index d790527..1772025 100644 --- a/include/telephony/ril.h +++ b/include/telephony/ril.h @@ -1411,6 +1411,31 @@ typedef struct { int enabled; } RIL_DataProfileInfo; +/* Tx Power Levels */ +typedef enum { + RIL_TX_POWER_LEVEL_ONE = 0, + RIL_TX_POWER_LEVEL_TWO = 1, + RIL_TX_POWER_LEVEL_THREE = 2, + RIL_TX_POWER_LEVEL_FOUR = 3, + RIL_TX_POWER_LEVEL_FIVE = 4, + RIL_TX_POWER_LEVEL_MAX = 5 +} RIL_TxPowerLevel; + +typedef struct { + + /* period (in ms) when modem is power collapsed */ + uint32_t sleep_mode_time_ms; + + /* period (in ms) when modem is awake and in idle mode*/ + uint32_t idle_mode_time_ms; + + /* period (in ms) for which Tx is active */ + uint32_t tx_mode_time_ms[RIL_TX_POWER_LEVEL_MAX]; + + /* period (in ms) for which Rx is active */ + uint32_t rx_mode_time_ms; +} RIL_ActivityStatsInfo; + /** * RIL_REQUEST_GET_SIM_STATUS * @@ -4270,6 +4295,7 @@ typedef struct { /** * RIL_REQUEST_GET_DC_RT_INFO * + * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO * Requests the Data Connection Real Time Info * * "data" is NULL @@ -4288,6 +4314,7 @@ typedef struct { /** * RIL_REQUEST_SET_DC_RT_INFO_RATE * + * The request is DEPRECATED * This is the minimum number of milliseconds between successive * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of @@ -4415,6 +4442,25 @@ typedef struct { */ #define RIL_REQUEST_PULL_LCEDATA 134 +/** + * RIL_REQUEST_GET_ACTIVITY_INFO + * + * Get modem activity statisitics info. + * + * There can be multiple RIL_REQUEST_GET_ACTIVITY_INFO calls to modem. + * Once the response for the request is sent modem will clear + * current statistics information. + * + * "data" is null + * "response" is const RIL_ActivityStatsInfo * + * + * Valid errors: + * + * SUCCESS + * RADIO_NOT_AVAILABLE (radio resetting) + * GENERIC_FAILURE + */ +#define RIL_REQUEST_GET_ACTIVITY_INFO 135 /***********************************************************************/ @@ -4962,6 +5008,7 @@ typedef struct { /** * RIL_UNSOL_DC_RT_INFO_CHANGED * + * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO * Sent when the DC_RT_STATE changes but the time * between these messages must not be less than the * value set by RIL_REQUEST_SET_DC_RT_RATE. -- 2.11.0