added debugging

Fork of BLE_nRF8001 by RedBearLab

BLE_nRF8001/BLECentral.h

Committer:
jn80842
Date:
2014-11-10
Revision:
2:7805a5595aab
Parent:
0:075ea2812998

File content as of revision 2:7805a5595aab:

#ifndef _BLE_CENTRAL_H_
#define _BLE_CENTRAL_H_

class BLEPeripheral;

class BLECentral
{
  friend class BLEPeripheral;

  public:
    operator bool() const;
    bool operator==(const BLECentral& rhs) const;
    bool operator!=(const BLECentral& rhs) const;

    bool connected();
    const char* address() const;
    void poll();

    void disconnect();

  protected:
    BLECentral(BLEPeripheral* peripheral);
    void setAddress(const unsigned char* address);
    void clearAddress();

  private:
    BLEPeripheral* _peripheral;
    unsigned char  _address[6];
};

#endif