Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 64cfb33

Browse filesBrowse files
tanakamasayukime-no-dev
authored andcommitted
Add Added unimplemented getCharacteristicsByHandle function (espressif#3277)
* Add Added unimplemented getCharacteristicsByHandle function Defined in BLERemoteService.h But, Not included in BLERemoteService.cpp * Delete log output
1 parent 5f1dff7 commit 64cfb33
Copy full SHA for 64cfb33

File tree

1 file changed

+14
-0
lines changed
Filter options

1 file changed

+14
-0
lines changed

‎libraries/BLE/src/BLERemoteService.cpp

Copy file name to clipboardExpand all lines: libraries/BLE/src/BLERemoteService.cpp
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,20 @@ std::map<std::string, BLERemoteCharacteristic*>* BLERemoteService::getCharacteri
226226
return &m_characteristicMap;
227227
} // getCharacteristics
228228

229+
/**
230+
* @brief Retrieve a map of all the characteristics of this service.
231+
* @return A map of all the characteristics of this service.
232+
*/
233+
std::map<uint16_t, BLERemoteCharacteristic*>* BLERemoteService::getCharacteristicsByHandle() {
234+
// If is possible that we have not read the characteristics associated with the service so do that
235+
// now. The request to retrieve the characteristics by calling "retrieveCharacteristics" is a blocking
236+
// call and does not return until all the characteristics are available.
237+
if (!m_haveCharacteristics) {
238+
retrieveCharacteristics();
239+
}
240+
return &m_characteristicMapByHandle;
241+
} // getCharacteristicsByHandle
242+
229243
/**
230244
* @brief This function is designed to get characteristics map when we have multiple characteristics with the same UUID
231245
*/

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.