Nordic stack and drivers for the mbed BLE API Modified for HRM 1017 and correct DISCONNECT event processing

Fork of nRF51822 by Nordic Semiconductor

Files at this revision

API Documentation at this revision

Comitter:
carlescufi
Date:
Fri Aug 29 10:41:37 2014 +0200
Parent:
54:e2294c844c83
Child:
57:2aa01a5008ac
Commit message:
Move value attribute as member of the char class

Changed in this revision

nRF51GattServer.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/nRF51GattServer.cpp	Thu Aug 28 15:50:59 2014 +0200
+++ b/nRF51GattServer.cpp	Fri Aug 29 10:41:37 2014 +0200
@@ -60,15 +60,15 @@
     for (uint8_t i = 0; i < service.getCharacteristicCount(); i++) {
         GattCharacteristic *p_char = service.getCharacteristic(i);
 
-        nordicUUID = custom_convert_to_nordic_uuid(p_char->getUUID());
+        nordicUUID = custom_convert_to_nordic_uuid(p_char->getValueAttribute().getUUID());
 
         ASSERT ( ERROR_NONE ==
                  custom_add_in_characteristic(BLE_GATT_HANDLE_INVALID,
                                               &nordicUUID,
                                               p_char->getProperties(),
-                                              p_char->getValuePtr(),
-                                              p_char->getInitialLength(),
-                                              p_char->getMaxLength(),
+                                              p_char->getValueAttribute().getValuePtr(),
+                                              p_char->getValueAttribute().getInitialLength(),
+                                              p_char->getValueAttribute().getMaxLength(),
                                               &nrfCharacteristicHandles[characteristicCount]),
                  BLE_ERROR_PARAM_OUT_OF_RANGE );
 
@@ -76,7 +76,7 @@
         uint16_t charHandle = characteristicCount;
         p_characteristics[characteristicCount++] = p_char;
 
-        p_char->setHandle(charHandle);
+        p_char->getValueAttribute().setHandle(charHandle);
   
         /* Add optional descriptors if any */
         /* ToDo: Make sure we don't overflow the array */