IOPSKeys.h

Introduction

IOPSKeys.h defines C strings for use accessing power source data in IOPowerSource CFDictionaries, as returned by IOPSGetPowerSourceDescription Note that all of these C strings must be converted to CFStrings before use. You can wrap them with the CFSTR() macro, or create a CFStringRef (that you must later CFRelease()) using CFStringCreateWithCString().



Groups

Power Source Commands (UPS)

Group members:

kIOPSCommandDelayedRemovePowerKey

Command to give a UPS when it should remove power from its AC plugs in a specified amount of time

kIOPSCommandEnableAudibleAlarmKey

Command to give a UPS when it should either enable or disable the audible alarm.

kIOPSCommandStartupDelayKey

Tell UPS how long it should wait for

 

Power Source data keys

Group members:

kIOPSACPowerValue

Value for key kIOPSPowerSourceStateKey. Power source is connected to external or AC power, and is not draining the internal battery.

kIOPSBatteryFailureModesKey

Enumerates a battery's failures and error conditions.

kIOPSBatteryHealthConditionKey

kIOPSBatteryHealthConditionKey broadly describes the battery's health.

kIOPSBatteryHealthKey

CFDictionary key for the current power source's "health" estimate.

kIOPSBatteryPowerValue

Value for key kIOPSPowerSourceStateKey. Power source is currently using the internal battery.

kIOPSCurrentCapacityKey

CFDictionary key for the current power source's capacity.

kIOPSCurrentKey

CFDictionary key for the current power source's electrical current.

kIOPSDesignCapacityKey

CFDictionary key for the current power source's design capacity

kIOPSHardwareSerialNumberKey

A unique serial number that identifies the power source.

kIOPSHealthConfidenceKey

CFDictionary key for our confidence in the accuracy of our power source's "health" estimate.

kIOPSInternalBatteryType

Represents a battery residing inside a Mac.

kIOPSInternalType

Value for key kIOPSTransportTypeKey. Indicates the power source is an internal battery.

kIOPSIsChargedKey

CFDictionary key indicates whether the battery is charged.

kIOPSIsChargingKey

CFDictionary key for the current power source's charging state

kIOPSIsFinishingChargeKey

CFDictionary key indicates whether the battery is finishing off its charge.

kIOPSIsPresentKey

CFDictionary key for the current power source's presence.

kIOPSMaxCapacityKey

CFDictionary key for the current power source's maximum or "Full Charge Capacity"

kIOPSMaxErrKey

CFDictionary key for the current power source's percentage error in capacity reporting.

kIOPSNameKey

CFDictionary key for the current power source's name.

kIOPSNetworkTransportType

Value for key kIOPSTransportTypeKey.

kIOPSOffLineValue

Value for key kIOPSPowerSourceStateKey. Power source is off-line or no longer connected.

kIOPSPowerSourceIDKey

CFNumber key uniquely identifying a UPS attached to the system.

kIOPSPowerSourceStateKey

CFDictionary key for the current source of power.

kIOPSSerialTransportType

Value for key kIOPSTransportTypeKey.

kIOPSTimeToEmptyKey

CFDictionary key for the current power source's time remaining until empty.

kIOPSTimeToFullChargeKey

CFDictionary key for the current power source's time remaining until empty.

kIOPSTransportTypeKey

CFDictionary key for the current power source's data transport type (e.g. the means that the power source conveys power source data to the OS X machine).

kIOPSTypeKey

CFDictionary key for the type of the power source

kIOPSUPSType

Represents an external attached UPS.

kIOPSUSBTransportType

Value for key kIOPSTransportTypeKey.

kIOPSVendorDataKey

CFDictionary key for arbitrary vendor data.

kIOPSVoltageKey

CFDictionary key for the current power source's electrical voltage.

 

Battery Failure Mode values

Group members:

kIOPSFailureCellImbalance

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureChargeFET

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureChargeOverCurrent

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureChargeOverTemp

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureDataFlushFault

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureDischargeFET

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureDischargeOverCurrent

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureDischargeOverTemp

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureExternalInput

