#include <IOKit/pwr_mgt/IOPM.h>

IOKit/pwr_mgt/IOPM.h Kernel.framework

@header IOPM.h @abstract Defines power management constants and keys used by both in-kernel and user space power management. @discussion IOPM.h defines a range of power management constants used in several in-kernel and user space APIs. Most significantly, the IOPMPowerFlags used to specify the fields of an IOPMPowerState struct are defined here. Most of the constants defined in IOPM.h are deprecated or for Apple internal use only, and are not elaborated on in headerdoc.
122 macros · 27 enums · 5 typedefs · 4 structs

enum(anonymous)

underlying type unsigned int
kIOPMMaxPowerStates10
IOPMMaxPowerStates10

typedefIOPMPowerFlags

@enum IOPMPowerFlags @abstract Bits are used in defining capabilityFlags, inputPowerRequirements, and outputPowerCharacter in the IOPMPowerState structure. @discussion These bits may be bitwise-OR'd together in the IOPMPowerState capabilityFlags field, the outputPowerCharacter field, and/or the inputPowerRequirement field. The comments clearly mark whether each flag should be used in the capabilityFlags field, outputPowerCharacter field, and inputPowerRequirement field, or all three. The value of capabilityFlags, inputPowerRequirement or outputPowerCharacter may be 0. Most drivers implement their 'OFF' state, used when asleep, by defininf each of the 3 fields as 0. The bits listed below are only the most common bits used to define a device's power states. Your device's IO family may require that your device specify other input or output power flags to interact properly. Consult family-specific documentation to determine if your IOPower plane parents or children require other power flags; they probably don't. @constant kIOPMPowerOn Indicates the device is on, requires power, and provides power. Useful as a: Capability, InputPowerRequirement, OutputPowerCharacter @constant kIOPMDeviceUsable Indicates the device is usable in this state. Useful only as a Capability @constant kIOPMLowPower Indicates device is in a low power state. May be bitwis-OR'd together with kIOPMDeviceUsable flag, to indicate the device is still usable. A device with a capability of kIOPMLowPower may: Require either 0 or kIOPMPowerOn from its power parent Offer either kIOPMLowPower, kIOPMPowerOn, or 0 (no power at all) to its power plane children. Useful only as a Capability, although USB drivers should consult USB family documentation for other valid circumstances to use the kIOPMLowPower bit. @constant kIOPMPreventIdleSleep In the capability field of a power state, disallows idle system sleep while the device is in that state. For example, displays and disks set this capability for their ON power state; since the system may not idle sleep while the display (and thus keyboard or mouse) or the disk is active. Useful only as a Capability. @constant kIOPMSleepCapability Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. @constant kIOPMRestartCapability Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. @constant kIOPMSleep Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. @constant kIOPMRestart Used only by certain IOKit Families (USB). Not defined or used by generic Power Management. Read your family documentation to see if you should define a powerstate using these capabilities. @constant kIOPMInitialDeviceState Indicates the initial power state for the device. If <code>initialPowerStateForDomainState()</code> returns a power state with this flag set in the capability field, then the initial power change is performed without calling the driver's <code>setPowerState()</code>. @constant kIOPMRootDomainState An indication that the power flags represent the state of the root power domain. This bit must not be set in the IOPMPowerState structure. Power Management may pass this bit to initialPowerStateForDomainState() to map from a global system state to the desired device state.
typedef unsigned long IOPMPowerFlags

enum(anonymous)

underlying type unsigned int
kIOPMPowerOn2
kIOPMDeviceUsable32768
kIOPMLowPower65536
kIOPMPreventIdleSleep64
kIOPMSleepCapability4
kIOPMRestartCapability128
kIOPMSleep1
kIOPMRestart128
kIOPMInitialDeviceState256
kIOPMRootDomainState512

enum(anonymous)

Private IOPMPowerFlags For Apple use only Not for use with non-Apple drivers Their behavior is undefined
underlying type unsigned int
kIOPMClockNormal4
kIOPMClockRunning8
kIOPMPreventSystemSleep16
kIOPMDoze1024
kIOPMChildClamp128
kIOPMChildClamp2512
kIOPMNotPowerManaged2048

enum(anonymous)

Deprecated IOPMPowerFlags Their behavior is undefined when used in IOPMPowerState Capability, InputPowerRequirement, or OutputPowerCharacter fields.
underlying type unsigned int
kIOPMMaxPerformance16384
kIOPMPassThrough256
kIOPMAuxPowerOn32
kIOPMNotAttainable1
kIOPMContextRetained8192
kIOPMConfigRetained4096
kIOPMStaticPowerValid2048
kIOPMSoftSleep1024
kIOPMCapabilitiesMask61574

enum(anonymous)

Support for old names of IOPMPowerFlag constants
underlying type unsigned int
IOPMNotAttainable1
IOPMPowerOn2
IOPMClockNormal4
IOPMClockRunning8
IOPMAuxPowerOn32
IOPMDeviceUsable32768
IOPMMaxPerformance16384
IOPMContextRetained8192
IOPMConfigRetained4096
IOPMNotPowerManaged2048
IOPMSoftSleep1024

enum(anonymous)

underlying type unsigned int
kIOPMNextHigherState1
kIOPMHighestState2
kIOPMNextLowerState3
kIOPMLowestState4

enum(anonymous)

