BA / Mbed OS BaBoRo1
Embed: (wiki syntax)

« Back to documentation index

AT_CellularPower Class Reference

AT_CellularPower Class Reference

Class AT_CellularPower. More...

#include <AT_CellularPower.h>

Inherits mbed::CellularPower, and mbed::AT_CellularBase.

Inherited by QUECTEL_BC95_CellularPower, TELIT_HE910_CellularPower, and UBLOX_LISA_U_CellularPower.

Public Member Functions

virtual nsapi_error_t on ()
 Set cellular device power on.
virtual nsapi_error_t off ()
 Set cellular device power off.
virtual nsapi_error_t set_at_mode ()
 Set AT command mode.
virtual nsapi_error_t set_power_level (int func_level)
 Set cellular device power level by enabling/disabling functionality.
virtual nsapi_error_t reset ()
 Reset and wake-up cellular device.
virtual nsapi_error_t opt_power_save_mode (int periodic_time, int active_time)
 Opt for power save setting on cellular device.
virtual nsapi_error_t opt_receive_period (int mode, EDRXAccessTechnology act_type, uint8_t edrx_value)
 Opt for discontinuous reception on cellular device.
ATHandlerget_at_handler ()
 Getter for at handler.
device_err_t get_device_error () const
 Gets the device error that happened when using AT commands/responses.

Detailed Description

Class AT_CellularPower.

Class that provides power handling functions for modem/module.

Definition at line 31 of file AT_CellularPower.h.


Member Function Documentation

ATHandler & get_at_handler (  ) [inherited]

Getter for at handler.

Common method for all AT-classes.

Returns:
reference to ATHandler

Definition at line 27 of file AT_CellularBase.cpp.

device_err_t get_device_error (  ) const [inherited]

Gets the device error that happened when using AT commands/responses.

This is at error returned by the device. Returned CME/CMS errors can be found from 3gpp documents 27007 and 27005.

Returns:
at error (CME/CMS) while communicating with the device

Definition at line 32 of file AT_CellularBase.cpp.

nsapi_error_t off (  ) [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

Implements CellularPower.

Definition at line 41 of file AT_CellularPower.cpp.

nsapi_error_t on (  ) [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

Implements CellularPower.

Definition at line 36 of file AT_CellularPower.cpp.

nsapi_error_t opt_power_save_mode ( int  periodic_time,
int  active_time 
) [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

Table 10.5.163a/3GPP TS 24.008: GPRS Timer 3 information element

Bits 5 to 1 represent the binary coded timer value.

Bits 6 to 8 defines the timer value unit for the GPRS timer as follows: 8 7 6 0 0 0 value is incremented in multiples of 10 minutes 0 0 1 value is incremented in multiples of 1 hour 0 1 0 value is incremented in multiples of 10 hours 0 1 1 value is incremented in multiples of 2 seconds 1 0 0 value is incremented in multiples of 30 seconds 1 0 1 value is incremented in multiples of 1 minute 1 1 0 value is incremented in multiples of 320 hours (NOTE 1) 1 1 1 value indicates that the timer is deactivated (NOTE 2).

Table 10.5.172/3GPP TS 24.008: GPRS Timer information element

Bits 5 to 1 represent the binary coded timer value.

Bits 6 to 8 defines the timer value unit for the GPRS timer as follows:

8 7 6 0 0 0 value is incremented in multiples of 2 seconds 0 0 1 value is incremented in multiples of 1 minute 0 1 0 value is incremented in multiples of decihours 1 1 1 value indicates that the timer is deactivated.

Other values shall be interpreted as multiples of 1 minute in this version of the protocol.

Implements CellularPower.

Definition at line 85 of file AT_CellularPower.cpp.

nsapi_error_t opt_receive_period ( int  mode,
EDRXAccessTechnology  act_type,
uint8_t  edrx_value 
) [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

Implements CellularPower.

Definition at line 216 of file AT_CellularPower.cpp.

nsapi_error_t reset (  ) [virtual]

Reset and wake-up cellular device.

Returns:
zero on success

Implements CellularPower.

Definition at line 73 of file AT_CellularPower.cpp.

nsapi_error_t set_at_mode (  ) [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

Implements CellularPower.

Definition at line 46 of file AT_CellularPower.cpp.

nsapi_error_t set_power_level ( int  func_level ) [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

Implements CellularPower.

Definition at line 62 of file AT_CellularPower.cpp.