Gleb Klochkov / Mbed OS Climatcontroll_Main

Dependencies:   esp8266-driver

Embed: (wiki syntax)

« Back to documentation index

CellularPower Class Reference

CellularPower Class Reference

Class CellularPower. More...

#include <CellularPower.h>

Inherited by AT_CellularPower.

Public Member Functions

virtual nsapi_error_t on ()=0
 Set cellular device power on.
virtual nsapi_error_t off ()=0
 Set cellular device power off.
virtual nsapi_error_t set_at_mode ()=0
 Set AT command mode.
virtual nsapi_error_t set_power_level (int func_level)=0
 Set cellular device power level by enabling/disabling functionality.
virtual nsapi_error_t reset ()=0
 Reset and wake-up cellular device.
virtual nsapi_error_t opt_power_save_mode (int periodic_time, int active_time)=0
 Opt for power save setting on cellular device.
virtual nsapi_error_t opt_receive_period (int mode, EDRXAccessTechnology act_type, uint8_t edrx_value)=0
 Opt for discontinuous reception on cellular device.

Protected Member Functions

virtual ~CellularPower ()
 virtual Destructor

Detailed Description

Class CellularPower.

An interface that provides power handling functions for modem/module.

Definition at line 29 of file CellularPower.h.


Constructor & Destructor Documentation

virtual ~CellularPower (  ) [protected, virtual]

virtual Destructor

Definition at line 38 of file CellularPower.h.


Member Function Documentation

virtual nsapi_error_t off (  ) [pure virtual]

Set cellular device power off.

Default implementation is empty. Device power on/off is modem/board specific behavior and must be done on inherited class if needed. Power off is done by toggling power pin/button.

Returns:
zero on success

Implemented in AT_CellularPower.

virtual nsapi_error_t on (  ) [pure virtual]

Set cellular device power on.

Default implementation is empty. Device power on/off is modem/board specific behavior and must be done on inherited class if needed. Power on is done by toggling power pin/button.

Remarks:
set_at_mode must be called to initialise modem
Returns:
zero on success

Implemented in AT_CellularPower.

virtual nsapi_error_t opt_power_save_mode ( int  periodic_time,
int  active_time 
) [pure virtual]

Opt for power save setting on cellular device.

If both parameters are zero then disables PSM.

Remarks:
See 3GPP TS 27.007 PSM for details
Parameters:
periodic_timeTimeout in seconds IoT subsystem is not expecting messaging
active_timeTimeout in seconds IoT subsystem waits for response
Returns:
zero on success

Implemented in AT_CellularPower.

virtual nsapi_error_t opt_receive_period ( int  mode,
EDRXAccessTechnology  act_type,
uint8_t  edrx_value 
) [pure virtual]

Opt for discontinuous reception on cellular device.

Remarks:
See 3GPP TS 27.007 eDRX for details.
Parameters:
modedisable or enable the use of eDRX
act_typetype of access technology
edrx_valuerequested edxr value. Extended DRX parameters information element.
Returns:
zero on success

Implemented in AT_CellularPower.

virtual nsapi_error_t reset (  ) [pure virtual]

Reset and wake-up cellular device.

Returns:
zero on success

Implemented in AT_CellularPower.

virtual nsapi_error_t set_at_mode (  ) [pure virtual]

Set AT command mode.

Blocking until success or failure.

Remarks:
must be called after power on to prepare correct AT mode
Returns:
zero on success

Implemented in AT_CellularPower.

virtual nsapi_error_t set_power_level ( int  func_level ) [pure virtual]

Set cellular device power level by enabling/disabling functionality.

Parameters:
func_level,:0 minimum functionality 1 full functionality. Enable (turn on) the transmit and receive RF circuits for all supported radio access technologies. For MTs supporting +CSRA, this equals the RATs indicated by the response of +CSRA=?. Current +CSRA setting is ignored. It is not required that the MT transmit and receive RF circuits are in a disabled state for this setting to have effect. 2 disable (turn off) MT transmit RF circuits only 3 disable (turn off) MT receive RF circuits only 4 disable (turn off) both MT transmit and receive RF circuits
Remarks:
See 3GPP TS 27.007 CFUN for more details
Returns:
zero on success

Implemented in AT_CellularPower.