underlying type unsigned int
IOPMNextHigherState1
IOPMHighestState2
IOPMNextLowerState3
IOPMLowestState4

enum(anonymous)

Internal commands used by power managment command queue
underlying type unsigned int
kIOPMBroadcastAggressiveness1
kIOPMUnidleDevice2

enum(anonymous)

Power consumption unknown value
underlying type unsigned int
kIOPMUnknown65535

macrokAppleClamshellStateKey

AppleClamshellState reflects the state of the clamshell (lid) on a portable. It has a boolean value. true == clamshell is closed false == clamshell is open not present == no clamshell on this hardware
#define kAppleClamshellStateKey "AppleClamshellState"

macrokAppleClamshellCausesSleepKey

AppleClamshellCausesSleep reflects the clamshell close behavior on a portable. It has a boolean value. true == system will sleep when clamshell is closed false == system will not sleep on clamshell close (typically external display mode) not present == no clamshell on this hardware
#define kAppleClamshellCausesSleepKey "AppleClamshellCausesSleep"

macrokIOPMSleepWakeUUIDKey

kIOPMSleepWakeUUIDKey Key refers to a CFStringRef that will uniquely identify a sleep/wake cycle for logging & tracking. The key becomes valid at the beginning of a sleep cycle - before we initiate any sleep/wake notifications. The key becomes invalid at the completion of a system wakeup. The property will not be present in the IOPMrootDomain's registry entry when it is invalid. See IOPMrootDomain notification kIOPMMessageSleepWakeUUIDChange
#define kIOPMSleepWakeUUIDKey "SleepWakeUUID"

macrokIOPMBootSessionUUIDKey

kIOPMBootSessionUUIDKey Key refers to a CFStringRef that will uniquely identify a boot cycle. The key becomes valid at boot time and remains valid till shutdown. The property value will remain same across sleep/wake/hibernate cycle.
#define kIOPMBootSessionUUIDKey "BootSessionUUID"

macrokIOPMDeepSleepEnabledKey

kIOPMDeepSleepEnabledKey Indicates the Deep Sleep enable state. It has a boolean value. true == Deep Sleep is enabled false == Deep Sleep is disabled not present == Deep Sleep is not supported on this hardware
#define kIOPMDeepSleepEnabledKey "Standby Enabled"

macrokIOPMDeepSleepDelayKey

kIOPMDeepSleepDelayKey Key refers to a CFNumberRef that represents the delay in seconds before entering Deep Sleep state when on battery power and when remaining battery capacity is below a particular threshold (e.g., 50%.) The property is not present if Deep Sleep is unsupported.
#define kIOPMDeepSleepDelayKey "Standby Delay"

macrokIOPMDeepSleepDelayHighKey

kIOPMDeepSleepDelayHighKey Key refers to a CFNumberRef that represents the delay in seconds before entering Deep Sleep state. This is used instead of the value specified by kIOPMDeepSleepDelayKey if the remaining battery capacity is above a particular threshold (e.g. 50%) or on AC power. The property is not present if Deep Sleep is unsupported.
#define kIOPMDeepSleepDelayHighKey "High Standby Delay"

macrokIOPMStandbyBatteryThresholdKey

kIOPMLowBatteryThresholdKey Key refers to a CFNumberRef that represents the threshold used to choose between the normal deep sleep delay and the high deep sleep delay (as a percentage of total battery capacity remaining.) The property is not present if Deep Sleep is unsupported.
#define kIOPMStandbyBatteryThresholdKey "Standby Battery Threshold"

macrokIOPMDestroyFVKeyOnStandbyKey

kIOPMDestroyFVKeyOnStandbyKey Specifies if FileVault key can be stored when going to standby mode It has a boolean value, true == Destroy FV key when going to standby mode false == Retain FV key when going to standby mode not present == Retain FV key when going to standby mode
#define kIOPMDestroyFVKeyOnStandbyKey "DestroyFVKeyOnStandby"

macrokIOPMResetPowerStateOnWakeKey

kIOPMResetPowerStateOnWakeKey If an IOService publishes this key with the value of kOSBooleanTrue, then PM will disregard the influence from changePowerStateToPriv() or any activity tickles that occurred before system sleep when resolving the initial device power state on wake. Influences from power children and changePowerStateTo() are not eliminated. At the earliest opportunity upon system wake, PM will query the driver for a new power state to be installed as the initial changePowerStateToPriv() influence, by calling initialPowerStateForDomainState() with both kIOPMRootDomainState and kIOPMPowerOn flags set. The default implementation will always return the lowest power state. Drivers can override this default behavior to immediately raise the power state when there are work blocked on the power change, and cannot afford to wait until the next activity tickle. This property should be statically added to a driver's plist or set at runtime before calling PMinit().
#define kIOPMResetPowerStateOnWakeKey "IOPMResetPowerStateOnWake"

enum(anonymous)

