Add example configuration

This commit is contained in:
Emery Hemingway 2023-05-06 20:57:35 +01:00
parent 0f9f622e37
commit e80cec0d4f
2 changed files with 20 additions and 2 deletions

View File

@ -1,6 +1,6 @@
# acpi_actor
A Syndicate actor for publishing Linux ACPI events as well as an example of interacting with Linux generic netlink sockets in pure Nim (Linux C headers aside).
Not very useful. I thought that I would get battery capacity information over netlink but apparently that information is polled from files in /sys despite any stated deprecations.
A configuration example is provide at [example-config.pr](./example-config.pr).
The lesson learned is that Netlink is of the sort of quality to be expected from the Linux kernel.
Not very useful. I thought that I would get battery capacity information over netlink but apparently that information is polled from files in /sys despite any stated deprecations.

18
example-config.pr Normal file
View File

@ -0,0 +1,18 @@
<require-service <daemon acpi_actor>>
<daemon acpi_actor {
argv: ["/bin/acpi_actor"]
protocol: application/syndicate
}>
? <machine-dataspace ?machine> [
? <service-object <daemon acpi_actor> ?cap> [
$cap { machine: $machine }
]
$machine ?? <acpi_event ?class ?bus ?type ?data> [
$log ! <log "-" { acpi_event: { device: $class bus-id: $bus type: $type data: $data } }>
]
]