virtual boolean onRead( LGATTReadRequest & request );
virtual boolean onRead( LGATTReadRequest & request );
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.
|
Parameters |
Description |
|
LGATTReadRequest & request |
An object representing the read request. Refer to LGATTReadRequest. |
true: Successful.
false: Failed.
LGATTServer.h