Driver Assertion bitfield description Driver PM assertions are defined by these bits.
underlying type unsigned int
kIOPMDriverAssertionCPUBit1kIOPMDriverAssertionCPUBit When set, PM kernel will prefer to leave the CPU and core hardware running in "Dark Wake" state, instead of sleeping.
kIOPMDriverAssertionPreventSystemIdleSleepBit2kIOPMDriverAssertionPreventSystemIdleSleepBit When set, the system should not idle sleep. This does not prevent demand sleep.
kIOPMDriverAssertionUSBExternalDeviceBit4kIOPMDriverAssertionUSBExternalDeviceBit When set, driver is informing PM that an external USB device is attached.
kIOPMDriverAssertionBluetoothHIDDevicePairedBit8kIOPMDriverAssertionBluetoothHIDDevicePairedBit When set, driver is informing PM that a Bluetooth HID device is paired.
kIOPMDriverAssertionExternalMediaMountedBit16kIOPMDriverAssertionExternalMediaMountedBit When set, driver is informing PM that an external media is mounted.
kIOPMDriverAssertionReservedBit532kIOPMDriverAssertionReservedBit5 Reserved for Thunderbolt.
kIOPMDriverAssertionPreventDisplaySleepBit64kIOPMDriverAssertionPreventDisplaySleepBit When set, the display should remain powered on while the system's awake.
kIOPMDriverAssertionReservedBit7128kIOPMDriverAssertionReservedBit7 Reserved for storage family.
kIOPMDriverAssertionMagicPacketWakeEnabledBit256kIOPMDriverAssertionMagicPacketWakeEnabledBit When set, driver is informing PM that magic packet wake is enabled.
kIOPMDriverAssertionNetworkKeepAliveActiveBit512kIOPMDriverAssertionNetworkKeepAliveActiveBit When set, driver is informing PM that it is holding the network interface up to do TCPKeepAlive
kIOPMDriverAssertionForceWakeupBit1024kIOPMDriverAssertionForceWakeupBit When set, the system will immediately wake up the CPU after going to sleep.
kIOPMDriverAssertionForceFullWakeupBit2048kIOPMDriverAssertionForceFullWakeupBit When set, the system will immediately do a full wakeup after going to sleep.

macrokIOPMAssertionsDriverKey

kIOPMAssertionsDriverKey This kIOPMrootDomain key refers to a CFNumberRef property, containing a bitfield describing the aggregate PM assertion levels. Example: A value of 0 indicates that no driver has asserted anything. Or, a value of <link>kIOPMDriverAssertionCPUBit</link> indicates that a driver (or drivers) have asserted a need for CPU and video.
#define kIOPMAssertionsDriverKey "DriverPMAssertions"

macrokIOPMAssertionsDriverDetailedKey

kIOPMAssertionsDriverKey This kIOPMrootDomain key refers to a CFNumberRef property, containing a bitfield describing the aggregate PM assertion levels. Example: A value of 0 indicates that no driver has asserted anything. Or, a value of <link>kIOPMDriverAssertionCPUBit</link> indicates that a driver (or drivers) have asserted a need for CPU and video.
#define kIOPMAssertionsDriverDetailedKey "DriverPMAssertionsDetailed"

macrokIOPMDriverAssertionIDKey

***************************************************************************** Kernel Driver assertion detailed dictionary keys Keys decode the Array & dictionary data structure under IOPMrootDomain property kIOPMAssertionsDriverKey.
#define kIOPMDriverAssertionIDKey "ID"

macrokIOPMDriverAssertionCreatedTimeKey

#define kIOPMDriverAssertionCreatedTimeKey "CreatedTime"

macrokIOPMDriverAssertionModifiedTimeKey

#define kIOPMDriverAssertionModifiedTimeKey "ModifiedTime"

macrokIOPMDriverAssertionOwnerStringKey

#define kIOPMDriverAssertionOwnerStringKey "Owner"

macrokIOPMDriverAssertionOwnerServiceKey

#define kIOPMDriverAssertionOwnerServiceKey "ServicePtr"

macrokIOPMDriverAssertionRegistryEntryIDKey

#define kIOPMDriverAssertionRegistryEntryIDKey "RegistryEntryID"

macrokIOPMDriverAssertionLevelKey

#define kIOPMDriverAssertionLevelKey "Level"

macrokIOPMDriverAssertionAssertedKey

#define kIOPMDriverAssertionAssertedKey "Assertions"

enum(anonymous)

kIOPMMessageClamshellStateChange Delivered as a general interest notification on the IOPMrootDomain IOPMrootDomain sends this message when state of either AppleClamshellState or AppleClamshellCausesSleep changes. If this clamshell change results in a sleep, the sleep will initiate soon AFTER delivery of this message. The state of both variables is encoded in a bitfield argument sent with the message. Check bits 0 and 1 using kClamshellStateBit & kClamshellSleepBit
underlying type unsigned int
kClamshellStateBit1
kClamshellSleepBit2

macrokIOPMMessageClamshellStateChange

#define kIOPMMessageClamshellStateChange iokit_family_msg(sub_iokit_powermanagement, 0x100)

macrokIOPMMessageFeatureChange

kIOPMMessageFeatureChange Delivered when the set of supported features ("Supported Features" dictionary under IOPMrootDomain registry) changes in some way. Typically addition or removal of a supported feature. RootDomain passes no argument with this message.
#define kIOPMMessageFeatureChange iokit_family_msg(sub_iokit_powermanagement, 0x110)

enum(anonymous)

kIOPMMessageInflowDisableCancelled The battery has drained completely to its "Fully Discharged" state. If a user process has disabled battery inflow for battery calibration, we forcibly re-enable Inflow at this point. If inflow HAS been forcibly re-enabled, bit 0 (kInflowForciblyEnabledBit) will be set.
underlying type unsigned int
kInflowForciblyEnabledBit1

