34
34
*
35
35
* Attributes are the building block of GATT servers: services are attributes,
36
36
* characteristics are groups of attributes and characteristic descriptors are
37
- * attributes too.
37
+ * attributes, too.
38
38
*
39
39
* @par Typed values
40
40
*
41
41
* Attributes are typed values composed of a type and its associated value. The
42
- * attribute type identifies the attribute purpose and is modelled by a UUID
43
- * read by the client during the discovery of the gatt server. The value of the
42
+ * attribute type identifies the attribute purpose. A UUID read by the client
43
+ * during the discovery of the GATT server models the attribute type . The value of the
44
44
* attribute is an array of bytes; its length may be fixed or variable.
45
45
*
46
- * As an example a primary service is declared by an attribute with the type
47
- * 0x2800 and the value of the attribute is the UUID of the service.
46
+ * As an example, a primary service is declared by an attribute with the type
47
+ * 0x2800, and the value of the attribute is the UUID of the service.
48
48
*
49
49
* @par Attribute Access
50
50
*
51
- * The GATT server is an array of attributes were each of the attributes is
52
- * identified within the array by a unique index . That index is called the
53
- * attribute handle and clients use it to access to attributes within the server.
51
+ * The GATT server is an array of attributes in which a unique index identifies
52
+ * each of the attributes within the array . That index is called the attribute
53
+ * handle, and clients use it to access to attributes within the server.
54
54
*
55
55
* @note Attributes do not contain information related to their permissions,
56
56
* grouping or semantic. Higher level specifications define these concepts.
@@ -60,9 +60,9 @@ class GattAttribute {
60
60
/* *
61
61
* Representation of an attribute handle.
62
62
*
63
- * Each attribute in a GattServer have a unique handle that can be used by
64
- * clients to identify the attribute. The underlying BLE stack usually
65
- * generates and assign handles to attributes.
63
+ * Each attribute in a GattServer has a unique handle that clients can use
64
+ * to identify the attribute. The underlying BLE stack usually
65
+ * generates and assigns handles to attributes.
66
66
*/
67
67
typedef ble::attribute_handle_t Handle_t;
68
68
@@ -75,19 +75,19 @@ class GattAttribute {
75
75
/* *
76
76
* Construct an attribute.
77
77
*
78
- * Application code use attributes to model characteristic descriptors and
78
+ * Application code uses attributes to model characteristic descriptors and
79
79
* characteristics values.
80
80
*
81
81
* @param[in] uuid The type of the attribute.
82
- * @param[in] valuePtr Pointer to the memory buffer which contains the
82
+ * @param[in] valuePtr Pointer to the memory buffer, which contains the
83
83
* initial value of the attribute. The constructor does not make a copy of
84
- * the attribute buffer; as a consequence the memory buffer must remain
84
+ * the attribute buffer; as a consequence, the memory buffer must remain
85
85
* valid during the lifetime of the attribute.
86
86
* @param[in] len The length in bytes of this attribute's value.
87
87
* @param[in] maxLen The length in bytes of the memory buffer containing the
88
88
* attribute value. It must be greater than or equal to @p len.
89
- * @param[in] hasVariableLen Flag that indicate if the attribute's value
90
- * length can changes over time.
89
+ * @param[in] hasVariableLen Flag that indicates whether the attribute's value
90
+ * length can change throughout time.
91
91
*
92
92
* @par Example
93
93
*
@@ -121,7 +121,7 @@ class GattAttribute {
121
121
/* *
122
122
* Get the attribute's handle in the ATT table.
123
123
*
124
- * @note The attribute's handle is set by the GattServer when services are
124
+ * @note The GattServer sets the attribute's handle when services are
125
125
* inserted.
126
126
*
127
127
* @return The attribute's handle.
@@ -178,8 +178,8 @@ class GattAttribute {
178
178
/* *
179
179
* Set the attribute handle.
180
180
*
181
- * @important This function is used internally by the GattServer and must
182
- * not be used by application code .
181
+ * @important The GattServer uses this function internally.
182
+ * Application code must not use it .
183
183
*
184
184
* @param[in] id The new attribute handle.
185
185
*/
@@ -199,7 +199,7 @@ class GattAttribute {
199
199
}
200
200
201
201
/* *
202
- * Check whether the length of the attribute's value can change over time.
202
+ * Check whether the length of the attribute's value can change throughout time.
203
203
*
204
204
* @return true if the attribute value has a variable length and false
205
205
* otherwise.
@@ -231,7 +231,7 @@ class GattAttribute {
231
231
uint16_t _len;
232
232
233
233
/* *
234
- * Whether the length of the value can change over time.
234
+ * Whether the length of the value can change throughout time.
235
235
*/
236
236
bool _hasVariableLen;
237
237
0 commit comments