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.
GattService Class Reference
GATT service. More...
#include <GattService.h>
Public Member Functions | |
GattService (uint8_t[16]) | |
Creates a new GattService using the specified 128-bit UUID. | |
GattService (uint16_t) | |
Creates a new GattService using the specified 16-bit BLE UUID. | |
virtual | ~GattService (void) |
Destructor. | |
ble_error_t | addCharacteristic (GattCharacteristic &) |
Adds a GattCharacterisic to the service. |
Detailed Description
GATT service.
Definition at line 32 of file GattService.h.
Constructor & Destructor Documentation
GattService | ( | uint8_t | base_uuid[16] ) |
Creates a new GattService using the specified 128-bit UUID.
- Note:
- The UUID value must be unique on the device
- Parameters:
-
[in] uuid The 16 byte (128-bit) UUID to use for this characteristic
EXAMPLE
Definition at line 39 of file GattService.cpp.
GattService | ( | uint16_t | ble_uuid ) |
Creates a new GattService using the specified 16-bit BLE UUID.
- Parameters:
-
[in] ble_uuid The standardised 16-bit (2 byte) BLE UUID to use for this characteristic
EXAMPLE
Definition at line 61 of file GattService.cpp.
~GattService | ( | void | ) | [virtual] |
Destructor.
Definition at line 73 of file GattService.cpp.
Member Function Documentation
ble_error_t addCharacteristic | ( | GattCharacteristic & | characteristic ) |
Adds a GattCharacterisic to the service.
- Note:
- This function will not update the .handle field in the GattCharacteristic. This value is updated when the parent service is added via the radio driver.
- Parameters:
-
[in] characteristic The GattCharacteristic object describing the characteristic to add to this service
- Returns:
- BLE_ERROR_NONE (0) if everything executed correctly, or an error code if there was a problem
- Return values:
-
BLE_ERROR_NONE Everything executed correctly
EXAMPLE
Definition at line 101 of file GattService.cpp.
Generated on Tue Jul 12 2022 12:14:23 by