Value for key kIOPSBatteryFailureModesKey

kIOPSFailureFuseBlown

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureOpenThermistor

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailurePeriodicAFEComms

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailurePermanentAFEComms

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureSafetyOverVoltage

Potential value for key kIOPSBatteryFailureModesKey

 

IOPSPowerAdapter Keys

Use these kIOPSPowerAdapter keys to decipher the dictionary returned by IOPSCopyExternalPowerAdapterDetails

Group members:

kIOPSPowerAdapterCurrentKey

This key refers to the current of the external AC power adapter attached to a portable. The value associated with this key is a CFNumberRef kCFNumberIntType integer value, in units of mAmps.

kIOPSPowerAdapterFamilyKey

The power adapter's family code. The value associated with this key is a CFNumberRef kCFNumberIntType integer value

kIOPSPowerAdapterIDKey

This key refers to the attached external AC power adapter's ID. The value associated with this key is a CFNumberRef kCFNumberIntType integer.

kIOPSPowerAdapterRevisionKey

The power adapter's revision. The value associated with this key is a CFNumberRef kCFNumberIntType integer value

kIOPSPowerAdapterSerialNumberKey

The power adapter's serial number. The value associated with this key is a CFNumberRef kCFNumberIntType integer value

kIOPSPowerAdapterSourceKey

This key refers to the source of the power. The value associated with this key is a CFNumberRef kCFNumberIntType integer value.

kIOPSPowerAdapterWattsKey

This key refers to the wattage of the external AC power adapter attached to a portable. The value associated with this key is a CFNumberRef kCFNumberIntType integer value, in units of watts.

 

Battery Health values

Group members:

kIOPSCheckBatteryValue

Value for key kIOPSBatteryHealthConditionKey

kIOPSFairValue

Value for key kIOPSBatteryHealthKey.

kIOPSGoodValue

Value for key kIOPSBatteryHealthKey.

kIOPSPermanentFailureValue

Value for key kIOPSBatteryHealthConditionKey

kIOPSPoorValue

Value for key kIOPSBatteryHealthKey.

 

Internal Keys

Group members:

kIOPSDeadWarnLevelKey

Key for the "Shutdown System" low power trigger-level. Default is 20%.

kIOPSDynamicStorePath

This is only used for internal bookkeeping, and should be ignored.

kIOPSLowWarnLevelKey

Key for the "Warning" UPS low power trigger-level. Default is 50%.

kIOPSUPSManagementClaimed

Claims UPS management for a third-party driver.


Macro Definitions

kIOPSACPowerValue

Value for key kIOPSPowerSourceStateKey. Power source is connected to external or AC power, and is not draining the internal battery.

kIOPSBatteryFailureModesKey

Enumerates a battery's failures and error conditions.

kIOPSBatteryHealthConditionKey

kIOPSBatteryHealthConditionKey broadly describes the battery's health.

kIOPSBatteryHealthKey

CFDictionary key for the current power source's "health" estimate.

kIOPSBatteryPowerValue

Value for key kIOPSPowerSourceStateKey. Power source is currently using the internal battery.

kIOPSCheckBatteryValue

Value for key kIOPSBatteryHealthConditionKey

kIOPSCommandDelayedRemovePowerKey

Command to give a UPS when it should remove power from its AC plugs in a specified amount of time

kIOPSCommandEnableAudibleAlarmKey

Command to give a UPS when it should either enable or disable the audible alarm.

kIOPSCommandStartupDelayKey

Tell UPS how long it should wait for

kIOPSCurrentCapacityKey

CFDictionary key for the current power source's capacity.

kIOPSCurrentKey

CFDictionary key for the current power source's electrical current.

kIOPSDeadWarnLevelKey

Key for the "Shutdown System" low power trigger-level. Default is 20%.

kIOPSDesignCapacityKey

CFDictionary key for the current power source's design capacity

kIOPSDynamicStorePath

This is only used for internal bookkeeping, and should be ignored.

