hal/doc/spec hal-spec.xml.in,1.26,1.27
David Zeuthen
david at freedesktop.org
Wed Dec 8 18:01:06 PST 2004
Update of /cvs/hal/hal/doc/spec
In directory gabe:/tmp/cvs-serv18555/doc/spec
Modified Files:
hal-spec.xml.in
Log Message:
2004-12-08 David Zeuthen <davidz at redhat.com>
* doc/spec/hal-spec.xml.in: Add battery.* properties - Patch from
Sergey Udaltsov <sergey.udaltsov at gmail.com>; slightly mangled.
Index: hal-spec.xml.in
===================================================================
RCS file: /cvs/hal/hal/doc/spec/hal-spec.xml.in,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- hal-spec.xml.in 13 Oct 2004 18:50:45 -0000 1.26
+++ hal-spec.xml.in 9 Dec 2004 02:01:04 -0000 1.27
@@ -2883,6 +2883,225 @@
</tgroup>
</informaltable>
</sect2>
+
+ <sect2 id="device-properties-battery">
+ <title><literal>battery</literal> namespace</title>
+ <para>
+
+ Device objects with the capability <literal>battery</literal>
+ represent all the devices having some battery (in many cases -
+ rechargeable) inside.
+ The following properties are available:
+ </para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Key (type)</entry>
+ <entry>Values</entry>
+ <entry>Mandatory</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry><literal>battery.type</literal> (string)</entry>
+ <entry></entry>
+ <entry>Yes</entry>
+ <entry>
+ This property defines the type of the device holding the
+ battery. This property is defined for the development
+ simplicity - battery indicators can use it to find the
+ proper iconic representation.
+ </entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><literal>pda</literal></entry>
+ <entry></entry>
+ <entry>
+ The device containing the battery is a personal digital
+ assistant, e.g. a device that looks like a handheld computer
+ to do specific tasks such as keeping notes or containing
+ a personal database
+ </entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><literal>ups</literal></entry>
+ <entry></entry>
+ <entry>
+ A battery powered power supply that is
+ guaranteed to provide power to a computer in the event of
+ interruptions in the incoming electrical power. Most of the
+ time this is an external device.
+ </entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><literal>primary</literal></entry>
+ <entry></entry>
+ <entry>
+ The battery is a primary power source for the system - an
+ example are laptop batteries.
+ </entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><literal>mouse</literal></entry>
+ <entry></entry>
+ <entry>
+ The device containing the battery is a mouse.
+ </entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><literal>keyboard</literal></entry>
+ <entry></entry>
+ <entry>
+ The device containing the battery is a keyboard.
+ </entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><literal>camera</literal></entry>
+ <entry></entry>
+ <entry>
+ The device containing the battery is a camera.
+ </entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry><literal>unknown</literal></entry>
+ <entry></entry>
+ <entry>
+ The device containing the battery is not covered by other types.
+ </entry>
+ </row>
+ <row>
+ <entry><literal>battery.charge_level.unit</literal> (string)</entry>
+ <entry>Examples: <literal>mWatt</literal>, <literal>VA</literal></entry>
+ <entry>No</entry>
+ <entry>
+ The physical unit used by the charge level properties
+ (maximum and current). In many cases, this property is empty
+ - which indicates that the charge properties are measured in
+ some unknown units.
+ </entry>
+ </row>
+ <row>
+ <entry><literal>battery.charge_level.maximum.specified</literal> (int)</entry>
+ <entry></entry>
+ <entry>Yes</entry>
+ <entry>
+ The maximum level of charge which the device can hold.
+ Measured in <literal>"battery.charge_level.unit"</literal>
+ units. It should represent theoretical limit as specified
+ in the documentation.
+ </entry>
+ </row>
+ <row>
+ <entry><literal>battery.charge_level.maximum.real</literal> (int)</entry>
+ <entry></entry>
+ <entry>No</entry>
+ <entry>
+ The maximum level of charge which the device can hold,
+ taking its age into account. Measured in
+ <literal>"battery.charge_level.unit"</literal> units. As the
+ battery gets older, this value can degrade - it should
+ represent the practical limit, not the theoretical one.
+ The user-level apps should use this value, if present,
+ in all the percentage calculations.
+ </entry>
+ </row>
+ <row>
+ <entry><literal>battery.charge_level.current</literal> (int)</entry>
+ <entry></entry>
+ <entry>Yes</entry>
+ <entry>
+ The current level of charge which the device can hold.
+ Measured in <literal>"battery.charge_level.unit"</literal>
+ units.
+ </entry>
+ </row>
+ <row>
+ <entry><literal>battery.is_rechargeable</literal> (bool)</entry>
+ <entry></entry>
+ <entry>No</entry>
+ <entry>
+ True if the battery unit is rechargeable, false if its is
+ one-time (disposable after one usage).
+ </entry>
+ </row>
+ <row>
+ <entry><literal>battery.rechargeable.is_charging</literal> (bool)</entry>
+ <entry></entry>
+ <entry>Only if <literal>battery.is_rechargeable</literal> is TRUE</entry>
+ <entry>
+ True if the device is charging, false otherwise.</entry>
+ </row>
+ <row>
+ <entry><literal>battery.rechargeable.time_to_charge</literal> (int)</entry>
+ <entry></entry>
+ <entry>No</entry>
+ <entry>
+ The time (measured in seconds) necessary for the
+ rechargeable device to charge fully.
+ </entry>
+ </row>
+ <row>
+ <entry><literal>battery.time_to_discharge</literal> (int)</entry>
+ <entry></entry>
+ <entry>No</entry>
+ <entry>
+ The expected worktime of the device (measured in
+ seconds), without recharging, from the current moment.
+ </entry>
+ </row>
+ <row>
+ <entry><literal>battery.command_interface</literal> (string)</entry>
+ <entry></entry>
+ <entry>No</entry>
+ <entry>
+ The abstract name allowing daemons and/or user-level apps
+ to distinguish some groups of devices having similar
+ programming interface. Introduced mostly for the daemons'
+ coding simplicity.
+ </entry>
+ </row>
+
+ <row>
+ <entry><literal>battery.vendor</literal> (string)</entry>
+ <entry></entry>
+ <entry>No</entry>
+ <entry>
+ Vendor of the battery.
+ </entry>
+ </row>
+ <row>
+ <entry><literal>battery.model</literal> (string)</entry>
+ <entry></entry>
+ <entry>No</entry>
+ <entry>
+ Make of the battery.
+ </entry>
+ </row>
+ <row>
+ <entry><literal>battery.serial</literal> (string)</entry>
+ <entry></entry>
+ <entry>No</entry>
+ <entry>
+ A string uniquely identifying the instance of the battery;
+ it will be different for two (otherwise) identical batteries.
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </sect2>
</sect1>
<sect1 id="properties-policy">
More information about the hal-commit
mailing list