High level Bluetooth Low Energy API and radio abstraction layer
Fork of BLE_API by
Revision 646:1c59b84fd7e6, committed 2015-06-19
- Comitter:
- rgrover1
- Date:
- Fri Jun 19 15:52:58 2015 +0100
- Parent:
- 645:21ae925832f7
- Child:
- 647:8a486ffd355d
- Commit message:
- Synchronized with git rev 1a9e68e1
Author: Rohit Grover
ReadCallback_t moves into GattClient.
Changed in this revision
--- a/common/DiscoveredCharacteristic.cpp Fri Jun 19 15:52:58 2015 +0100 +++ b/common/DiscoveredCharacteristic.cpp Fri Jun 19 15:52:58 2015 +0100 @@ -17,7 +17,7 @@ #include "DiscoveredCharacteristic.h" #include "GattClient.h" -DiscoveredCharacteristic::ReadCallback_t DiscoveredCharacteristic::onDataReadCallback; +GattClient::ReadCallback_t DiscoveredCharacteristic::onDataReadCallback; ble_error_t DiscoveredCharacteristic::read(uint16_t offset) const
--- a/public/BLEDevice.h Fri Jun 19 15:52:58 2015 +0100 +++ b/public/BLEDevice.h Fri Jun 19 15:52:58 2015 +0100 @@ -20,6 +20,7 @@ #include "blecommon.h" #include "Gap.h" #include "GattServer.h" +#include "GattClient.h" #include "BLEDeviceInstanceBase.h" #include "GapAdvertisingData.h"
--- a/public/DiscoveredCharacteristic.h Fri Jun 19 15:52:58 2015 +0100 +++ b/public/DiscoveredCharacteristic.h Fri Jun 19 15:52:58 2015 +0100 @@ -20,8 +20,8 @@ #include "UUID.h" #include "Gap.h" #include "GattAttribute.h" +#include "GattClient.h" -class GattClient; /* forward declaration */ /** * Structure for holding information about the service and the characteristics @@ -52,14 +52,6 @@ operator unsigned() const; /* disallow implicit conversion into an integer */ }; - struct ReadResponse_t { - GattAttribute::Handle_t handle; /**< Attribute Handle. */ - uint16_t offset; /**< Offset of the attribute data. */ - uint16_t len; /**< Attribute data length. */ - const uint8_t *data; /**< Attribute data, variable length. */ - }; - typedef void (*ReadCallback_t)(const ReadResponse_t *params); - /** * Initiate (or continue) a read for the value attribute, optionally at a * given offset. If the Characteristic or Descriptor to be read is longer
--- a/public/GattClient.h Fri Jun 19 15:52:58 2015 +0100 +++ b/public/GattClient.h Fri Jun 19 15:52:58 2015 +0100 @@ -28,6 +28,14 @@ OP_WRITE_CMD }; + struct ReadResponse_t { + GattAttribute::Handle_t handle; /**< Attribute Handle. */ + uint16_t offset; /**< Offset of the attribute data. */ + uint16_t len; /**< Attribute data length. */ + const uint8_t *data; /**< Attribute data, variable length. */ + }; + typedef void (*ReadCallback_t)(const ReadResponse_t *params); + public: /** * Launch service discovery. Once launched, service discovery will remain
--- a/public/ServiceDiscovery.h Fri Jun 19 15:52:58 2015 +0100 +++ b/public/ServiceDiscovery.h Fri Jun 19 15:52:58 2015 +0100 @@ -20,8 +20,9 @@ #include "UUID.h" #include "Gap.h" #include "GattAttribute.h" -#include "DiscoveredService.h" -#include "DiscoveredCharacteristic.h" + +class DiscoveredService; +class DiscoveredCharacteristic; class ServiceDiscovery { public: