Mistake on this page?
Report an issue in GitHub or email us
Public Types | Public Member Functions
GattService Class Reference

#include <GattService.h>

Public Types

enum  {
  UUID_ALERT_NOTIFICATION_SERVICE = 0x1811, UUID_BATTERY_SERVICE = 0x180F, UUID_BLOOD_PRESSURE_SERVICE = 0x1810, UUID_CURRENT_TIME_SERVICE = 0x1805,
  UUID_CYCLING_SPEED_AND_CADENCE = 0x1816, UUID_DEVICE_INFORMATION_SERVICE = 0x180A, UUID_ENVIRONMENTAL_SERVICE = 0x181A, UUID_GLUCOSE_SERVICE = 0x1808,
  UUID_HEALTH_THERMOMETER_SERVICE = 0x1809, UUID_HEART_RATE_SERVICE = 0x180D, UUID_HUMAN_INTERFACE_DEVICE_SERVICE = 0x1812, UUID_IMMEDIATE_ALERT_SERVICE = 0x1802,
  UUID_LINK_LOSS_SERVICE = 0x1803, UUID_NEXT_DST_CHANGE_SERVICE = 0x1807, UUID_PHONE_ALERT_STATUS_SERVICE = 0x180E, UUID_REFERENCE_TIME_UPDATE_SERVICE = 0x1806,
  UUID_RUNNING_SPEED_AND_CADENCE = 0x1814, UUID_SCAN_PARAMETERS_SERVICE = 0x1813, UUID_TX_POWER_SERVICE = 0x1804
}
 

Public Member Functions

 GattService (const UUID &uuid, GattCharacteristic *characteristics[], unsigned numCharacteristics)
 
const UUIDgetUUID (void) const
 
uint16_t getHandle (void) const
 
uint8_t getCharacteristicCount (void) const
 
void setHandle (uint16_t handle)
 
GattCharacteristicgetCharacteristic (uint8_t index)
 

Detailed Description

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.

Member Enumeration Documentation

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.

Constructor & Destructor Documentation

GattService::GattService ( const UUID uuid,
GattCharacteristic characteristics[],
unsigned  numCharacteristics 
)
inline

Construct a GattService.

Parameters
[in]uuidThe UUID assigned to this service.
[in]characteristicsA pointer to the array of characteristics that belongs to the service.
[in]numCharacteristicsThe number of characteristics.
Attention
The characteristics of the service must remain valid while the GattServer uses the service.

Member Function Documentation

GattCharacteristic* GattService::getCharacteristic ( uint8_t  index)
inline

Get this service's characteristic at a specific index.

Parameters
[in]indexThe index of the characteristic.
Returns
A pointer to the characteristic at index index.
uint8_t GattService::getCharacteristicCount ( void  ) const
inline

Get the total number of characteristics within this service.

Returns
The total number of characteristics within this service.
uint16_t GattService::getHandle ( void  ) const
inline

Get the handle of the service declaration attribute in the ATT table.

Returns
The service's handle.
const UUID& GattService::getUUID ( void  ) const
inline

Get this service's UUID.

Returns
A reference to the service's UUID.
void GattService::setHandle ( uint16_t  handle)
inline

Set the handle of the service declaration attribute in the ATT table.

Attention
Application code must not use this API.
Parameters
[in]handleThe service's handle.

The documentation for this class was generated from the following file:
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.