IOPSKeys.h

Overview

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()



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 the specific failure modes of the battery. If detectable, various battery failures will be listed here. A battery may suffer from more than one type of failure simultaneously, as tracked in this array. 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.
Implementing this key is RECOMMENDED
Type CFArrayRef

kIOPSBatteryHealthConditionKey

kIOPSBatteryHealthConditionKey broadly describes the battery's health.
Value is one of the "Battery Health Condition" keys described below.
Implementing this key is OPTIONAL - the values associated with these keys have values only used by Apple power sources.
Type CFStringRef

kIOPSBatteryHealthConfidenceKey

CFDictionary key for our confidence in the accuracy of our power source's "health" estimate. Power source does not need to define this key.
This key is DEPRECATED, do not implement it.
Type CFStringRef

kIOPSBatteryHealthKey

CFDictionary key for the current power source's "health" estimate. Health indicates whether a power source is showing signs of aging, or no longer capable of providing its design charge.
Use value kIOPSGoodValue to describe a well-performing power source, kIOPSFairValue to describe a functional power source with limited capacity, and kIOPSPoorValue to describe a power source that's not capable of providing power.
Implementing this key is OPTIONAL.
Type CFStringRef

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
The matching argumnet 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.
The matching argumnet should be a CFBooleanRef where kCFBooleanTrue enables the alarm and
kCFBooleanFalse diables the alarm

kIOPSCommandStartupDelayKey

Tell UPS how long it should wait for
The matching argumnet 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.
The power source's software may specify the units for this key. The units must be consisent for all capacities reported by this power source.
Clients may derive a percentage of power source battery remaining by dividing "Current Capacity" by "Max Capacity"
Implementing this key is REQUIRED
Type CFNumber (signed integer)

kIOPSCurrentKey

CFDictionary key for the current power source's electrical current.
Implementing this key is RECOMMENDED
Type CFNumber (signed integer) - units are mA

kIOPSDeadWarnLevelKey

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

kIOPSDesignCapacityKey

CFDictionary key for the current power source's design capacity
The power source's software may specify the units for this key. The units must be consisent for all capacities reported by this power source.
Implementing this key is RECOMMENDED
Type CFNumber (signed integer)

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 & kIOPMPSHealthConfidenceKey.

kIOPSGoodValue

Value for key kIOPSBatteryHealthKey & kIOPMPSHealthConfidenceKey.

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. Power source does not need to define this key.
This key is DEPRECATED, do not implement it.
Type CFStringRef

kIOPSInternalBatteryType
kIOPSInternalType

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

kIOPSIsChargedKey

CFDictionary key indicates whether the battery is charged. 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 = 95% and not charging, is defined as charged.
Implementing this key is RECOMMENDED
Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse

kIOPSIsChargedKey

CFDictionary key indicates whether the battery is charged. 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 = 95% and not charging, is defined as charged.
Implementing this key is REQUIRED
Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse

kIOPSIsChargingKey

CFDictionary key for the current power source's charging state
Implementing this key is REQUIRED
Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse

kIOPSIsFinishingChargeKey

CFDictionary key indicates whether the battery is finishing off its charge. 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.
Implementing this key is RECOMMENDED
Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse

kIOPSIsPresentKey

CFDictionary key for the current power source's presence.
For instance, a PowerBook 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.
Implementing this key is REQUIRED
Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse

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"
The power source's software may specify the units for this key. The units must be consisent for all capacities reported by this power source.
Implementing this key is REQUIRED
Type CFNumber (signed integer)

kIOPSMaxErrKey

CFDictionary key for the current power source's percentage error in capacity reporting. In internal batteries, this refers to the battery pack's estimated percentage error.
Implementing this key is OPTIONAL.
Type CFNumberRef, non-negative integer

kIOPSNameKey

CFDictionary key for the current power source's name.
Implementing this key is REQUIRED
Type CFStringRef

kIOPSNetworkTransportType

Value for key kIOPSTransportTypeKey. 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.

kIOPSPermanentFailureValue

Value for key kIOPSBatteryHealthConditionKey

kIOPSPoorValue

Value for key kIOPSBatteryHealthKey & kIOPMPSHealthConfidenceKey.

kIOPSPowerAdapterFamilyKey

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

kIOPSPowerAdapterIDKey
kIOPSPowerAdapterRevisionKey

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

