note description: "[ Battery/power supply informations. You should never take a battery status as absolute truth. Batteries (especially failing batteries) are delicate hardware, and the values reported here are best estimates based on what that hardware reports. It's not uncommon for older batteries to lose stored power much faster than it reports, or completely drain when reporting it has 20 percent left, etc. Battery status can change at any time; if you are concerned with power state, you should call this function frequently, and perhaps ignore changes until they seem to be stable for a few seconds. ]" author: "Louis Marchand" date: "Thu, 28 Jan 2016 02:17:06 +0000" revision: "2.0" class interface GAME_BATTERY create default_create feature -- Access update -- Check the battery state and life to update the features of Current feature -- Status Report is_life_left_valid: BOOLEAN -- The last update did not return any valid value for seconds_left and percentage_left. -- You can wait for some time and retry. If it is always not valid, maybe the system does not -- support battery life information or the system is not running on battery. seconds_left: INTEGER_32 -- An approximation of the seconds of battery life left percentage_left: INTEGER_32 -- An approximation of the percentage of battery life left is_state_unknown: BOOLEAN -- Cannot identify the state of Current -- You can wait for some time and retry. -- If it is always unknown, maybe the system does not support battery. is_state_on_battery: BOOLEAN -- not plugged in, running on the battery is_state_no_battery: BOOLEAN -- plugged in, no battery available is_state_charging: BOOLEAN -- plugged in, charging battery is_state_charged: BOOLEAN -- plugged in, battery charged end -- class GAME_BATTERY
Generated by ISE EiffelStudio