BatteryStatus
BatteryStatus(which)
Returns a status frame for the specified battery.
DISCUSSION
- which
- An integer identifying the battery for which to return status information. The value 0 specifies the primary battery pack.
- return value
- A status frame; see DISCUSSION.
The status frame returned contains the following slots:
COMPATIBILITY
batteryType
- Contains one of the following symbols, or an integer:
'alkaline
Battery is standard alkaline.
'nicd
Battery is nickel-cadmium.
'nimh
Battery is nickel-metal hydride.
'lithium
Battery is lithium.
batteryVoltage
- A real number giving the current battery voltage.
batteryCapacity
- An integer, indicating the percentage of a full charge that the battery contains.
batteryLow
- An integer, indicating the percentage of a full charge at which the "low battery" warning should be triggered by the system.
batteryDead
- An integer, indicating the percentage of a full charge at which the "dead battery" warning should be triggered and the unit shut down by the system.
batteryCurrent
- A real number indicating the current drain, in milliamps. This slot is
nil
if the battery is charging. This slot is new in 2.1.acPower
- Contains a symbol (
'yes
or'no
) indicating whether or not the unit has AC power applied. Note that this does not imply that the battery is charging. SeechargeState
to determine that.acVoltage
- A real number giving the AC voltage being supplied by an AC adapter, or
nil
if AC power is not supplied.chargeState
- Contains one of the following symbols, or an integer:
'notCharging
The battery is not charging.
'discharging
The battery is discharging.
'preliminaryCharging
The battery is charging under a pulsed duty schedule that raises its voltage to a level at which it can be efficiently fast-charged. This charging mode is used initially for charging a heavily discharged battery.
'fastCharging
The battery is fast-charging.
'trickleChargeContinuous
or'trickleCharging
The battery is fully charged and is being maintained in that state by trickle-charging.
chargeRate
- Reserved for future use.
chargeCurrent
- A real number indicating the current, in milliamps, being supplied to charge the battery, if it is charging. If the battery is discharging, this is the current supplied from the battery to the system.
ambientTemp
- A real number indicating the ambient temperature in degrees Celsius.
batteryTemp
- A real number indicating the battery temperature in degrees Celsius.
- Note
- A
nil
value for a slot means the underlying hardware cannot supply this information. The slots containing symbol values (batteryType
,chargeState
,acPower
) may contain integers if the battery driver returned something other than the values listed here.![]()
The return value of this function is changed from its Newton 2.0 OS implementation. The
batteryCurrent
slot is new and the possible symbol values for thechargeState
slot are different.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help