Player APIs (BrightScript & Ja...
...
Object Reference
Input/Output Objects
roPowerManager
5min
the ropowermanager object is used to report the battery state of the device object creation the ropowermanager object is created as follows createobject("ropowermanager") ifpowermanager getpowersource() as string returns either "battery", "ac", or "ethernet", depending on the power source getbatterystatus() as object returns the following values state string string returns the device battery status as either "charging", "discharging", "charge complete", or "charge fault" soc percent int int the level of charge of the battery as a percentage hardware version string string the hardware version number poweroff() indicates that the charger should cut the power setpowerswitchmode(as a string) takes either "hard" or "soft" getpowerswitchmode() as string returns whether it is set to "hard" or "soft" ifmessageport setport(as a object) which message port should be used to get messages from the power manager