Lancaster University's fork of the mbed BLE API. Lives on github, https://github.com/lancaster-university/BLE_API

Dependents:   microbit-dal microbit-dal microbit-ble-open microbit-dal ... more

Fork of BLE_API by Bluetooth Low Energy

Files at this revision

API Documentation at this revision

Comitter:
LancasterUniversity
Date:
Wed Apr 06 18:40:32 2016 +0100
Parent:
1135:0f5db03e0325
Child:
1137:290d499dd0e8
Commit message:
Synchronized with git rev 7c1aa005
Author: Joe Finney
microbit: Added support for explicit notification

Introduce abality to explicitly perform a notify/indicate opertion on a characteristic.
This brings benefits of a reduce RAM footprint for storing GattCharacterisitics.

n.b. temporary measure until ARM mbed integrate more generic optimisations.

Changed in this revision

ble/GattServer.h Show annotated file Show diff for this revision Revisions of this file
--- a/ble/GattServer.h	Wed Apr 06 18:40:31 2016 +0100
+++ b/ble/GattServer.h	Wed Apr 06 18:40:32 2016 +0100
@@ -185,6 +185,27 @@
     }
 
     /**
+     * Perform an explicit BLE notification of a given attribute.
+     *
+     * @param[in] attributeHandle
+     *              Handle for the value attribute of the Characteristic.
+     * @param[in] value
+     *              A pointer to a buffer holding the new value
+     * @param[in] size
+     *              Size of the new value (in bytes).
+     *
+     * @return BLE_ERROR_NONE if we have successfully set the value of the attribute.
+     */
+    virtual ble_error_t notify(GattAttribute::Handle_t attributeHandle, const uint8_t *value, uint16_t size)
+    {
+        (void)attributeHandle;
+        (void)value;
+        (void)size;
+
+        return BLE_ERROR_NOT_IMPLEMENTED; /* Requesting action from porter(s): override this API if this capability is supported. */
+    }
+
+    /**
      * Determine the updates-enabled status (notification or indication) for the current connection from a characteristic's CCCD.
      *
      * @param       characteristic