kIOPSFailureCellImbalance

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureChargeFET

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureChargeOverCurrent

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureChargeOverTemp

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureDataFlushFault

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureDischargeFET

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureDischargeOverCurrent

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureDischargeOverTemp

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureExternalInput

Value for key kIOPSBatteryFailureModesKey

kIOPSFailureFuseBlown

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureOpenThermistor

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailurePeriodicAFEComms

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailurePermanentAFEComms

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFailureSafetyOverVoltage

Potential value for key kIOPSBatteryFailureModesKey

kIOPSFairValue

Value for key kIOPSBatteryHealthKey.

kIOPSGoodValue

Value for key kIOPSBatteryHealthKey.

kIOPSHardwareSerialNumberKey

A unique serial number that identifies the power source.

kIOPSHealthConfidenceKey

CFDictionary key for our confidence in the accuracy of our power source's "health" estimate.

kIOPSInternalBatteryType

Represents a battery residing inside a Mac.

kIOPSInternalType

Value for key kIOPSTransportTypeKey. Indicates the power source is an internal battery.

kIOPSIsChargedKey

CFDictionary key indicates whether the battery is charged.

kIOPSIsChargingKey

CFDictionary key for the current power source's charging state

kIOPSIsFinishingChargeKey

CFDictionary key indicates whether the battery is finishing off its charge.

kIOPSIsPresentKey

CFDictionary key for the current power source's presence.

kIOPSLowWarnLevelKey

Key for the "Warning" UPS low power trigger-level. Default is 50%.

kIOPSMaxCapacityKey

CFDictionary key for the current power source's maximum or "Full Charge Capacity"

kIOPSMaxErrKey

CFDictionary key for the current power source's percentage error in capacity reporting.

kIOPSNameKey

CFDictionary key for the current power source's name.

kIOPSNetworkTransportType

Value for key kIOPSTransportTypeKey.

kIOPSOffLineValue

Value for key kIOPSPowerSourceStateKey. Power source is off-line or no longer connected.

kIOPSPermanentFailureValue

Value for key kIOPSBatteryHealthConditionKey

kIOPSPoorValue

Value for key kIOPSBatteryHealthKey.

kIOPSPowerAdapterCurrentKey

This key refers to the current of the external AC power adapter attached to a portable. The value associated with this key is a CFNumberRef kCFNumberIntType integer value, in units of mAmps.

kIOPSPowerAdapterFamilyKey

The power adapter's family code. The value associated with this key is a CFNumberRef kCFNumberIntType integer value

kIOPSPowerAdapterIDKey

This key refers to the attached external AC power adapter's ID. The value associated with this key is a CFNumberRef kCFNumberIntType integer.

kIOPSPowerAdapterRevisionKey

The power adapter's revision. The value associated with this key is a CFNumberRef kCFNumberIntType integer value

kIOPSPowerAdapterSerialNumberKey

The power adapter's serial number. The value associated with this key is a CFNumberRef kCFNumberIntType integer value

kIOPSPowerAdapterSourceKey

This key refers to the source of the power. The value associated with this key is a CFNumberRef kCFNumberIntType integer value.

kIOPSPowerAdapterWattsKey

This key refers to the wattage of the external AC power adapter attached to a portable. The value associated with this key is a CFNumberRef kCFNumberIntType integer value, in units of watts.

kIOPSPowerSourceIDKey

CFNumber key uniquely identifying a UPS attached to the system.

kIOPSPowerSourceStateKey

CFDictionary key for the current source of power.

kIOPSSerialTransportType

Value for key kIOPSTransportTypeKey.

kIOPSTimeToEmptyKey

CFDictionary key for the current power source's time remaining until empty.

kIOPSTimeToFullChargeKey

CFDictionary key for the current power source's time remaining until empty.

kIOPSTransportTypeKey

CFDictionary key for the current power source's data transport type (e.g. the means that the power source conveys power source data to the OS X machine).

kIOPSTypeKey

CFDictionary key for the type of the power source

kIOPSUPSManagementClaimed

