Add documentation to NimBLEService::isStarted

This commit is contained in:
h2zero 2024-06-15 09:52:35 -06:00
parent a2a50957b1
commit cabd48aef3
2 changed files with 10 additions and 1 deletions

View file

@ -434,4 +434,13 @@ NimBLEServer* NimBLEService::getServer() {
return NimBLEDevice::getServer(); return NimBLEDevice::getServer();
}// getServer }// getServer
/**
* @brief Checks if the service has been started.
* @return True if the service has been started.
*/
bool NimBLEService::isStarted() {
return m_pSvcDef != nullptr;
}
#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL */ #endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL */

View file

@ -44,7 +44,7 @@ public:
uint16_t getHandle(); uint16_t getHandle();
std::string toString(); std::string toString();
void dump(); void dump();
bool isStarted() { return m_pSvcDef != nullptr; } bool isStarted();
bool start(); bool start();
NimBLECharacteristic* createCharacteristic(const char* uuid, NimBLECharacteristic* createCharacteristic(const char* uuid,