kIOPSPowerAdapterSerialNumberKey

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

kIOPSPowerAdapterWattsKey
kIOPSPowerSourceID

CFNumber key uniquely identifying a UPS attached to the system.
OS X Power Management will specify this key.
Callers should not set this key; OS X will insert this key.
Type CFNumber, kCFNumberIntType, uniquely identifying an attached UPS.

kIOPSPowerSourceIDKey

CFNumber key uniquely identifying a UPS attached to the system.
OS X Power Management will specify this key.
Callers should not set this key; OS X will insert this key.
Type CFNumber, kCFNumberIntType, uniquely identifying an attached UPS.

kIOPSPowerSourceStateKey

CFDictionary key for the current source of power.
Implementing 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. 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. 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.
Implementing this key is RECOMMENDED
Type CFNumber (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. Only valid if the value of kIOPSIsChargingKey is kCFBooleanTrue.
Implementing this key is RECOMMENDED
Type CFNumber (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). kIOPSInternalType describes an internal power source. kIOPSUSBTransportType, kIOPSNetworkTransportType, and kIOPSSerialTransportType usually describe UPS's.
Implementing this key is REQUIRED
Type CFStringRef. Valid transport types are kIOPSSerialTransportType, kIOPSUSBTransportType, kIOPSNetworkTransportType, kIOPSInternalType

kIOPSTypeKey

CFDictionary key for the type of the power source
Implementing this key is REQUIRED.
Type CFStringRef. Valid transport types are kIOPSUPSType or kIOPSInternalBatteryType.

kIOPSUPSManagementClaimed

Claims UPS management for a third-party driver.

kIOPSUPSType
kIOPSUSBTransportType

Value for key kIOPSTransportTypeKey. Indicates the power source is a UPS attached over a USB connection.

kIOPSVendorDataKey

CFDictionary key for arbitrary vendor data.
Implementing 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.
Implementing this key is RECOMMENDED
Type CFNumber (signed integer) - units are mV


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 the specific failure modes of the battery. If detectable, various battery failures will be listed here. A battery may suffer from more than one type of failure simultaneously, as tracked in this array. 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.
Implementing this key is RECOMMENDED
Type CFArrayRef

#define kIOPSBatteryFailureModesKey "BatteryFailureModes" 


kIOPSBatteryHealthConditionKey


kIOPSBatteryHealthConditionKey broadly describes the battery's health.
Value is one of the "Battery Health Condition" keys described below.
Implementing this key is OPTIONAL - the values associated with these keys have values only used by Apple power sources.
Type CFStringRef

#define kIOPSBatteryHealthConditionKey "BatteryHealthCondition" 


kIOPSBatteryHealthConfidenceKey


CFDictionary key for our confidence in the accuracy of our power source's "health" estimate. Power source does not need to define this key.
This key is DEPRECATED, do not implement it.
Type CFStringRef

See Also:
#define kIOPSHealthConfidenceKey "HealthConfidence" 


kIOPSBatteryHealthKey


CFDictionary key for the current power source's "health" estimate. Health indicates whether a power source is showing signs of aging, or no longer capable of providing its design charge.
Use value kIOPSGoodValue to describe a well-performing power source, kIOPSFairValue to describe a functional power source with limited capacity, and kIOPSPoorValue to describe a power source that's not capable of providing power.
Implementing this key is OPTIONAL.
Type CFStringRef

#define kIOPSBatteryHealthKey "BatteryHealth" 


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" 


kIOPSCommandDelayedRemovePowerKey


Command to give a UPS when it should remove power from its AC plugs in a specified amount of time
The matching argumnet should be a CFNumber of kCFNumberIntType specifying when the UPS should
remove power from its AC power ports.

#define kIOPSCommandDelayedRemovePowerKey "Delayed Remove Power" 


kIOPSCommandEnableAudibleAlarmKey


Command to give a UPS when it should either enable or disable the audible alarm.
The matching argumnet should be a CFBooleanRef where kCFBooleanTrue enables the alarm and
kCFBooleanFalse diables the alarm

#define kIOPSCommandEnableAudibleAlarmKey "Enable Audible Alarm" 


kIOPSCommandStartupDelayKey


Tell UPS how long it should wait for
The matching argumnet should be a CFNumber of kCFNumberIntType specifying when the UPS should
remove power from its AC power ports.

#define kIOPSCommandStartupDelayKey "Startup Delay" 


kIOPSCurrentCapacityKey


CFDictionary key for the current power source's capacity.
The power source's software may specify the units for this key. The units must be consisent for all capacities reported by this power source.
Clients may derive a percentage of power source battery remaining by dividing "Current Capacity" by "Max Capacity"
Implementing this key is REQUIRED
Type CFNumber (signed integer)

#define kIOPSCurrentCapacityKey "Current Capacity" 


kIOPSCurrentKey


CFDictionary key for the current power source's electrical current.
Implementing this key is RECOMMENDED
Type CFNumber (signed integer) - units are mA

#define kIOPSCurrentKey "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
The power source's software may specify the units for this key. The units must be consisent for all capacities reported by this power source.
Implementing this key is RECOMMENDED
Type CFNumber (signed integer)

#define kIOPSDesignCapacityKey "DesignCapacity" 


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 & kIOPMPSHealthConfidenceKey.

#define kIOPSFairValue "Fair" 


kIOPSGoodValue


Value for key kIOPSBatteryHealthKey & kIOPMPSHealthConfidenceKey.

#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.
Implementing this key is RECOMMENDED
Type CFStringRef


kIOPSHealthConfidenceKey


CFDictionary key for our confidence in the accuracy of our power source's "health" estimate. Power source does not need to define this key.
This key is DEPRECATED, do not implement it.
Type CFStringRef

See Also:
#define kIOPSHealthConfidenceKey "HealthConfidence" 


kIOPSInternalBatteryType


#define kIOPSInternalBatteryType "InternalBattery" 
Discussion

kIOPSInternalBatteryType represents a battery residing inside an Apple computer.


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. 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 = 95% and not charging, is defined as charged.
Implementing this key is RECOMMENDED
Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse

#define kIOPSIsChargedKey "Is Charged" 


kIOPSIsChargedKey


CFDictionary key indicates whether the battery is charged. 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 = 95% and not charging, is defined as charged.
Implementing this key is REQUIRED
Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse

#define kIOPSIsChargedKey "Is Charged" 


kIOPSIsChargingKey


CFDictionary key for the current power source's charging state
Implementing this key is REQUIRED
Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse

#define kIOPSIsChargingKey "Is Charging" 


kIOPSIsFinishingChargeKey


CFDictionary key indicates whether the battery is finishing off its charge. 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.
Implementing this key is RECOMMENDED
Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse

#define kIOPSIsFinishingChargeKey "Is Finishing Charge" 


kIOPSIsPresentKey


CFDictionary key for the current power source's presence.
For instance, a PowerBook 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.
Implementing this key is REQUIRED
Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse

#define kIOPSIsPresentKey "Is Present" 


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"
The power source's software may specify the units for this key. The units must be consisent for all capacities reported by this power source.
Implementing this key is REQUIRED
Type CFNumber (signed integer)

#define kIOPSMaxCapacityKey "Max Capacity" 


kIOPSMaxErrKey


CFDictionary key for the current power source's percentage error in capacity reporting. In internal batteries, this refers to the battery pack's estimated percentage error.
Implementing this key is OPTIONAL.
Type CFNumberRef, non-negative integer

#define kIOPSMaxErrKey "MaxErr" 


kIOPSNameKey


CFDictionary key for the current power source's name.
Implementing this key is REQUIRED
Type CFStringRef

#define kIOPSNameKey "Name" 


kIOPSNetworkTransportType


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

#define kIOPSNetworkTransportType "Ethernet" 


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" 


kIOPSPoorValue


Value for key kIOPSBatteryHealthKey & kIOPMPSHealthConfidenceKey.

#define kIOPSPoorValue "Poor" 


kIOPSPowerAdapterFamilyKey


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

#define kIOPSPowerAdapterFamilyKey "FamilyCode" 
Discussion

This key may be present in the dictionary returned from IOPSCopyExternalPowerAdapterDetails This key might not be defined for any given power source.


kIOPSPowerAdapterIDKey


#define kIOPSPowerAdapterIDKey "AdapterID" 
Discussion

This key may be present in the dictionary returned from IOPSCopyExternalPowerAdapterDetails This key might not be defined for any given power source.


kIOPSPowerAdapterRevisionKey


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

#define kIOPSPowerAdapterRevisionKey "AdapterRevision" 
Discussion

This key may be present in the dictionary returned from IOPSCopyExternalPowerAdapterDetails This key might not be defined for any given power source.


kIOPSPowerAdapterSerialNumberKey


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

#define kIOPSPowerAdapterSerialNumberKey "SerialNumber" 
Discussion

This key may be present in the dictionary returned from IOPSCopyExternalPowerAdapterDetails This key might not be defined for any given power source.


kIOPSPowerAdapterWattsKey


#define kIOPSPowerAdapterWattsKey "Watts" 
Discussion

This key may be present in the dictionary returned from IOPSCopyExternalPowerAdapterDetails This key might not be defined for any given power source.


kIOPSPowerSourceID


CFNumber key uniquely identifying a UPS attached to the system.
OS X Power Management will specify this key.
Callers should not set this key; OS X will insert this key.
Type CFNumber, kCFNumberIntType, uniquely identifying an attached UPS.

See Also:
#define kIOPSPowerSourceIDKey "Power Source ID" 


kIOPSPowerSourceIDKey


CFNumber key uniquely identifying a UPS attached to the system.
OS X Power Management will specify this key.
Callers should not set this key; OS X will insert this key.
Type CFNumber, kCFNumberIntType, uniquely identifying an attached UPS.

See Also:
#define kIOPSPowerSourceIDKey "Power Source ID" 


kIOPSPowerSourceStateKey


CFDictionary key for the current source of power.
Implementing 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.

#define kIOPSPowerSourceStateKey "Power Source State" 


kIOPSSerialTransportType


Value for key kIOPSTransportTypeKey. Indicates the power source is a UPS attached over a serial connection.

#define kIOPSSerialTransportType "Serial" 


kIOPSTimeToEmptyKey


CFDictionary key for the current power source's time remaining until empty. 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.
Implementing this key is RECOMMENDED
Type CFNumber (signed integer), units are minutes
A value of -1 indicates "Still Calculating the Time", otherwise estimated minutes left on the battery.

#define kIOPSTimeToEmptyKey "Time to Empty" 


kIOPSTimeToFullChargeKey


CFDictionary key for the current power source's time remaining until empty. Only valid if the value of kIOPSIsChargingKey is kCFBooleanTrue.
Implementing this key is RECOMMENDED
Type CFNumber (signed integer), units are minutes
A value of -1 indicates "Still Calculating the Time", otherwise estimated minutes until fully charged.

#define kIOPSTimeToFullChargeKey "Time to Full Charge" 


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). kIOPSInternalType describes an internal power source. kIOPSUSBTransportType, kIOPSNetworkTransportType, and kIOPSSerialTransportType usually describe UPS's.
Implementing this key is REQUIRED
Type CFStringRef. Valid transport types are kIOPSSerialTransportType, kIOPSUSBTransportType, kIOPSNetworkTransportType, kIOPSInternalType

