ContentsIndex
LGATTService Class Members
LGATTService Class | Legend
Members
Methods
Method 
Description 
You need to override this function to receive handles for each characteristic when characteristics are added. 
This function is called when the status of connections from the central device has changed. 
You need to override this method to receive handles for each descriptor when descriptors are added. 
You need to override this method in order to define a Bluetooth GATT service. This function is called immediately upon calling LGATTServer.begin(), and it must return an array of LGATTServiceInfo beginning with the type TYPE_SERVICE, followed by elements of TYPE_CHARACTERISTIC or TYPE_DESCRIPTOR. Also, it must be terminated with an element of TYPE_END. 
You need to override this method to handle a read request coming from central device. Always respond to the request by calling request.ackOk() or request.ackFail() before this function returns. Otherwise it will lead to an undefined behavior. 
You need to override this method to handle a write action coming from the central device. You may store sendData or ACK after onRead() returns, Always respond the write request by calling ackOK() and ackFail() before this function returns. Otherwise it will lead to an undefined behavior. 
This function sends notifications or indications to the central device.