W3C home > Mailing lists > Public > public-dap-commits@w3.org > January 2010

2009/dap/system-info Overview.html,1.52,1.53

From: Max Froumentin via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 05 Jan 2010 10:30:22 +0000
To: public-dap-commits@w3.org
Message-Id: <E1NS6gA-0000BD-Mw@lionel-hutz.w3.org>
Update of /sources/public/2009/dap/system-info
In directory hutz:/tmp/cvs-serv669

Modified Files:
	Overview.html 
Log Message:
- moved signalStrength and ipAddress back into Connection. More logical, even though it makes monitoring signal across connections require 2 watch calls

- added an issue about whether/how to indicate active input/output devices

- editorial: section around Thermal

- updated figure from changes in the text


Index: Overview.html
===================================================================
RCS file: /sources/public/2009/dap/system-info/Overview.html,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- Overview.html	4 Jan 2010 16:40:04 -0000	1.52
+++ Overview.html	5 Jan 2010 10:30:20 -0000	1.53
@@ -277,7 +277,7 @@
             <dd>An object containing the various options for fetching the properties requested</dd>
           </dl>
           </dd>
-          <dt>PendingOp set(DOMString propertyId, Object newValue, optional SuccessCB? successCallback, optional ErrorCB? errorCallback)</dt>
+          <dt>PendingOp set(DOMString propertyId, DOMString instanceId, Object newValue, optional SuccessCB? successCallback, optional ErrorCB? errorCallback)</dt>
           <dd>
             The <a>set</a> function modifies the current value of of a
             system property. When called, the function immediately
@@ -426,6 +426,7 @@
         <section>
           <h4>ECMAScript Example</h4>
           <pre class="sh_javascript example">// Alert the user when the power level is below 20%
