From: Michal Pawluk Date: Mon, 21 Dec 2015 21:37:35 +0000 (+0100) Subject: [SAMPLE APP][Bluetooth LE Service] References section added X-Git-Tag: tizen_3.0/TD_SYNC/20161201~210^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e9abf58530caf0bea752587a69136b68b9e0d8ac;p=sdk%2Fonline-doc.git [SAMPLE APP][Bluetooth LE Service] References section added Change-Id: I1968fa1ec8643a721b870d86003861b73cb9311e Signed-off-by: Michal Pawluk Signed-off-by: Agnieszka Janowicz --- diff --git a/org.tizen.sampledescriptions/html/wearable_n/bluetooth_le_service_sd_wn.htm b/org.tizen.sampledescriptions/html/wearable_n/bluetooth_le_service_sd_wn.htm index e1f3c07..7792544 100644 --- a/org.tizen.sampledescriptions/html/wearable_n/bluetooth_le_service_sd_wn.htm +++ b/org.tizen.sampledescriptions/html/wearable_n/bluetooth_le_service_sd_wn.htm @@ -361,6 +361,92 @@ See the References section for details of all undescribed fun

References

+

+For developer's convenience, the controller module contains a set of functions wrapping +Bluetooth LE Adapter +(bt_common.c source file) and Sensor API +(sensor_listener.c source file). +These functions are not listed in this document due to their simplicity. +

+ +

+The __pack_heart_rate_measurement_data() and +__pack_body_sensor_location_data() functions are not listed here as they simply encode the provided values according to +adopted Bluetooth SIG standards. +

+ +
+void bt_advertiser_delete(bt_advertiser_h *adv_h)
+{
+   /* Stops advertising and responding to scan requests. *.
+   bt_common_stop_advertising(*adv_h);
+   __delete_advertizer(adv_h);
+}
+
+ +
+static void __delete_advertizer(bt_advertiser_h *adv_h)
+{
+   /* Deletes the advertiser's handle. */
+   bt_common_delete_advertizer(*adv_h);
+   /* Variables clearing. */
+   *adv_h = NULL;
+   __advertizer_appearance = 0;
+}
+
+ +
+bool __set_advertizing_properties(bt_advertiser_h adv_h)
+{
+   struct _adv_properties properties = {0,};
+
+   /* Advertising message configuration. */
+   properties.pkt_type = BT_ADAPTER_LE_PACKET_ADVERTISING;
+   properties.name = true;
+   properties.tx_power = false;
+   properties.appearance = 0;
+   properties.manufacturer_id = MANUFACTURER_ID_SAMSUNG;
+   properties.manufacturer_data.id = MANUFACTURER_ID_SAMSUNG;
+
+   /* The configuration is applied to the advertiser. */
+   return __set_properties(adv_h, properties);
+}
+
+ +
+bool __set_scan_response_properties(bt_advertiser_h adv_h, int appearance)
+{
+   struct _adv_properties properties = {0,};
+
+   /* Scan response message configuration. */
+   properties.pkt_type = BT_ADAPTER_LE_PACKET_SCAN_RESPONSE;
+   properties.name = true;
+   properties.tx_power = false;
+   properties.appearance = appearance;
+   properties.manufacturer_id = MANUFACTURER_ID_SAMSUNG;
+   properties.manufacturer_data.id = MANUFACTURER_ID_SAMSUNG;
+
+   /* The configuration is applied to the advertiser. */
+   return __set_properties(adv_h, properties);
+}
+
+ +
+const char *heart_rate_measurement_model_get_uuid(void)
+{
+   /* HRM_UUID is defined as string constant: "2A37". */
+   return HRM_UUID;
+}
+
+ +
+const char *body_sensor_location_model_get_uuid(void)
+{
+   /* BSL_UUID is defined as string constant: "2A38". */
+   return BSL_UUID;
+}
+
+ @@ -383,4 +469,4 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga - \ No newline at end of file +