Lines Matching full:attribute
2 * @brief Generic Attribute Profile handling.
14 * @brief Generic Attribute Profile (GATT)
15 * @defgroup bt_gatt Generic Attribute Profile (GATT)
36 /** GATT attribute permission bit field values */
41 /** Attribute read permission. */
44 /** Attribute write permission. */
47 /** @brief Attribute read permission with encryption.
53 /** @brief Attribute write permission with encryption.
59 /** @brief Attribute read permission with authentication.
66 /** @brief Attribute write permission with authentication.
73 /** @brief Attribute prepare write permission.
80 /** @brief Attribute read permission with LE Secure Connection encryption.
86 /** @brief Attribute write permission with LE Secure Connection encryption.
94 * @brief Construct error return value for attribute read and write callbacks.
98 * @return Appropriate error code for the attribute callbacks.
102 /** GATT attribute write flags */
104 /** @brief Attribute prepare write flag
111 /** @brief Attribute write command flag
118 /** @brief Attribute write execute flag
127 /* Forward declaration of GATT Attribute structure */
131 * @brief Attribute read callback
135 * This function may safely assume the Attribute Permissions
152 * @param attr The attribute that's being read
166 * @brief Attribute Value write implementation
170 * This function may safely assume the Attribute Permissions
181 * Attribute Value write implementations can and often do have
194 * @param attr The attribute that's being written
208 /** @brief GATT Attribute
210 * This type primarily represents an ATT Attribute that may be
225 /** @brief Attribute Type, aka. "UUID"
227 * The Attribute Type determines the interface that can
231 * E.g. Attribute of type @ref BT_UUID_GATT_CPF will act as a
235 * You can define a new Attribute Type.
239 /** @brief Attribute Value read method
243 * Must be NULL if the attribute is not readable.
245 * The behavior of this method is determined by the Attribute
252 /** @brief Attribute Value write method
256 * Must be NULL if the attribute is not writable.
258 * The behavior of this method is determined by the Attribute
269 * @note Attributes may have the same Attribute Type but have
271 * Attribute Type alone must not be used to infer the type of
278 /** @brief Attribute Handle or zero, maybe?
282 * contain the Attribute Handle.
291 /** @brief Attribute Permissions
303 * Indicates if the attribute handle was assigned automatically.
305 * This flag is set to 1 if the attribute handle was assigned by the stack,
318 /** Service Attribute count */
326 /** Service Attribute count */
332 /** @brief Service Attribute Value. */
340 /** @brief Include Attribute Value. */
371 * read operation for the attribute that is being read.
374 * @param attr The attribute that is being read.
385 * write operation for the attribute that is being written.
388 * @param attr The attribute that is being written.
451 /** @brief Characteristic Attribute Value. */
465 /** @brief Characteristic Extended Properties Attribute Value. */
486 /** Client Characteristic Configuration Attribute Value */
502 /** Server Characteristic Configuration Attribute Value */
508 /** @brief GATT Characteristic Presentation Format Attribute Value. */
630 * @brief Attribute iterator callback.
632 * @param attr Attribute found.
633 * @param handle Attribute handle found.
636 * @return ``BT_GATT_ITER_CONTINUE`` if should continue to the next attribute.
643 /** @brief Attribute iterator by type.
650 * @param attr_data Attribute data to match, passing NULL skips data matching.
661 /** @brief Attribute iterator.
678 /** @brief Iterate to the next attribute
680 * Iterate to the next attribute following a given attribute.
682 * @param attr Current Attribute.
684 * @return The next attribute or NULL if it cannot be found.
688 /** @brief Find Attribute by UUID.
690 * Find the attribute with the matching UUID.
692 * the ``attr_count`` to the service attribute count .
694 * @param attr Pointer to an attribute that serves as the starting point
706 /** @brief Get Attribute handle.
708 * @param attr An attribute object currently registered in the
711 * @return Handle of the corresponding attribute or zero if the attribute
718 * @param attr A Characteristic Attribute.
720 * @note The ``user_data`` of the attribute must of type @ref bt_gatt_chrc.
724 * attribute.
728 /** @brief Generic Read Attribute value helper.
730 * Read attribute value from local database storing the result into buffer.
733 * @param attr Attribute to read.
737 * @param value Attribute value.
738 * @param value_len Length of the attribute value.
747 /** @brief Read Service Attribute helper.
749 * Read service attribute value from local database storing the result into
754 * @param attr Attribute to read.
787 * of the array is linked to the service attribute array which is also
792 * attribute callbacks.
794 * @param _attrs_def Macro provided by the user that defines attribute
824 * Helper macro to declare a primary service attribute.
826 * @param _service Service attribute value.
835 * Helper macro to declare a secondary service attribute.
840 * @param _service Service attribute value.
846 /** @brief Read Include Attribute helper.
848 * Read include service attribute value from local database storing the result
853 * @param attr Attribute to read.
868 * Helper macro to declare database internal include service attribute.
870 * @param _service_incl the first service attribute of service to include
876 /** @brief Read Characteristic Attribute helper.
878 * Read characteristic attribute value from local database storing the result
883 * @param attr Attribute to read.
905 * Helper macro to declare a characteristic attribute along with its
906 * attribute value.
908 * @param _uuid Characteristic attribute uuid.
909 * @param _props Characteristic attribute properties,
911 * @param _perm Characteristic Attribute access permissions,
913 * @param _read Characteristic Attribute read callback
915 * @param _write Characteristic Attribute write callback
917 * @param _user_data Characteristic Attribute user data.
953 /** @brief CCC attribute changed callback
955 * @param attr The attribute that's changed value
960 /** @brief CCC attribute write validation callback
963 * @param attr The attribute that's being written
972 /** @brief CCC attribute match handler
978 * @param attr The attribute that's being checked
987 /** @brief Read Client Characteristic Configuration Attribute helper.
989 * Read CCC attribute value from local database storing the result into buffer
995 * @param attr Attribute to read.
1007 /** @brief Write Client Characteristic Configuration Attribute helper.
1009 * Write value in the buffer into CCC attribute.
1014 * @param attr Attribute to read.
1031 * Helper macro to initialize a Managed CCC attribute value.
1048 * Helper macro to declare a Managed CCC attribute.
1050 * @param _ccc CCC attribute user data, shall point to a _bt_gatt_ccc.
1062 * Helper macro to declare a CCC attribute.
1072 /** @brief Read Characteristic Extended Properties Attribute helper
1074 * Read CEP attribute value from local database storing the result into buffer
1080 * @param attr Attribute to read
1095 * Helper macro to declare a CEP attribute.
1103 /** @brief Read Characteristic User Description Descriptor Attribute helper
1105 * Read CUD attribute value from local database storing the result into buffer
1112 * @param attr Attribute to read
1127 * Helper macro to declare a CUD attribute.
1130 * @param _perm Descriptor attribute access permissions,
1137 /** @brief Read Characteristic Presentation format Descriptor Attribute helper
1139 * Read CPF attribute value from local database storing the result into buffer
1145 * @param attr Attribute to read
1160 * Helper macro to declare a CPF attribute.
1171 * Helper macro to declare a descriptor attribute.
1173 * @param _uuid Descriptor attribute uuid.
1174 * @param _perm Descriptor attribute access permissions,
1176 * @param _read Descriptor attribute read callback
1178 * @param _write Descriptor attribute write callback
1180 * @param _user_data Descriptor attribute user data.
1186 * @brief Attribute Declaration Macro.
1188 * Helper macro to declare an attribute.
1190 * @param _uuid Attribute uuid.
1191 * @param _perm Attribute access permissions,
1193 * @param _read Attribute read callback (@ref bt_gatt_attr_read_func_t).
1194 * @param _write Attribute write callback (@ref bt_gatt_attr_write_func_t).
1195 * @param _user_data Attribute user data.
1215 /** @brief Notification Attribute UUID type
1217 * Optional, use to search for an attribute with matching UUID when
1218 * the attribute object pointer is not known.
1221 /** @brief Notification Attribute object
1224 * range to search for the attribute with the given UUID.
1240 /** @brief Notify attribute value change.
1253 * parameters, when using this method the attribute if provided is used as the
1277 * attribute and set the bit for Multiple Handle Value Notifications before
1285 * This API has an additional limitation: it only accepts valid attribute
1301 * - One of the attribute handles is invalid.
1319 /** @brief Notify attribute value change.
1321 * Send notification of attribute value change, if connection is NULL notify
1325 * The attribute object on the parameters can be the so called Characteristic
1332 * @param attr Characteristic or Characteristic Value attribute.
1333 * @param data Pointer to Attribute data.
1334 * @param len Attribute value length.
1356 /** @brief Notify attribute value change by UUID.
1358 * Send notification of attribute value change, if connection is NULL notify
1362 * The attribute object is the starting point for the search of the UUID.
1368 * @param attr Pointer to an attribute that serves as the starting point for
1370 * @param data Pointer to Attribute data.
1371 * @param len Attribute value length.
1414 /** @brief Indicate Attribute UUID type
1416 * Optional, use to search for an attribute with matching UUID when
1417 * the attribute object pointer is not known.
1420 /** @brief Indicate Attribute object
1423 * range to search for the attribute with the given UUID.
1441 /** @brief Indicate attribute value change.
1443 * Send an indication of attribute value change. if connection is NULL
1447 * The attribute object on the parameters can be the so called Characteristic
1454 * parameters, when using this method the attribute if provided is used as the
1470 /** @brief Check if connection have subscribed to attribute
1472 * Check if connection has subscribed to attribute value change.
1474 * The attribute object can be the so called Characteristic Declaration,
1482 * @param attr Attribute object.
1486 * @return true if the attribute object has been subscribed.
1494 * amount of attribute data that can be transferred within a single packet.
1507 * opcode, additional fields, and any attribute value payload. Consequently,
1509 * of ATT PDU. For example, in an ATT_HANDLE_VALUE_NTF PDU, the Attribute Value
1567 * @brief Discover attribute callback function.
1570 * @param attr Attribute found, or NULL if not found.
1577 * The attribute object as well as its UUID and value objects are temporary and
1579 * Only the following fields of the attribute contains valid information:
1580 * - uuid UUID representing the type of attribute.
1582 * - user_data The value of the attribute, if the discovery type maps to an
1665 /** Discover attribute callback */
1669 /** Include service attribute declaration handle */
1707 * For each attribute found the callback is called which can then decide
1736 * When reading using by_uuid, `params->start_handle` is the attribute handle
1742 * @param data Attribute value data. NULL means read has completed.
1743 * @param length Attribute value length.
1745 * @return BT_GATT_ITER_CONTINUE if should continue to the next attribute.
1754 /** Read attribute callback. */
1763 /** Attribute handle. */
1765 /** Attribute data offset. */
1769 /** Attribute handles to read with Read Multiple
1801 /** @brief Read Attribute Value by handle
1803 * This procedure read the attribute value and return it to the callback.
1861 /** Attribute handle */
1863 /** Attribute data offset */
1874 /** @brief Write Attribute Value by handle
1898 /** @brief Write Attribute Value by handle without response with callback.
1914 * @param handle Attribute handle.
1933 /** @brief Write Attribute Value by handle without response
1935 * This procedure write the attribute value without requiring an
1942 * @param handle Attribute handle.
1974 * @param data Attribute value data. If NULL then subscription was removed.
1975 * @param length Attribute value length.
2082 /** @brief Subscribe Attribute Value Notification
2122 /** @brief Resubscribe Attribute Value Notification subscription
2124 * Resubscribe to Attribute Value Notification when already subscribed from a
2141 /** @brief Unsubscribe Attribute Value Notification