Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Added unimplemented getCharacteristicsByHandle function #3277

Merged

Conversation

@tanakamasayuki
Copy link
Contributor

commented Sep 26, 2019

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

Defined in BLERemoteService.h
But, Not included in BLERemoteService.cpp
* @return A map of all the characteristics of this service.
*/
std::map<uint16_t, BLERemoteCharacteristic*>* BLERemoteService::getCharacteristicsByHandle() {
log_v(">> getCharacteristicsByHandle() for service: %s", getUUID().toString().c_str());

This comment has been minimized.

Copy link
@me-no-dev

me-no-dev Sep 26, 2019

Member

log already prints the method name.

This comment has been minimized.

Copy link
@me-no-dev

me-no-dev Sep 29, 2019

Member

please remove >> getCharacteristicsByHandle() for from the log lines

@tanakamasayuki

This comment has been minimized.

Copy link
Contributor Author

commented Sep 26, 2019

1.0.3\libraries\BLE\src\BLERemoteService.h

	std::map<std::string, BLERemoteCharacteristic*>* getCharacteristics();
	std::map<uint16_t, BLERemoteCharacteristic*>* getCharacteristicsByHandle();  // Get the characteristics map.

getCharacteristicsByHandle is defined.
But, Not available.

sketch\BLE_clientEx.ino.cpp.o:(.literal._Z15connectToServerv+0x24): undefined reference to `BLERemoteService::getCharacteristicsByHandle()'

Therefore, it was created with reference to the getCharacteristics function.

/**
 * @brief Retrieve a map of all the characteristics of this service.
 * @return A map of all the characteristics of this service.
 */
std::map<std::string, BLERemoteCharacteristic*>* BLERemoteService::getCharacteristics() {
	log_v(">> getCharacteristics() for service: %s", getUUID().toString().c_str());
	// 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();
	}
	log_v("<< getCharacteristics() for service: %s", getUUID().toString().c_str());
	return &m_characteristicMap;
} // getCharacteristics

getCharacteristics to getCharacteristicsByHandle
m_characteristicMap to m_characteristicMapByHandle

tanakamasayuki and others added 3 commits Sep 30, 2019
@me-no-dev me-no-dev merged commit 64cfb33 into espressif:master Oct 1, 2019
21 checks passed
21 checks passed
Arduino 0 on ubuntu-latest
Details
Arduino 1 on ubuntu-latest
Details
Arduino 2 on ubuntu-latest
Details
Arduino 3 on ubuntu-latest
Details
Arduino 4 on ubuntu-latest
Details
Arduino 5 on ubuntu-latest
Details
Arduino 6 on ubuntu-latest
Details
Arduino 7 on ubuntu-latest
Details
Arduino 8 on ubuntu-latest
Details
Arduino 9 on ubuntu-latest
Details
Arduino 10 on ubuntu-latest
Details
Arduino 11 on ubuntu-latest
Details
Arduino 12 on ubuntu-latest
Details
Arduino 13 on ubuntu-latest
Details
Arduino 14 on ubuntu-latest
Details
Arduino on windows-latest
Details
Arduino on macOS-latest
Details
PlatformIO on ubuntu-latest
Details
PlatformIO on windows-latest
Details
PlatformIO on macOS-latest
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.