[JIRA #937] sensor API doc update
authorAdam Szczerbiak <a.szczerbiak@samsung.com>
Tue, 26 Jan 2016 07:42:13 +0000 (08:42 +0100)
committerHyunJin Park <hj.na.park@samsung.com>
Tue, 2 Feb 2016 09:25:10 +0000 (18:25 +0900)
This commit updates the API documentation for Sensor module in both
mobile and wearable branches, so that they reflect widl spec file.

Change-Id: I7752ccb5277820edc8e03e65ebed44df3bdd5ce4
Signed-off-by: Adam Szczerbiak <a.szczerbiak@samsung.com>
org.tizen.web.apireference/html/device_api/mobile/tizen/sensor.html
org.tizen.web.apireference/html/device_api/wearable/tizen/sensor.html

index 81d18ec..942d751 100644 (file)
@@ -518,7 +518,7 @@ The supported sensor types are hardware-dependent. <br><br>To check if the given
 </dt>
 <dd>
 <div class="brief">
- Registers a change listener to be called when sensor data of the given type changes.
+Registers a change listener to retrieve sensor data periodically.
             </div>
 <div class="synopsis"><pre class="signature prettyprint">void setChangeListener(<a href="#SensorDataSuccessCallback">SensorDataSuccessCallback</a> successCallback, optional long? interval);
              </pre></div>
@@ -532,16 +532,20 @@ Note that the setChangeListener() method only registers the listener.
 The start() method must be called to turn on the sensor, or the sensor data will not change.
             </p>
            </div>
+<p><span class="remark">Remark: </span><em>interval</em> is supported since Tizen 2.3.2</p>
 <div class="parameters">
 <p><span class="param">Parameters:</span></p>
 <ul>
           <li class="param">
 <span class="name">successCallback</span>: 
- Callback method to be invoked when the sensor data changes
+ Callback method to be invoked periodically.
                 </li>
           <li class="param">
-            <span class="name">interval</span> <span class="optional">[optional]</span>:
- The period in milliseconds at which events are invoked. Valid values are integers in range &lt;10, 1000&gt; inclusively. The default value is 100.
+            <span class="name">interval</span>
+            <span class="optional"> [optional]</span><span class="optional"> [nullable]</span>:
+ The period in milliseconds at which sensor data will be sent to the application which calls this method.<br />
+ <em>interval</em> should be in range &lt;10, 1000&gt; inclusively. However, if it is null or zero, it will be set to the default value of 100 ms.<br />
+For the <a href="#SensorType">PROXIMITY</a> sensor type,<em> interval</em> will be ignored.
           </li>
         </ul>
 </div>
@@ -554,6 +558,9 @@ The start() method must be called to turn on the sensor, or the sensor data will
 <li class="list"><p>
  with error type UnknownError, if registering the listener fails because of an unknown error.
                 </p></li>
+<li class="list"><p>
+ with error type InvalidValuesError, if any of the input parameters contain an invalid value.
+                </p></li>
 </ul>
 </li></ul>
         </div>
index c0f8c60..068805c 100644 (file)
@@ -532,16 +532,20 @@ Note that the setChangeListener() method only registers the listener.
 The start() method must be called to turn on the sensor, or the sensor data will not change.
             </p>
            </div>
+<p><span class="remark">Remark: </span><em>interval</em> is supported since Tizen 2.3.2</p>
 <div class="parameters">
 <p><span class="param">Parameters:</span></p>
 <ul>
           <li class="param">
 <span class="name">successCallback</span>:
- Callback method to be invoked when the sensor data changes
+ Callback method to be invoked periodically.
           </li>
           <li class="param">
-<span class="name">interval</span> <span class="optional">[optional]</span>:
-The period in milliseconds at which events are invoked. Valid values are integers in range &lt;10, 1000&gt; inclusively. The default value is 100.
+<span class="name">interval</span>
+<span class="optional"> [optional]</span><span class="optional"> [nullable]</span>:
+The period in milliseconds at which sensor data will be sent to the application which calls this method.<br />
+ <em>interval</em> should be in range &lt;10, 1000&gt; inclusively. However, if it is null or zero, it will be set to the default value of 100 ms.<br />
+For the <a href="#SensorType">PROXIMITY</a> sensor type,<em> interval</em> will be ignored.
           </li>
         </ul>
 </div>
@@ -554,12 +558,14 @@ The period in milliseconds at which events are invoked. Valid values are integer
 <li class="list"><p>
  with error type UnknownError, if registering the listener fails because of an unknown error.
                 </p></li>
+<li class="list"><p>
+ with error type InvalidValuesError, if any of the input parameters contain an invalid value.
+                </p></li>
 </ul>
 </li></ul>
         </div>
-
-
-<div class="example"><span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint">
  var proximitySensor = tizen.sensorservice.getDefaultSensor("PROXIMITY");
 
  function onsuccessCB() {
@@ -594,7 +600,6 @@ The period in milliseconds at which events are invoked. Valid values are integer
  lightSensor.start(onSuccessCB);
  </pre>
 </div>
-
 </dd>
 <dt class="method" id="Sensor::unsetChangeListener">
 <a class="backward-compatibility-anchor" name="::Sensor::Sensor::unsetChangeListener"></a><code><b><span class="methodName">unsetChangeListener</span></b></code>