macrokIOPMMessageInternalBatteryFullyDischarged

kIOPMMessageInternalBatteryFullyDischarged The battery has drained completely to its "Fully Discharged" state.
#define kIOPMMessageInternalBatteryFullyDischarged iokit_family_msg(sub_iokit_powermanagement, 0x120)

macrokIOPMMessageSystemPowerEventOccurred

kIOPMMessageSystemPowerEventOccurred Some major system thermal property has changed, and interested clients may modify their behavior.
#define kIOPMMessageSystemPowerEventOccurred iokit_family_msg(sub_iokit_powermanagement, 0x130)

macrokIOPMMessageSleepWakeUUIDChange

kIOPMMessageSleepWakeUUIDChange Either a new SleepWakeUUID has been specified at the beginning of a sleep, or we're removing the existing property upon completion of a wakeup.
#define kIOPMMessageSleepWakeUUIDChange iokit_family_msg(sub_iokit_powermanagement, 0x140)

macrokIOPMMessageSleepWakeUUIDSet

kIOPMMessageSleepWakeUUIDSet Argument accompanying the kIOPMMessageSleepWakeUUIDChange notification when a new UUID has been specified.
#define kIOPMMessageSleepWakeUUIDSet ((void *)1)

macrokIOPMMessageSleepWakeUUIDCleared

kIOPMMessageSleepWakeUUIDCleared Argument accompanying the kIOPMMessageSleepWakeUUIDChange notification when the current UUID has been removed.
#define kIOPMMessageSleepWakeUUIDCleared ((void *)NULL)

macrokIOPMMessageDriverAssertionsChanged

kIOPMMessageDriverAssertionsChanged Sent when kernel PM driver assertions have changed.
#define kIOPMMessageDriverAssertionsChanged iokit_family_msg(sub_iokit_powermanagement, 0x150)

macrokIOPMMessageDarkWakeThermalEmergency

kIOPMMessageDarkWakeThermalEmergency Sent when machine becomes unsustainably warm in DarkWake. Kernel PM might choose to put the machine back to sleep right after.
#define kIOPMMessageDarkWakeThermalEmergency iokit_family_msg(sub_iokit_powermanagement, 0x160)

enum(anonymous)

***************************************************************************** Power commands issued to root domain Use with IOPMrootDomain::receivePowerNotification() These commands are issued from system drivers only: ApplePMU, AppleSMU, IOGraphics, AppleACPIFamily TODO: deprecate kIOPMAllowSleep and kIOPMPreventSleep ****************************************************************************
underlying type unsigned int
kIOPMSleepNow1put machine to sleep now
kIOPMAllowSleep2allow idle sleep
kIOPMPreventSleep4do not allow idle sleep
kIOPMPowerButton8power button was pressed
kIOPMClamshellClosed16clamshell was closed
kIOPMPowerEmergency32battery dangerously low
kIOPMDisableClamshell64do not sleep on clamshell closure
kIOPMEnableClamshell128sleep on clamshell closure
kIOPMProcessorSpeedChange256change the processor speed
kIOPMOverTemp512system dangerously hot
kIOPMClamshellOpened1024clamshell was opened
kIOPMDWOverTemp2048DarkWake thermal limits exceeded.
kIOPMPowerButtonUp4096Power button up
kIOPMProModeEngaged8192Fans entered 'ProMode'
kIOPMProModeDisengaged16384Fans exited 'ProMode'

enum(anonymous)

***************************************************************************** Power Management Return Codes ****************************************************************************
underlying type unsigned int
kIOPMNoErr0
kIOPMAckImplied0Returned by driver's setPowerState(), powerStateWillChangeTo(), powerStateDidChangeTo(), or acknowledgeSetPowerState() to implicitly acknowledge power change upon function return.
kIOPMWillAckLater1Deprecated
kIOPMBadSpecification4Returned by requestPowerDomainState() to indicate unrecognized specification parameter.
kIOPMNoSuchState5Returned by requestPowerDomainState() to indicate no power state matches search specification.
kIOPMCannotRaisePower6Deprecated
kIOPMParameterError7Deprecated
kIOPMNotYetInitialized8Returned when power management state is accessed before driver has called PMinit().
IOPMNoErr0And the old constants; deprecated
IOPMAckImplied0
IOPMWillAckLater1
IOPMBadSpecification4
IOPMNoSuchState5
IOPMCannotRaisePower6
IOPMParameterError7
IOPMNotYetInitialized8

macrokIOPMPSExternalConnectedKey

IOPMPowerSource class descriptive strings Power Source state is published as properties to the IORegistry under these keys.
#define kIOPMPSExternalConnectedKey "ExternalConnected"

macrokIOPMPSExternalChargeCapableKey

#define kIOPMPSExternalChargeCapableKey "ExternalChargeCapable"

macrokIOPMPSBatteryInstalledKey

#define kIOPMPSBatteryInstalledKey "BatteryInstalled"

macrokIOPMPSIsChargingKey

#define kIOPMPSIsChargingKey "IsCharging"

macrokIOPMFullyChargedKey

#define kIOPMFullyChargedKey "FullyCharged"

macrokIOPMPSAtWarnLevelKey

#define kIOPMPSAtWarnLevelKey "AtWarnLevel"

macrokIOPMPSAtCriticalLevelKey