Claims UPS management for a third-party driver.

kIOPSUPSType

Represents an external attached UPS.

kIOPSUSBTransportType

Value for key kIOPSTransportTypeKey.

kIOPSVendorDataKey

CFDictionary key for arbitrary vendor data.

kIOPSVoltageKey

CFDictionary key for the current power source's electrical voltage.


kIOPSACPowerValue


Value for key kIOPSPowerSourceStateKey. Power source is connected to external or AC power, and is not draining the internal battery.

#define kIOPSACPowerValue "AC Power" 

kIOPSBatteryFailureModesKey


Enumerates a battery's failures and error conditions.

#define kIOPSBatteryFailureModesKey "BatteryFailureModes" 
Discussion

Various battery failures will be listed here. A battery may suffer from more than one type of failure simultaneously, so this key has a CFArray value.

If BatteryFailureModesKey is not defined (or is set to an empty dictionary), then the battery has no detectable failures.

Each entry in the array should be a short descriptive string describing the error.

  • Apple-defined power sources will publish this key if any battery errors exist.

  • For power source creators: Providing this key is RECOMMENDED.

  • Type CFArrayRef


kIOPSBatteryHealthConditionKey


kIOPSBatteryHealthConditionKey broadly describes the battery's health.

#define kIOPSBatteryHealthConditionKey "BatteryHealthCondition" 
Discussion
  • Apple-defined power sources will publish this key.

  • Value is one of the "Battery Health Condition Values" strings described in this file.

  • For power source creators: Providing this key is OPTIONAL - these keys have values only used by Apple power sources.

  • Type CFStringRef


kIOPSBatteryHealthKey


CFDictionary key for the current power source's "health" estimate.

#define kIOPSBatteryHealthKey "BatteryHealth" 
Discussion
  • Apple-defined battery power sources will publish this key.

  • Use value kIOPSGoodValue to describe a well-performing power source,

  • Use kIOPSFairValue to describe a functional power source with limited capacity

  • And use kIOPSPoorValue to describe a power source that's not capable of Providing power.

  • For power source creators: Providing this key is OPTIONAL.

  • Type CFStringRef


kIOPSBatteryPowerValue


Value for key kIOPSPowerSourceStateKey. Power source is currently using the internal battery.

#define kIOPSBatteryPowerValue "Battery Power" 

kIOPSCheckBatteryValue


Value for key kIOPSBatteryHealthConditionKey

#define kIOPSCheckBatteryValue "Check Battery" 
Discussion

This value indicates that the battery should be checked out by a licensed Mac repair service.


kIOPSCommandDelayedRemovePowerKey


Command to give a UPS when it should remove power from its AC plugs in a specified amount of time

#define kIOPSCommandDelayedRemovePowerKey "Delayed Remove Power" 
Discussion
  • The matching argument should be a CFNumber of kCFNumberIntType specifying when the UPS should

  • remove power from its AC power ports.


kIOPSCommandEnableAudibleAlarmKey


Command to give a UPS when it should either enable or disable the audible alarm.

#define kIOPSCommandEnableAudibleAlarmKey "Enable Audible Alarm" 
Discussion
  • The matching argument should be a CFBooleanRef where kCFBooleanTrue enables the alarm and

  • kCFBooleanFalse diables the alarm


kIOPSCommandStartupDelayKey


Tell UPS how long it should wait for

#define kIOPSCommandStartupDelayKey "Startup Delay" 
Discussion
  • The matching argument should be a CFNumber of kCFNumberIntType specifying when the UPS should

  • remove power from its AC power ports.


kIOPSCurrentCapacityKey


CFDictionary key for the current power source's capacity.

#define kIOPSCurrentCapacityKey "Current Capacity" 
Discussion
  • Apple-defined power sources will publish this key in units of percent.

  • The power source's software may specify the units for this key. The units must be consistent for all capacities reported by this power source. The power source will usually define this number in units of percent, or mAh.

  • Clients may derive a percentage of power source battery remaining by dividing "Current Capacity" by "Max Capacity"

  • For power source creators: Providing this key is REQUIRED.

  • Type CFNumber kCFNumberIntType (signed integer)


