Clone of the nRF51822 repository from github The correct home is https://github.com/lancaster-university/nRF51822
Dependencies: nrf51-sdk
Dependents: microbit-dal microbit-ble-open microbit-dal-eddystone microbit-dal-ble-accelerometer-example ... more
nRF5xCharacteristicDescriptorDiscoverer Class Reference
Manage the discovery of Characteristic descriptors. More...
#include <nRF5xCharacteristicDescriptorDiscoverer.h>
Public Member Functions | |
nRF5xCharacteristicDescriptorDiscoverer () | |
Construct a new characteristic descriptor discoverer. | |
~nRF5xCharacteristicDescriptorDiscoverer () | |
Destroy a characteristic descriptor discoverer. | |
ble_error_t | launch (const DiscoveredCharacteristic &characteristic, const DiscoveryCallback_t &discoveryCallback, const TerminationCallback_t &terminationCallback) |
Launch a new characteristic descriptor discovery for a given DiscoveredCharacteristic. | |
bool | isActive (const DiscoveredCharacteristic &characteristic) const |
indicate if a characteristic descriptor discovery is active for a given DiscoveredCharacteristic. | |
void | requestTerminate (const DiscoveredCharacteristic &characteristic) |
request the termination of characteristic descriptor discovery for a give DiscoveredCharacteristic | |
void | process (uint16_t connectionHandle, const ble_gattc_evt_desc_disc_rsp_t &descriptors) |
process descriptors discovered from the Nordic stack. | |
void | terminate (uint16_t connectionHandle, ble_error_t err) |
Called by the Nordic stack when the discovery is over. |
Detailed Description
Manage the discovery of Characteristic descriptors.
is a bridge between BLE API and Nordic stack regarding Characteristic Descriptor discovery. The BLE API can launch, monitor and ask for termination of a discovery. The Nordic stack will provide new descriptors and indicate when the discovery is done.
Definition at line 33 of file nRF5xCharacteristicDescriptorDiscoverer.h.
Constructor & Destructor Documentation
Construct a new characteristic descriptor discoverer.
Definition at line 20 of file nRF5xCharacteristicDescriptorDiscoverer.cpp.
Destroy a characteristic descriptor discoverer.
Definition at line 25 of file nRF5xCharacteristicDescriptorDiscoverer.cpp.
Member Function Documentation
bool isActive | ( | const DiscoveredCharacteristic & | characteristic ) | const |
indicate if a characteristic descriptor discovery is active for a given DiscoveredCharacteristic.
- Parameters:
-
characteristic The characteristic for whom the descriptor might be currently discovered.
- Returns:
- true if descriptors of characteristic are discovered, false otherwise.
- Note:
- : this will be called by BLE API side.
Definition at line 72 of file nRF5xCharacteristicDescriptorDiscoverer.cpp.
ble_error_t launch | ( | const DiscoveredCharacteristic & | characteristic, |
const DiscoveryCallback_t & | discoveryCallback, | ||
const TerminationCallback_t & | terminationCallback | ||
) |
Launch a new characteristic descriptor discovery for a given DiscoveredCharacteristic.
- Parameters:
-
characteristic The characteristic owning the descriptors to discover. discoveryCallback The callback called when a descriptor is discovered. terminationCallback The callback called when the discovery process end.
- Returns:
- BLE_ERROR_NONE if characteristic descriptor discovery is launched successfully; else an appropriate error.
- Note:
- : this will be called by BLE API side.
void process | ( | uint16_t | connectionHandle, |
const ble_gattc_evt_desc_disc_rsp_t & | descriptors | ||
) |
process descriptors discovered from the Nordic stack.
- Parameters:
-
connectionHandle The connection handle upon which descriptors has been discovered. descriptors Discovered descriptors.
- Note:
- This will be called by the Nordic stack.
Definition at line 89 of file nRF5xCharacteristicDescriptorDiscoverer.cpp.
void requestTerminate | ( | const DiscoveredCharacteristic & | characteristic ) |
request the termination of characteristic descriptor discovery for a give DiscoveredCharacteristic
- Parameters:
-
characteristic The characteristic for whom the descriptor discovery should be stopped.
- Note:
- : this will be called by BLE API side.
Definition at line 81 of file nRF5xCharacteristicDescriptorDiscoverer.cpp.
void terminate | ( | uint16_t | connectionHandle, |
ble_error_t | err | ||
) |
Called by the Nordic stack when the discovery is over.
- Parameters:
-
The connection handle upon which the discovery process is done. err An error if the termination is due to an error.
Definition at line 118 of file nRF5xCharacteristicDescriptorDiscoverer.cpp.
Generated on Tue Jul 12 2022 15:23:08 by 1.7.2