Functions for handling GATTS write and read requests. More...
Modules |
|
| GATTS read | |
|
Functions for handling GATTS read requests.
|
|
| GATTS write | |
|
Functions for handling GATTS write requests.
|
|
Functions |
|
| ret_code_t | es_gatts_init ( nrf_ble_escs_t *p_ble_escs) |
| void | es_gatts_handle_write ( nrf_ble_escs_t *p_escs, uint16_t uuid, uint16_t val_handle, uint8_t const *p_data, uint16_t length) |
|
Function for handling all write requests from the Central.
More...
|
|
| void | es_gatts_handle_read ( nrf_ble_escs_t *p_escs, uint16_t uuid, uint16_t val_handle) |
|
Function for handling all read requests from the Central.
More...
|
|
| ret_code_t | es_gatts_send_reply ( nrf_ble_escs_t *p_escs, ble_gatts_rw_authorize_reply_params_t *p_reply) |
|
Function for sending an RW-authorization reply.
More...
|
|
| ret_code_t | es_gatts_send_op_not_permitted ( nrf_ble_escs_t *p_escs, bool op_is_read) |
|
Function for sending an RW-authorization reply with status 'Operation not permitted'.
More...
|
|
Detailed Description
Functions for handling GATTS write and read requests.
Function Documentation
| void es_gatts_handle_read | ( | nrf_ble_escs_t * | p_escs , |
| uint16_t | uuid , | ||
| uint16_t | val_handle | ||
| ) |
Function for handling all read requests from the Central.
- Parameters
-
[in] p_escs Pointer to the Eddystone Configuration Service. [in] uuid The UUID of the characteristic that is being read from. [in] val_handle Value handle field of the characteristic handle of the characteristic that is being read from.
| void es_gatts_handle_write | ( | nrf_ble_escs_t * | p_escs , |
| uint16_t | uuid , | ||
| uint16_t | val_handle , | ||
| uint8_t const * | p_data , | ||
| uint16_t | length | ||
| ) |
Function for handling all write requests from the Central.
- Parameters
-
[in] p_escs Pointer to the Eddystone Configuration Service. [in] uuid The UUID of the characteristic that is being written to. [in] val_handle Value handle field of the characteristic handle of the characteristic that is being written to. [in] p_data Pointer to the data to be written. [in] length Length of the data to be written.
| ret_code_t es_gatts_send_op_not_permitted | ( | nrf_ble_escs_t * | p_escs , |
| bool | op_is_read | ||
| ) |
Function for sending an RW-authorization reply with status 'Operation not permitted'.
- Parameters
-
[in] p_escs Pointer to the Eddystone Configuration Service. [in] op_is_read Flag that specifies if the operation being responded to is a 'read' operation. If false, a 'write' operation is assumed.
- Return values
-
NRF_ERROR_NULL If p_escsis NULL.
- Returns
- Otherwise, the error code from es_gatts_send_reply() is returned.
| ret_code_t es_gatts_send_reply | ( | nrf_ble_escs_t * | p_escs , |
| ble_gatts_rw_authorize_reply_params_t * | p_reply | ||
| ) |
Function for sending an RW-authorization reply.
- Parameters
-
[in] p_escs Pointer to the Eddystone Configuration Service. [in] p_reply Pointer to the reply to send.
- Return values
-
NRF_SUCCESS If the reply was successfully issued to the SoftDevice. NRF_ERROR_NULL If either of the pointers p_escsorp_replyis NULL.NRF_ERROR_INVALID_STATE If the connection handle of p_escsis invalid.
- Returns
- Otherwise, an error code from sd_ble_gatts_rw_authorize_reply() is returned.