Skip to content

Commit a517758

Browse files
active voide and clarifications
1 parent a6368a4 commit a517758

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/reference/api/connectivity/bluetooth/GattServer.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@ A GattServer is a collection of GattServices. These services contain characteris
44

55
#### Server layout
66

7-
Application code can add a GattService object to the server with the help of the function `addService()`. That function registers all the GattCharacteristics enclosed in the service, as well as all the characteristic descriptors (see GattAttribute) that these characteristics contain. Service registration assigns a unique handle to the various attributes that are part of the service, and this handle should be used to subsequently read or write these components.
7+
Application code can add a GattService object to the server with the help of the function `addService()`. That function registers all the GattCharacteristics enclosed in the service, as well as all the characteristic descriptors (see GattAttribute) that these characteristics contain. Service registration assigns a unique handle to the various attributes that are part of the service. The user must use this handle to read or write these components.
88

99
There are no defined primitives that remove a single service; however, a call to the function `reset()` removes all services previously registered in the GattServer.
1010

1111
#### Characteristic and attributes access
1212

13-
Values of the characteristic and the characteristic descriptor present in the GattServer must be accessed through the handle assigned to them when the service has been registered. The GattServer class offers several flavours of `read()` and `write()` functions that retrieve or mutate an attribute value.
13+
You must access values of the characteristic and the characteristic descriptor present in the GattServer through the handle assigned to them when you registered the service. The GattServer class offers several types of `read()` and `write()` functions that retrieve or mutate an attribute value.
1414

15-
If a client has subscribed to a given characteristic's value update, then the application code can query by invoking the function `areUpdatesEnabled()`.
15+
You can query the server by invoking the function `areUpdatesEnabled()` to find out if a client has subscribed to a given characteristic's value update.
1616

1717
#### Events
1818

19-
The GattServer allows application code to register several event handlers that can be used to monitor client and server activities:
19+
You can register several event handlers with the GattServer that will be used to notify you of client (remote application connected to the server) and server activities:
2020

21-
- `onDataSent`: Register an event handler that is called when a characteristic value update has been sent to a client.
22-
- `onDataWriten`: Register an event handler that is called when a client has written an attribute of the server.
23-
- `onDataRead`: Register an event handler that is called when a client has read an attribute of the server.
24-
- `onUpdatesEnabled`: Register an event handler that is called when a client subscribes to updates for a characteristic.
25-
- `onUpdatesDisabled`: Register an event handler that is called when a client unsubscribes from updates for a characteristic.
26-
- `onConfimationReceived`: Register an event handler that is called when a client acknowledges a characteristic value notification.
21+
- `onDataSent`: Register an event handler with the GattServer that will be called by it when it sends a characteristic value update to a client.
22+
- `onDataWriten`: Register an event handler with the GattServer that will be called by it when a client has written an attribute of the server.
23+
- `onDataRead`: Register an event handler with the GattServer that will be called by it when a client has read an attribute of the server.
24+
- `onUpdatesEnabled`: Register an event handler with the GattServer that will be called by it when a client subscribes to updates for a characteristic.
25+
- `onUpdatesDisabled`: Register an event handler with the GattServer that will be called by it when a client unsubscribes from updates for a characteristic.
26+
- `onConfimationReceived`: Register an event handler with the GattServer that will be called by it when a client acknowledges a characteristic value notification.
2727

2828
The term characteristic value update represents Characteristic Value Notification and Characteristic Value Indication when the nature of the server initiated is not relevant.
2929

0 commit comments

Comments
 (0)