#define kIOPSTransportTypeKey "Transport Type" 


kIOPSTypeKey


CFDictionary key for the type of the power source
Implementing this key is REQUIRED.
Type CFStringRef. Valid transport types are kIOPSUPSType or kIOPSInternalBatteryType.

#define kIOPSTypeKey "Type" 


kIOPSUPSManagementClaimed


Claims UPS management for a third-party driver.

 #define kIOPSUPSManagementClaimed "/IOKit/UPSPowerManagementClaimed" 
Discussion

kIOPSUPSManagementClaimed Obsolete. Do not use.


kIOPSUPSType


#define kIOPSUPSType "UPS" 
Discussion

kIOPSUPSType represents an external attached UPS.


kIOPSUSBTransportType


Value for key kIOPSTransportTypeKey. Indicates the power source is a UPS attached over a USB connection.

#define kIOPSUSBTransportType "USB" 


kIOPSVendorDataKey


CFDictionary key for arbitrary vendor data.
Implementing this key is OPTIONAL.
CFDictionary; contents determined by the power source software. OS X will not look at this data.

#define kIOPSVendorDataKey "Vendor Specific Data" 


kIOPSVoltageKey


CFDictionary key for the current power source's electrical voltage.
Implementing this key is RECOMMENDED
Type CFNumber (signed integer) - units are mV

#define kIOPSVoltageKey "Voltage" 

 

Did this document help you? Yes It's good, but... Not helpful...

 

Last Updated: 2009-10-15