Name

action await power remaining, actionawaitpowerremaining, kPMActionActionAwaitPowerRemaining — Wait for the power remaining to change.

Synopsis

action await power remaining structure { type, capacity, seconds remaining, filter };
type : string, choice
capacity : integer, default, optional, range 0..100
seconds remaining : integer, default, optional, range 1..86400
filter : power source filter structure, optional

Description

Wait for the power remaining to change.

The next action will not be performed until the power remaining changes.

Fields

type. Type of action to perform.

type is a string. type must be await power remaining, kPMActionType_AwaitPowerRemaining.

capacity. Trigger when a power source reaches or passes this capacity.

A power source's capacity may not increase and decrease in single units. The current capacity value may jump a few percentage points at a time. The trigger will fire when the current capacity equals or passes this capacity value.

If the power source is being charged, the trigger will fire if the capacity equals or is greater than this capacity.

If the power source is being used, the trigger will fire if the capacity equals or is less than this capacity.

The trigger will only fire when the power source reaches or passes this capacity value.

capacity is an integer. If capacity is omitted, the default 50 is used. capacity is optional. capacity must be between 0 and 100, inclusive.

seconds remaining. Trigger when a power source reaches or passes this duration remaining.

seconds remaining is an integer. If seconds remaining is omitted, the default 1800 is used. seconds remaining is optional. seconds remaining must be between 1 and 86400, inclusive.

filter. Power sources to monitor.

filter is a power source filter structure. filter is optional.