Name
condition, condition, kPMCondition — Description of a testable condition that resolves to a boolean.
Synopsis
condition structure { type, invert, ... };
type : string, choice |
invert : boolean, default, optional |
Description
Description of a testable condition that resolves to a boolean.
Conditions are designed to be positive where a specific situation can be tested. A condition can more easily test for the existence of a running process or power assertion, than for the lack of these states.
Fields
type. Type of condition to test.
type is a string. type must be one of the following 13 constants:
- boolean,
kPMConditionType_Boolean. - delayed boolean,
kPMConditionType_DelayedBoolean. - days,
kPMConditionType_Days. - date range,
kPMConditionType_DateRange. - time range,
kPMConditionType_TimeRange. - execute external,
kPMConditionType_ExecuteExternal. - full screen,
kPMConditionType_FullScreen. - sample,
kPMConditionType_Sample. - running processes,
kPMConditionType_RunningProcesses. - power assertions,
kPMConditionType_PowerAssertions. - power state,
kPMConditionType_PowerState. - battery health,
kPMConditionType_BatteryHealth. - power remaining,
kPMConditionType_PowerRemaining.
invert. Invert the condition's conclusion.
Conditions are designed to positively identify specific states. Many events will want a condition to confirm that a specific state is not occuring. To reverse the role of a positive condition, use the invert field.
If a condition is true, and the invert field is set, the condition will invert the true and return false.
If a condition is false, and the invert field is set, the condition will invert the false and return true.
invert is a boolean. If invert is omitted, the default false is used. invert is optional.