Exposing the mouse battery status through HAL

Sergey Udaltsov sergey.udaltsov at gmail.com
Wed Dec 1 16:14:34 PST 2004


So, as I promised, here is the list of the properties I propose for
the capability "rechargeable":

- "rechargeable.type" (string, mandatory) - "laptop", "mouse", "PDA",
"UPS", "keyboard", "cellphone", "photocamera", "toy", "other" - some
set of well-known values (to be extended). This will help indicators
to find the appopriate icons. Usually taken straight from fdi.

- "rechargeable.charge_unit" (string, mandatory) - the unit name.
possible values: "milliWatts", "VA", ... Can be just "" - it means
some relative "units". Usually taken straight from fdi.

- "rechargeable.maximum_battery_level" (int, mandatory) - the maximum
level of the battery charge, in "units". Usually taken straight from
fdi.

- "rechargeable.current_battery_level" (int, mandatory) - the current
level of the battery charge, in "units". Handled by the
callout/daemon/...

- "rechargeable.is_charging" (bool, mandatory) - whether the device is
charging or not, handled by the daemon. If this property is "true" and
"current_battery_level" = "maximum_battery_level" - it means that
device is simply working from AC (being fully charged). Handled by the
callout/daemon.

Note: In theory, the property "rechargeable.is_plugged_in" can be
introduced - but I'd consider it as redundant. Or it can be made
optional.

- "rechargeable.command_interface" (string, mandatory?) - helps
callouts to find the devices it can handle. Usually taken from fdi.
For logitech mice, this is going to be

- "rechargeable.time_to_charge" (int, optional, in minutes) - if some
predictions can be made by the callout/daemon, they are here. This
property can be defined even when "is_charging" is false. (though they
always recommend to discharge batteries fully before charging).
Handled by callout/daemon.

- "rechargeable.time_to_discharge" (int, optional, in minutes) - if
some predictions can be made by the callout/daemon, they are here.
This property can be defined even when "is_charging" is true (though
they always recommend to charge batteries fully before discharging)
Handled by callout/daemon

Note: also, there can be introduced optional "rechargeable.disposable"
- for devices using non-rechargeable batteries (if device can report
this fact).

This is basically it. Comments are welcome.

Sergey
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list