Skip to content

Commit bd492be

Browse files
committed
Add advertisement data auxiliary functions
1 parent a9550cf commit bd492be

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/BLEDevice.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,16 @@ String BLEDevice::advertisedServiceUuid(int index) const
184184
return serviceUuid;
185185
}
186186

187+
bool BLEDevice::hasAdvertisementData() const
188+
{
189+
return (_eirDataLength > 0);
190+
}
191+
192+
int BLEDevice::advertisementDataLength() const
193+
{
194+
return _eirDataLength;
195+
}
196+
187197
int BLEDevice::advertisementData(uint8_t value[], int length) const
188198
{
189199
if (length > _eirDataLength) length = _eirDataLength;

src/BLEDevice.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ class BLEDevice {
5959
String advertisedServiceUuid() const;
6060
String advertisedServiceUuid(int index) const;
6161

62+
bool hasAdvertisementData() const;
63+
int advertisementDataLength() const;
6264
int advertisementData(uint8_t value[], int length) const;
6365

6466
virtual int rssi();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy