From cabd48aef3c2c7b2947007f76e190633a5ce12fe Mon Sep 17 00:00:00 2001 From: h2zero Date: Sat, 15 Jun 2024 09:52:35 -0600 Subject: [PATCH] Add documentation to NimBLEService::isStarted --- src/NimBLEService.cpp | 9 +++++++++ src/NimBLEService.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/NimBLEService.cpp b/src/NimBLEService.cpp index 02195ac..8055869 100644 --- a/src/NimBLEService.cpp +++ b/src/NimBLEService.cpp @@ -434,4 +434,13 @@ NimBLEServer* NimBLEService::getServer() { return NimBLEDevice::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 */ diff --git a/src/NimBLEService.h b/src/NimBLEService.h index 6f33016..73cbd87 100644 --- a/src/NimBLEService.h +++ b/src/NimBLEService.h @@ -44,7 +44,7 @@ public: uint16_t getHandle(); std::string toString(); void dump(); - bool isStarted() { return m_pSvcDef != nullptr; } + bool isStarted(); bool start(); NimBLECharacteristic* createCharacteristic(const char* uuid,