kIOPSCurrentKey


CFDictionary key for the current power source's electrical current.

#define kIOPSCurrentKey "Current" 
Discussion
  • Apple-defined power sources will publish this key.

  • For power source creators: Providing this key is RECOMMENDED.

  • Type CFNumber kCFNumberIntType (signed integer) - units are mA


kIOPSDeadWarnLevelKey


Key for the "Shutdown System" low power trigger-level. Default is 20%.

#define kIOPSDeadWarnLevelKey "Shutdown Level" 

kIOPSDesignCapacityKey


CFDictionary key for the current power source's design capacity

#define kIOPSDesignCapacityKey "DesignCapacity" 
Discussion
  • Apple-defined power sources might not publish this key.

  • The power source's software may specify the units for this key. The units must be consistent for all capacities reported by this power source.

  • For power source creators: Providing this key is RECOMMENDED.

  • Type CFNumber kCFNumberIntType (signed integer)


kIOPSDynamicStorePath


This is only used for internal bookkeeping, and should be ignored.

#define kIOPSDynamicStorePath "/IOKit/PowerSources" 

kIOPSFailureCellImbalance


Potential value for key kIOPSBatteryFailureModesKey

#define kIOPSFailureCellImbalance "Cell Imbalance" 

kIOPSFailureChargeFET


Potential value for key kIOPSBatteryFailureModesKey

#define kIOPSFailureChargeFET "Charge FET" 

kIOPSFailureChargeOverCurrent


Potential value for key kIOPSBatteryFailureModesKey

#define kIOPSFailureChargeOverCurrent "Charge Over-Current" 

kIOPSFailureChargeOverTemp


Potential value for key kIOPSBatteryFailureModesKey

#define kIOPSFailureChargeOverTemp "Charge Over-Temperature" 

kIOPSFailureDataFlushFault


Potential value for key kIOPSBatteryFailureModesKey

#define kIOPSFailureDataFlushFault "Data Flush Fault" 

kIOPSFailureDischargeFET


Potential value for key kIOPSBatteryFailureModesKey

#define kIOPSFailureDischargeFET "Discharge FET" 

kIOPSFailureDischargeOverCurrent


Potential value for key kIOPSBatteryFailureModesKey

#define kIOPSFailureDischargeOverCurrent "Discharge Over-Current" 

kIOPSFailureDischargeOverTemp


Potential value for key kIOPSBatteryFailureModesKey

#define kIOPSFailureDischargeOverTemp "Discharge Over-Temperature" 

kIOPSFailureExternalInput


Value for key kIOPSBatteryFailureModesKey

#define kIOPSFailureExternalInput "Externally Indicated Failure" 

kIOPSFailureFuseBlown


Potential value for key kIOPSBatteryFailureModesKey

#define kIOPSFailureFuseBlown "Fuse Blown" 

kIOPSFailureOpenThermistor


Potential value for key kIOPSBatteryFailureModesKey

#define kIOPSFailureOpenThermistor "Open Thermistor" 

kIOPSFailurePeriodicAFEComms


Potential value for key kIOPSBatteryFailureModesKey

#define kIOPSFailurePeriodicAFEComms "Periodic AFE Comms" 

kIOPSFailurePermanentAFEComms


Potential value for key kIOPSBatteryFailureModesKey

#define kIOPSFailurePermanentAFEComms "Permanent AFE Comms" 

kIOPSFailureSafetyOverVoltage


Potential value for key kIOPSBatteryFailureModesKey

#define kIOPSFailureSafetyOverVoltage "Safety Over-Voltage" 

kIOPSFairValue


Value for key kIOPSBatteryHealthKey.

#define kIOPSFairValue "Fair" 

kIOPSGoodValue


Value for key kIOPSBatteryHealthKey.

#define kIOPSGoodValue "Good" 

kIOPSHardwareSerialNumberKey


A unique serial number that identifies the power source.

