Add Added unimplemented getCharacteristicsByHandle function (#3277)

* Add Added unimplemented getCharacteristicsByHandle function

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

* Delete log output
This commit is contained in:
TANAKA Masayuki 2019-10-01 17:43:59 +09:00 committed by Me No Dev
parent 5f1dff7dad
commit 64cfb33deb

View File

@ -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
*/