Skip to content

Commit 1da844b

Browse files
author
Amanda Butler
authored
Update GattServer.h
Copy edit, mostly for active voice and because American English treats collective nouns as singular.
1 parent 70041c1 commit 1da844b

File tree

1 file changed

+47
-47
lines changed

1 file changed

+47
-47
lines changed

features/FEATURE_BLE/ble/GattServer.h

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -36,52 +36,52 @@
3636
/**
3737
* Construct and operates a GATT server.
3838
*
39-
* A Gatt server is a collection of GattService; these services contains
40-
* characteristics that may be read or written by a peer connected to the device.
41-
* These characteristics may also emits updates to subscribed clients when their
42-
* value change.
39+
* A Gatt server is a collection of GattService; these services contain
40+
* characteristics that a peer connected to the device may read or write.
41+
* These characteristics may also emit updates to subscribed clients when their
42+
* values change.
4343
*
4444
* @p Server Layout
4545
*
46-
* Application code can add GattService object to the server with the help of
46+
* Application code can add a GattService object to the server with the help of
4747
* the function addService(). That function registers all the GattCharacteristic
48-
* enclosed in the service as well as all the characteristics descriptors (see
49-
* GattAttribute) these characteristics contain. Service registration assign
48+
* enclosed in the service, as well as all the characteristics descriptors (see
49+
* GattAttribute) these characteristics contain. Service registration assigns
5050
* a unique handle to the various attributes being part of the service; this
5151
* handle should be used for subsequent read or write of these components.
5252
*
53-
* There is no primitives defined to remove a single service; however a call to
54-
* the function reset() will remove all services previously registered in the
53+
* There are no primitives defined to remove a single service; however, a call to
54+
* the function reset() removes all services previously registered in the
5555
* GattServer.
5656
*
5757
* @p Characteristic and attributes access
5858
*
5959
* Values of the characteristic and the characteristic descriptor present in the
60-
* GattServer must be accessed via the handle assigned to them when the service
60+
* GattServer must be accessed through the handle assigned to them when the service
6161
* has been registered; the GattServer class offers several flavors of read()
62-
* and write() function that retrieve or mutate an attribute value.
62+
* and write() functions that retrieve or mutate an attribute value.
6363
*
6464
* Application code can query if a client has subscribed to a given
6565
* characteristic's value update by invoking the function areUpdatesEnabled().
6666
*
6767
* @p Events
6868
*
69-
* The GattServer allows application code to register several event handler that
69+
* The GattServer allows application code to register several event handlers that
7070
* can be used to monitor client and server activities:
71-
* - onDataSent(): Register an event handler that will be called when a
71+
* - onDataSent(): Register an event handler that is called when a
7272
* characteristic value update has been sent to a client.
73-
* - onDataWriten(): Register an event handler that will be called when a
73+
* - onDataWriten(): Register an event handler that is called when a
7474
* client has written an attribute of the server.
75-
* - onDataRead(): Register an event handler that will be called when a
75+
* - onDataRead(): Register an event handler that is called when a
7676
* client has read an attribute of the server.
77-
* - onUpdatesEnabled: Register an event handler that will be called when a
77+
* - onUpdatesEnabled: Register an event handler that is called when a
7878
* client subscribes to updates of a characteristic.
79-
* - onUpdatesDisabled: Register an event handler that will be called when a
79+
* - onUpdatesDisabled: Register an event handler that is called when a
8080
* client unsubscribes from updates of a characteristic.
81-
* - onConfimationReceived: Register an event handler that will be called
82-
* when a client acknowledge a characteristic value notification.
81+
* - onConfimationReceived: Register an event handler that is called
82+
* when a client acknowledges a characteristic value notification.
8383
*
84-
* @note The term characteristic value update is used to represents
84+
* @note The term characteristic value update is used to represent
8585
* Characteristic Value Notification and Characteristic Value Indication when
8686
* the nature of the server initiated is not relevant.
8787
*/
@@ -152,7 +152,7 @@ class GattServer {
152152
GattServerShutdownCallbackChain_t;
153153

154154
/**
155-
* Event handler that handle subscription to characteristic updates,
155+
* Event handler that handles subscription to characteristic updates,
156156
* unsubscription from characteristic updates and notification confirmation.
157157
*
158158
* @see onUpdatesEnabled() onUpdateDisabled() onConfirmationReceived()
@@ -187,19 +187,19 @@ class GattServer {
187187
* followed by the characteristic declarations (including characteristic
188188
* descriptors) present in @p service.
189189
*
190-
* The process assign a unique attribute handle to all the elements added
190+
* The process assigns a unique attribute handle to all the elements added
191191
* into the attribute table. This handle is an ID that must be used for
192192
* subsequent interractions with the elements.
193193
*
194-
* @note Their is no mirror function that removes a single service.
194+
* @note There is no mirror function that removes a single service.
195195
* Application code can remove all the registered services by calling
196196
* reset().
197197
*
198198
* @important Service, characteristics and descriptors objects registered
199199
* within the GattServer must remain reachable until reset() is called.
200200
*
201201
* @param[in] service The service to be added; attribute handle of services,
202-
* characteristic and characteristic descriptors will be updated by the
202+
* characteristic and characteristic descriptors are updated by the
203203
* process.
204204
*
205205
* @return BLE_ERROR_NONE if the service was successfully added.
@@ -288,9 +288,9 @@ class GattServer {
288288
* @param[in] value A pointer to a buffer holding the new value.
289289
* @param[in] size Size in bytes of the new value (in bytes).
290290
* @param[in] localOnly If this flag is false and the attribute handle
291-
* written is a characteristic value then the server sends an update
291+
* written is a characteristic value, then the server sends an update
292292
* containing the new value to all clients that have subscribed to the
293-
* characteristic's notifications or indications. Otherwise the update does
293+
* characteristic's notifications or indications. Otherwise, the update does
294294
* not generate a single server initiated event.
295295
*
296296
* @return BLE_ERROR_NONE if the attribute value has been successfully
@@ -325,10 +325,10 @@ class GattServer {
325325
* @param[in] value A pointer to a buffer holding the new value.
326326
* @param[in] size Size of the new value (in bytes).
327327
* @param[in] localOnly If this flag is false and the attribute handle
328-
* written is a characteristic value then the server sends an update
328+
* written is a characteristic value, then the server sends an update
329329
* containing the new value to the client identified by the parameter
330330
* @p connectionHandle if it is subscribed to the characteristic's
331-
* notifications or indications. Otherwise the update does not generate a
331+
* notifications or indications. Otherwise, the update does not generate a
332332
* single server initiated event.
333333
*
334334
* @return BLE_ERROR_NONE if the attribute value has been successfully
@@ -359,7 +359,7 @@ class GattServer {
359359
*
360360
* @param[in] characteristic The characteristic.
361361
* @param[out] enabledP Upon return, *enabledP is true if updates are
362-
* enabled for a connected client; otherwise *enabledP is false.
362+
* enabled for a connected client; otherwise, *enabledP is false.
363363
*
364364
* @return BLE_ERROR_NONE if the connection and handle are found. False
365365
* otherwise.
@@ -385,7 +385,7 @@ class GattServer {
385385
* @param[in] characteristic The characteristic.
386386
* @param[out] enabledP Upon return, *enabledP is true if the client
387387
* identified by @p connectionHandle has subscribed to notifications or
388-
* indications of @p characteristic; otherwise *enabledP is false.
388+
* indications of @p characteristic; otherwise, *enabledP is false.
389389
*
390390
* @return BLE_ERROR_NONE if the connection and handle are found. False
391391
* otherwise.
@@ -443,7 +443,7 @@ class GattServer {
443443
* Add an event handler that monitors emission of characteristic value
444444
* updates.
445445
*
446-
* @param[in] objPtr Pointer to the instance that will be used to invoke the
446+
* @param[in] objPtr Pointer to the instance that is used to invoke the
447447
* event handler.
448448
* @param[in] memberPtr Event handler being registered. It is a member
449449
* function.
@@ -465,8 +465,8 @@ class GattServer {
465465
}
466466

467467
/**
468-
* Set an event handler that will be called after an attribute has been
469-
* written by a connected peer.
468+
* Set an event handler that is called after
469+
* a connected peer has written an attribute.
470470
*
471471
* @param[in] callback The event handler being registered.
472472
*
@@ -479,10 +479,10 @@ class GattServer {
479479
}
480480

481481
/**
482-
* Set an event handler that will be called after an attribute has been
483-
* written by a connected peer.
482+
* Set an event handler that is called after
483+
* a connected peer has written an attribute.
484484
*
485-
* @param[in] objPtr Pointer to the instance that will be used to invoke the
485+
* @param[in] objPtr Pointer to the instance that is used to invoke the
486486
* event handler (@p memberPtr).
487487
* @param[in] memberPtr Event handler being registered. It is a member
488488
* function.
@@ -542,7 +542,7 @@ class GattServer {
542542
/**
543543
* Set an event handler that monitors attribute reads from connected clients.
544544
*
545-
* @param[in] objPtr Pointer to the instance that will be used to invoke the
545+
* @param[in] objPtr Pointer to the instance that is used to invoke the
546546
* event handler (@p memberPtr).
547547
* @param[in] memberPtr Event handler being registered. It is a member
548548
* function.
@@ -579,8 +579,8 @@ class GattServer {
579579
/**
580580
* Set an event handler that monitors shutdown or reset of the GattServer.
581581
*
582-
* The event handler will be invoked when the GattServer instance is about
583-
* to be shut down. This can result of a call to reset() or BLE::reset().
582+
* The event handler is invoked when the GattServer instance is about
583+
* to be shut down. This can result in a call to reset() or BLE::reset().
584584
*
585585
* @param[in] callback Event handler being registered.
586586
*
@@ -597,10 +597,10 @@ class GattServer {
597597
/**
598598
* Set an event handler that monitors shutdown or reset of the GattServer.
599599
*
600-
* The event handler will be invoked when the GattServer instance is about
600+
* The event handler is invoked when the GattServer instance is about
601601
* to be shut down. This can result of a call to reset() or BLE::reset().
602602
*
603-
* @param[in] objPtr Pointer to the instance that will be used to invoke the
603+
* @param[in] objPtr Pointer to the instance that is used to invoke the
604604
* event handler (@p memberPtr).
605605
* @param[in] memberPtr Event handler being registered. It is a member
606606
* function.
@@ -650,9 +650,9 @@ class GattServer {
650650
}
651651

652652
/**
653-
* Set up an event handler that monitors notification acknowledgement.
653+
* Set up an event handler that monitors notification acknowledgment.
654654
*
655-
* The event handler is called when a client send a confirmation that it has
655+
* The event handler is called when a client sends a confirmation that it has
656656
* correctly received a notification from the server.
657657
*
658658
* @param[in] callback Event handler being registered.
@@ -669,7 +669,7 @@ class GattServer {
669669
* of a data written event.
670670
*
671671
* @important Vendor implementation must invoke this function after one of
672-
* the GattServer attribute has been written.
672+
* the GattServer attributes has been written.
673673
*
674674
* @param[in] params The data written parameters passed to the registered
675675
* handlers.
@@ -684,7 +684,7 @@ class GattServer {
684684
* of a data read event.
685685
*
686686
* @important Vendor implementation must invoke this function after one of
687-
* the GattServer attribute has been read.
687+
* the GattServer attributes has been read.
688688
*
689689
* @param[in] params The data read parameters passed to the registered
690690
* handlers.
@@ -699,7 +699,7 @@ class GattServer {
699699
* of updates enabled, updates disabled or confirmation received events.
700700
*
701701
* @important Vendor implementation must invoke this function when a client
702-
* subscribe to characteristic updates, unsubscribe from characteristic
702+
* subscribes to characteristic updates, unsubscribes from characteristic
703703
* updates or a notification confirmation has been received.
704704
*
705705
* @param[in] type The type of event that occurred.
@@ -750,7 +750,7 @@ class GattServer {
750750
* Shut down the GattServer instance.
751751
*
752752
* This function notifies all event handlers listening for shutdown events
753-
* that the GattServer is about to be shut down; then it clear all
753+
* that the GattServer is about to be shut down; then it clears all
754754
* GattServer state.
755755
*
756756
* @note This function is meant to be overridden in the platform-specific

0 commit comments

Comments
 (0)