GAP based TOF Demo

Dependencies:   BLE_API X_NUCLEO_6180XA1 mbed

Fork of BLE_HeartRate_IDB0XA1 by ST

Revision:
26:fd06c8b57d16
Parent:
25:231d3f382583
Child:
27:32267cee7cb8
--- a/bricks/service.h	Fri Jan 06 21:36:47 2017 +0000
+++ b/bricks/service.h	Sat Jan 07 15:38:15 2017 +0000
@@ -1,5 +1,7 @@
 // service.h - declaring services and definitions
 //
+// Synopsis
+//
 // Example 1: A protocol might be declared as a class as follows
 //
 //    Collection col;                            // collection used during setup
@@ -55,13 +57,13 @@
 
    class Service
    {
-      private:                              // private properties
+      public:                               // public properties
          Collection collection;             // collection of characteristics
-         UUID uuid;                         // UUID of service
+         uint16_t uuid;                     // UUID of service
          const char *name;                  // name of service
          
       public:                               // public methods
-         Service(UUID _uuid, const char* _name = NULL) : collection()
+         Service(uint16_t _uuid, const char* _name = NULL) : collection()
          {
              uuid = _uuid;
              name = _name;
@@ -71,22 +73,6 @@
          {
              collection.add(pChr);
          }
-         
-         void enroll(Blob &blue)            // enroll the service
-         {
-            static const uint16_t list[] = {0xFFFF};
-      
-               // Custom UUID, FFFF is reserved for development
-               // Used for UUID's broadcast in advertising packet 
-
-            GattService service(uuid, collection.plist, collection.count);
-
-            blue.pble->gap().accumulateAdvertisingPayload(
-               GapAdvertisingData::COMPLETE_LIST_16BIT_SERVICE_IDS,
-                  (uint8_t *)list, sizeof(list));
-
-            blue.pble->addService(service);
-         }
    };
 
 #endif // _SERVICE_H_
\ No newline at end of file