#define kIOPSHardwareSerialNumberKey "Hardware Serial Number" 
Discussion

For Apple-manufactured batteries, this is an alphanumeric string generated during the battery manufacturing process.

  • Apple-defined power sources will publish this key if the hardware provides the serial number.

  • For power source creators: Providing this key is RECOMMENDED.

  • Type CFStringRef


kIOPSHealthConfidenceKey


CFDictionary key for our confidence in the accuracy of our power source's "health" estimate.

#define kIOPSHealthConfidenceKey "HealthConfidence" 
Discussion
  • Apple-defined power sources will no longer publish this key.

  • Power source creators should not publish this key.

  • For power source creators: This key is DEPRECATED, do not implement it.

  • Type CFStringRef

Deprecated

In OS X 10.6 and later.


kIOPSInternalBatteryType


Represents a battery residing inside a Mac.

#define kIOPSInternalBatteryType "InternalBattery" 

kIOPSInternalType


Value for key kIOPSTransportTypeKey. Indicates the power source is an internal battery.

#define kIOPSInternalType "Internal" 

kIOPSIsChargedKey


CFDictionary key indicates whether the battery is charged.

#define kIOPSIsChargedKey "Is Charged" 
Discussion

A battery must be plugged in to an external power source in order to be fully charged. Note that a battery may validly be plugged in, not charging, and <100% charge. e.g. A battery with capacity >= 95% and not charging, is defined as charged.

  • Apple-defined power sources will publish this key.

  • For power source creators: Providing this key is REQUIRED.

  • Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse


kIOPSIsChargingKey


CFDictionary key for the current power source's charging state

#define kIOPSIsChargingKey "Is Charging" 
Discussion
  • Apple-defined power sources will publish this key.

  • For power source creators: Providing this key is REQUIRED.

  • Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse


kIOPSIsFinishingChargeKey


CFDictionary key indicates whether the battery is finishing off its charge.

#define kIOPSIsFinishingChargeKey "Is Finishing Charge" 
Discussion

When this is true, the system UI should indicate that the battery is "Finishing Charge." Some batteries may continue charging after they report 100% capacity.

  • Apple-defined battery power sources will publish this key.

  • For power source creators: Providing this key is RECOMMENDED.

  • Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse


kIOPSIsPresentKey


CFDictionary key for the current power source's presence.

#define kIOPSIsPresentKey "Is Present" 
Discussion
  • Apple-defined power sources will publish this key.

  • For instance, a portable with the capacity for two batteries but with only one present would show two power source dictionaries, but kIOPSIsPresentKey would have the value kCFBooleanFalse in one of them.

  • For power source creators: Providing this key is REQUIRED.

  • Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse


kIOPSLowWarnLevelKey


Key for the "Warning" UPS low power trigger-level. Default is 50%.

#define kIOPSLowWarnLevelKey "Low Warn Level" 

kIOPSMaxCapacityKey


CFDictionary key for the current power source's maximum or "Full Charge Capacity"

#define kIOPSMaxCapacityKey "Max Capacity" 
Discussion
  • Apple-defined power sources will publish this key in units of percent. The value is usually 100%.

  • The power source's software may specify the units for this key. The units must be consistent for all capacities reported by this power source.

  • For power source creators: Providing this key is REQUIRED.

  • Type CFNumber kCFNumberIntType (signed integer)


kIOPSMaxErrKey


CFDictionary key for the current power source's percentage error in capacity reporting.

#define kIOPSMaxErrKey "MaxErr" 
Discussion

In internal batteries, this refers to the battery pack's estimated percentage error.

  • Apple-defined battery power sources will publish this key, but only if it's defined for the battery.

  • For power source creators: Providing this key is OPTIONAL.

  • Type CFNumberRef kCFNumberIntType, non-negative integer


kIOPSNameKey


CFDictionary key for the current power source's name.

#define kIOPSNameKey "Name" 
Discussion
  • Apple-defined power sources will publish this key.

  • For power source creators: Providing this key is REQUIRED.

  • Type CFStringRef


