Devchannel Team / X_NUCLEO_IDB0XA1

Dependents:   Hello_BLE F446RE-BLE

Fork of X_NUCLEO_IDB0XA1 by ST

Files at this revision

API Documentation at this revision

Comitter:
mridup
Date:
Wed Apr 01 09:48:50 2015 +0000
Parent:
65:f9958b8f2548
Child:
67:23f9772ef7bf
Commit message:
GattServer protected member function issue resolution.

Changed in this revision

BlueNRGGattServer.cpp Show annotated file Show diff for this revision Revisions of this file
BlueNRGGattServer.h Show annotated file Show diff for this revision Revisions of this file
platform/src/btle.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/BlueNRGGattServer.cpp	Wed Apr 01 09:02:51 2015 +0000
+++ b/BlueNRGGattServer.cpp	Wed Apr 01 09:48:50 2015 +0000
@@ -352,4 +352,21 @@
     return p_char;
 }
 
+void BlueNRGGattServer::HCIDataWrittenEvent(const GattCharacteristicWriteCBParams *params) {
+    this->handleDataWrittenEvent(params);
+}
+    
+void BlueNRGGattServer::HCIDataReadEvent(const GattCharacteristicReadCBParams *params) {
+    this->handleDataReadEvent(params);
+}
 
+void BlueNRGGattServer::HCIEvent(GattServerEvents::gattEvent_e type, uint16_t charHandle) {
+    this->handleEvent(type, charHandle);
+}
+
+void BlueNRGGattServer::HCIDataSentEvent(unsigned count) {
+    this->handleDataSentEvent(count);
+}
+
+    
+
--- a/BlueNRGGattServer.h	Wed Apr 01 09:02:51 2015 +0000
+++ b/BlueNRGGattServer.h	Wed Apr 01 09:48:50 2015 +0000
@@ -66,6 +66,10 @@
     //void hwCallback(void *pckt);
     ble_error_t Read_Request_CB(tHalUint16 handle);
     GattCharacteristic* getCharacteristicFromHandle(tHalUint16 charHandle);
+    void HCIDataWrittenEvent(const GattCharacteristicWriteCBParams *params);
+    void HCIDataReadEvent(const GattCharacteristicReadCBParams *params);
+    void HCIEvent(GattServerEvents::gattEvent_e type, uint16_t charHandle);
+    void HCIDataSentEvent(unsigned count);
     
 private:
     static const int MAX_SERVICE_COUNT = 10;
--- a/platform/src/btle.cpp	Wed Apr 01 09:02:51 2015 +0000
+++ b/platform/src/btle.cpp	Wed Apr 01 09:48:50 2015 +0000
@@ -281,11 +281,11 @@
                                 //Now Check if data written in Enable or Disable
                                 if((uint16_t)evt->att_data[0]==1) {
                                     //DEBUG("Notify ENABLED\n\r"); 
-                                    BlueNRGGattServer::getInstance().handleEvent(GattServerEvents::GATT_EVENT_UPDATES_ENABLED, evt->attr_handle);
+                                    BlueNRGGattServer::getInstance().HCIEvent(GattServerEvents::GATT_EVENT_UPDATES_ENABLED, evt->attr_handle);
                                 } 
                                 else {
                                     //DEBUG("Notify DISABLED\n\r"); 
-                                    BlueNRGGattServer::getInstance().handleEvent(GattServerEvents::GATT_EVENT_UPDATES_DISABLED, evt->attr_handle);
+                                    BlueNRGGattServer::getInstance().HCIEvent(GattServerEvents::GATT_EVENT_UPDATES_DISABLED, evt->attr_handle);
                                 }
                             }
                             
@@ -302,7 +302,7 @@
                                 #if BLUENRG_MS
                                 writeParams.offset=evt->offset;//Not used in BlueNRG?
                                 #endif
-                                BlueNRGGattServer::getInstance().handleDataWrittenEvent(&writeParams);
+                                BlueNRGGattServer::getInstance().HCIDataWrittenEvent(&writeParams);
 
                                 //BlueNRGGattServer::getInstance().handleEvent(GattServerEvents::GATT_EVENT_DATA_WRITTEN, evt->attr_handle);
                                 //Write the actual Data to the Attr Handle? (uint8_1[])evt->att_data contains the data