drx
Diff: UbloxCellularBase.h
- Revision:
- 26:7a05f60319bc
- Parent:
- 25:e67d3d9d2e7e
- Child:
- 27:bea0391bb075
--- a/UbloxCellularBase.h Wed May 29 12:39:28 2019 +0500 +++ b/UbloxCellularBase.h Fri Jul 26 15:32:42 2019 +0500 @@ -1,4 +1,4 @@ -/* Copyright (c) 2017 ARM Limited +/* Copyright (c) 2019 ARM Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -83,6 +83,17 @@ ASLEEP = 1 } ModemPSMState; + /** + * edrx access technology + */ + typedef enum { + EDRXGSM_EC_GSM_IoT_mode = 1, + EDRXGSM_A_Gb_mode, + EDRXUTRAN_Iu_mode, + EDRXEUTRAN_WB_S1_mode, + EDRXEUTRAN_NB_S1_mode + }tEDRXAccessTechnology; + /** Initialise the modem, ready for use. * * @param pin PIN for the SIM card. @@ -400,6 +411,55 @@ bool is_modem_awake(); #endif +#ifdef TARGET_UBLOX_C030_R41XM + /** Set discontinuous reception time on cellular device. + * SARA-R404M / SARA-R410M-02B / SARA-R410M-52B / SARA-R412M / SARA-N4 : The <Paging_time_window> parameter cannot be set by means of the set command. + * + * + * @remark See 3GPP TS 27.007 eDRX for details. + * + * @param mode disable or enable the use of eDRX + * @param act_type type of access technology + * @param edrx_value requested edxr value. Extended DRX parameters information element. + * + * @return 0 on success + * 1 on failure + */ + int set_receive_period(int mode, tEDRXAccessTechnology act_type, uint8_t edrx_value); + + /** Set discontinuous reception time on cellular device. + * + * @remark See 3GPP TS 27.007 eDRX for details. + * + * @param mode disable or enable the use of eDRX + * @param act_type type of access technology + * + * @return 0 on success + * 1 on failure + */ + int set_receive_period(int mode, tEDRXAccessTechnology act_type); + + /** Set discontinuous reception time on cellular device. (Disable) + * + * @remark See 3GPP TS 27.007 eDRX for details. + * + * @param mode disable or enable the use of eDRX + * + * @return 0 on success + * 1 on failure + */ + int set_receive_period(int mode); + + /** get discontinuous reception time on cellular device. + * + * @remark See 3GPP TS 27.007 eDRX for details. + * + * @return true on success + * false on failure + */ + bool get_receive_period(); +#endif + protected: #define OUTPUT_ENTER_KEY "\r" @@ -671,6 +731,7 @@ #ifdef TARGET_UBLOX_C030_R412M void UUPSMR_URC(); bool _psm_status; + bool _edrx_configured; void *_cb_param_psm_going_in; Callback<void(void*)> _func_psm_going_in; /**< Callback. */ void *_cb_param_psm_coming_out;