white space changes to move away from 80-column rule
parent
d67d20c55e
commit
820e159489
|
@ -302,14 +302,8 @@ public:
|
|||
uint16_t gatt_nsdesc; /**< Namespace description from Bluetooth Assigned Numbers, normally '0', see @ref BLE_GATT_CPF_NAMESPACES. */
|
||||
} presentation_format_t;
|
||||
|
||||
GattCharacteristic(ShortUUID_t uuid = 0,
|
||||
uint16_t minLen = 1,
|
||||
uint16_t maxLen = 1,
|
||||
uint8_t properties = 0);
|
||||
GattCharacteristic(const LongUUID_t longUUID,
|
||||
uint16_t minLen = 1,
|
||||
uint16_t maxLen = 1,
|
||||
uint8_t properties = 0);
|
||||
GattCharacteristic(ShortUUID_t uuid = 0, uint16_t minLen = 1, uint16_t maxLen = 1, uint8_t properties = 0);
|
||||
GattCharacteristic(const LongUUID_t longUUID, uint16_t minLen = 1, uint16_t maxLen = 1, uint8_t properties = 0);
|
||||
virtual ~GattCharacteristic(void);
|
||||
|
||||
public:
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
GattService(UUID uuid);
|
||||
virtual ~GattService(void);
|
||||
|
||||
ble_error_t addCharacteristic(GattCharacteristic &);
|
||||
ble_error_t addCharacteristic(GattCharacteristic &);
|
||||
|
||||
enum {
|
||||
UUID_ALERT_NOTIFICATION_SERVICE = 0x1811,
|
||||
|
@ -76,6 +76,7 @@ public:
|
|||
if (index >= characteristicCount) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return characteristics[index];
|
||||
}
|
||||
|
||||
|
|
|
@ -152,11 +152,7 @@ private:
|
|||
ble_error_t setAdvertisingDataForTransport(void);
|
||||
|
||||
public:
|
||||
BLEDevice() : transport(createBLEDeviceInstance()),
|
||||
advParams(),
|
||||
advPayload(),
|
||||
scanResponse(),
|
||||
needToUpdateAdvData(true) {
|
||||
BLEDevice() : transport(createBLEDeviceInstance()), advParams(), advPayload(), scanResponse(), needToUpdateAdvData(true) {
|
||||
advPayload.clear();
|
||||
scanResponse.clear();
|
||||
}
|
||||
|
@ -167,19 +163,18 @@ private:
|
|||
GapAdvertisingParams advParams;
|
||||
GapAdvertisingData advPayload;
|
||||
GapAdvertisingData scanResponse;
|
||||
bool needToUpdateAdvData; /* Accumulation of AD structures
|
||||
* in the advertisement payload should eventually
|
||||
* result in a call to the target's
|
||||
* setAdvertisingData() before the server begins
|
||||
* advertising. This flag marks the status of the
|
||||
* pending update.*/
|
||||
|
||||
/* Accumulation of AD structures in the advertisement payload should
|
||||
* eventually result in a call to the target's setAdvertisingData() before
|
||||
* the server begins advertising. This flag marks the status of the pending
|
||||
* update.*/
|
||||
bool needToUpdateAdvData;
|
||||
|
||||
/**
|
||||
* DEPRECATED
|
||||
*/
|
||||
public:
|
||||
ble_error_t setAdvertisingData(const GapAdvertisingData &ADStructures,
|
||||
const GapAdvertisingData &scanResponse);
|
||||
ble_error_t setAdvertisingData(const GapAdvertisingData &ADStructures, const GapAdvertisingData &scanResponse);
|
||||
ble_error_t setAdvertisingData(const GapAdvertisingData &ADStructures);
|
||||
|
||||
ble_error_t startAdvertising(const GapAdvertisingParams &advParams);
|
||||
|
|
9
hw/Gap.h
9
hw/Gap.h
|
@ -42,8 +42,7 @@ public:
|
|||
|
||||
/* These functions must be defined in the sub-class */
|
||||
virtual ble_error_t setAddress(addr_type_t type, const uint8_t address[6]) = 0;
|
||||
virtual ble_error_t setAdvertisingData(const GapAdvertisingData &,
|
||||
const GapAdvertisingData &) = 0;
|
||||
virtual ble_error_t setAdvertisingData(const GapAdvertisingData &, const GapAdvertisingData &) = 0;
|
||||
virtual ble_error_t startAdvertising(const GapAdvertisingParams &) = 0;
|
||||
virtual ble_error_t stopAdvertising(void) = 0;
|
||||
virtual ble_error_t disconnect(void) = 0;
|
||||
|
@ -95,11 +94,7 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
Gap() :
|
||||
state(),
|
||||
onTimeout(NULL),
|
||||
onConnection(NULL),
|
||||
onDisconnection(NULL) {
|
||||
Gap() : state(), onTimeout(NULL), onConnection(NULL), onDisconnection(NULL) {
|
||||
/* empty */
|
||||
}
|
||||
|
||||
|
|
|
@ -34,12 +34,8 @@ class GattServer
|
|||
public:
|
||||
/* These functions must be defined in the sub-class */
|
||||
virtual ble_error_t addService(GattService &) = 0;
|
||||
virtual ble_error_t readValue(uint16_t, uint8_t[],
|
||||
uint16_t) = 0;
|
||||
virtual ble_error_t updateValue(uint16_t,
|
||||
uint8_t[],
|
||||
uint16_t,
|
||||
bool localOnly = false) = 0;
|
||||
virtual ble_error_t readValue(uint16_t, uint8_t[], uint16_t) = 0;
|
||||
virtual ble_error_t updateValue(uint16_t, uint8_t[], uint16_t, bool localOnly = false) = 0;
|
||||
|
||||
// ToDo: For updateValue, check the CCCD to see if the value we are
|
||||
// updating has the notify or indicate bits sent, and if BOTH are set
|
||||
|
@ -95,14 +91,7 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
GattServer() :
|
||||
serviceCount(0),
|
||||
characteristicCount(0),
|
||||
onDataSent(NULL),
|
||||
onDataWritten(NULL),
|
||||
onUpdatesEnabled(NULL),
|
||||
onUpdatesDisabled(NULL),
|
||||
onConfirmationReceived(NULL) {
|
||||
GattServer() : serviceCount(0), characteristicCount(0), onDataSent(NULL), onDataWritten(NULL), onUpdatesEnabled(NULL), onUpdatesDisabled(NULL), onConfirmationReceived(NULL) {
|
||||
/* empty */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue