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 = "DesignCycleCount9C"
)
of dictionary of node "AppleSmartBattery" of node "AppleSmartBatteryManager" of node "AppleECSMBusController" of node "SMB0" of node "AppleACPIPlatformExpert" of service plane of iokit registry
)
-
(
integer of value of entry whose
(
key of it = "CycleCount"
)
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 = "DesignCycleCount9C"
)
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 = "DesignCycleCount9C") of dictionary of node "AppleSmartBattery" of node "AppleSmartBatteryManager" of node "AppleECSMBusController" of node "SMB0" of node "AppleACPIPlatformExpert" of service plane of iokit registry) - (integer of value of entry whose(key of it = "CycleCount") 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 = "DesignCycleCount9C") 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