if
(
not exists node "AppleACPIPlatformExpert" whose
(
exists node "AppleSmartBattery" of node "AppleSmartBatteryManager" of node "AppleECSMBusController" of node "SMB0" of it
)
of service plane of iokit registry
)
then "<No battery info>" else
(
(
integer of value of entry whose
(
key of it = "MaxCapacity"
)
of dictionary of node "AppleSmartBattery" of node "AppleSmartBatteryManager" of node "AppleECSMBusController" of node "SMB0" of node "AppleACPIPlatformExpert" of service plane of iokit registry
)
*100/
(
integer of value of entry whose
(
key of it = "DesignCapacity"
)
of dictionary of node "AppleSmartBattery" of node "AppleSmartBatteryManager" of node "AppleECSMBusController" of node "SMB0" of node "AppleACPIPlatformExpert" of service plane of iokit registry
)
)
as string
if(not exists node "AppleACPIPlatformExpert" whose(exists node "AppleSmartBattery" of node "AppleSmartBatteryManager" of node "AppleECSMBusController" of node "SMB0" of it) of service plane of iokit registry) then "<No battery info>" else ((integer of value of entry whose(key of it = "MaxCapacity") of dictionary of node "AppleSmartBattery" of node "AppleSmartBatteryManager" of node "AppleECSMBusController" of node "SMB0" of node "AppleACPIPlatformExpert" of service plane of iokit registry)*100/(integer of value of entry whose(key of it = "DesignCapacity") of dictionary of node "AppleSmartBattery" of node "AppleSmartBatteryManager" of node "AppleECSMBusController" of node "SMB0" of node "AppleACPIPlatformExpert" of service plane of iokit registry)) as string