#define kIOPMPSAtCriticalLevelKey "AtCriticalLevel"

macrokIOPMPSCurrentCapacityKey

#define kIOPMPSCurrentCapacityKey "CurrentCapacity"

macrokIOPMPSMaxCapacityKey

#define kIOPMPSMaxCapacityKey "MaxCapacity"

macrokIOPMPSDesignCapacityKey

#define kIOPMPSDesignCapacityKey "DesignCapacity"

macrokIOPMPSTimeRemainingKey

#define kIOPMPSTimeRemainingKey "TimeRemaining"

macrokIOPMPSAmperageKey

#define kIOPMPSAmperageKey "Amperage"

macrokIOPMPSVoltageKey

#define kIOPMPSVoltageKey "Voltage"

macrokIOPMPSCycleCountKey

#define kIOPMPSCycleCountKey "CycleCount"

macrokIOPMPSMaxErrKey

#define kIOPMPSMaxErrKey "MaxErr"

macrokIOPMPSAdapterInfoKey

#define kIOPMPSAdapterInfoKey "AdapterInfo"

macrokIOPMPSLocationKey

#define kIOPMPSLocationKey "Location"

macrokIOPMPSErrorConditionKey

#define kIOPMPSErrorConditionKey "ErrorCondition"

macrokIOPMPSManufacturerKey

#define kIOPMPSManufacturerKey "Manufacturer"

macrokIOPMPSManufactureDateKey

#define kIOPMPSManufactureDateKey "ManufactureDate"

macrokIOPMPSModelKey

#define kIOPMPSModelKey "Model"

macrokIOPMPSSerialKey

#define kIOPMPSSerialKey "Serial"

macrokIOPMDeviceNameKey

#define kIOPMDeviceNameKey "DeviceName"

macrokIOPMPSLegacyBatteryInfoKey

#define kIOPMPSLegacyBatteryInfoKey "LegacyBatteryInfo"

macrokIOPMPSBatteryHealthKey

#define kIOPMPSBatteryHealthKey "BatteryHealth"

macrokIOPMPSHealthConfidenceKey

#define kIOPMPSHealthConfidenceKey "HealthConfidence"

macrokIOPMPSCapacityEstimatedKey

#define kIOPMPSCapacityEstimatedKey "CapacityEstimated"

macrokIOPMPSBatteryChargeStatusKey

#define kIOPMPSBatteryChargeStatusKey "ChargeStatus"

macrokIOPMPSBatteryTemperatureKey

#define kIOPMPSBatteryTemperatureKey "Temperature"

macrokIOPMPSAdapterDetailsKey

#define kIOPMPSAdapterDetailsKey "AdapterDetails"

macrokIOPMPSChargerConfigurationKey

#define kIOPMPSChargerConfigurationKey "ChargerConfiguration"

macrokIOPMBatteryChargeStatusTooHot

kIOPMPSBatteryChargeStatusKey may have one of the following values, or may have no value. If kIOPMBatteryChargeStatusKey has a NULL value (or no value) associated with it then charge is proceeding normally. If one of these battery charge status reasons is listed, then the charge may have been interrupted.
#define kIOPMBatteryChargeStatusTooHot "HighTemperature"

macrokIOPMBatteryChargeStatusTooCold

#define kIOPMBatteryChargeStatusTooCold "LowTemperature"

macrokIOPMBatteryChargeStatusTooHotOrCold

#define kIOPMBatteryChargeStatusTooHotOrCold "HighOrLowTemperature"

macrokIOPMBatteryChargeStatusGradient

#define kIOPMBatteryChargeStatusGradient "BatteryTemperatureGradient"

enum(anonymous)

Definitions for battery location, in case of multiple batteries. A location of 0 is unspecified Location is undefined for single battery systems
underlying type unsigned int
kIOPMPSLocationLeft1001
kIOPMPSLocationRight1002

enum(anonymous)

Battery quality health types, specified by BatteryHealth and HealthConfidence properties in an IOPMPowerSource battery kext.
underlying type unsigned int
kIOPMUndefinedValue0
kIOPMPoorValue1
kIOPMFairValue2
kIOPMGoodValue3

macrokIOPMPSAdapterDetailsIDKey

Keys for kIOPMPSAdapterDetailsKey dictionary
#define kIOPMPSAdapterDetailsIDKey "AdapterID"

macrokIOPMPSAdapterDetailsWattsKey

#define kIOPMPSAdapterDetailsWattsKey "Watts"

macrokIOPMPSAdapterDetailsRevisionKey

#define kIOPMPSAdapterDetailsRevisionKey "AdapterRevision"

macrokIOPMPSAdapterDetailsSerialNumberKey

#define kIOPMPSAdapterDetailsSerialNumberKey "SerialNumber"

macrokIOPMPSAdapterDetailsFamilyKey

#define kIOPMPSAdapterDetailsFamilyKey "FamilyCode"

macrokIOPMPSAdapterDetailsAmperageKey

#define kIOPMPSAdapterDetailsAmperageKey "Current"

macrokIOPMPSAdapterDetailsDescriptionKey

#define kIOPMPSAdapterDetailsDescriptionKey "Description"

macrokIOPMPSAdapterDetailsPMUConfigurationKey

#define kIOPMPSAdapterDetailsPMUConfigurationKey "PMUConfiguration"

macrokIOPMPSAdapterDetailsVoltage

