jgh

Dependents:   Migration

Fork of BLE_API by Bluetooth Low Energy

Revision:
493:23cc7ad1b99b
Parent:
492:7e0bd56f4957
Child:
494:2e4af47b00a8
--- a/public/DiscoveredCharacteristic.h	Fri Jun 19 15:52:02 2015 +0100
+++ b/public/DiscoveredCharacteristic.h	Fri Jun 19 15:52:02 2015 +0100
@@ -19,6 +19,7 @@
 
 #include "UUID.h"
 #include "GattAttribute.h"
+#include "GattClient.h"
 
 /**
  * Structure for holding information about the service and the characteristics
@@ -74,8 +75,7 @@
             return BLE_ERROR_OPERATION_NOT_PERMITTED;
         }
 
-        return BLE_ERROR_NONE;
-        // return (ble.getGattClient())->read(connHandle, valueHandle, offset);
+        return gattc->read(connHandle, valueHandle, offset);
     }
 
     /**
@@ -132,7 +132,8 @@
     }
 
 public:
-    DiscoveredCharacteristic() : uuid(UUID::ShortUUIDBytes_t(0)),
+    DiscoveredCharacteristic() : gattc(NULL),
+                                 uuid(UUID::ShortUUIDBytes_t(0)),
                                  props(),
                                  declHandle(GattAttribute::INVALID_HANDLE),
                                  valueHandle(GattAttribute::INVALID_HANDLE) {
@@ -140,6 +141,9 @@
     }
 
 protected:
+    GattClient             *gattc;
+
+protected:
     UUID                    uuid;
     Properties_t            props;
     GattAttribute::Handle_t declHandle;