- From: Max Froumentin via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 10 Dec 2009 13:04:34 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/system-info In directory hutz:/tmp/cvs-serv7877 Modified Files: Overview.html Log Message: - expanded CPU, Thermal and Fans to include individual devices - moved CPU out Index: Overview.html =================================================================== RCS file: /sources/public/2009/dap/system-info/Overview.html,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- Overview.html 10 Dec 2009 11:06:12 -0000 1.30 +++ Overview.html 10 Dec 2009 13:04:32 -0000 1.31 @@ -199,7 +199,13 @@ navigator.device.system.watch("power:state",success,null,{lowThreshold:0.2});</pre> </section> - + <p class="issue"> + We need a way to get/watch/set individual batteries (or + CPUs, Fans, etc.). In that case we couls define sub-URLs that + can be passed to <a>watch</a>. For instance, + <code>http://www.w3.org/2009/dap/SysInfo/PowerSource#3</code> + would represent the system's third power source. + </p> <section> <h4>Properties</h4> <p>Properties that can be obtained or watched through the appropriate functions</p> @@ -219,7 +225,7 @@ Specifies how much the internal power source remains, scaled from 0 to 1. A value of 0 means that the battery level is lowest before the system stops, and 1 - indicates that the system's charge is maximal. Any + indicates that the system's charge is maximal. Any threshold parameter used in a <a>watch</a> function to monitor this property applies to this attribute. </dd> @@ -246,10 +252,13 @@ </section> <dl title="[NoInterfaceObject] interface PowerSource" class="idl"> - <dt>const unsigned short BATTERY=0</dt> + <dt>const unsigned short UNKNOWN=0</dt> + <dd>In <code>type</code> has this value, then this power source is undetermined</dd> + + <dt>const unsigned short BATTERY=1</dt> <dd>In <code>type</code> has this value, then this power source is a battery</dd> - <dt>const unsigned short EXTERNAL=1</dt> + <dt>const unsigned short EXTERNAL=2</dt> <dd>In <code>type</code> has this value, then this power source is external</dd> <dt>attribute unsigned int type</dt> @@ -272,21 +281,24 @@ </section> - <!--******************* Internal Sensors *******************************************--> + <!--******************* CPU *******************************************--> <section> - <h3>Internal Sensors (CPU, Fans, Temperature)</h3> - <p>This section defines a set of APIs that expose sensor - information pertaining to the internal state of the - device. For example, <abbr title="Central Processing Unit">CPU</abbr> - load, cooling fan speed, or temperature.</p> + <h3>CPU</h3> + <p>This section defines a set of APIs that expose the system's CPU information, including type, specifications, and load + information</p> <section> <h4>ECMAScript Example</h4> <pre class="sh_javascript example"> +navigator.device.system.watch("cpu:state",success);</pre> + var success = function(cpu) { - document.getElementById("cpuIndicator").innerHTML=("CPU: "+cpu.load); + var s="CPU STATUS. Global load: "+cpu.load"; + for (var i=0;i<cpu.units;i++) { + s+="CPU #"+i+": "+cpu.units[i].currentFrequency+" MHz"; + } + document.getElementById("cpuState").innerHTML=s; } -navigator.device.system.watch("internal:CPULoad",success,null);</pre> </section> <section> @@ -295,10 +307,10 @@ <section> <h5>CPU State</h5> <ul> - <li>URI: <code>http://www.w3.org/2009/dap/sysinfo/internal#CPULoad</code></li> - <li>Short Name: <code>internal:CPULoad</code></li> + <li>URI: <code>http://www.w3.org/2009/dap/Sysinfo/CpuState</code></li> + <li>Short Name: <code>cpu:state</code></li> <li>Corresponding DCO property: <a href="">@@</a></li> - <li>Value type: <a>CpuLoad</a></li> + <li>Value type: <a>CpuState</a></li> </ul> <dl title="[NoInterfaceObject] interface CpuState" class="idl"> @@ -306,62 +318,119 @@ <dd> This attribute indicates the current CPU load, as a number between 0.0 and 1.0, representing the minimum and - maximum values allowed by this system. On devices that - have multiple CPUs, this value should reflect the - average load of the individual CPUs. + maximum values allowed on this system. Any + threshold parameter used in a <a>watch</a> function to + monitor this property applies to this attribute. + </dd> + <dt>attribute sequence<CPU> units</dt> + <dd>The list of available CPUs</dd> + </dl> + + <dl title="[NoInterfaceObject] interface Cpu" class="idl"> + <dt>attribute float currentFrequency</dt> + <dd> + This attribute indicates the current frequency of this CPU (in MHz). + </dd> + <dt>attribute float maxFrequency</dt> + <dd> + This attribute indicates the maximum frequency of this CPU (in MHz). </dd> </dl> </section> + </section> + </section> + <!--******************** /CPU **********************************--> + + <!--******************* Temperature *******************************************--> + <section> + <h3>Internal Temperature</h3> + <p>This API offers access to the system's temparature, as measured by internal thermometers</p> + + <section> + <h4>ECMAScript Example</h4> + <pre class="sh_javascript example"> +var success = function(thermal) { + document.getElementById("tempIndicator").innerHTML=("Current Temperature #1: "+thermal.thermometers[0].temperature); +} +navigator.device.system.get("internal:CPULoad",success);</pre> + </section> + + <section> + <h4>Properties</h4> <section> - <h5>Internal Thermometer</h5> + <h5>Thermal State</h5> <ul> - <li>URI: <code>http://www.w3.org/2009/dap/sysinfo/internal#temperature</code></li> - <li>Short Name: <code>internal:temperature</code></li> - <li>Value type: <a>Temperature</a></li> + <li>URI: <code>http://www.w3.org/2009/dap/SysInfo/Thermal/State</code></li> + <li>Short Name: <code>thermal:state</code></li> <li>Corresponding DCO property: <a href="">@@</a></li> + <li>Value type: <a>ThermalState</a></li> </ul> - <dl title="[NoInterfaceObject] interface Temperature" class="idl"> - <dt>attribute float value</dt> + <dl title="[NoInterfaceObject] interface ThermalState" class="idl"> + <dt>attribute float status</dt> <dd> - This attribute indicates the current internal - temperature of the system, scaled to a 0.0 to 1.0 - floating point range. A value of 0.0 means that the - system is running at the lowest safe temperature, and a - value of 1.0 means that the system is running at the - highest safe temparature. On devices that have multiple - thermometers, this value should reflect the global - internal temperature of the device. + This attribute indicates the current thermal status, + as a number between 0.0 and 1.0 representing the + minimum and maximum operating values allowed by this + system. On devices that have multiple thermometer, + this implementation-defined value should reflect the + global temperature of the system. </dd> + + <dt>attribute sequence <Thermometer> thermometers</dt> + <dd>The list of all the system's internal themometers</dd> </dl> - </section> + <dl title="[NoInterfaceObject] interface Thermometer" class="idl"> + <dt>attribute float currentTemperature</dt> + <dd>This thermometer's current temperature, on the Celsius scale (°C)</dd> + </dl> + </section> + <section> - <h5>Cooling Fan</h5> + <h5>Cooling Devices</h5> + <p>The property and interfaces defined here expose information about the system's devices that act as cooling mechanisms for internal components generating heat (e.g. CPU)</p> <ul> - <li>URI: <code>http://www.w3.org/2009/dap/sysinfo/internal#fanThrottle</code></li> - <li>Short Name: <code>internal:fanThrottle</code></li> + <li>URI: <code>http://www.w3.org/2009/dap/SysInfo/Thermal/Cooling</code></li> + <li>Short Name: <code>thermal:cooling</code></li> <li>Corresponding DCO property: <a href="">@@</a></li> - <li>Value type: <a>FanThrottle</a></li> + <li>Value type: <a>CoolingSystem</a></li> </ul> - <dl title="[NoInterfaceObject] interface Fanthrottle" class="idl"> + <dl title="[NoInterfaceObject] interface CoolingSystem" class="idl"> <dt>attribute float value</dt> <dd> - This attribute indicates that the current throttling - speed of the cooling fans scaled to a 0.0 to 1.0 - floating point range. A value of 0.0 means that the fan - is not running, and a value of 1.0 means that the system - is running at its maximum speed. On devices that have - multiple cooling fans, this value should reflect the - average speed of the individual fans. + This attribute indicates the current state of the + cooling system scaled to a 0.0 to 1.0 floating point + range. A value of 0.0 means that the system is not + running, and a value of 1.0 means that the system + running at its maximum capacity. On devices that have + multiple cooling devices, this value should reflect the + global status of the individual devices + </dd> + <dt>attribute sequence <CoolingDevice> devices</dt> + <dd>The list of all the system's cooling devices (e.g. fans).</dd> + </dl> + + <dl title="[NoInterfaceObject] interface CoolingDevice" class="idl"> + <dt>const unsigned short UNKNOWN=0</dt> + <dd>A device of undetermined type.</dd> + <dt>const unsigned short FAN=1</dt> + <dd>A cooling fan</dd> + <dt>const unsigned short LIQUID=2</dt> + <dd>A liquid submersion cooling device</dd> + <dt>attribute unsigned short type</dt> + <dd>The kind of device. Takes a value among the constants defined in this interface</dd> + <dt>attribute float? speed</dt> + <dd> + If the type of this device is <a>FAN</a>, the fan's rotational speed (in <abbr title="Revolutions Per Minute">RPM</abbr>). <code>null</code> otherwise. </dd> </dl> </section> </section> </section> - <!--******************** /Internal **********************************--> + <!--******************** /Temperature **********************************--> <!--******************** Network **********************************-->
Received on Thursday, 10 December 2009 13:04:50 UTC