[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Base Operating System and Extensions Technical Reference, Volume 1

pm_event_query Subroutine

Purpose

Queries a Power Management Event.

Library

Standard C Library (libc.a)

Syntax

#include <sys/pm.h>
int pm_event_query(Event, Action);
int *Event;
int *Action;

Description

The pm_event_query subroutine queries a Power Management (PM) event.

Parameters

Event Returns one of the following events:
PM_EVENT_NONE
no event
PM_EVENT_LID_CLOSE
LID close
PM_EVENT_SYSTEM_IDLE_TIMER
system timer expiration
PM_EVENT_LOW_BATTERY
low battery
PM_EVENT_SOFTWARE_REQUEST
requested by software
PM_EVENT_DATA_CHANGE
PM data change notice
PM_EVENT_AC
power change from DC to AC
PM_EVENT_DC
power change from AC to DC
PM_EVENT_DISPLAY_MESSAGE
display message request
PM_EVENT_SPECIFIED_TIME
Specified time for suspend/hibernation
Action Returns one of the following actions (system state) to be requested. It is a default state transition action in PM core:
PM_SYSTEM_NONE
PM_SYSTEM_FULL_ON
PM_SYSTEM_ENABLE
PM_SYSTEM_STANDBY
PM_SYSTEM_SUSPEND
PM_SYSTEM_SHUTDOWN

Return Values

PM_SUCCESS Indicates successful completion.
PM_ERROR Indicates an error condition. The variable errno is set to identify the error.

Error Codes

EINVAL The argument or command is not valid.
EBUSY Another process is blocked for query.

Implementation Specifics

The pm_event_query subroutine is part of the Base Operating System (BOS) Runtime.

Related Information

The pm_control_state subroutine, pm_control_parameter subroutine, pm_battery_control subroutine.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]