W3C home > Mailing lists > Public > public-dap-commits@w3.org > October 2011

2009/dap/system-info Sensors.html,1.3,1.4

From: Dzung Tran via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 06 Oct 2011 03:23:51 +0000
To: public-dap-commits@w3.org
Message-Id: <E1RBeYp-0005Ib-J6@lionel-hutz.w3.org>
Update of /sources/public/2009/dap/system-info
In directory hutz:/tmp/cvs-serv20353/system-info

Modified Files:
	Sensors.html 
Log Message:
Added SensorManager for discovery of sensors
Added Sensor object for sensor's meta-data
Added timestamp attribute
Added accuracy attribute

Index: Sensors.html
===================================================================
RCS file: /sources/public/2009/dap/system-info/Sensors.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Sensors.html	28 Sep 2011 14:08:02 -0000	1.3
+++ Sensors.html	6 Oct 2011 03:23:49 -0000	1.4
@@ -82,8 +82,61 @@
 	<p>To be defined</p>
 </section>
 
+<section>
+		<h2>SensorManager</h3>
+		The SensorManager object is an event target that MUST be used to request a list of sensors that are available on the 
+		hosting device. The sensor information is acquired by calling platform native sensor interfaces, creating a list of 
+		Sensor objects, and populating that object with appropriate data accordingly.
+		<dl title='interface SensorManager : EventTarget' class='idl'>
+				<dt>Sensor[] listSensors(in optional DOMString type)</dt>
+				<dd>
+					The <code>listSensors()</code> function optionally takes one argument as the sensor <code>type</code>. 
+					When called, the user agent calls platform native sensor interfaces and fill a list of <code>Sensor</code> 
+					objects that contain the sensors information. If the argument <code>type</code> is set, only sensors of 
+					the specified <code>type</code> are returned.
+				</dd>
+				
+				<dt>attribute Function? onsensoravailable</dt>
+				<dd>
+				Allows to set an event handler that will be invoked when new sensors are available
+				</dd>
+		</dl>	
 </section>
-	<section>
+
+<section>
+	<h2>Sensor</h2>
+		The Sensor object allows an implementation to provide sensor information of the hosting device. The sensor information is acquired by
+		calling platform sensor interfaces.  
+		<dl title='interface Sensor : Object' class='idl'>
+			<dt>readonly attribute float resolution</dt>
+			<dd>
+				Specifies the resolution of the sensor in the sensor's unit
+			</dd>
+			<dt>readonly attribute int delay</dt>
+			<dd>
+	 			Specifies the minimum delay allowed between two events in microsecond or zero if this sensor 
+	 			only returns a value when the data it's measuring changes
+			</dd>
+			<dt>readonly attribute int range</dt>
+			<dd>
+	 			Specifies the maximum range of the sensor in the sensor's unit
+			</dd>
+			<dt>readonly attribute DOMString name</dt>
+			<dd>
+				Specifies the sensor name for this Sensor object
+			</dd>
+			<dt>readonly attribute DOMString type</dt>
+			<dd>
+				Specifies the sensor type for this Sensor object
+			</dd>
+			<dt>readonly attribute float power</dt>
+			<dd>
+				Specifies the power in mA used by this sensor while in use 
+			</dd>
+		</dl>
+</section>
+		
+<section>
 		<h2>SensorConnection Interface</h2>
 		The SensorConnection object is an event target that MUST be used to request a connection to a sensor of a 
 		specified type on the hosting device. The sensor connection is acquired by calling platform native sensor interfaces.
@@ -176,7 +229,7 @@
 			</dd>
 	</dl>
 
-	</section>
+</section>
 
 <section>
 		<h2>SensorWatchOptions Interface</h2>
@@ -193,13 +246,27 @@
 		</dl>
 </section>	
 
-	<section>
+<section>
 		<h2>SensorDataEvent Interface</h2>
  		<dl title='interface SensorDataEvent : Event' class='idl'>
 				<dt>readonly attribute any data</dt>
 				<dd>This attribute represents the raw data provided by the sensor. The specific type depends on the <a>type</a> of the sensor.
 					See <a href="datatypes"></a> for implementation requirements for this attribute depending on the type of sensor. 
 				</dd>
+       			<dt>readonly attribute int accuracy</dt>
+       			<dd>
+              		<ul>
+					<li>SENSOR_STATUS_ACCURACY_HIGH - This sensor is reporting data with maximum accuracy</li>
+             		<li>SENSOR_STATUS_ACCURACY_MEDIUM - This sensor is reporting data with average accuracy, calibration with the environment mayimprove readings</li>
+              		<li>SENSOR_STATUS_ACCURACY_LOW - This sensor is reporting data with low level of accuracy, calibration with the environment is needed</li>
+              		<li>SENSOR_STATUS_ACCURACY_UNRELIABLE - This sensor is reporting data that can't be trusted, calibration is needed or the environmentdoesn't allow readings</li>
+              		</ul>
+       			</dd>
+       			<dt>readonly attribute double timestamp</dt>
+       			<dd>
+				The time in nanosecond at which the sensor data was read. This value is relative to the timestamp of the first sample that was acquired for 
+				this sensor.
+       			</dd>
 				<dt>readonly attribute DOMString reason</dt>
 				<dd>It is a string that denotes the reason for this data. The only admissible values for this attribute are:
 					<ul>
@@ -218,7 +285,7 @@
                 </dd>
 		</dl>
 
-	</section>
+</section>
 
 <section id="datatypes">
 	<h2>Sensor Data Implementation Requirements</h2>
Received on Thursday, 6 October 2011 03:23:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 6 October 2011 03:23:54 GMT