#define kIOPMPSAdapterDetailsVoltage "AdapterVoltage"

macrokIOPMPSAdapterDetailsSourceIDKey

#define kIOPMPSAdapterDetailsSourceIDKey "Source"

macrokIOPMPSAdapterDetailsErrorFlagsKey

#define kIOPMPSAdapterDetailsErrorFlagsKey "ErrorFlags"

macrokIOPMPSAdapterDetailsSharedSourceKey

#define kIOPMPSAdapterDetailsSharedSourceKey "SharedSource"

macrokIOPMPSAdapterDetailsCloakedKey

#define kIOPMPSAdapterDetailsCloakedKey "CloakedSource"

enum(anonymous)

values for kIOPSPowerAdapterFamilyKey
underlying type int
kIOPSFamilyCodeDisconnected0
kIOPSFamilyCodeUnsupported-536870201
kIOPSFamilyCodeFirewire-536838144
kIOPSFamilyCodeUSBHost-536854528
kIOPSFamilyCodeUSBHostSuspended-536854527
kIOPSFamilyCodeUSBDevice-536854526
kIOPSFamilyCodeUSBAdapter-536854525
kIOPSFamilyCodeUSBChargingPortDedicated-536854524
kIOPSFamilyCodeUSBChargingPortDownstream-536854523
kIOPSFamilyCodeUSBChargingPort-536854522
kIOPSFamilyCodeUSBUnknown-536854521
kIOPSFamilyCodeUSBCBrick-536854520
kIOPSFamilyCodeUSBCTypeC-536854519
kIOPSFamilyCodeUSBCPD-536854518
kIOPSFamilyCodeAC-536723456
kIOPSFamilyCodeExternal-536723455
kIOPSFamilyCodeExternal2-536723454
kIOPSFamilyCodeExternal3-536723453
kIOPSFamilyCodeExternal4-536723452
kIOPSFamilyCodeExternal5-536723451
kIOPSFamilyCodeExternal6-536723450
kIOPSFamilyCodeExternal7-536723449
kIOPSFamilyCodeExternal8-536723448
kIOPSFamilyCodeUnsupportedRegion-536723447

enum(anonymous)

values for kIOPMPSAdapterDetailsErrorFlagsKey
underlying type unsigned int
kIOPSAdapterErrorFlagNoErrors0
kIOPSAdapterErrorFlagInsufficientAvailablePower2
kIOPSAdapterErrorFlagForeignObjectDetected4
kIOPSAdapterErrorFlagDeviceNeedsToBeRepositioned8

macrokIOPMPSInvalidWakeSecondsKey

Battery's time remaining estimate is invalid this long (seconds) after a wake
#define kIOPMPSInvalidWakeSecondsKey "BatteryInvalidWakeSeconds"

macrokIOPMPSPostChargeWaitSecondsKey

Battery must wait this long (seconds) after being completely charged before the battery is settled.
#define kIOPMPSPostChargeWaitSecondsKey "PostChargeWaitSeconds"

macrokIOPMPSPostDishargeWaitSecondsKey

Battery must wait this long (seconds) after being completely discharged before the battery is settled.
#define kIOPMPSPostDishargeWaitSecondsKey "PostDischargeWaitSeconds"

macrokIOPMGraphicsPowerLimitsKey

kIOPMGraphicsPowerLimitsKey The key representing the dictionary of graphics power limits. The dictionary contains the other kIOPMCPUPower keys & their associated values (e.g. Speed limit, Processor Count, and Schedule limits).
#define kIOPMGraphicsPowerLimitsKey "Graphics_Power_Limits"

macrokIOPMGraphicsPowerLimitPerformanceKey

kIOPMGraphicsPowerLimitPerformanceKey The key representing the percent of overall performance made available by the graphics chip as a percentage (integer 0 - 100).
#define kIOPMGraphicsPowerLimitPerformanceKey "Graphics_Power_Performance"

macrokIOPMCPUPowerLimitsKey

kIOPMCPUPowerLimitsKey The key representing the dictionary of CPU Power Limits. The dictionary contains the other kIOPMCPUPower keys & their associated values (e.g. Speed limit, Processor Count, and Schedule limits).
#define kIOPMCPUPowerLimitsKey "CPU_Power_Limits"

macrokIOPMCPUPowerLimitProcessorSpeedKey

kIOPMCPUPowerLimitProcessorSpeedKey defines the speed & voltage limits placed on the CPU. Represented as a percentage (0-100) of maximum CPU speed.
#define kIOPMCPUPowerLimitProcessorSpeedKey "CPU_Speed_Limit"

macrokIOPMCPUPowerLimitProcessorCountKey

kIOPMCPUPowerLimitProcessorCountKey reflects how many, if any, CPUs have been taken offline. Represented as an integer number of CPUs (0 - Max CPUs).
#define kIOPMCPUPowerLimitProcessorCountKey "CPU_Available_CPUs"

macrokIOPMCPUPowerLimitSchedulerTimeKey

kIOPMCPUPowerLimitSchedulerTimeKey represents the percentage (0-100) of CPU time available. 100% at normal operation. The OS may limit this time for a percentage less than 100%.
#define kIOPMCPUPowerLimitSchedulerTimeKey "CPU_Scheduler_Limit"

macrokIOPMThermalLevelWarningKey

