BLE Library with custom services for the tortuga bike

Dependents:   TORTUGA_BLE

Fork of BLE_API by aapje monkey

Committer:
ptuytsch
Date:
Fri Jul 15 12:49:23 2016 +0000
Revision:
1206:8afbec0520f5
Parent:
1205:86f0783a5420
Child:
1207:da7745688342
adding prototype working services for tortuga itself

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ptuytsch 1131:5cc818415e2b 1 #ifndef __BLE_BIKE_SERVICE_H__
ptuytsch 1131:5cc818415e2b 2 #define __BLE_BIKE_SERVICE_H__
ptuytsch 1204:c87f50212c84 3
ptuytsch 1204:c87f50212c84 4 #include "BikeData.h"
ptuytsch 1205:86f0783a5420 5 #include "ble/BLE.h"
ptuytsch 1131:5cc818415e2b 6 class BikeService {
ptuytsch 1131:5cc818415e2b 7 public:
ptuytsch 1204:c87f50212c84 8 /*
ptuytsch 1204:c87f50212c84 9 UUID LIST:
ptuytsch 1204:c87f50212c84 10 0x6969: SERVICE
ptuytsch 1204:c87f50212c84 11 0x696A: Trip Distance
ptuytsch 1204:c87f50212c84 12 0x696B: Trip Average
ptuytsch 1204:c87f50212c84 13 0x696C: Trip Time (in seconds)
ptuytsch 1204:c87f50212c84 14
ptuytsch 1204:c87f50212c84 15 0x696D: Overall Distance
ptuytsch 1204:c87f50212c84 16 0x696E: Overall Average
ptuytsch 1204:c87f50212c84 17 0x696F: Overall Time (in seconds)
ptuytsch 1204:c87f50212c84 18
ptuytsch 1204:c87f50212c84 19 0x6970: Since Battery Change Distance
ptuytsch 1204:c87f50212c84 20 0x6971: Since Battery Change Average
ptuytsch 1204:c87f50212c84 21 0x6972: Since Battery Change Time (in seconds)
ptuytsch 1204:c87f50212c84 22
ptuytsch 1204:c87f50212c84 23 0x6973: pulses in last second
ptuytsch 1204:c87f50212c84 24 0x6974: Speed
ptuytsch 1204:c87f50212c84 25 0x6975: Control
ptuytsch 1205:86f0783a5420 26 0x6976: Device Name
ptuytsch 1204:c87f50212c84 27 */
ptuytsch 1204:c87f50212c84 28
ptuytsch 1204:c87f50212c84 29
ptuytsch 1204:c87f50212c84 30 /*defining the UUID's for the service and characters*/
ptuytsch 1205:86f0783a5420 31 const static uint16_t BIKE_SERVICE_UUID = 0x6969;
ptuytsch 1202:a31d51d9fba8 32
ptuytsch 1205:86f0783a5420 33 const static uint16_t TRIP_DISTANCE_CHARACTERISTIC_UUID = 0x696A;
ptuytsch 1205:86f0783a5420 34 const static uint16_t TRIP_AVERAGE_CHARACTERISTIC_UUID = 0x696B;
ptuytsch 1205:86f0783a5420 35 const static uint16_t TRIP_TIME_CHARACTERISTIC_UUID = 0x696C;
ptuytsch 1204:c87f50212c84 36
ptuytsch 1205:86f0783a5420 37 const static uint16_t OVERALL_DISTANCE_CHARACTERISTIC_UUID = 0x696D;
ptuytsch 1205:86f0783a5420 38 const static uint16_t OVERALL_AVERAGE_CHARACTERISTIC_UUID = 0x696E;
ptuytsch 1205:86f0783a5420 39 const static uint16_t OVERALL_TIME_CHARACTERISTIC_UUID = 0x696F;
ptuytsch 1204:c87f50212c84 40
ptuytsch 1205:86f0783a5420 41 const static uint16_t BATCHANGE_DISTANCE_CHARACTERISTIC_UUID = 0x6970;
ptuytsch 1205:86f0783a5420 42 const static uint16_t BATCHANGE_AVERAGE_CHARACTERISTIC_UUID = 0x6971;
ptuytsch 1205:86f0783a5420 43 const static uint16_t BATCHANGE_TIME_CHARACTERISTIC_UUID = 0x6972;
ptuytsch 1204:c87f50212c84 44
ptuytsch 1205:86f0783a5420 45 const static uint16_t PULSE_CHARACTERISTIC_UUID = 0x6973;
ptuytsch 1205:86f0783a5420 46 const static uint16_t SPEED_CHARACTERISTIC_UUID = 0x6974;
ptuytsch 1205:86f0783a5420 47 const static uint16_t CONTROL_CHARACTERISTIC_UUID = 0x6975;
ptuytsch 1205:86f0783a5420 48 const static uint16_t DEVICE_NAME_CHARACTERISTIC_UUID = 0x6976;
ptuytsch 1202:a31d51d9fba8 49
ptuytsch 1202:a31d51d9fba8 50 //CONSTRUCTOR
ptuytsch 1204:c87f50212c84 51 BikeService(BLE &_ble, BikeData *bikeData) :
ptuytsch 1204:c87f50212c84 52 /*define standard/initial value*/
ptuytsch 1204:c87f50212c84 53 ble(_ble),
ptuytsch 1204:c87f50212c84 54 bd(bikeData),
ptuytsch 1204:c87f50212c84 55 tripDistanceChar(TRIP_DISTANCE_CHARACTERISTIC_UUID,&tripDistance, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY),
ptuytsch 1204:c87f50212c84 56 tripAverageChar(TRIP_AVERAGE_CHARACTERISTIC_UUID,&tripAverage, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY),
ptuytsch 1204:c87f50212c84 57 tripTimeChar(TRIP_TIME_CHARACTERISTIC_UUID,&tripTime, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY),
ptuytsch 1204:c87f50212c84 58
ptuytsch 1204:c87f50212c84 59 overallDistanceChar(OVERALL_DISTANCE_CHARACTERISTIC_UUID,&overallDistance, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY),
ptuytsch 1204:c87f50212c84 60 overallAverageChar(OVERALL_AVERAGE_CHARACTERISTIC_UUID,&overallAverage, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY),
ptuytsch 1204:c87f50212c84 61 overallTimeChar(OVERALL_TIME_CHARACTERISTIC_UUID,&overallTime, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY),
ptuytsch 1204:c87f50212c84 62
ptuytsch 1204:c87f50212c84 63 batChangeDistanceChar(BATCHANGE_DISTANCE_CHARACTERISTIC_UUID,&batChangeDistance, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY),
ptuytsch 1204:c87f50212c84 64 batChangeAverageChar(BATCHANGE_AVERAGE_CHARACTERISTIC_UUID,&batChangeAverage, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY),
ptuytsch 1204:c87f50212c84 65 batChangeTimeChar(BATCHANGE_TIME_CHARACTERISTIC_UUID,&batChangeTime, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY),
ptuytsch 1204:c87f50212c84 66
ptuytsch 1204:c87f50212c84 67 pulseChar(PULSE_CHARACTERISTIC_UUID,&pulse, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY),
ptuytsch 1204:c87f50212c84 68 speedChar(SPEED_CHARACTERISTIC_UUID,&speed, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY),
ptuytsch 1204:c87f50212c84 69 controlChar(CONTROL_CHARACTERISTIC_UUID,&control, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY)
ptuytsch 1205:86f0783a5420 70 /*deviceNameChar(DEVICE_NAME_CHARACTERISTIC_UUID,
ptuytsch 1205:86f0783a5420 71 (uint8_t *)bd->getBikeName(),
ptuytsch 1205:86f0783a5420 72 bd->getBikeNameSize(),
ptuytsch 1205:86f0783a5420 73 bd->getBikeNameSize(),
ptuytsch 1205:86f0783a5420 74 GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE)*/
ptuytsch 1131:5cc818415e2b 75 {
ptuytsch 1205:86f0783a5420 76 static char devName[] = "tmp";
ptuytsch 1205:86f0783a5420 77 bd->getBikeName(devName);
ptuytsch 1205:86f0783a5420 78 deviceNameChar = new GattCharacteristic(DEVICE_NAME_CHARACTERISTIC_UUID,
ptuytsch 1205:86f0783a5420 79 (uint8_t *)devName,
ptuytsch 1205:86f0783a5420 80 bd->getBikeNameSize(),
ptuytsch 1205:86f0783a5420 81 bd->getBikeNameSize(),
ptuytsch 1205:86f0783a5420 82 GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE);
ptuytsch 1205:86f0783a5420 83 /*static char devName[] = "tmp";
ptuytsch 1205:86f0783a5420 84 bd->getBikeName(devName);
ptuytsch 1205:86f0783a5420 85 ble.gattServer().write(deviceNameChar.getValueHandle(),(uint8_t *)devName,bd->getBikeNameSize());*/
ptuytsch 1204:c87f50212c84 86 //read al the values out of the BikeData object
ptuytsch 1204:c87f50212c84 87 tripDistance = (bd->getDataSet(BikeData::TRIP))->getDistance() *100;
ptuytsch 1204:c87f50212c84 88 tripAverage = (bd->getDataSet(BikeData::TRIP))->getAverage() *100;
ptuytsch 1204:c87f50212c84 89 tripTime = (bd->getDataSet(BikeData::TRIP))->getTime();
ptuytsch 1204:c87f50212c84 90
ptuytsch 1204:c87f50212c84 91 overallDistance = (bd->getDataSet(BikeData::OVERALL))->getDistance()*100;
ptuytsch 1204:c87f50212c84 92 overallAverage = (bd->getDataSet(BikeData::OVERALL))->getAverage()*100;
ptuytsch 1204:c87f50212c84 93 overallTime = (bd->getDataSet(BikeData::OVERALL))->getTime();
ptuytsch 1204:c87f50212c84 94
ptuytsch 1204:c87f50212c84 95 batChangeDistance = (bd->getDataSet(BikeData::BATCHANGE))->getDistance() *100;
ptuytsch 1204:c87f50212c84 96 batChangeAverage = (bd->getDataSet(BikeData::BATCHANGE))->getAverage() *100;
ptuytsch 1204:c87f50212c84 97 batChangeTime = (bd->getDataSet(BikeData::BATCHANGE))->getTime();
ptuytsch 1204:c87f50212c84 98
ptuytsch 1204:c87f50212c84 99 pulse = bd->getLastCount();
ptuytsch 1204:c87f50212c84 100 speed = bd->getSpeed()*100;
ptuytsch 1204:c87f50212c84 101 control = bd->isLogging()*5;
ptuytsch 1204:c87f50212c84 102
ptuytsch 1204:c87f50212c84 103 //creating a pointer list of al the characteristics
ptuytsch 1204:c87f50212c84 104 GattCharacteristic *charTable[] = {&tripDistanceChar, &tripAverageChar, &tripTimeChar,
ptuytsch 1204:c87f50212c84 105 &overallDistanceChar, &overallAverageChar, &overallTimeChar,
ptuytsch 1204:c87f50212c84 106 &batChangeDistanceChar, &batChangeAverageChar, &batChangeTimeChar,
ptuytsch 1205:86f0783a5420 107 &pulseChar, &speedChar, &controlChar, deviceNameChar};
ptuytsch 1204:c87f50212c84 108 //creating the gattService
ptuytsch 1131:5cc818415e2b 109 GattService bikeService(BikeService::BIKE_SERVICE_UUID, charTable, sizeof(charTable) / sizeof(GattCharacteristic *));
ptuytsch 1131:5cc818415e2b 110 ble.gattServer().addService(bikeService);
ptuytsch 1205:86f0783a5420 111 //define the function to call when data is written to service
ptuytsch 1202:a31d51d9fba8 112 ble.onDataWritten(this, &BikeService::onDataWrittenCallback);
ptuytsch 1202:a31d51d9fba8 113 }
ptuytsch 1202:a31d51d9fba8 114
ptuytsch 1202:a31d51d9fba8 115 void onDataWrittenCallback(const GattWriteCallbackParams *writeParams) {
ptuytsch 1204:c87f50212c84 116 //when data is written in the controlCharacteristic
ptuytsch 1204:c87f50212c84 117 if (writeParams->handle == controlChar.getValueHandle()) {
ptuytsch 1204:c87f50212c84 118 //performing different actions according to the written value
ptuytsch 1204:c87f50212c84 119 if (*(writeParams->data) == '1'){
ptuytsch 1204:c87f50212c84 120 bd->startTrip();
ptuytsch 1204:c87f50212c84 121 }
ptuytsch 1204:c87f50212c84 122 else if (*(writeParams->data) == '2'){
ptuytsch 1204:c87f50212c84 123 bd->pauzeTrip();
ptuytsch 1204:c87f50212c84 124 }
ptuytsch 1204:c87f50212c84 125 else if (*(writeParams->data) == '3'){
ptuytsch 1204:c87f50212c84 126 bd->stopTrip();
ptuytsch 1204:c87f50212c84 127 }
ptuytsch 1202:a31d51d9fba8 128 }
ptuytsch 1205:86f0783a5420 129
ptuytsch 1205:86f0783a5420 130 if (writeParams->handle == deviceNameChar->getValueHandle()) {
ptuytsch 1205:86f0783a5420 131 printf("name changing, length: %i\n",(uint8_t)writeParams->len);
ptuytsch 1205:86f0783a5420 132 //uint8_t *recievedName = writeParams->data;
ptuytsch 1205:86f0783a5420 133 //writeParams->data->push_back(0x00);
ptuytsch 1205:86f0783a5420 134 uint8_t recievedName[writeParams->len +1];
ptuytsch 1205:86f0783a5420 135 for (uint8_t i = 0 ; i < writeParams->len ; i++){
ptuytsch 1205:86f0783a5420 136 recievedName[i] = *(writeParams->data+i);
ptuytsch 1205:86f0783a5420 137 }
ptuytsch 1205:86f0783a5420 138 recievedName[writeParams->len] = 0x00;
ptuytsch 1205:86f0783a5420 139 bd->setBikeName((char *)recievedName,((uint8_t)writeParams->len)+1);
ptuytsch 1205:86f0783a5420 140 ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LOCAL_NAME, (uint8_t *)recievedName, (writeParams->len)+1);//passing the device name
ptuytsch 1205:86f0783a5420 141
ptuytsch 1205:86f0783a5420 142 printf("written length: %i\n", bd->getBikeNameSize());
ptuytsch 1205:86f0783a5420 143 static char devName[] = "tmp";
ptuytsch 1205:86f0783a5420 144 bd->getBikeName(devName);
ptuytsch 1205:86f0783a5420 145 ble.gattServer().write(deviceNameChar->getValueHandle(),(uint8_t *)devName,bd->getBikeNameSize());
ptuytsch 1205:86f0783a5420 146 /*char name[] = "otherName";
ptuytsch 1205:86f0783a5420 147 bd->setBikeName(name,sizeof(name));*/
ptuytsch 1205:86f0783a5420 148 }
ptuytsch 1131:5cc818415e2b 149 }
ptuytsch 1131:5cc818415e2b 150
ptuytsch 1131:5cc818415e2b 151
ptuytsch 1204:c87f50212c84 152 void update(){
ptuytsch 1204:c87f50212c84 153 /*updating the different characteristics when the value has changed*/
ptuytsch 1204:c87f50212c84 154 uint32_t tmp;
ptuytsch 1204:c87f50212c84 155 //TripData
ptuytsch 1204:c87f50212c84 156 tmp = ((bd->getDataSet(BikeData::TRIP))->getDistance()) * 100;
ptuytsch 1204:c87f50212c84 157 if (tmp != tripDistance){
ptuytsch 1204:c87f50212c84 158 tripDistance = tmp;
ptuytsch 1204:c87f50212c84 159 ble.gattServer().write(tripDistanceChar.getValueHandle(),(uint8_t *)&tripDistance,sizeof(uint32_t));
ptuytsch 1206:8afbec0520f5 160 }
ptuytsch 1204:c87f50212c84 161 tmp = ((bd->getDataSet(BikeData::TRIP))->getAverage()) * 100;
ptuytsch 1204:c87f50212c84 162 if (tmp != tripAverage){
ptuytsch 1204:c87f50212c84 163 tripAverage = tmp;
ptuytsch 1204:c87f50212c84 164 ble.gattServer().write(tripAverageChar.getValueHandle(),(uint8_t *)&tripAverage,sizeof(uint32_t));
ptuytsch 1204:c87f50212c84 165 }
ptuytsch 1204:c87f50212c84 166 tmp = ((bd->getDataSet(BikeData::TRIP))->getTime());
ptuytsch 1204:c87f50212c84 167 if (tmp != tripTime){
ptuytsch 1204:c87f50212c84 168 tripTime = tmp;
ptuytsch 1204:c87f50212c84 169 ble.gattServer().write(tripTimeChar.getValueHandle(),(uint8_t *)&tripTime,sizeof(uint32_t));
ptuytsch 1204:c87f50212c84 170 }
ptuytsch 1204:c87f50212c84 171 //OverallData
ptuytsch 1204:c87f50212c84 172 tmp = (bd->getDataSet(BikeData::OVERALL))->getDistance()*100;
ptuytsch 1204:c87f50212c84 173 if (tmp != overallDistance){
ptuytsch 1204:c87f50212c84 174 overallDistance = tmp;
ptuytsch 1204:c87f50212c84 175 ble.gattServer().write(overallDistanceChar.getValueHandle(),(uint8_t *)&overallDistance,sizeof(uint32_t));
ptuytsch 1204:c87f50212c84 176 }
ptuytsch 1204:c87f50212c84 177 tmp = (bd->getDataSet(BikeData::OVERALL))->getAverage()*100;
ptuytsch 1204:c87f50212c84 178 if (tmp != overallAverage){
ptuytsch 1204:c87f50212c84 179 overallAverage = tmp;
ptuytsch 1204:c87f50212c84 180 ble.gattServer().write(overallAverageChar.getValueHandle(),(uint8_t *)&overallAverage,sizeof(uint32_t));
ptuytsch 1204:c87f50212c84 181 }
ptuytsch 1204:c87f50212c84 182 tmp = (bd->getDataSet(BikeData::OVERALL))->getTime();
ptuytsch 1204:c87f50212c84 183 if (tmp != overallTime){
ptuytsch 1204:c87f50212c84 184 overallTime = tmp;
ptuytsch 1204:c87f50212c84 185 ble.gattServer().write(overallTimeChar.getValueHandle(),(uint8_t *)&overallTime,sizeof(uint32_t));
ptuytsch 1204:c87f50212c84 186 }
ptuytsch 1204:c87f50212c84 187 //Since Battery Change
ptuytsch 1204:c87f50212c84 188 tmp = (bd->getDataSet(BikeData::BATCHANGE))->getDistance() *100;
ptuytsch 1204:c87f50212c84 189 if (tmp != batChangeDistance){
ptuytsch 1204:c87f50212c84 190 batChangeDistance = tmp;
ptuytsch 1204:c87f50212c84 191 ble.gattServer().write(batChangeDistanceChar.getValueHandle(),(uint8_t *)&batChangeDistance,sizeof(uint32_t));
ptuytsch 1204:c87f50212c84 192 }
ptuytsch 1204:c87f50212c84 193 tmp = (bd->getDataSet(BikeData::BATCHANGE))->getAverage() *100;
ptuytsch 1204:c87f50212c84 194 if (tmp != batChangeAverage){
ptuytsch 1204:c87f50212c84 195 batChangeAverage = tmp;
ptuytsch 1204:c87f50212c84 196 ble.gattServer().write(batChangeAverageChar.getValueHandle(),(uint8_t *)&batChangeAverage,sizeof(uint32_t));
ptuytsch 1204:c87f50212c84 197 }
ptuytsch 1204:c87f50212c84 198 tmp = (bd->getDataSet(BikeData::BATCHANGE))->getTime();
ptuytsch 1204:c87f50212c84 199 if (tmp != batChangeTime){
ptuytsch 1204:c87f50212c84 200 batChangeTime = tmp;
ptuytsch 1204:c87f50212c84 201 ble.gattServer().write(batChangeTimeChar.getValueHandle(),(uint8_t *)&batChangeTime,sizeof(uint32_t));
ptuytsch 1204:c87f50212c84 202 }
ptuytsch 1204:c87f50212c84 203 // Continious Data
ptuytsch 1204:c87f50212c84 204 tmp = bd->getLastCount();
ptuytsch 1204:c87f50212c84 205 if (tmp != pulse){
ptuytsch 1204:c87f50212c84 206 pulse = tmp;
ptuytsch 1204:c87f50212c84 207 ble.gattServer().write(pulseChar.getValueHandle(),&pulse,sizeof(uint8_t));
ptuytsch 1204:c87f50212c84 208 }
ptuytsch 1204:c87f50212c84 209 tmp = bd->getSpeed()*100;
ptuytsch 1204:c87f50212c84 210 if (tmp != speed){
ptuytsch 1204:c87f50212c84 211 speed = tmp;
ptuytsch 1204:c87f50212c84 212 ble.gattServer().write(speedChar.getValueHandle(),(uint8_t *)&speed,sizeof(uint32_t));
ptuytsch 1204:c87f50212c84 213 }
ptuytsch 1204:c87f50212c84 214 tmp = bd->isLogging()*'5';
ptuytsch 1204:c87f50212c84 215 if (tmp != control){
ptuytsch 1204:c87f50212c84 216 control = tmp;
ptuytsch 1204:c87f50212c84 217 ble.gattServer().write(controlChar.getValueHandle(),&control,sizeof(uint8_t));
ptuytsch 1204:c87f50212c84 218 }
ptuytsch 1204:c87f50212c84 219 }
ptuytsch 1204:c87f50212c84 220
ptuytsch 1204:c87f50212c84 221 public:
ptuytsch 1204:c87f50212c84 222
ptuytsch 1204:c87f50212c84 223 //different variables for the service
ptuytsch 1204:c87f50212c84 224 BLE &ble;
ptuytsch 1204:c87f50212c84 225 BikeData *bd;
ptuytsch 1204:c87f50212c84 226 uint32_t tripDistance, tripAverage, tripTime,
ptuytsch 1204:c87f50212c84 227 overallDistance, overallAverage, overallTime,
ptuytsch 1204:c87f50212c84 228 batChangeDistance, batChangeAverage, batChangeTime,
ptuytsch 1204:c87f50212c84 229 speed;
ptuytsch 1204:c87f50212c84 230 uint8_t pulse, control;
ptuytsch 1204:c87f50212c84 231
ptuytsch 1204:c87f50212c84 232 //the different characteristics created of an template
ptuytsch 1204:c87f50212c84 233 ReadOnlyGattCharacteristic<uint32_t> tripDistanceChar;
ptuytsch 1204:c87f50212c84 234 ReadOnlyGattCharacteristic<uint32_t> tripAverageChar;
ptuytsch 1204:c87f50212c84 235 ReadOnlyGattCharacteristic<uint32_t> tripTimeChar;
ptuytsch 1131:5cc818415e2b 236
ptuytsch 1204:c87f50212c84 237 ReadOnlyGattCharacteristic<uint32_t> overallDistanceChar;
ptuytsch 1204:c87f50212c84 238 ReadOnlyGattCharacteristic<uint32_t> overallAverageChar;
ptuytsch 1204:c87f50212c84 239 ReadOnlyGattCharacteristic<uint32_t> overallTimeChar;
ptuytsch 1204:c87f50212c84 240
ptuytsch 1204:c87f50212c84 241 ReadOnlyGattCharacteristic<uint32_t> batChangeDistanceChar;
ptuytsch 1204:c87f50212c84 242 ReadOnlyGattCharacteristic<uint32_t> batChangeAverageChar;
ptuytsch 1204:c87f50212c84 243 ReadOnlyGattCharacteristic<uint32_t> batChangeTimeChar;
ptuytsch 1204:c87f50212c84 244
ptuytsch 1204:c87f50212c84 245 ReadOnlyGattCharacteristic<uint8_t> pulseChar;
ptuytsch 1204:c87f50212c84 246 ReadOnlyGattCharacteristic<uint32_t> speedChar;
ptuytsch 1204:c87f50212c84 247 ReadWriteGattCharacteristic<uint8_t> controlChar;
ptuytsch 1205:86f0783a5420 248
ptuytsch 1205:86f0783a5420 249
ptuytsch 1205:86f0783a5420 250 GattCharacteristic *deviceNameChar;
ptuytsch 1131:5cc818415e2b 251 };
ptuytsch 1131:5cc818415e2b 252
ptuytsch 1202:a31d51d9fba8 253 #endif