Previous: acpi-listener example, Up: ACPI API [Contents][Index]
The following procedures are available in the (netlink acpi)
module.
Open a connection to the kernel, and set it up to listen for ACPI event
notifications. The procedure returns three new procedures for managing this
connection: read-selector which returns a file descriptor which can be
passed to the select
procedure to wait for data from the kernel,
process-data action which reads and evaluates the data, and calls
ACTION event
on it, and finally close-connection which will
terminate the connection with the kernel.
Extract the display class from the event. This will be a string.
Extract the bus-id from the event, again a string.
Extract the type of the event, a number, nominally unsigned 32 bit.
Extract the data from the event, a number, also nominally unsigned 32 bit.