+
 navigator.system.watch("Power",success,null,{lowThreshold:0.2});
 
 function success(power) {
@@ -522,6 +523,7 @@
         <section>
           <h4>ECMAScript Example</h4>
           <pre class="sh_javascript example">//Monitor and display the CPU load, and show the frequency of each CPU
+
 navigator.device.system.watch("Processing",success);
 
 function success(cpu) {
@@ -589,6 +591,7 @@
         <section>
           <h4>ECMAScript Example</h4>
           <pre class="sh_javascript example">// Display the temperature of the first thermometer
+
 navigator.device.system.get("Thermal",success);
 
 function success(thermal) {
@@ -629,52 +632,54 @@
             <dd>The minimum temperature that this device can report, in degrees Celcius (°C)</dd>.
           </dl>
         </section>
-        
+      </section>
       <!--******************* /Thermal ****************************-->
 
       <!--******************* Cooling ****************************-->
-
       <section>
-        <h4>The <a>Cooling</a> property</h4>
-
+        <h2>Cooling</h2>
         <p>This property exposes the overall state of the system's active cooling devices (e.g. fans or pumps)</p>
-
+        
         <section>
           <h4>ECMAScript Example</h4>
           <pre class="sh_javascript example">// If the temperature gets near the top, set all cooling devices to 1500 RPM
+          
 navigator.system.watch("Thermal", 
                        function() {
                          alert("Cooling system at more than 90% capacity. Engaging Fans");
                          navigator.system.get("Cooling",function(cooling) {
                            for (var i in cooling.devices)
-                             navigator.system.set("CoolingDevice",{id: cooling.devices[i], speed: 1500},null,null);
+                             navigator.system.set("CoolingDevice",cooling.devices[i], {speed: 1500},null,null);
                          })
                        },
                        null,
                        {highThreshold:0.9});</pre>
         </section>
-
-        <dl title="[NoInterfaceObject] interface Cooling" class="idl">
-          <dt>readonly attribute float state</dt>
-          <dd>
-            This attribute indicates the current state of the cooling
-            system scaled to a 0 to 1 floating point range. A value of
-            0 means that the system is not running, and a value of 1
-            means that the system running at its maximum capacity.  On
-            devices that have multiple cooling devices, this value
-            should be an implementation-defined combination of the
-            state of each device.
-          </dd>
-          <dt>readonly attribute sequence &lt;CoolingDevice&gt; devices</dt>
-          <dd>The list of all the system's cooling devices.</dd>
-        </dl>
-      </section>
-
+        
+        <section>
+          <h4>The <a>Cooling</a> property</h4>
+          
+          <dl title="[NoInterfaceObject] interface Cooling" class="idl">
+            <dt>readonly attribute float state</dt>
+            <dd>
+              This attribute indicates the current state of the cooling
+              system scaled to a 0 to 1 floating point range. A value of
+              0 means that the system is not running, and a value of 1
+              means that the system running at its maximum capacity.  On
+              devices that have multiple cooling devices, this value
+              should be an implementation-defined combination of the
+              state of each device.
+            </dd>
+            <dt>readonly attribute sequence &lt;CoolingDevice&gt; devices</dt>
+            <dd>The list of all the system's cooling devices.</dd>
+          </dl>
+        </section>
+        
         <section>
           <h4>The <a>CoolingDevice</a> property</h4>
-
+          
           <p>This property provides information on a single cooling device in the system. It is <a>enumerable</a></p>
-
+          
           <dl title="[NoInterfaceObject] interface CoolingDevice : SystemDevice" class="idl">
             <dt>const unsigned short TYPE_UNKNOWN=0</dt>
             <dd>A device of undetermined type.</dd>
@@ -700,7 +705,7 @@
       </section>
 
       <!--******************** /Cooling **********************************-->
-
+      
       <!--******************** Network **********************************-->
 
       <section>
@@ -713,7 +718,8 @@
           <h4>ECMAScript Example</h4>
           <pre class="sh_javascript example">// Find if the system has a WiFi connection, if so monitor its signal
 // First, find the first WiFi interface on the system
-navigator.system.get("Connection",success,null);
+
+navigator.system.get("Network",success,null);
 
 function success(connection) {
   var nets = connection.availableConnections;
@@ -736,9 +742,6 @@
           <p>This property provides information on the system's connection to the network</p>
 
           <dl title='[NoInterfaceObject] interface Network' class='idl'>
-            <dt>readonly attribute float? currentSignalStrength</dt>
-            <dd>This connection's signal strength. This value MUST be <code>null</code> if this connection is wired.</dd>
-
             <dt>readonly attribute unsigned int currentDownloadBandwidth</dt>
             <dd>
               This current download bandwidth, in Kbits/s.
@@ -749,16 +752,10 @@
               This current upload bandwidth, in Kbits/s.
             </dd>
 
-            <dt>readonly attribute DOMString ipAddress</dt>
-            <dd>
-              The IP Address assigned to the device by the network bearer. An implementation 
-              MUST support both IPv4 and IPv6.        
-            </dd>
-
             <dt>readonly attribute Connection activeConnection</dt>
             <dd>The current active connection among the ones reported by the <a>availableConnections</a> attribute.</dd>
 
-            <dt>readonly attribute Connection availableConnections[]</dt>
+            <dt>readonly attribute Connection[] availableConnections</dt>
             <dd>A list of all the connections available to this system.</dd>
           </dl>
         </section>
@@ -840,6 +837,15 @@
             <dt>readonly attribute unsigned int maxUploadBandwidth</dt>
             <dd>This property represents the max upload bandwidth offered by a network bearer measured in Kbits/s.</dd>
 
+            <dt>readonly attribute float? currentSignalStrength</dt>
+            <dd>This connection's signal strength. This value MUST be <code>null</code> if this connection is wired.</dd>
+
+            <dt>readonly attribute DOMString? ipAddress</dt>
+            <dd>
+              The IP Address assigned to the device by the network bearer. An implementation 
+              MUST support both IPv4 and IPv6.        
+            </dd>
+
             <dt>readonly attribute DOMString? ESSID</dt>
             <dd>The Extended Service Set Identifier (ESSID) if the type attribute is TYPE_IEE802.11, <code>null</code> otherwise.</dd>
 
@@ -870,6 +876,7 @@
         <section>
           <h4>ECMAScript Example</h4>
           <pre class="sh_javascript example">// Adjust the screen's brightness if the ambient brightness is above a certain level
+
 navigator.device.system.watch("AmbientLight",success, {maxThreshold: 0.9});
 
 function success() {
@@ -1174,6 +1181,8 @@
         <section>
           <h2>Output Devices</h2>
           <p>This section gathers system properties related to this device's output devices: screens, sound systems, etc.</p>
+
+          <p class="issue">Do we need information about active devices, e.g. in order to be able to see which screen is currently being in use, or to control which set of speakers should be activated? If so how do we specify it? Through an "active" flag on each device (hard to watch), or through a pointer (e.g. currentDisplay in OutputDevices) which would mean only one device is active at a time, which might not always be correct in cases like several active keyboards</p>
           
           <section>
             <h4>The <a>OutputDevices</a> Property</h4>
Received on Tuesday, 5 January 2010 10:30:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 5 January 2010 10:30:24 GMT