add ServiceDiscovery::isActive()

This commit is contained in:
Rohit Grover 2015-05-22 10:31:21 +01:00
parent c058b2b4ec
commit 9a1cb12120
2 changed files with 10 additions and 0 deletions

View file

@ -61,6 +61,12 @@ ServiceDiscovery::terminate(void)
sdSingleton.terminateServiceDiscovery();
}
bool
ServiceDiscovery::isActive(void)
{
return sdSingleton.isActive();
}
ble_error_t
NordicServiceDiscovery::launchCharacteristicDiscovery(Gap::Handle_t connectionHandle,
Gap::Handle_t startHandle,

View file

@ -49,6 +49,10 @@ public:
serviceIndex++; /* Progress service index to keep discovery alive. */
}
bool isActive(void) const {
return (sDiscoveryActive || cDiscoveryActive);
}
private:
void resetDiscoveredServices(void) {
numServices = 0;