Thermal Level Warning Key Indicates the thermal constraints placed on the system. This value may cause clients to action to consume fewer system resources. The value associated with this warning is defined by the platform.
#define kIOPMThermalLevelWarningKey "Thermal_Level_Warning"

enum(anonymous)

Thermal Warning Level values kIOPMThermalLevelNormal - under normal operating conditions kIOPMThermalLevelDanger - thermal pressure may cause system slowdown kIOPMThermalLevelCritical - thermal conditions may cause imminent shutdown The platform may define additional thermal levels if necessary. Platform specific values are defined from 100 and above
underlying type unsigned int
kIOPMThermalLevelNormal0
kIOPMThermalLevelDanger5
kIOPMThermalLevelCritical10
kIOPMThermalLevelWarning100
kIOPMThermalLevelTrap110
kIOPMThermalLevelUnknown255

macrokIOPMThermalWarningLevelNormal

#define kIOPMThermalWarningLevelNormal kIOPMThermalLevelNormal

macrokIOPMThermalWarningLevelDanger

#define kIOPMThermalWarningLevelDanger kIOPMThermalLevelWarning

macrokIOPMThermalWarningLevelCrisis

#define kIOPMThermalWarningLevelCrisis kIOPMThermalLevelCritical

macrokIOPMSettingWakeOnRingKey

PM Settings Controller setting types Settings types used primarily with: IOPMrootDomain::registerPMSettingController The values are identical to the similarly named keys for use in user space PM settings work. Those keys are defined in IOPMLibPrivate.h.
#define kIOPMSettingWakeOnRingKey "Wake On Modem Ring"

macrokIOPMSettingRestartOnPowerLossKey

#define kIOPMSettingRestartOnPowerLossKey "Automatic Restart On Power Loss"

macrokIOPMSettingWakeOnACChangeKey

#define kIOPMSettingWakeOnACChangeKey "Wake On AC Change"

macrokIOPMSettingSleepOnPowerButtonKey

#define kIOPMSettingSleepOnPowerButtonKey "Sleep On Power Button"

macrokIOPMSettingWakeOnClamshellKey

#define kIOPMSettingWakeOnClamshellKey "Wake On Clamshell Open"

macrokIOPMSettingReduceBrightnessKey

#define kIOPMSettingReduceBrightnessKey "ReduceBrightness"

macrokIOPMSettingDisplaySleepUsesDimKey

#define kIOPMSettingDisplaySleepUsesDimKey "Display Sleep Uses Dim"

macrokIOPMSettingTimeZoneOffsetKey

#define kIOPMSettingTimeZoneOffsetKey "TimeZoneOffsetSeconds"

macrokIOPMSettingMobileMotionModuleKey

#define kIOPMSettingMobileMotionModuleKey "MobileMotionModule"

macrokIOPMSettingGraphicsSwitchKey

#define kIOPMSettingGraphicsSwitchKey "GPUSwitch"

macrokIOPMSettingProModeControl

#define kIOPMSettingProModeControl "ProModeControl"

macrokIOPMSettingProModeDefer

#define kIOPMSettingProModeDefer "ProModeDefer"

macrokIOPMSettingAutoWakeSecondsKey

Setting controlling drivers can register to receive scheduled wake data Either in "CF seconds" type, or structured calendar data in a formatted IOPMCalendarStruct defined below.
#define kIOPMSettingAutoWakeSecondsKey "wake"

macrokIOPMSettingAutoWakeCalendarKey

#define kIOPMSettingAutoWakeCalendarKey "WakeByCalendarDate"

macrokIOPMSettingAutoPowerSecondsKey

#define kIOPMSettingAutoPowerSecondsKey "poweron"

macrokIOPMSettingAutoPowerCalendarKey

#define kIOPMSettingAutoPowerCalendarKey "PowerByCalendarDate"

macrokIOPMSettingDebugWakeRelativeKey

Debug seconds auto wake Used by sleep cycling debug tools
#define kIOPMSettingDebugWakeRelativeKey "WakeRelativeToSleep"

macrokIOPMSettingDebugPowerRelativeKey

#define kIOPMSettingDebugPowerRelativeKey "PowerRelativeToShutdown"

macrokIOPMSettingMaintenanceWakeCalendarKey

Maintenance wake calendar.
#define kIOPMSettingMaintenanceWakeCalendarKey "MaintenanceWakeCalendarDate"

structIOPMCalendarStruct

size 12, align 4
UInt32year
UInt8month
UInt8day
UInt8hour
UInt8minute
UInt8second
UInt8selector

typedefIOPMCalendarStruct

typedef struct IOPMCalendarStruct IOPMCalendarStruct

enum(anonymous)

SetAggressiveness types
underlying type unsigned int
kPMGeneralAggressiveness0
kPMMinutesToDim1
kPMMinutesToSpinDown2
kPMMinutesToSleep3
kPMEthernetWakeOnLANSettings4
kPMSetProcessorSpeed5
kPMPowerSource6
kPMMotionSensor7
kPMLastAggressivenessType8

macrokMaxType

#define kMaxType (kPMLastAggressivenessType-1)

enum(anonymous)

SetAggressiveness values for the kPMPowerSource aggressiveness type
underlying type unsigned int
kIOPMInternalPower1
kIOPMExternalPower2

macrokIOREMSleepEnabledKey

#define kIOREMSleepEnabledKey "REMSleepEnabled"

macrokIOBatteryInfoKey