kIOPSNetworkTransportType


Value for key kIOPSTransportTypeKey.

#define kIOPSNetworkTransportType "Ethernet" 
Discussion

Indicates the power source is a UPS attached over a network connection (and it may be managing several computers).


kIOPSOffLineValue


Value for key kIOPSPowerSourceStateKey. Power source is off-line or no longer connected.

#define kIOPSOffLineValue "Off Line" 

kIOPSPermanentFailureValue


Value for key kIOPSBatteryHealthConditionKey

#define kIOPSPermanentFailureValue "Permanent Battery Failure" 
Discussion

Indicates the battery needs replacement.


kIOPSPoorValue


Value for key kIOPSBatteryHealthKey.

#define kIOPSPoorValue "Poor" 

kIOPSPowerAdapterCurrentKey


This key refers to the current of the external AC power adapter attached to a portable. The value associated with this key is a CFNumberRef kCFNumberIntType integer value, in units of mAmps.

#define kIOPSPowerAdapterCurrentKey "Current" 
Discussion

This key may be present in the dictionary returned from IOPSCopyExternalPowerAdapterDetails This key might not be defined in the adapter details dictionary.


kIOPSPowerAdapterFamilyKey


The power adapter's family code. The value associated with this key is a CFNumberRef kCFNumberIntType integer value

#define kIOPSPowerAdapterFamilyKey "FamilyCode" 
Discussion

This key may be present in the dictionary returned from IOPSCopyExternalPowerAdapterDetails This key might not be defined in the adapter details dictionary.


kIOPSPowerAdapterIDKey


This key refers to the attached external AC power adapter's ID. The value associated with this key is a CFNumberRef kCFNumberIntType integer.

#define kIOPSPowerAdapterIDKey "AdapterID" 
Discussion

This key may be present in the dictionary returned from IOPSCopyExternalPowerAdapterDetails This key might not be defined in the adapter details dictionary.


kIOPSPowerAdapterRevisionKey


The power adapter's revision. The value associated with this key is a CFNumberRef kCFNumberIntType integer value

#define kIOPSPowerAdapterRevisionKey "AdapterRevision" 
Discussion

This key may be present in the dictionary returned from IOPSCopyExternalPowerAdapterDetails This key might not be defined in the adapter details dictionary.


kIOPSPowerAdapterSerialNumberKey


The power adapter's serial number. The value associated with this key is a CFNumberRef kCFNumberIntType integer value

#define kIOPSPowerAdapterSerialNumberKey "SerialNumber" 
Discussion

This key may be present in the dictionary returned from IOPSCopyExternalPowerAdapterDetails This key might not be defined in the adapter details dictionary.


kIOPSPowerAdapterSourceKey


This key refers to the source of the power. The value associated with this key is a CFNumberRef kCFNumberIntType integer value.

#define kIOPSPowerAdapterSourceKey "Source" 
Discussion

This key may be present in the dictionary returned from IOPSCopyExternalPowerAdapterDetails This key might not be defined in the adapter details dictionary.


kIOPSPowerAdapterWattsKey


This key refers to the wattage of the external AC power adapter attached to a portable. The value associated with this key is a CFNumberRef kCFNumberIntType integer value, in units of watts.

#define kIOPSPowerAdapterWattsKey "Watts" 
Discussion

This key may be present in the dictionary returned from IOPSCopyExternalPowerAdapterDetails This key might not be defined in the adapter details dictionary.


kIOPSPowerSourceIDKey


CFNumber key uniquely identifying a UPS attached to the system.

#define kIOPSPowerSourceIDKey "Power Source ID" 
Discussion
  • Apple UPS power sources will publish this key.

  • Callers should not set this key; OS X power management will publish this key for UPS's.

  • Type CFNumber, kCFNumberIntType, uniquely identifying an attached UPS.


kIOPSPowerSourceStateKey


CFDictionary key for the current source of power.

