takashi kadono / Mbed OS Nucleo_446

Dependencies:   ssd1331

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, int do_reset=0)=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.
virtual nsapi_error_t is_device_ready ()=0
 Check whether the device is ready to accept commands.
virtual nsapi_error_t set_device_ready_urc_cb (mbed::Callback< void()> callback)=0
 Set URC callback function for device specific ready urc.
virtual void remove_device_ready_urc_cb (mbed::Callback< void()> callback)=0
 Removes the device ready urc from the list of urc's.

Protected Member Functions

virtual ~CellularPower ()
 virtual Destructor

Detailed Description

Class CellularPower.

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

Definition at line 30 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 is_device_ready (  ) [pure virtual]

Check whether the device is ready to accept commands.

Returns:
NSAPI_ERROR_OK on success NSAPI_ERROR_DEVICE_ERROR on failure

Implemented in AT_CellularPower.

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:
NSAPI_ERROR_OK on success NSAPI_ERROR_UNSUPPORTED if not overridden by the target modem

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:
NSAPI_ERROR_OK on success NSAPI_ERROR_UNSUPPORTED if not overridden by the target modem

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, this 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:
NSAPI_ERROR_OK on success NSAPI_ERROR_DEVICE_ERROR on failure

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:
NSAPI_ERROR_OK on success NSAPI_ERROR_DEVICE_ERROR on failure

Implemented in AT_CellularPower.

virtual void remove_device_ready_urc_cb ( mbed::Callback< void()>  callback ) [pure virtual]

Removes the device ready urc from the list of urc's.

Parameters:
callbackcallback to remove from the list of urc's

Implemented in AT_CellularPower.

virtual nsapi_error_t reset (  ) [pure virtual]

Reset and wake-up cellular device.

Returns:
NSAPI_ERROR_OK on success NSAPI_ERROR_DEVICE_ERROR on failure

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:
NSAPI_ERROR_OK on success NSAPI_ERROR_DEVICE_ERROR on failure

Implemented in AT_CellularPower.

virtual nsapi_error_t set_device_ready_urc_cb ( mbed::Callback< void()>  callback ) [pure virtual]

Set URC callback function for device specific ready urc.

URC is defined in device specific power API. Used in startup sequence to listen when device is ready for using at commands and possible sim.

Parameters:
callbackCallback function called when urc received
Returns:
NSAPI_ERROR_OK on success NSAPI_ERROR_NO_MEMORY on memory failure NSAPI_ERROR_UNSUPPORTED if not overridden by the target modem

Implemented in AT_CellularPower.

virtual nsapi_error_t set_power_level ( int  func_level,
int  do_reset = 0 
) [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
do_reset0 for do not reset, 1 for reset the device when changing the functionality
Remarks:
See 3GPP TS 27.007 CFUN for more details
Returns:
NSAPI_ERROR_OK on success NSAPI_ERROR_DEVICE_ERROR on failure

Implemented in AT_CellularPower.