sl_bt_evt_gatt_server_user_write_requestGATT Server#
Indicates that a remote GATT client is attempting to write a value of an attribute into the local GATT database, where the attribute was defined in the GATT database XML file to have the type="user".
Data Structures#
struct | sl_bt_evt_gatt_server_user_write_request_s Data structure of the user_write_request event. |
Macros#
#define | sl_bt_evt_gatt_server_user_write_request_id 0x020a00a0 Identifier of the user_write_request event. |
Detailed Description#
Indicates that a remote GATT client is attempting to write a value of an attribute into the local GATT database, where the attribute was defined in the GATT database XML file to have the type="user".
The parameter att_opcode
informs which attribute procedure was used to write the value. If the att_opcode
is sl_bt_gatt_write_request (see sl_bt_gatt_att_opcode_t), the application needs to respond to this request by using the sl_bt_gatt_server_send_user_write_response command within 30 seconds, otherwise further GATT transactions are not allowed by the remote side. If the att_opcode
is sl_bt_gatt_prepare_write_request, the application needs to respond to this request by using the sl_bt_gatt_server_send_user_prepare_write_response command within 30 seconds, otherwise further GATT transactions are not allowed by the remote side. If the value of att_opcode
is sl_bt_gatt_execute_write_request, it indicates that there was one or more prepare writes earlier and now the GATT server is processing the execute write, the value of characteristic
is set to 0 and should be ignored. The event sl_bt_evt_gatt_server_execute_write_completed will be emitted after responding to sl_bt_gatt_execute_write_request by using sl_bt_gatt_server_send_user_write_response.
Data Structure Documentation#
sl_bt_evt_gatt_server_user_write_request_s#
struct sl_bt_evt_gatt_server_user_write_request_s
Data structure of the user_write_request event.
Data Fields | ||
---|---|---|
uint8_t | connection | Connection handle |
uint16_t | characteristic | GATT characteristic handle. This value is normally received from the gatt_characteristic event. |
uint8_t | att_opcode | Enum sl_bt_gatt_att_opcode_t. Attribute |
opcode that informs the procedure from which the value was received. | ||
uint16_t | offset | Value offset |
value | Value |