added debugging
Fork of BLE_nRF8001 by
BLE_nRF8001/BLECentral.h@2:7805a5595aab, 2014-11-10 (annotated)
- Committer:
- jn80842
- Date:
- Mon Nov 10 01:24:23 2014 +0000
- Revision:
- 2:7805a5595aab
- Parent:
- 0:075ea2812998
just added debugging
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
RedBearLab | 0:075ea2812998 | 1 | #ifndef _BLE_CENTRAL_H_ |
RedBearLab | 0:075ea2812998 | 2 | #define _BLE_CENTRAL_H_ |
RedBearLab | 0:075ea2812998 | 3 | |
RedBearLab | 0:075ea2812998 | 4 | class BLEPeripheral; |
RedBearLab | 0:075ea2812998 | 5 | |
RedBearLab | 0:075ea2812998 | 6 | class BLECentral |
RedBearLab | 0:075ea2812998 | 7 | { |
RedBearLab | 0:075ea2812998 | 8 | friend class BLEPeripheral; |
RedBearLab | 0:075ea2812998 | 9 | |
RedBearLab | 0:075ea2812998 | 10 | public: |
RedBearLab | 0:075ea2812998 | 11 | operator bool() const; |
RedBearLab | 0:075ea2812998 | 12 | bool operator==(const BLECentral& rhs) const; |
RedBearLab | 0:075ea2812998 | 13 | bool operator!=(const BLECentral& rhs) const; |
RedBearLab | 0:075ea2812998 | 14 | |
RedBearLab | 0:075ea2812998 | 15 | bool connected(); |
RedBearLab | 0:075ea2812998 | 16 | const char* address() const; |
RedBearLab | 0:075ea2812998 | 17 | void poll(); |
RedBearLab | 0:075ea2812998 | 18 | |
RedBearLab | 0:075ea2812998 | 19 | void disconnect(); |
RedBearLab | 0:075ea2812998 | 20 | |
RedBearLab | 0:075ea2812998 | 21 | protected: |
RedBearLab | 0:075ea2812998 | 22 | BLECentral(BLEPeripheral* peripheral); |
RedBearLab | 0:075ea2812998 | 23 | void setAddress(const unsigned char* address); |
RedBearLab | 0:075ea2812998 | 24 | void clearAddress(); |
RedBearLab | 0:075ea2812998 | 25 | |
RedBearLab | 0:075ea2812998 | 26 | private: |
RedBearLab | 0:075ea2812998 | 27 | BLEPeripheral* _peripheral; |
RedBearLab | 0:075ea2812998 | 28 | unsigned char _address[6]; |
RedBearLab | 0:075ea2812998 | 29 | }; |
RedBearLab | 0:075ea2812998 | 30 | |
RedBearLab | 0:075ea2812998 | 31 | #endif |