[BluetoothLE] add rssi attribute
authorLukasz Bardeli <l.bardeli@samsung.com>
Wed, 24 Aug 2016 10:23:58 +0000 (12:23 +0200)
committerLukasz Bardeli <l.bardeli@samsung.com>
Wed, 24 Aug 2016 10:23:58 +0000 (12:23 +0200)
Change-Id: I9655c347d4a507dee0091a368670a2fbcd6498b4
Signed-off-by: Lukasz Bardeli <l.bardeli@samsung.com>
org.tizen.web.apireference/html/device_api/mobile/tizen/bluetooth.html
org.tizen.web.apireference/html/device_api/wearable/tizen/bluetooth.html

index 8b8adc7..4e928fb 100644 (file)
@@ -3791,6 +3791,7 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
         readonly attribute <a href="#BluetoothLESolicitationUUID">BluetoothLESolicitationUUID</a>[]? solicitationuuids;
         readonly attribute <a href="#BluetoothLEServiceData">BluetoothLEServiceData</a>[]? serviceData;
         readonly attribute <a href="#BluetoothLEManufacturerData">BluetoothLEManufacturerData</a>? manufacturerData;
+        readonly attribute long rssi;
 
         void connect(optional <a href="tizen.html#SuccessCallback">SuccessCallback</a>? successCallback,
                      optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
@@ -3799,6 +3800,8 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
 
         <a href="#BluetoothGATTService">BluetoothGATTService</a> getService(<a href="#BluetoothUUID">BluetoothUUID</a> uuid) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
 
+        <a href="#BluetoothUUID">BluetoothUUID</a>[] getServiceAllUuids() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
         long addConnectStateChangeListener(<a href="#BluetoothLEConnectChangeCallback">BluetoothLEConnectChangeCallback</a> listener) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
 
         void removeConnectStateChangeListener(long watchID);
@@ -3991,6 +3994,36 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  </pre>
 </div>
 </li>
+<li class="attribute" id="BluetoothLEDevice::rssi">
+<span class="attrName"><span class="readonly">                readonly
+</span><span class="type">long </span><span class="name">rssi</span></span><div class="brief">
+ The received signal strength indicator in dBm (decibel-milliwatts) units.
+            </div>
+<div class="description">
+            <p>
+The signal strength depends on distance (between the device and the beacon) and broadcasting power value.
+            </p>
+           </div>
+<p><span class="version">
+            Since: </span>
+ 3.0
+            </p>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
+ adapter.startScan(
+     function onsuccess(device) {
+         console.log("Found device: " + device.name);
+         console.log("RSSI: " + device.rssi);
+     }
+ );
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> Found device: beacon
+ RSSI: -25
+ </pre>
+</div>
+</li>
 </ul>
 </div>
 <div class="methods">
index 5c51fe1..89072bb 100644 (file)
@@ -3837,6 +3837,7 @@ Instead, use <em>http://tizen.org/privilege/bluetooth</em>.
         readonly attribute <a href="#BluetoothLESolicitationUUID">BluetoothLESolicitationUUID</a>[]? solicitationuuids;
         readonly attribute <a href="#BluetoothLEServiceData">BluetoothLEServiceData</a>[]? serviceData;
         readonly attribute <a href="#BluetoothLEManufacturerData">BluetoothLEManufacturerData</a>? manufacturerData;
+        readonly attribute long rssi;
 
         void connect(optional <a href="tizen.html#SuccessCallback">SuccessCallback</a>? successCallback,
                      optional <a href="tizen.html#ErrorCallback">ErrorCallback</a>? errorCallback) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
@@ -4039,6 +4040,36 @@ A <em>BluetoothLEDevice</em> object can be retrieved by using one of the followi
  </pre>
 </div>
 </li>
+<li class="attribute" id="BluetoothLEDevice::rssi">
+<span class="attrName"><span class="readonly">                readonly
+</span><span class="type">long </span><span class="name">rssi</span></span><div class="brief">
+ The received signal strength indicator in dBm (decibel-milliwatts) units.
+            </div>
+<div class="description">
+            <p>
+The signal strength depends on distance (between the device and the beacon) and broadcasting power value.
+            </p>
+           </div>
+<p><span class="version">
+            Since: </span>
+ 3.0
+            </p>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var adapter = tizen.bluetooth.getLEAdapter();
+ adapter.startScan(
+     function onsuccess(device) {
+         console.log("Found device: " + device.name);
+         console.log("RSSI: " + device.rssi);
+     }
+ );
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> Found device: beacon
+ RSSI: -25
+ </pre>
+</div>
+</li>
 </ul>
 </div>
 <div class="methods">