File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -66,9 +66,10 @@ BLEService* BLEServer::createService(const char* uuid) {
66
66
* With a %BLE server, we can host one or more services. Invoking this function causes the creation of a definition
67
67
* of a new service. Every service must have a unique UUID.
68
68
* @param [in] uuid The UUID of the new service.
69
+ * @param [in] numHandles The maximum number of handles associated with this service.
69
70
* @return A reference to the new service object.
70
71
*/
71
- BLEService* BLEServer::createService (BLEUUID uuid) {
72
+ BLEService* BLEServer::createService (BLEUUID uuid, uint32_t numHandles ) {
72
73
ESP_LOGD (LOG_TAG, " >> createService - %s" , uuid.toString ().c_str ());
73
74
m_semaphoreCreateEvt.take (" createService" );
74
75
@@ -80,7 +81,7 @@ BLEService* BLEServer::createService(BLEUUID uuid) {
80
81
return nullptr ;
81
82
}
82
83
83
- BLEService* pService = new BLEService (uuid);
84
+ BLEService* pService = new BLEService (uuid, numHandles );
84
85
m_serviceMap.setByUUID (uuid, pService); // Save a reference to this service being on this server.
85
86
pService->executeCreate (this ); // Perform the API calls to actually create the service.
86
87
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class BLEServer {
53
53
public:
54
54
uint32_t getConnectedCount ();
55
55
BLEService* createService (const char * uuid);
56
- BLEService* createService (BLEUUID uuid);
56
+ BLEService* createService (BLEUUID uuid, uint32_t numHandles= 15 );
57
57
BLEAdvertising* getAdvertising ();
58
58
void setCallbacks (BLEServerCallbacks *pCallbacks);
59
59
void startAdvertising ();
You can’t perform that action at this time.
0 commit comments