added debugging

Fork of BLE_nRF8001 by RedBearLab

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers BLECentral.h Source File

BLECentral.h

00001 #ifndef _BLE_CENTRAL_H_
00002 #define _BLE_CENTRAL_H_
00003 
00004 class BLEPeripheral;
00005 
00006 class BLECentral
00007 {
00008   friend class BLEPeripheral;
00009 
00010   public:
00011     operator bool() const;
00012     bool operator==(const BLECentral& rhs) const;
00013     bool operator!=(const BLECentral& rhs) const;
00014 
00015     bool connected();
00016     const char* address() const;
00017     void poll();
00018 
00019     void disconnect();
00020 
00021   protected:
00022     BLECentral(BLEPeripheral* peripheral);
00023     void setAddress(const unsigned char* address);
00024     void clearAddress();
00025 
00026   private:
00027     BLEPeripheral* _peripheral;
00028     unsigned char  _address[6];
00029 };
00030 
00031 #endif