Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
Diff: bleservice.h
- Revision:
- 0:ace2e8d3ce79
diff -r 000000000000 -r ace2e8d3ce79 bleservice.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bleservice.h Fri Nov 29 14:42:22 2013 +0000
@@ -0,0 +1,36 @@
+#ifndef __BLE_SERVICE_H__
+#define __BLE_SERVICE_H__
+
+#include "blecommon.h"
+#include "uuid.h"
+#include "blecharacteristic.h"
+
+#define BLE_SERVICE_MAX_CHARACTERISTICS (5)
+
+class BLEService
+{
+private:
+
+public:
+ typedef struct
+ {
+ uint16_t id;
+ uint16_t lenMin;
+ uint16_t lenMax;
+ uint8_t properties;
+ uint8_t reserved;
+ } serialisedChar_t;
+
+ BLEService(uint8_t[16]); /* 128-bit Base UUID */
+ BLEService(uint16_t); /* 16-bit BLE UUID */
+ virtual ~BLEService(void);
+
+ UUID primaryServiceID;
+ uint8_t characteristicCount;
+ serialisedChar_t characteristics[BLE_SERVICE_MAX_CHARACTERISTICS];
+ uint8_t index;
+
+ ble_error_t addCharacteristic(BLECharacteristic &);
+};
+
+#endif
