Syntax
class LGATTClient : public _LTaskClass;
ContentsIndex
PreviousUpNext
LGATTClient Class
Members
Syntax
class LGATTClient : public _LTaskClass;
Description

You can use this class to read and write Bluetooth GATT attributes and receive notifications. This class instantiates an object to scan for nearby Bluetooth 4.0 peripheral devices. It also provides functionality to connect to one Bluetooth 4.0 peripheral device and enumerate all the GATT service the peripheral device provides.

Class Hierarchy
File

LGATTClient.h

Group
Methods
Method 
Description 
This function initializes a Bluetooth 4.0 GATT Client. 
This function connects to a Bluetooth 4.0 device. 
This function disconnects from a Bluetooth 4.0 device. 
end 
When this function is called, it will end the Bluetooth module and release the resources (memory) occupied by the LGATT Client object. 
This function gets the information of a characteristic. 
This function gets the descriptor from a specified characteristic. 
This function retrieves the device information from the scan result. 
This function gets number of services provided by a connected Bluetooth 4.0 device. 
This function gets the information of a service. 
This function queries the attribute value from the notification of a connected Bluetooth 4.0 device. 
This function reads the service characteristic provided by a Bluetooth 4.0 device. 
This function reads the descriptor from the service provided by a Bluetooth 4.0 device. 
This function reads the signal strength of the remote device. 
scan 
The LGATTClient scan function scans for Bluetooth 4.0 devices. The maximum number of Bluetooth 4.0 devices that can be captured by the scan function is 10. The scan function will return an integer value indicating the number of devices scanned or a timeout message, which ever comes first. 
This function enables or disables notifications. 
This function writes the service characteristic provided by a Bluetooth 4.0 device. 
This function writes the descriptor to a service.