テスト用

Fork of nRF51822 by Nordic Semiconductor

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,