GATTS Application command request encoders and command response decoders. More...
Functions |
|
| uint32_t | ble_gatts_value_get_req_enc (uint16_t conn_handle, uint16_t handle, ble_gatts_value_t const *const p_value, uint8_t *const p_buf, uint32_t *const p_buf_len) |
|
Encodes
sd_ble_gatts_value_get
command request.
More...
|
|
| uint32_t | ble_gatts_value_get_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, ble_gatts_value_t *const p_value, uint32_t *const p_result_code) |
|
Decodes response to
sd_ble_gatts_value_get
command.
More...
|
|
| uint32_t | ble_gatts_hvx_req_enc (uint16_t conn_handle, ble_gatts_hvx_params_t const *const p_hvx_params, uint8_t *const p_buf, uint32_t *const p_buf_len) |
|
Encodes
sd_ble_gatts_hvx
command request.
More...
|
|
| uint32_t | ble_gatts_hvx_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, uint32_t *const p_result_code, uint16_t **const pp_bytes_written) |
|
Decodes response to
sd_ble_gatts_hvx
command.
More...
|
|
| uint32_t | ble_gatts_characteristic_add_req_enc (uint16_t service_handle, ble_gatts_char_md_t const *const p_char_md, ble_gatts_attr_t const *const p_attr_char_value, ble_gatts_char_handles_t const *const p_handles, uint8_t *const p_buf, uint32_t *const p_buf_len) |
|
Encodes
sd_ble_gatts_characteristic_add
command request.
More...
|
|
| uint32_t | ble_gatts_characteristic_add_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, uint16_t **const pp_handles, uint32_t *const p_result_code) |
|
Decodes response to
sd_ble_gatts_characteristic_add
command.
More...
|
|
| uint32_t | ble_gatts_service_add_req_enc (uint8_t type, ble_uuid_t const *const p_uuid, uint16_t const *const p_conn_handle, uint8_t *const p_buf, uint32_t *const p_buf_len) |
|
Encodes
sd_ble_gatts_service_add
command request.
More...
|
|
| uint32_t | ble_gatts_service_add_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, uint16_t *const p_conn_handle, uint32_t *const p_result_code) |
|
Decodes response to
sd_ble_gatts_service_add
command.
More...
|
|
| uint32_t | ble_gatts_sys_attr_set_req_enc (uint16_t conn_handle, uint8_t const *const p_sys_attr_data, uint16_t sys_attr_data_len, uint32_t flags, uint8_t *const p_buf, uint32_t *const p_buf_len) |
|
Encodes
sd_ble_gatts_sys_attr_set
command request.
More...
|
|
| uint32_t | ble_gatts_sys_attr_set_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, uint32_t *const p_result_code) |
|
Decodes response to
sd_ble_gatts_sys_attr_set
command.
More...
|
|
| uint32_t | ble_gatts_value_set_req_enc (uint16_t conn_handle, uint16_t handle, ble_gatts_value_t *p_value, uint8_t *const p_buf, uint32_t *const p_buf_len) |
|
Encodes
sd_ble_gatts_value_set
command request.
More...
|
|
| uint32_t | ble_gatts_value_set_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, ble_gatts_value_t *const p_value, uint32_t *const p_result_code) |
|
Decodes response to
sd_ble_gatts_value_set
command.
More...
|
|
| uint32_t | ble_gatts_sys_attr_get_req_enc (uint16_t conn_handle, uint8_t const *const p_sys_attr_data, uint16_t const *const p_sys_attr_data_len, uint32_t flags, uint8_t *const p_buf, uint32_t *p_buf_len) |
|
Encodes
sd_ble_gatts_sys_attr_get
command request.
More...
|
|
| uint32_t | ble_gatts_sys_attr_get_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, uint8_t **const pp_sys_attr_data, uint16_t **const pp_sys_attr_data_len, uint32_t *const p_result_code) |
|
Decodes response to
sd_ble_gatts_sys_attr_get
command.
More...
|
|
| uint32_t | ble_gatts_descriptor_add_req_enc (uint16_t char_handle, ble_gatts_attr_t const *const p_attr, uint16_t *const p_handle, uint8_t *const p_buf, uint32_t *const p_buf_len) |
|
Encodes
sd_ble_gatts_descriptor_add
command request.
More...
|
|
| uint32_t | ble_gatts_descriptor_add_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, uint16_t *const p_handle, uint32_t *const p_result_code) |
|
Decodes response to
sd_ble_gatts_descriptor_add
command.
More...
|
|
| uint32_t | ble_gatts_include_add_req_enc (uint16_t service_handle, uint16_t inc_srvc_handle, uint16_t *const p_include_handle, uint8_t *const p_buf, uint32_t *const p_buf_len) |
|
Encodes
sd_ble_gatts_include_add
command request.
More...
|
|
| uint32_t | ble_gatts_include_add_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, uint16_t *const p_include_handle, uint32_t *const p_result_code) |
|
Decodes response to
sd_ble_gatts_include_add
command.
More...
|
|
| uint32_t | ble_gatts_rw_authorize_reply_req_enc (uint16_t conn_handle, ble_gatts_rw_authorize_reply_params_t const *const p_reply_params, uint8_t *const p_buf, uint32_t *const p_buf_len) |
|
Encodes
sd_ble_gatts_rw_authorize_reply
command request.
More...
|
|
| uint32_t | ble_gatts_rw_authorize_reply_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, uint32_t *const p_result_code) |
|
Decodes response to
sd_ble_gatts_rw_authorize_reply
command.
More...
|
|
| uint32_t | ble_gatts_service_changed_req_enc (uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle, uint8_t *const p_buf, uint32_t *const p_buf_len) |
|
Encodes
sd_ble_gatts_service_changed
command request.
More...
|
|
| uint32_t | ble_gatts_service_changed_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, uint32_t *const p_result_code) |
|
Decodes response to
sd_ble_gatts_service_changed
command.
More...
|
|
| uint32_t | ble_gatts_attr_get_req_enc (uint16_t handle, ble_uuid_t *p_uuid, ble_gatts_attr_md_t *p_md, uint8_t *const p_buf, uint32_t *p_buf_len) |
|
Encodes
sd_ble_gatts_attr_get
command request.
More...
|
|
| uint32_t | ble_gatts_attr_get_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, ble_uuid_t **pp_uuid, ble_gatts_attr_md_t **pp_md, uint32_t *const p_result_code) |
|
Decodes response to
sd_ble_gatts_attr_get
command.
More...
|
|
| uint32_t | ble_gatts_initial_user_handle_get_req_enc (uint16_t *p_handle, uint8_t *const p_buf, uint32_t *p_buf_len) |
|
Encodes
sd_ble_gatts_initial_user_handle_get
command request.
More...
|
|
| uint32_t | ble_gatts_initial_user_handle_get_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, uint16_t **pp_handle, uint32_t *const p_result_code) |
|
Decodes response to
sd_ble_gatts_initial_user_handle_get
command.
More...
|
|
| uint32_t | ble_gatts_exchange_mtu_reply_req_enc (uint16_t conn_handle, uint16_t server_rx_mtu, uint8_t *const p_buf, uint32_t *const p_buf_len) |
|
Encodes
sd_ble_gatts_exchange_mtu_reply
command request.
More...
|
|
| uint32_t | ble_gatts_exchange_mtu_reply_rsp_dec (uint8_t const *const p_buf, uint32_t packet_len, uint32_t *const p_result_code) |
|
Decodes response to
sd_ble_gatts_exchange_mtu_reply
command.
More...
|
|
Detailed Description
GATTS Application command request encoders and command response decoders.
Function Documentation
| uint32_t ble_gatts_attr_get_req_enc | ( | uint16_t | handle , |
| ble_uuid_t * | p_uuid , | ||
| ble_gatts_attr_md_t * | p_md , | ||
| uint8_t *const | p_buf , | ||
| uint32_t * | p_buf_len | ||
| ) |
Encodes sd_ble_gatts_attr_get command request.
- See Also
- ble_gatts_attr_get_rsp_dec for command response decoder.
- Parameters
-
[in] handle See sd_ble_gatts_attr_get . [in] p_uuid See sd_ble_gatts_attr_get . [out] p_md See sd_ble_gatts_attr_get . [in,out] p_buf Pointer to buffer where encoded data command will be returned. [in,out] p_buf_len in:size ofp_bufbuffer.out:Length of encoded command packet.
- Return values
-
NRF_SUCCESS Encoding success. NRF_ERROR_NULL Encoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Encoding failure. Incorrect buffer length.
| uint32_t ble_gatts_attr_get_rsp_dec | ( | uint8_t const *const | p_buf , |
| uint32_t | packet_len , | ||
| ble_uuid_t ** | pp_uuid , | ||
| ble_gatts_attr_md_t ** | pp_md , | ||
| uint32_t *const | p_result_code | ||
| ) |
Decodes response to sd_ble_gatts_attr_get command.
- See Also
- ble_gatts_attr_get_req_enc for command request encoder.
- Parameters
-
[in] p_buf Pointer to beginning of command response packet. [in] packet_len Length (in bytes) of response packet. [out] pp_uuid Pointer to address where to put output data. [out] pp_md Pointer to address where to put output data. [out] p_result_code Command result code.
- Return values
-
NRF_SUCCESS Decoding success. NRF_ERROR_NULL Decoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length. NRF_ERROR_INVALID_DATA Decoding failure. Decoded operation code does not match expected operation code.
| uint32_t ble_gatts_characteristic_add_req_enc | ( | uint16_t | service_handle , |
| ble_gatts_char_md_t const *const | p_char_md , | ||
| ble_gatts_attr_t const *const | p_attr_char_value , | ||
| ble_gatts_char_handles_t const *const | p_handles , | ||
| uint8_t *const | p_buf , | ||
| uint32_t *const | p_buf_len | ||
| ) |
Encodes sd_ble_gatts_characteristic_add command request.
- See Also
- ble_gatts_characteristic_add_rsp_dec for command response decoder.
- Parameters
-
[in] service_handle Handle of the service where the characteristic is to be placed. If BLE_GATT_HANDLE_INVALID is used, it will be placed sequentially. [in] p_char_md Pointer to a ble_gatts_char_md_t structure, characteristic metadata. [in] p_attr_char_value Pointer to a ble_gatts_attr_t structure, corresponding to the characteristic value. [in] p_handles Pointer to a ble_gatts_char_handles_t structure, where the assigned handles will be stored. [in] p_buf Pointer to buffer where encoded data command will be returned. [in,out] p_buf_len in:Size ofp_bufbuffer.out:Length of encoded command packet.
- Note
-
p_handleswill not be updated by the command request encoder. Updated values are set by ble_gatts_characteristic_add_rsp_dec .
- Return values
-
NRF_SUCCESS Encoding success. NRF_ERROR_NULL Encoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Encoding failure. Incorrect buffer length.
| uint32_t ble_gatts_characteristic_add_rsp_dec | ( | uint8_t const *const | p_buf , |
| uint32_t | packet_len , | ||
| uint16_t **const | pp_handles , | ||
| uint32_t *const | p_result_code | ||
| ) |
Decodes response to sd_ble_gatts_characteristic_add command.
- See Also
- ble_gatts_characteristic_add_req_enc for command request encoder.
- Parameters
-
[in] p_buf Pointer to beginning of command response packet. [in] packet_len Length (in bytes) of response packet. [out] pp_handles Pointer to pointer to location where handles should be decoded. [out] p_result_code Pointer to command result code decode location.
- Return values
-
NRF_SUCCESS Decoding success. NRF_ERROR_NULL Decoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length. NRF_ERROR_INVALID_DATA Decoding failure. Decoded operation code does not match expected operation code.
| uint32_t ble_gatts_descriptor_add_req_enc | ( | uint16_t | char_handle , |
| ble_gatts_attr_t const *const | p_attr , | ||
| uint16_t *const | p_handle , | ||
| uint8_t *const | p_buf , | ||
| uint32_t *const | p_buf_len | ||
| ) |
Encodes sd_ble_gatts_descriptor_add command request.
- See Also
- ble_gatts_descriptor_add_rsp_dec for command response decoder.
- Parameters
-
[in] char_handle Handle of the characteristic where the description is to be placed. If BLE_GATT_HANDLE_INVALID is used, it will be placed sequentially. [in] p_attr Pointer to a ble_gatts_attr_t structure, characteristic metadata. [in] p_handle Pointer to a ble_gatts_char_handles_t structure, where the assigned handles will be stored. [in] p_buf Pointer to buffer where encoded data command will be returned. [in,out] p_buf_len in:Size ofp_bufbuffer.out:Length of encoded command packet.
- Return values
-
NRF_SUCCESS Encoding success. NRF_ERROR_NULL Encoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Encoding failure. Incorrect buffer length.
| uint32_t ble_gatts_descriptor_add_rsp_dec | ( | uint8_t const *const | p_buf , |
| uint32_t | packet_len , | ||
| uint16_t *const | p_handle , | ||
| uint32_t *const | p_result_code | ||
| ) |
Decodes response to sd_ble_gatts_descriptor_add command.
- See Also
- ble_gatts_descriptor_add_req_enc for command request encoder.
- Parameters
-
[in] p_buf Pointer to beginning of command response packet. [in] packet_len Length (in bytes) of response packet. [out] p_handle Pointer to bufer where descriptor handle will be returned. [out] p_result_code Pointer to command result code decode location.
- Return values
-
NRF_SUCCESS Decoding success. NRF_ERROR_NULL Decoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length. NRF_ERROR_INVALID_DATA Decoding failure. Decoded operation code does not match expected operation code.
| uint32_t ble_gatts_exchange_mtu_reply_req_enc | ( | uint16_t | conn_handle , |
| uint16_t | server_rx_mtu , | ||
| uint8_t *const | p_buf , | ||
| uint32_t *const | p_buf_len | ||
| ) |
Encodes sd_ble_gatts_exchange_mtu_reply command request.
- See Also
- ble_gatts_exchange_mtu_reply_rsp_dec for command response decoder.
- Parameters
-
[in] conn_handle Connection handle. [in] server_rx_mtu Server MTU Size. [in] p_buf Pointer to buffer where encoded data command will be returned. [in,out] p_buf_len in:Size ofp_bufbuffer.out:Length of encoded command packet.
- Return values
-
NRF_SUCCESS Encoding success. NRF_ERROR_NULL Encoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Encoding failure. Incorrect buffer length. NRF_ERROR_INVALID_PARAM Encoding failure. Invalid param provided in p_reply_params.
| uint32_t ble_gatts_exchange_mtu_reply_rsp_dec | ( | uint8_t const *const | p_buf , |
| uint32_t | packet_len , | ||
| uint32_t *const | p_result_code | ||
| ) |
Decodes response to sd_ble_gatts_exchange_mtu_reply command.
- See Also
- ble_gatts_exchange_mtu_reply_req_enc for command request encoder.
- Parameters
-
[in] p_buf Pointer to beginning of command response packet. [in] packet_len Length (in bytes) of response packet. [out] p_result_code Command result code.
- Return values
-
NRF_SUCCESS Decoding success. NRF_ERROR_NULL Decoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length. NRF_ERROR_INVALID_DATA Decoding failure. Decoded operation code does not match expected operation code.
| uint32_t ble_gatts_hvx_req_enc | ( | uint16_t | conn_handle , |
| ble_gatts_hvx_params_t const *const | p_hvx_params , | ||
| uint8_t *const | p_buf , | ||
| uint32_t *const | p_buf_len | ||
| ) |
Encodes sd_ble_gatts_hvx command request.
- See Also
- ble_gatts_hvx_rsp_dec for command response decoder.
- Parameters
-
[in] conn_handle Connection handle. [in] p_hvx_params Pointer to an HVx parameters structure to be encoded. [in] p_buf Pointer to buffer where encoded data command will be returned. [in,out] p_buf_len in:Size ofp_bufbuffer.out:Length of encoded command packet.
- Note
-
p_hvx_paramswill not be updated by the command request encoder. Updated values are set by ble_gatts_hvx_rsp_dec .
- Return values
-
NRF_SUCCESS Encoding success. NRF_ERROR_NULL Encoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Encoding failure. Incorrect buffer length.
| uint32_t ble_gatts_hvx_rsp_dec | ( | uint8_t const *const | p_buf , |
| uint32_t | packet_len , | ||
| uint32_t *const | p_result_code , | ||
| uint16_t **const | pp_bytes_written | ||
| ) |
Decodes response to sd_ble_gatts_hvx command.
- See Also
- ble_gatts_hvx_req_enc for command request encoder.
- Parameters
-
[in] p_buf Pointer to beginning of command response packet. [in] packet_len Length (in bytes) of response packet. [out] p_result_code Command result code. [out] pp_bytes_written Pointer to pointer to location where number of bytes is written.
- Return values
-
NRF_SUCCESS Decoding success. NRF_ERROR_NULL Decoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length. NRF_ERROR_INVALID_DATA Decoding failure. Decoded operation code does not match expected operation code.
| uint32_t ble_gatts_include_add_req_enc | ( | uint16_t | service_handle , |
| uint16_t | inc_srvc_handle , | ||
| uint16_t *const | p_include_handle , | ||
| uint8_t *const | p_buf , | ||
| uint32_t *const | p_buf_len | ||
| ) |
Encodes sd_ble_gatts_include_add command request.
- See Also
- ble_gatts_include_add_rsp_dec for command response decoder.
- Parameters
-
[in] service_handle Handle of the service where the included service is to be placed. [in] inc_srvc_handle Handle of the included service [in] p_include_handle Pointer to Pointer to a 16-bit word where the assigned handle will be stored. [in] p_buf Pointer to buffer where encoded data command will be returned. [in,out] p_buf_len in:Size ofp_bufbuffer.out:Length of encoded command packet.
- Return values
-
NRF_SUCCESS Encoding success. NRF_ERROR_NULL Encoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Encoding failure. Incorrect buffer length.
| uint32_t ble_gatts_include_add_rsp_dec | ( | uint8_t const *const | p_buf , |
| uint32_t | packet_len , | ||
| uint16_t *const | p_include_handle , | ||
| uint32_t *const | p_result_code | ||
| ) |
Decodes response to sd_ble_gatts_include_add command.
- See Also
- ble_gatts_include_add_req_enc for command request encoder.
- Parameters
-
[in] p_buf Pointer to beginning of command response packet. [in] packet_len Length (in bytes) of response packet. [out] p_include_handle Pointer to a 16-bit word where the assigned handle will be stored. [out] p_result_code Pointer to command result code decode location.
- Return values
-
NRF_SUCCESS Decoding success. NRF_ERROR_NULL Decoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length. NRF_ERROR_INVALID_DATA Decoding failure. Decoded operation code does not match expected operation code.
| uint32_t ble_gatts_initial_user_handle_get_req_enc | ( | uint16_t * | p_handle , |
| uint8_t *const | p_buf , | ||
| uint32_t * | p_buf_len | ||
| ) |
Encodes sd_ble_gatts_initial_user_handle_get command request.
- See Also
- ble_gatts_initial_user_handle_get_rsp_dec for command response decoder.
- Parameters
-
[out] p_handle See sd_ble_gatts_initial_user_handle_get . [in,out] p_buf Pointer to buffer where encoded data command will be returned. [in,out] p_buf_len in:size ofp_bufbuffer.out:Length of encoded command packet.
- Return values
-
NRF_SUCCESS Encoding success. NRF_ERROR_NULL Encoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Encoding failure. Incorrect buffer length.
| uint32_t ble_gatts_initial_user_handle_get_rsp_dec | ( | uint8_t const *const | p_buf , |
| uint32_t | packet_len , | ||
| uint16_t ** | pp_handle , | ||
| uint32_t *const | p_result_code | ||
| ) |
Decodes response to sd_ble_gatts_initial_user_handle_get command.
- See Also
- ble_gatts_initial_user_handle_get_req_enc for command request encoder.
- Parameters
-
[in] p_buf Pointer to beginning of command response packet. [in] packet_len Length (in bytes) of response packet. [out] pp_handle Pointer to address where to put output data. [out] p_result_code Command result code.
- Return values
-
NRF_SUCCESS Decoding success. NRF_ERROR_NULL Decoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length. NRF_ERROR_INVALID_DATA Decoding failure. Decoded operation code does not match expected operation code.
| uint32_t ble_gatts_rw_authorize_reply_req_enc | ( | uint16_t | conn_handle , |
| ble_gatts_rw_authorize_reply_params_t const *const | p_reply_params , | ||
| uint8_t *const | p_buf , | ||
| uint32_t *const | p_buf_len | ||
| ) |
Encodes sd_ble_gatts_rw_authorize_reply command request.
- See Also
- ble_gatts_rw_authorize_reply_rsp_dec for command response decoder.
- Parameters
-
[in] conn_handle Connection handle. [in] p_reply_params Pointer to ble_gatts_rw_authorize_reply_params_t [in] p_buf Pointer to buffer where encoded data command will be returned. [in,out] p_buf_len in:Size ofp_bufbuffer.out:Length of encoded command packet.
- Return values
-
NRF_SUCCESS Encoding success. NRF_ERROR_NULL Encoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Encoding failure. Incorrect buffer length. NRF_ERROR_INVALID_PARAM Encoding failure. Invalid param provided in p_reply_params.
| uint32_t ble_gatts_rw_authorize_reply_rsp_dec | ( | uint8_t const *const | p_buf , |
| uint32_t | packet_len , | ||
| uint32_t *const | p_result_code | ||
| ) |
Decodes response to sd_ble_gatts_rw_authorize_reply command.
- See Also
- ble_gatts_rw_authorize_reply_req_enc for command request encoder.
- Parameters
-
[in] p_buf Pointer to beginning of command response packet. [in] packet_len Length (in bytes) of response packet. [out] p_result_code Command result code.
- Return values
-
NRF_SUCCESS Decoding success. NRF_ERROR_NULL Decoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length. NRF_ERROR_INVALID_DATA Decoding failure. Decoded operation code does not match expected operation code.
| uint32_t ble_gatts_service_add_req_enc | ( | uint8_t | type , |
| ble_uuid_t const *const | p_uuid , | ||
| uint16_t const *const | p_conn_handle , | ||
| uint8_t *const | p_buf , | ||
| uint32_t *const | p_buf_len | ||
| ) |
Encodes sd_ble_gatts_service_add command request.
- See Also
- ble_gatts_service_add_rsp_dec for command response decoder.
- Parameters
-
[in] type Toggles between primary and secondary services, see GATT Server Service Types . [in] p_uuid Pointer to service UUID. [in] p_conn_handle Pointer to a 16-bit word where the assigned handle will be stored. [in] p_buf Pointer to buffer where encoded data command will be returned. [in,out] p_buf_len in:Size ofp_bufbuffer.out:Length of encoded command packet.
- Note
-
p_conn_handlewill not be updated by the command request encoder. Updated values are set by ble_gatts_service_add_rsp_dec .
- Return values
-
NRF_SUCCESS Encoding success. NRF_ERROR_NULL Encoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Encoding failure. Incorrect buffer length.
| uint32_t ble_gatts_service_add_rsp_dec | ( | uint8_t const *const | p_buf , |
| uint32_t | packet_len , | ||
| uint16_t *const | p_conn_handle , | ||
| uint32_t *const | p_result_code | ||
| ) |
Decodes response to sd_ble_gatts_service_add command.
- See Also
- ble_gatts_service_add_req_enc for command request encoder.
- Parameters
-
[in] p_buf Pointer to beginning of command response packet. [in] packet_len Length (in bytes) of response packet. [out] p_conn_handle Connection handle. [out] p_result_code Command result code.
- Return values
-
NRF_SUCCESS Decoding success. NRF_ERROR_NULL Decoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length. NRF_ERROR_INVALID_DATA Decoding failure. Decoded operation code does not match expected operation code.
| uint32_t ble_gatts_service_changed_req_enc | ( | uint16_t | conn_handle , |
| uint16_t | start_handle , | ||
| uint16_t | end_handle , | ||
| uint8_t *const | p_buf , | ||
| uint32_t *const | p_buf_len | ||
| ) |
Encodes sd_ble_gatts_service_changed command request.
- See Also
- ble_gatts_service_changed_rsp_dec for command response decoder.
- Parameters
-
[in] conn_handle Connection handle. [in] start_handle Start of affected attribute handle range. [in] end_handle End of affected attribute handle range. [in] p_buf Pointer to buffer where encoded data command will be returned. [in,out] p_buf_len in:Size ofp_bufbuffer.out:Length of encoded command packet.
- Return values
-
NRF_SUCCESS Encoding success. NRF_ERROR_NULL Encoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Encoding failure. Incorrect buffer length. NRF_ERROR_INVALID_PARAM Encoding failure. Invalid param provided in p_reply_params.
| uint32_t ble_gatts_service_changed_rsp_dec | ( | uint8_t const *const | p_buf , |
| uint32_t | packet_len , | ||
| uint32_t *const | p_result_code | ||
| ) |
Decodes response to sd_ble_gatts_service_changed command.
- See Also
- ble_gatts_service_changed_req_enc for command request encoder.
- Parameters
-
[in] p_buf Pointer to beginning of command response packet. [in] packet_len Length (in bytes) of response packet. [out] p_result_code Command result code.
- Return values
-
NRF_SUCCESS Decoding success. NRF_ERROR_NULL Decoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length. NRF_ERROR_INVALID_DATA Decoding failure. Decoded operation code does not match expected operation code.
| uint32_t ble_gatts_sys_attr_get_req_enc | ( | uint16_t | conn_handle , |
| uint8_t const *const | p_sys_attr_data , | ||
| uint16_t const *const | p_sys_attr_data_len , | ||
| uint32_t | flags , | ||
| uint8_t *const | p_buf , | ||
| uint32_t * | p_buf_len | ||
| ) |
Encodes sd_ble_gatts_sys_attr_get command request.
- See Also
- ble_gatts_sys_attr_get_rsp_dec for command response decoder.
- Parameters
-
[in] conn_handle Connection handle of the connection. [in] p_sys_attr_data Pointer to buffer where updated information about system attributes will be stored. Can be NULL to calculate required size. [in] p_sys_attr_data_len Size of p_sys_attr_data buffer if p_sys_attr_datais not NULL.[in] flags Additional optional flags. [in,out] p_buf Pointer to buffer where encoded data command will be returned. [in,out] p_buf_len in:size ofp_bufbuffer.out:Length of encoded command packet.
- Note
-
p_sys_attr_dataandp_sys_attr_data_lenwill not be updated by the command request encoder. Updated values are set by ble_gatts_sys_attr_get_rsp_dec .
- Return values
-
NRF_SUCCESS Encoding success. NRF_ERROR_NULL Encoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Encoding failure. Incorrect buffer length.
| uint32_t ble_gatts_sys_attr_get_rsp_dec | ( | uint8_t const *const | p_buf , |
| uint32_t | packet_len , | ||
| uint8_t **const | pp_sys_attr_data , | ||
| uint16_t **const | pp_sys_attr_data_len , | ||
| uint32_t *const | p_result_code | ||
| ) |
Decodes response to sd_ble_gatts_sys_attr_get command.
- See Also
- ble_gatts_sys_attr_get_req_enc for command request encoder.
- Parameters
-
[in] p_buf Pointer to beginning of command response packet. [in] packet_len Length (in bytes) of response packet. [out] pp_sys_attr_data Pointer to a buffer where updated information about system attributes will be stored. [in,out] pp_sys_attr_data_len in:Size (in bytes) ofp_sys_attr_databuffer.out:Length of decoded contents ofp_sys_attr_data.[out] p_result_code Command result code.
- Return values
-
NRF_SUCCESS Decoding success. NRF_ERROR_NULL Decoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length. NRF_ERROR_DATA_SIZE Length of p_sys_attr_datais too small to hold decoded value from response.NRF_ERROR_INVALID_DATA Decoding failure. Decoded operation code does not match expected operation code.
| uint32_t ble_gatts_sys_attr_set_req_enc | ( | uint16_t | conn_handle , |
| uint8_t const *const | p_sys_attr_data , | ||
| uint16_t | sys_attr_data_len , | ||
| uint32_t | flags , | ||
| uint8_t *const | p_buf , | ||
| uint32_t *const | p_buf_len | ||
| ) |
Encodes sd_ble_gatts_sys_attr_set command request.
- See Also
- ble_gatts_sys_attr_set_rsp_dec for command response decoder.
- Parameters
-
[in] conn_handle Connection handle. [in] p_sys_attr_data Pointer to a buffer (at least sys_attr_data_lenbytes long) containing the attribute value to write.[in] sys_attr_data_len Length (in bytes) of p_sys_attr_data.[in] flags Optional additional flags. [in] p_buf Pointer to buffer where encoded data command will be returned. [in,out] p_buf_len in:Size ofp_bufbuffer.out:Length of encoded command packet.
- Return values
-
NRF_SUCCESS Encoding success. NRF_ERROR_NULL Encoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Encoding failure. Incorrect buffer length.
| uint32_t ble_gatts_sys_attr_set_rsp_dec | ( | uint8_t const *const | p_buf , |
| uint32_t | packet_len , | ||
| uint32_t *const | p_result_code | ||
| ) |
Decodes response to sd_ble_gatts_sys_attr_set command.
- See Also
- ble_gatts_sys_attr_set_req_enc for command request encoder.
- Parameters
-
[in] p_buf Pointer to beginning of command response packet. [in] packet_len Length (in bytes) of response packet. [out] p_result_code Command result code.
- Return values
-
NRF_SUCCESS Decoding success. NRF_ERROR_NULL Decoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length. NRF_ERROR_INVALID_DATA Decoding failure. Decoded operation code does not match expected operation code.
| uint32_t ble_gatts_value_get_req_enc | ( | uint16_t | conn_handle , |
| uint16_t | handle , | ||
| ble_gatts_value_t const *const | p_value , | ||
| uint8_t *const | p_buf , | ||
| uint32_t *const | p_buf_len | ||
| ) |
Encodes sd_ble_gatts_value_get command request.
- See Also
- ble_gatts_value_get_rsp_dec for command response decoder.
- Parameters
-
[in] conn_handle Connection handle. [in] handle Attribute handle. [in] p_value Pointer to attribute value information. [in] p_buf Pointer to buffer where encoded data command will be returned. [in,out] p_buf_len in:Size ofp_bufbuffer.out:Length of encoded command packet.
- Note
-
p_data_lenandp_datawill not be updated by the command request encoder. Updated values are set by ble_gatts_value_get_rsp_dec .
- Return values
-
NRF_SUCCESS Encoding success. NRF_ERROR_NULL Encoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Encoding failure. Incorrect buffer length.
| uint32_t ble_gatts_value_get_rsp_dec | ( | uint8_t const *const | p_buf , |
| uint32_t | packet_len , | ||
| ble_gatts_value_t *const | p_value , | ||
| uint32_t *const | p_result_code | ||
| ) |
Decodes response to sd_ble_gatts_value_get command.
- See Also
- ble_gatts_value_get_req_enc for command request encoder.
- Parameters
-
[in] p_buf Pointer to beginning of command response packet. [in] packet_len Length (in bytes) of response packet. [out] p_value Pointer to structure where the attribute value will be stored. [out] p_result_code Command result code.
- Return values
-
NRF_SUCCESS Decoding success. NRF_ERROR_NULL Decoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length. NRF_ERROR_DATA_SIZE Length of p_valueis too small to hold decoded value from response.
| uint32_t ble_gatts_value_set_req_enc | ( | uint16_t | conn_handle , |
| uint16_t | handle , | ||
| ble_gatts_value_t * | p_value , | ||
| uint8_t *const | p_buf , | ||
| uint32_t *const | p_buf_len | ||
| ) |
Encodes sd_ble_gatts_value_set command request.
- See Also
- ble_gatts_value_set_rsp_dec for command response decoder.
- Parameters
-
[in] conn_handle Connection handle. [in] handle Attribute handle. [in] p_value Pointer to attribute value information. [in] p_buf Pointer to buffer where encoded data command will be returned. [in,out] p_buf_len in:Size ofp_bufbuffer.out:Length of encoded command packet.
- Return values
-
NRF_SUCCESS Encoding success. NRF_ERROR_NULL Encoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Encoding failure. Incorrect buffer length.
| uint32_t ble_gatts_value_set_rsp_dec | ( | uint8_t const *const | p_buf , |
| uint32_t | packet_len , | ||
| ble_gatts_value_t *const | p_value , | ||
| uint32_t *const | p_result_code | ||
| ) |
Decodes response to sd_ble_gatts_value_set command.
- See Also
- ble_gatts_value_set_req_enc for command request encoder.
- Parameters
-
[in] p_buf Pointer to beginning of command response packet. [in] packet_len Length (in bytes) of response packet. [out] p_value Pointer to attribute value information. [out] p_result_code Command result code.
- Return values
-
NRF_SUCCESS Decoding success. NRF_ERROR_NULL Decoding failure. NULL pointer supplied. NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length. NRF_ERROR_INVALID_DATA Decoding failure. Decoded operation code does not match expected operation code.