Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
GenericGattClient< TPalGattClient, SigningMonitorEventHandler > Class Template Reference
Generic implementation of the GattClient. More...
#include <GenericGattClient.h>
Inherits SigningEventMonitor< GenericGattClient< TPalGattClient, SigningMonitorEventHandler >, SigningMonitorEventHandler >, and GattClientEventHandler< GenericGattClient< TPalGattClient, SigningMonitorEventHandler > >.
Public Member Functions | |
GenericGattClient (PalGattClient *pal_client) | |
Create a GenericGattClient from a pal::GattClient. | |
ble_error_t | launchServiceDiscovery_ (connection_handle_t connection_handle, ServiceDiscovery::ServiceCallback_t service_callback, ServiceDiscovery::CharacteristicCallback_t characteristic_callback, const UUID &matching_service_uuid, const UUID &matching_characteristic_uuid) |
bool | isServiceDiscoveryActive_ () const |
void | terminateServiceDiscovery_ () |
ble_error_t | read_ (connection_handle_t connection_handle, GattAttribute::Handle_t attribute_handle, uint16_t offset) const |
ble_error_t | write_ (WriteOp_t cmd, connection_handle_t connection_handle, GattAttribute::Handle_t attribute_handle, size_t length, const uint8_t *value) const |
void | onServiceDiscoveryTermination_ (ServiceDiscovery::TerminationCallback_t callback) |
ble_error_t | discoverCharacteristicDescriptors_ (const DiscoveredCharacteristic &characteristic, const CharacteristicDescriptorDiscovery::DiscoveryCallback_t &discoveryCallback, const CharacteristicDescriptorDiscovery::TerminationCallback_t &terminationCallback) |
bool | isCharacteristicDescriptorDiscoveryActive_ (const DiscoveredCharacteristic &characteristic) const |
void | terminateCharacteristicDescriptorDiscovery_ (const DiscoveredCharacteristic &characteristic) |
ble_error_t | negotiateAttMtu_ (connection_handle_t connection) |
ble_error_t | reset_ (void) |
void | set_signing_event_handler_ (SigningMonitorEventHandler *signing_event_handler) |
void | on_att_mtu_change_ (ble::connection_handle_t connection_handle, uint16_t att_mtu_size) |
void | on_write_command_sent_ (ble::connection_handle_t connection_handle, ble::attribute_handle_t attribute_handle, uint8_t status) |
void | set_signing_event_handler (SigningMonitorEventHandler *signing_event_handler) |
Register a handler for singing events to be used internally and serviced first. | |
void | on_att_mtu_change (ble::connection_handle_t connection_handle, uint16_t att_mtu_size) |
Function invoked when the connections changes the ATT_MTU which controls the maximum size of an attribute that can be read in a single L2CAP packet which might be fragmented across multiple packets. | |
void | on_write_command_sent (ble::connection_handle_t connection_handle, ble::attribute_handle_t attribute_handle, uint8_t status) |
Function invoked when a write command has been sent out of the stack (either to the controller or over the air). | |
GenericGattClient < TPalGattClient, SigningMonitorEventHandler > * | impl () |
const GenericGattClient < TPalGattClient, SigningMonitorEventHandler > * | impl () const |
Detailed Description
template<template< class > class TPalGattClient, class SigningMonitorEventHandler>
class ble::generic::GenericGattClient< TPalGattClient, SigningMonitorEventHandler >
Generic implementation of the GattClient.
It requires a pal::GattClient injected at construction site.
- Attention:
- : Not part of the public interface of BLE API.
Definition at line 36 of file GenericGattClient.h.
Constructor & Destructor Documentation
GenericGattClient | ( | PalGattClient * | pal_client ) |
Create a GenericGattClient from a pal::GattClient.
Member Function Documentation
ble_error_t discoverCharacteristicDescriptors_ | ( | const DiscoveredCharacteristic & | characteristic, |
const CharacteristicDescriptorDiscovery::DiscoveryCallback_t & | discoveryCallback, | ||
const CharacteristicDescriptorDiscovery::TerminationCallback_t & | terminationCallback | ||
) |
- See also:
- GattClient::discoverCharacteristicDescriptors
GenericGattClient< TPalGattClient, SigningMonitorEventHandler > * impl | ( | ) | [inherited] |
- Returns:
- A pointer to the implementation class.
Definition at line 35 of file StaticInterface.h.
const GenericGattClient< TPalGattClient, SigningMonitorEventHandler > * impl | ( | ) | const [inherited] |
- Returns:
- A pointer to the implementation class.
Definition at line 43 of file StaticInterface.h.
bool isCharacteristicDescriptorDiscoveryActive_ | ( | const DiscoveredCharacteristic & | characteristic ) | const |
- See also:
- GattClient::isCharacteristicDescriptorDiscoveryActive
bool isServiceDiscoveryActive_ | ( | ) | const |
- See also:
- GattClient::isServiceDiscoveryActive
ble_error_t launchServiceDiscovery_ | ( | connection_handle_t | connection_handle, |
ServiceDiscovery::ServiceCallback_t | service_callback, | ||
ServiceDiscovery::CharacteristicCallback_t | characteristic_callback, | ||
const UUID & | matching_service_uuid, | ||
const UUID & | matching_characteristic_uuid | ||
) |
- See also:
- GattClient::launchServiceDiscovery
ble_error_t negotiateAttMtu_ | ( | connection_handle_t | connection ) |
- See also:
- GattClient::negotiateAttMtu
void on_att_mtu_change | ( | ble::connection_handle_t | connection_handle, |
uint16_t | att_mtu_size | ||
) | [inherited] |
Function invoked when the connections changes the ATT_MTU which controls the maximum size of an attribute that can be read in a single L2CAP packet which might be fragmented across multiple packets.
- Parameters:
-
connectionHandle The handle of the connection that changed the size. attMtuSize
Definition at line 48 of file PalGattClient.h.
void on_att_mtu_change_ | ( | ble::connection_handle_t | connection_handle, |
uint16_t | att_mtu_size | ||
) |
- See also:
- pal::GattClient::EventHandler::on_att_mtu_change
void on_write_command_sent | ( | ble::connection_handle_t | connection_handle, |
ble::attribute_handle_t | attribute_handle, | ||
uint8_t | status | ||
) | [inherited] |
Function invoked when a write command has been sent out of the stack (either to the controller or over the air).
- Parameters:
-
connection_handle Connection targeted by the write command attribute_handle Attribute written status HCI status of the operation.
Definition at line 63 of file PalGattClient.h.
void on_write_command_sent_ | ( | ble::connection_handle_t | connection_handle, |
ble::attribute_handle_t | attribute_handle, | ||
uint8_t | status | ||
) |
- See also:
- pal::GattClient::EventHandler::on_write_command_sent
void onServiceDiscoveryTermination_ | ( | ServiceDiscovery::TerminationCallback_t | callback ) |
- See also:
- GattClient::onServiceDiscoveryTermination
ble_error_t read_ | ( | connection_handle_t | connection_handle, |
GattAttribute::Handle_t | attribute_handle, | ||
uint16_t | offset | ||
) | const |
- See also:
- GattClient::read
ble_error_t reset_ | ( | void | ) |
- See also:
- GattClient::reset
void set_signing_event_handler | ( | SigningMonitorEventHandler * | signing_event_handler ) | [inherited] |
Register a handler for singing events to be used internally and serviced first.
- Parameters:
-
[in] signing_event_handler Event handler being registered.
Definition at line 89 of file SigningEventMonitor.h.
void set_signing_event_handler_ | ( | SigningMonitorEventHandler * | signing_event_handler ) |
void terminateCharacteristicDescriptorDiscovery_ | ( | const DiscoveredCharacteristic & | characteristic ) |
- See also:
- GattClient::terminateCharacteristicDescriptorDiscovery
void terminateServiceDiscovery_ | ( | ) |
- See also:
- GattClient::terminateServiceDiscovery
ble_error_t write_ | ( | WriteOp_t | cmd, |
connection_handle_t | connection_handle, | ||
GattAttribute::Handle_t | attribute_handle, | ||
size_t | length, | ||
const uint8_t * | value | ||
) | const |
- See also:
- GattClient::write
Generated on Tue Jul 12 2022 13:55:40 by
