High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

GattService.h

Committer:
ktownsend
Date:
2014-01-07
Revision:
23:f19c60478e1b
Parent:
11:200931be5617
Child:
27:4a83843f04b0

File content as of revision 23:f19c60478e1b:

#ifndef __GATT_SERVICE_H__
#define __GATT_SERVICE_H__

#include "blecommon.h"
#include "uuid.h"
#include "GattCharacteristic.h"

#define BLE_SERVICE_MAX_CHARACTERISTICS (5)

class GattService
{
private:

public:
    GattService(uint8_t[16]);  /* 128-bit Base UUID */
    GattService(uint16_t);     /* 16-bit BLE UUID */
    virtual ~GattService(void);

    UUID                primaryServiceID;
    uint8_t             characteristicCount;
    GattCharacteristic  characteristics[BLE_SERVICE_MAX_CHARACTERISTICS];
    uint8_t             handle;

    ble_error_t         addCharacteristic(GattCharacteristic &);
};

#endif