This method blocks script execution and sets the system in power saving mode for a given time interval or until an external event occurs (e.g. incoming call RING). Blocking script execution is necessary for power saving conditions to be achieved. Setting power saving mode is equivalent to AT+CFUN=0 command (see Telit Modules Software User Guide for further details).
The input parameter timeout is an integer, which is measured in seconds and represents the maximum time the Python script remains blocked. The Python script will exit power saving mode when the given value of timeout is reached or when an external event occurs (e.g. incoming call RING). If the timeout value is -1 the Python script will exit from power saving mode only when an external event occurs. The timeout value can be -1 or in the range (0 ÷ 1800000 (500 hours)).
The return value is a Python integer which is 0 if the Python script has exited power saving mode because an external event has occurred otherwise it is 1 if the Python script has exited power saving mode because the timeout has expired.
Example:
cause = MOD.powerSaving(100)
blocks Python script and enters power saving mode for a maximum of 100 sec or until an external event occurs.