Strings for deciphering the dictionary returned from IOPMCopyBatteryInfo
#define kIOBatteryInfoKey "IOBatteryInfo"

macrokIOBatteryCurrentChargeKey

#define kIOBatteryCurrentChargeKey "Current"

macrokIOBatteryCapacityKey

#define kIOBatteryCapacityKey "Capacity"

macrokIOBatteryFlagsKey

#define kIOBatteryFlagsKey "Flags"

macrokIOBatteryVoltageKey

#define kIOBatteryVoltageKey "Voltage"

macrokIOBatteryAmperageKey

#define kIOBatteryAmperageKey "Amperage"

macrokIOBatteryCycleCountKey

#define kIOBatteryCycleCountKey "Cycle Count"

enum(anonymous)

underlying type unsigned int
kIOBatteryInstalled4
kIOBatteryCharge2
kIOBatteryChargerConnect1

macrokIOPMMessageBatteryStatusHasChanged

Private power management message indicating battery data has changed Indicates new data resides in the IORegistry
#define kIOPMMessageBatteryStatusHasChanged iokit_family_msg(sub_iokit_pmu, 0x100)

macrokIOPMUMessageLegacyAutoWake

Apple private Legacy messages for re-routing AutoWake and AutoPower messages to the PMU through newer user space IOPMSchedulePowerEvent API
#define kIOPMUMessageLegacyAutoWake iokit_family_msg(sub_iokit_pmu, 0x200)

macrokIOPMUMessageLegacyAutoPower

#define kIOPMUMessageLegacyAutoPower iokit_family_msg(sub_iokit_pmu, 0x210)

macroIOPM_POWER_SOURCE_REV

For use with IOPMPowerSource bFlags
#define IOPM_POWER_SOURCE_REV 2

enum(anonymous)

underlying type unsigned int
kIOPMACInstalled1
kIOPMBatteryCharging2
kIOPMBatteryInstalled4
kIOPMUPSInstalled8
kIOPMBatteryAtWarn16
kIOPMBatteryDepleted32
kIOPMACnoChargeCapability64AC adapter cannot charge battery
kIOPMRawLowBattery128used only by Platform Expert
kIOPMForceLowSpeed256set by Platfm Expert, chk'd by Pwr Plugin
kIOPMClosedClamshell512set by PMU - reflects state of the clamshell
kIOPMClamshellStateOnWake1024used only by Platform Expert

enum(anonymous)

underlying type unsigned int
kIOPowerEmergencyLevel1000

enum(anonymous)

underlying type unsigned int
kIOPMSubclassPolicy0
kIOPMSuperclassPolicy11

structstateChangeNote

size 24, align 8
IOPMPowerFlagsstateFlags
unsigned longstateNum
void *powerRef

typedefstateChangeNote

typedef struct stateChangeNote stateChangeNote

structIOPowerStateChangeNotification

size 32, align 8
void *powerRef
unsigned longreturnValue
unsigned longstateNumber
IOPMPowerFlagsstateFlags

typedefIOPowerStateChangeNotification

typedef struct IOPowerStateChangeNotification IOPowerStateChangeNotification

typedefsleepWakeNote

typedef IOPowerStateChangeNotification sleepWakeNote

structIOPMSystemCapabilityChangeParameters

@struct IOPMSystemCapabilityChangeParameters @abstract A structure describing a system capability change. @discussion A system capability change is a system level transition from a set of system capabilities to a new set of system capabilities. Power management sends a <code>kIOMessageSystemCapabilityChange</code> message and provides this structure as the message data (by reference) to <code>gIOPriorityPowerStateInterest</code> clients when system capability changes. @field notifyRef An identifier for this message notification. Clients with pending I/O can signal completion by calling <code>allowPowerChange()</code> with this value as the argument. Clients that are able to process the notification synchronously should ignore this field. @field maxWaitForReply A return value to the caller indicating the maximum time in microseconds to wait for the <code>allowPowerChange()</code> call. The default value is zero, which indicates the client processing has finished, and power management should not wait for an <code>allowPowerChange()</code> call. @field changeFlags Flags will be set to indicate whether the notification precedes the capability change (<code>kIOPMSystemCapabilityWillChange</code>), or after the capability change has occurred (<code>kIOPMSystemCapabilityDidChange</code>). @field __reserved1 Set to zero. @field fromCapabilities The system capabilities at the start of the transition. @field toCapabilities The system capabilities at the end of the transition. @field __reserved2 Set to zero.
size 40, align 4
uint32_tnotifyRef
uint32_tmaxWaitForReply
uint32_tchangeFlags
uint32_t__reserved1
uint32_tfromCapabilities
uint32_ttoCapabilities
uint32_t[4]__reserved2

enum(anonymous)

@enum IOPMSystemCapabilityChangeFlags @constant kIOPMSystemCapabilityWillChange Indicates the system capability will change. @constant kIOPMSystemCapabilityDidChange Indicates the system capability has changed.
underlying type unsigned int
kIOPMSystemCapabilityWillChange1
kIOPMSystemCapabilityDidChange2

enum(anonymous)

underlying type unsigned int
kIOPMSystemCapabilityCPU1
kIOPMSystemCapabilityGraphics2
kIOPMSystemCapabilityAudio4
kIOPMSystemCapabilityNetwork8
kIOPMSystemCapabilityAOT16