Skip to content
Permalink
Browse files

Add Added unimplemented getCharacteristicsByHandle function (#3277)

* Add Added unimplemented getCharacteristicsByHandle function

Defined in BLERemoteService.h
But, Not included in BLERemoteService.cpp

* Delete log output
  • Loading branch information...
tanakamasayuki authored and me-no-dev committed Oct 1, 2019
1 parent 5f1dff7 commit 64cfb33deb63a5cda3c994190fdb03ae41119081
Showing with 14 additions and 0 deletions.
  1. +14 −0 libraries/BLE/src/BLERemoteService.cpp
@@ -226,6 +226,20 @@ std::map<std::string, BLERemoteCharacteristic*>* BLERemoteService::getCharacteri
return &m_characteristicMap;
} // getCharacteristics

/**
* @brief Retrieve a map of all the characteristics of this service.
* @return A map of all the characteristics of this service.
*/
std::map<uint16_t, BLERemoteCharacteristic*>* BLERemoteService::getCharacteristicsByHandle() {
// If is possible that we have not read the characteristics associated with the service so do that
// now. The request to retrieve the characteristics by calling "retrieveCharacteristics" is a blocking
// call and does not return until all the characteristics are available.
if (!m_haveCharacteristics) {
retrieveCharacteristics();
}
return &m_characteristicMapByHandle;
} // getCharacteristicsByHandle

/**
* @brief This function is designed to get characteristics map when we have multiple characteristics with the same UUID
*/

0 comments on commit 64cfb33

Please sign in to comment.
You can’t perform that action at this time.