#define kIOPSPowerSourceStateKey "Power Source State" 
Discussion
  • Apple-defined power sources will publish this key.

  • For power source creators: Providing this key is REQUIRED.

  • kIOPSBatteryPowerValue indicates power source is drawing internal power; kIOPSACPowerValue indicates power source is connected to an external power source.

  • Type CFString, value is kIOPSACPowerValue, kIOPSBatteryPowerValue, or kIOPSOffLineValue.


kIOPSSerialTransportType


Value for key kIOPSTransportTypeKey.

#define kIOPSSerialTransportType "Serial" 
Discussion

Indicates the power source is a UPS attached over a serial connection.


kIOPSTimeToEmptyKey


CFDictionary key for the current power source's time remaining until empty.

#define kIOPSTimeToEmptyKey "Time to Empty" 
Discussion

Only valid if the power source is running off its own power. That's when the kIOPSPowerSourceStateKey has value kIOPSBatteryPowerValue and the value of kIOPSIsChargingKey is kCFBooleanFalse.

  • Apple-defined power sources will publish this key.

  • For power source creators: Providing this key is RECOMMENDED.

  • Type CFNumber kCFNumberIntType (signed integer), units are minutes

  • A value of -1 indicates "Still Calculating the Time", otherwise estimated minutes left on the battery.


kIOPSTimeToFullChargeKey


CFDictionary key for the current power source's time remaining until empty.

#define kIOPSTimeToFullChargeKey "Time to Full Charge" 
Discussion

Only valid if the value of kIOPSIsChargingKey is kCFBooleanTrue.

  • Apple-defined power sources will publish this key.

  • For power source creators: Providing this key is RECOMMENDED.

  • Type CFNumber kCFNumberIntType (signed integer), units are minutes

  • A value of -1 indicates "Still Calculating the Time", otherwise estimated minutes until fully charged.


kIOPSTransportTypeKey


CFDictionary key for the current power source's data transport type (e.g. the means that the power source conveys power source data to the OS X machine).

#define kIOPSTransportTypeKey "Transport Type" 
Discussion
  • Apple-defined power sources will publish this key.

  • A value of kIOPSInternalType describes an internal power source.

  • kIOPSUSBTransportType, kIOPSNetworkTransportType, and kIOPSSerialTransportType usually describe UPS's.

  • For power source creators: Providing this key is REQUIRED.

  • Type CFStringRef. Valid transport types are kIOPSSerialTransportType, kIOPSUSBTransportType, kIOPSNetworkTransportType, kIOPSInternalType


kIOPSTypeKey


CFDictionary key for the type of the power source

#define kIOPSTypeKey "Type" 
Discussion
  • Apple-defined power sources will publish this key.

  • For power source creators: Providing this key is REQUIRED.

  • Type CFStringRef. Valid transport types are kIOPSUPSType or kIOPSInternalBatteryType.


kIOPSUPSManagementClaimed


Claims UPS management for a third-party driver.

#define kIOPSUPSManagementClaimed "/IOKit/UPSPowerManagementClaimed" 
Discussion

kIOPSUPSManagementClaimed is obsolete. Do not use.

Deprecated

Unsupported in OS X 10.5 and later.


kIOPSUPSType


Represents an external attached UPS.

#define kIOPSUPSType "UPS" 

kIOPSUSBTransportType


Value for key kIOPSTransportTypeKey.

#define kIOPSUSBTransportType "USB" 
Discussion

Indicates the power source is a UPS attached over a USB connection.


kIOPSVendorDataKey


CFDictionary key for arbitrary vendor data.

#define kIOPSVendorDataKey "Vendor Specific Data" 
Discussion
  • Apple-defined power sources are not required to publish this key.

  • For power source creators: Providing this key is OPTIONAL.

  • CFDictionary; contents determined by the power source software. OS X will not look at this data.


kIOPSVoltageKey


CFDictionary key for the current power source's electrical voltage.

#define kIOPSVoltageKey "Voltage" 
Discussion
  • Apple-defined power sources will publish this key.

  • For power source creators: Providing this key is RECOMMENDED.

  • Type CFNumber kCFNumberIntType (signed integer) - units are mV