
Chapter 12 Device Logic (Pawn)
native PM_BackupClose();
Deactivates malfunction monitoring for the supply or charging voltage V IN
Explanation
Return value
OK, if successful
native PM_GetInfo(info[TPM_Info], len=sizeof info);
Provides information on the energy source used and power management status
Parameter
Explanation
info
Structure for storing the information (see "TPM_Info" in chapter "Arrays with
symbolic indices" on page 159)
len
Size (in cells) of the structure to store the information - OPTIONAL
Explanation
Return value
l
OK, if successful
l
ERROR, if an invalid parameter was transferred
native PM_GetCoulombCounter(flags=0);
Reads the current state of the Coulomb counter (electric charge) that can be used for the application
derived from the system's internal Coulomb counter
Parameter
Explanation
flags
Configuration flags to be set/deleted - OPTIONAL
Bit0: Resetting the Coulomb counter that can be used for the application
0 = no action
PM_CC_RESET = Counter reset
Explanation
Return value
Depleted electric charge [mAs] since the last reset of the Coulomb counter that
can be used for the application
12.4 Device Logic error codes
If an error occurs while executing the Device Logic, the corresponding error code is entered in the device log
and the Device Logic is restarted. If such an error occurs more than three times in 24 hours, the Device Logic
is deactivated and error handling is activated (see "Error handling" on page 32). The parameter for all log
entries except "SCRIPT_ERR" contains the 32-bit instruction pointer of the PAWN abstract machine (AMX).
Two entries are generated in the device log as only 16-bit values can be saved in the parameter of a log entry.
The first entry contains Bit31-Bit16 and the second entry contains Bit15-Bit0 of 32-bit instruction pointer.
Rev. 01
161