Originally from Donal's blog article. http://mbed.org/users/donalm/code/BLE_Health_Thermometer_Blog/ Changed low freq. clock source from XTAL to IRC.
Dependents: BLE_Health_Thermometer_IRC BLE_RCBController_micono_test BLE_konashi_PIO_test BLE_ADT7410_TMP102_Sample ... more
Fork of BLE_API_Native_blog by
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 11:35:32 by 1.7.2