Representation of a GattServer service. More...
#include <GattService.h>
Public Types |
Public Member Functions | |
GattService (const UUID &uuid, GattCharacteristic *characteristics[], unsigned numCharacteristics) | |
Construct a GattService. More... | |
const UUID & | getUUID (void) const |
Get this service's UUID. More... | |
uint16_t | getHandle (void) const |
Get the handle of the service declaration attribute in the ATT table. More... | |
uint8_t | getCharacteristicCount (void) const |
Get the total number of characteristics within this service. More... | |
void | setHandle (uint16_t handle) |
Set the handle of the service declaration attribute in the ATT table. More... | |
GattCharacteristic * | getCharacteristic (uint8_t index) |
Get this service's characteristic at a specific index. More... | |
Representation of a GattServer service.
A service is a cohesive collection of characteristics. It is identified by a UUID and starts at a specific handle of its GattServer.
Definition at line 38 of file GattService.h.
anonymous enum |
Enumerator | |
---|---|
UUID_ALERT_NOTIFICATION_SERVICE |
UUID of the Alert Notification service. |
UUID_BATTERY_SERVICE |
UUID of the Battery service. |
UUID_BLOOD_PRESSURE_SERVICE |
UUID of the Blood Pressure service. |
UUID_CURRENT_TIME_SERVICE |
UUID of the Current Time service. |
UUID_CYCLING_SPEED_AND_CADENCE |
UUID of the Cycling Speed and Cadence (CSC) service. |
UUID_DEVICE_INFORMATION_SERVICE |
UUID of the Device Information Service (DIS). |
UUID_ENVIRONMENTAL_SERVICE |
UUID of the environmental service. |
UUID_GLUCOSE_SERVICE |
UUID of the Glucose service. |
UUID_HEALTH_THERMOMETER_SERVICE |
UUID of the health thermometer. |
UUID_HEART_RATE_SERVICE |
UUID of the Heart Rate service. |
UUID_HUMAN_INTERFACE_DEVICE_SERVICE |
UUID of the Human Interface Device (HID) service. |
UUID_IMMEDIATE_ALERT_SERVICE |
UUID of the Immediate Alert service. |
UUID_LINK_LOSS_SERVICE |
UUID of the Link Loss service. |
UUID_NEXT_DST_CHANGE_SERVICE |
UUID of the Next DST change service. |
UUID_PHONE_ALERT_STATUS_SERVICE |
UUID of the Phone Alert Status service. |
UUID_REFERENCE_TIME_UPDATE_SERVICE |
UUID of the Reference Time Update service. |
UUID_RUNNING_SPEED_AND_CADENCE |
UUID of the Running Speed and Cadence (RSC) service. |
UUID_SCAN_PARAMETERS_SERVICE |
UUID of the Scan Parameter service. |
UUID_TX_POWER_SERVICE |
UUID of the TX power service. |
Definition at line 40 of file GattService.h.
GattService | ( | const UUID & | uuid, |
GattCharacteristic * | characteristics[], | ||
unsigned | numCharacteristics | ||
) |
Construct a GattService.
[in] | uuid | The UUID assigned to this service. |
[in] | characteristics | A pointer to the array of characteristics that belongs to the service. |
[in] | numCharacteristics | The number of characteristics. |
Definition at line 149 of file GattService.h.
GattCharacteristic* getCharacteristic | ( | uint8_t | index | ) |
Get this service's characteristic at a specific index.
[in] | index | The index of the characteristic. |
index
. Definition at line 209 of file GattService.h.
uint8_t getCharacteristicCount | ( | void | ) | const |
Get the total number of characteristics within this service.
Definition at line 185 of file GattService.h.
uint16_t getHandle | ( | void | ) | const |
Get the handle of the service declaration attribute in the ATT table.
Definition at line 175 of file GattService.h.
const UUID& getUUID | ( | void | ) | const |
Get this service's UUID.
Definition at line 165 of file GattService.h.
void setHandle | ( | uint16_t | handle | ) |
Set the handle of the service declaration attribute in the ATT table.
[in] | handle | The service's handle. |
Definition at line 197 of file GattService.h.