Skip to content

Commit 64cfb33

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

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

libraries/BLE/src/BLERemoteService.cpp

+14
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)