Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: nrf51-sdk
Dependents: microbit-dal microbit-ble-open microbit-dal-eddystone microbit-dal-ble-accelerometer-example ... more
Diff: nRF51GattServer.cpp
- Revision:
- 20:b4f64efaaa2c
- Parent:
- 14:5ca08f962e4f
- Child:
- 21:84599842b5fb
--- a/nRF51GattServer.cpp	Thu Jun 05 08:53:18 2014 +0100
+++ b/nRF51GattServer.cpp	Thu Jun 05 11:38:33 2014 +0100
@@ -46,21 +46,21 @@
 
     /* Add the service to the nRF51 */
     ble_uuid_t nordicUUID;
-    nordicUUID = custom_convert_to_nordic_uuid(service.primaryServiceID);
+    nordicUUID = custom_convert_to_nordic_uuid(service.getUUID());
     ASSERT( ERROR_NONE ==
             sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY,
                                      &nordicUUID,
-                                     &service.handle),
+                                     service.getHandlePtr()),
             BLE_ERROR_PARAM_OUT_OF_RANGE );
 
     /* Add characteristics to the service */
-    for (uint8_t i = 0; i < service.characteristicCount; i++) {
-        GattCharacteristic *p_char = service.characteristics[i];
+    for (uint8_t i = 0; i < service.getCharacteristicCount(); i++) {
+        GattCharacteristic *p_char = service.getCharacteristic(i);
 
         nordicUUID = custom_convert_to_nordic_uuid(p_char->getUUID());
 
         ASSERT ( ERROR_NONE ==
-                 custom_add_in_characteristic(service.handle,
+                 custom_add_in_characteristic(service.getHandle(),
                                               &nordicUUID,
                                               p_char->getProperties(),
                                               NULL,