Skip to content

Commit 08ba159

Browse files
author
Amanda Butler
authored
Copy edit DiscoveredCharacteristic.h
Make minor copy edits, mostly for active voice and American English.
1 parent c9931f3 commit 08ba159

File tree

1 file changed

+61
-61
lines changed

1 file changed

+61
-61
lines changed

features/FEATURE_BLE/ble/DiscoveredCharacteristic.h

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
/**
3737
* Representation of a characteristic discovered.
3838
*
39-
* Instances of this class are generated by the GattClient discovery procedure
40-
* initiated with GattClient::launchServiceDiscovery().
39+
* The GattClient discovery procedure initiated with
40+
* GattClient::launchServiceDiscovery() generates instances of this class.
4141
*
4242
* It exposes the main attributes of the discovered characteristic:
4343
* - The UUID of the characteristic, it can be retrieved by a call to the
@@ -51,39 +51,39 @@
5151
* It important to note that the value of the characteristic - if it is
5252
* accessible - is not fetched at discovery time.
5353
*
54-
* The main operations offered by the class are reading, writing and discovering
54+
* The main operations the class offers are reading, writing and discovering
5555
* the descriptors of the characteristic discovered.
5656
*
5757
* Reading a discovered characteristic can be accomplished in two different
58-
* fashion:
58+
* fashions:
5959
*
6060
* If the user has a callback registered for the data read operation in the
61-
* GattClient then a call to the read(uint16_t) function will initiate a read of
61+
* GattClient, then a call to the read(uint16_t) function will initiate a read of
6262
* the characteristic. Results of the operation will be pass on the callback
63-
* registered by GattClient::onDataRead() which process all the responses to
63+
* registered by GattClient::onDataRead(), which processes all the responses to
6464
* read requests. The read request for a given characteristic can be identified
65-
* by the connection handle and the attribute handle which are present in
65+
* by the connection handle and the attribute handle, which are present in
6666
* GattReadCallbackParams.
6767
*
6868
* Another overload (read(uint16_t, const GattClient::ReadCallback_t&)) of the
69-
* read function accept a completion callback as a last parameter. That
69+
* read function accepts a completion callback as a last parameter. That
7070
* completion callback will be invoked automatically once the response to the
71-
* read request for that given characteristic has been received. However
71+
* read request for that given characteristic has been received. However,
7272
* convenience came at the expense of dynamic memory usage for the time of the
7373
* transaction.
7474
*
7575
* Similarly, two versions of the write() API are exposed. One where the user
76-
* has to register a callback handling write response via the function
77-
* GattClient::onDataWritten() and another one which accept a completion
76+
* has to register a callback handling write response through the function
77+
* GattClient::onDataWritten() and another one that accepts a completion
7878
* callback in input.
7979
*
80-
* It is also possible to send a write command which is not acknowledged by the
80+
* It is also possible to send a write command, which is not acknowledged by the
8181
* peer server by using the function writeWoResponse().
8282
*
83-
* Finally descriptors of the characteristic can be discovered by invoking the
84-
* function discoverDescriptors which is a shorthand for calling
83+
* Finally, descriptors of the characteristic can be discovered by invoking the
84+
* function discoverDescriptors, which is shorthand for calling
8585
* GattClient::discoverCharacteristicDescriptors. That discovery is necessary to
86-
* enable or disable characteristic notification or indication which is achieved
86+
* enable or disable characteristic notification or indication that is achieved
8787
* by writing on the Client Characteristic Configuration Descriptor (CCCD).
8888
*/
8989
class DiscoveredCharacteristic {
@@ -96,47 +96,47 @@ class DiscoveredCharacteristic {
9696
* Permits broadcasts of the characteristic value using the character
9797
* the Server Characteristic Configuration Descriptor.
9898
*
99-
* @note If set descriptors of the characteristic shall contain a Server
99+
* @note If set, descriptors of the characteristic contain a Server
100100
* Characteristic Configuration Descriptor.
101101
*/
102102
uint8_t _broadcast :1;
103103

104104
/**
105-
* If set the value of the characteristic can be read.
105+
* If set, the value of the characteristic can be read.
106106
*/
107107
uint8_t _read :1;
108108

109109
/**
110-
* If set the characteristic value can be written by a write command
110+
* If set, a write command can write the characteristic value
111111
* (write without response).
112112
*/
113113
uint8_t _writeWoResp :1;
114114

115115
/**
116-
* If set clients can issue requests to write the characteristic.
116+
* If set, clients can issue requests to write the characteristic.
117117
*/
118118
uint8_t _write :1;
119119

120120
/**
121-
* If set the server can emit notifications of the Characteristic Value
122-
* (without client acknowledgement).
121+
* If set, the server can emit notifications of the Characteristic Value
122+
* (without client acknowledgment).
123123
*
124-
* @note If set descriptors of the characteristic shall contain a Client
124+
* @note If set, descriptors of the characteristic contain a Client
125125
* Characteristic Configuration Descriptor.
126126
*/
127127
uint8_t _notify :1;
128128

129129
/**
130-
* If set the server can emit indication of the Characteristic Value
130+
* If set, the server can emit indication of the Characteristic Value
131131
* (with client acknowledgement).
132132
*
133-
* @note If set descriptors of the characteristic shall contain a Client
133+
* @note If set, descriptors of the characteristic contain a Client
134134
* Characteristic Configuration Descriptor.
135135
*/
136136
uint8_t _indicate :1;
137137

138138
/**
139-
* If set signed write of the Characteristic Value are supported.
139+
* If set, signed write of the Characteristic Value is supported.
140140
*/
141141
uint8_t _authSignedWrite :1;
142142

@@ -171,7 +171,7 @@ class DiscoveredCharacteristic {
171171
/**
172172
* Return the value of the write without response property.
173173
*
174-
* @return true if the characteristic accept write without response
174+
* @return true if the characteristic accepts write without response
175175
* commands and false otherwise.
176176
*
177177
* @see _writeWoResp
@@ -184,7 +184,7 @@ class DiscoveredCharacteristic {
184184
/**
185185
* Return the value of the write property.
186186
*
187-
* @return true if writing the characteristic accept write requests and
187+
* @return true if writing the characteristic accepts write requests and
188188
* false otherwise.
189189
*
190190
* @see _write
@@ -201,7 +201,7 @@ class DiscoveredCharacteristic {
201201
* can be configured to notify the characteristic value to a given
202202
* client and false otherwise.
203203
*
204-
* @note unlike indication the notification procedure does not require
204+
* @note unlike indication, the notification procedure does not require
205205
* acknowledgement from the client.
206206
*
207207
* @see _notify
@@ -219,7 +219,7 @@ class DiscoveredCharacteristic {
219219
* client and false otherwise.
220220
*
221221
* @note unlike notification the indication procedure does require
222-
* acknowledgement from the client.
222+
* acknowledgment from the client.
223223
*
224224
* @see _indicate
225225
*/
@@ -231,7 +231,7 @@ class DiscoveredCharacteristic {
231231
/**
232232
* Return the value of the authenticated signed writes property.
233233
*
234-
* @return true if the characteristic accept authenticated signed write
234+
* @return true if the characteristic accepts authenticated signed write
235235
* and false otherwise.
236236
*/
237237
bool authSignedWrite(void) const
@@ -242,8 +242,8 @@ class DiscoveredCharacteristic {
242242
/**
243243
* Equal to operator for DiscoveredCharacteristic::Properties_t.
244244
*
245-
* @param[in] lhs The left hand side of the equality expression
246-
* @param[in] rhs The right hand side of the equality expression
245+
* @param[in] lhs The left hand side of the equality expression.
246+
* @param[in] rhs The right hand side of the equality expression.
247247
*
248248
* @return true if operands are equals and false otherwise.
249249
*/
@@ -284,8 +284,8 @@ class DiscoveredCharacteristic {
284284
* of the characteristic.
285285
*
286286
* Read responses will be passed to the callback registered in
287-
* GattClient::onDataRead(). Read responses to read requests initiated by
288-
* this function call will have their GattReadCallbackParams::connHandle
287+
* GattClient::onDataRead(). Read responses to read requests that this function
288+
* call initiates will have their GattReadCallbackParams::connHandle
289289
* field equal to the value returned by getConnectionHandle() and their
290290
* GattReadCallbackParams::handle field equal to the value returned by
291291
* getValueHandle().
@@ -310,7 +310,7 @@ class DiscoveredCharacteristic {
310310
* - where the read operation begin.
311311
*
312312
* @param[in] onRead Completion callback which will accept the response of
313-
* the read request. The callback is copied, it is not necessary to keep it
313+
* the read request. The callback is copied; it is unnecessary to keep it
314314
* in memory after the call.
315315
*
316316
* @return BLE_ERROR_NONE if a read has been initiated.
@@ -320,7 +320,7 @@ class DiscoveredCharacteristic {
320320
* @return BLE_ERROR_OPERATION_NOT_PERMITTED due to the characteristic's
321321
* properties.
322322
*
323-
* @note This function is similar to read(uint16_t) const however it uses
323+
* @note This function is similar to read(uint16_t) const; however, it uses
324324
* dynamic memory to store the use completion callback.
325325
*/
326326
ble_error_t read(
@@ -331,8 +331,8 @@ class DiscoveredCharacteristic {
331331
/**
332332
* Perform a write without response procedure.
333333
*
334-
* @note Write without responses are not acknowledged by the server and
335-
* therefore won't generate any event on the client side.
334+
* @note The server does not acknowledge write without responses.
335+
* Therefore, they won't generate any event on the client side.
336336
*
337337
* @param[in] length The amount of data being written.
338338
* @param[in] value The bytes being written.
@@ -355,20 +355,20 @@ class DiscoveredCharacteristic {
355355
* invoked with the descriptor discovered as parameter. When the process
356356
* ends, the callback onTermination is invoked.
357357
*
358-
* @param[in] onDescriptorDiscovered Callback invoked when a descriptor is
359-
* discovered
358+
* @param[in] onDescriptorDiscovered Callback is invoked when a descriptor is
359+
* discovered.
360360
*
361-
* @param[in] onTermination Callback invoke when the discovery process ends.
361+
* @param[in] onTermination Callback is invoked when the discovery process ends.
362362
*
363363
* @return BLE_ERROR_NONE if descriptor discovery is launched successfully;
364364
* else an appropriate error.
365365
*
366-
* @note This function is a shorthand for
367-
* GattClient::discoverCharacteristicDescriptors therefore
366+
* @note This function is shorthand for
367+
* GattClient::discoverCharacteristicDescriptors; therefore,
368368
* GattClient::isCharacteristicDescriptorDiscoveryActive can be used to
369-
* determine if the descriptor discovery and
369+
* determine the descriptor discovery and
370370
* GattClient::terminateCharacteristicDescriptorDiscovery can be used to
371-
* ends the discovery process.
371+
* end the discovery process.
372372
*/
373373
ble_error_t discoverDescriptors(
374374
const CharacteristicDescriptorDiscovery::DiscoveryCallback_t &onDescriptorDiscovered,
@@ -378,16 +378,16 @@ class DiscoveredCharacteristic {
378378
/**
379379
* Initiate a write procedure of the characteristic value.
380380
*
381-
* Unlike write without responses (see writeWoResponse()) an acknowledgement
381+
* Unlike write without responses (see writeWoResponse()), an acknowledgment
382382
* is expected for this procedure. The response of the peer GATT server to
383-
* the write request will be passed to callbacks registered in
383+
* the write request is passed to callbacks registered in
384384
* GattClient::onDataWritten().
385385
*
386386
* Similarly to read responses, responses to write request of this
387387
* characteristic can be identified by their connection handle (
388-
* GattWriteCallbackParams::connHandle) which will be equal to the value
388+
* GattWriteCallbackParams::connHandle), which is equal to the value
389389
* returned by getConnectionHandle() and their attribute handle (
390-
* GattWriteCallbackParams::handle) which will be equal to the value
390+
* GattWriteCallbackParams::handle), which is equal to the value
391391
* returned by getValueHandle().
392392
*
393393
* @param[in] length The amount of data being written.
@@ -402,16 +402,16 @@ class DiscoveredCharacteristic {
402402
* @return BLE_ERROR_OPERATION_NOT_PERMITTED due to the characteristic's
403403
* properties.
404404
*
405-
* @note Internally the API use the write or long write procedure depending
405+
* @note Internally, the API uses the write or long write procedure, depending
406406
* on the number of bytes to write and the MTU size.
407407
*/
408408
ble_error_t write(uint16_t length, const uint8_t *value) const;
409409

410410
/**
411411
* Initiate a write procedure of the characteristic value.
412412
*
413-
* Same as write(uint16_t, const uint8_t *) const but accept a completion
414-
* callback which will be invoked when the server response is received.
413+
* Same as write(uint16_t, const uint8_t *) const but accepts a completion
414+
* callback, which is invoked when the server response is received.
415415
*
416416
* @param[in] length The amount of bytes to write.
417417
* @param[in] value The bytes to write.
@@ -492,13 +492,13 @@ class DiscoveredCharacteristic {
492492
/**
493493
* Return the last attribute handle of the characteristic definition.
494494
*
495-
* The attribute layout of a characteristic definition is as follows:
496-
* - Declaration attribute (see #getDeclHandle)
497-
* - Value attribute (see #getValueHandle)
495+
* The attribute layout of a characteristic definition is:
496+
* - Declaration attribute (see #getDeclHandle).
497+
* - Value attribute (see #getValueHandle).
498498
* - Zero or more characteristic descriptors attribute.
499499
*
500500
* The last attribute handle is used internally to discover characteristic
501-
* descriptors. The discovery operate on the range [ValueHandle + 1 :
501+
* descriptors. The discovery operates on the range [ValueHandle + 1 :
502502
* LastHandle].
503503
*
504504
* @return The last handle of this characteristic definition.
@@ -511,19 +511,19 @@ class DiscoveredCharacteristic {
511511
}
512512

513513
/**
514-
* Get the GattClient which can operate on this characteristic.
514+
* Get the GattClient, which can operate on this characteristic.
515515
*
516-
* @return The GattClient which can operate on this characteristic.
516+
* @return The GattClient, which can operate on this characteristic.
517517
*/
518518
GattClient* getGattClient()
519519
{
520520
return gattc;
521521
}
522522

523523
/**
524-
* Get the GattClient which can operate on this characteristic.
524+
* Get the GattClient, which can operate on this characteristic.
525525
*
526-
* @return The GattClient which can operate on this characteristic.
526+
* @return The GattClient, which can operate on this characteristic.
527527
*/
528528
const GattClient* getGattClient() const
529529
{
@@ -534,7 +534,7 @@ class DiscoveredCharacteristic {
534534
* @brief Get the connection handle to the GattServer containing this
535535
* characteristic.
536536
*
537-
* @return Connection handle to the GattServer which contain this
537+
* @return Connection handle to the GattServer, which contains this
538538
* characteristic.
539539
*/
540540
Gap::Handle_t getConnectionHandle() const

0 commit comments

Comments
 (0)