nRF51 SDK - S130 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
GATTS Connectivity command request decoders and command response encoders

GATTS Connectivity command request decoders and command response encoders. More...

Functions

uint32_t ble_gatts_value_get_req_dec (uint8_t const *const p_buf, uint16_t packet_len, uint16_t *const p_conn_handle, uint16_t *const p_handle, ble_gatts_value_t **const pp_value)
 Decodes sd_ble_gatts_value_get command request. More...
 
uint32_t ble_gatts_value_get_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len, ble_gatts_value_t *const p_value)
 Encodes sd_ble_gatts_value_get command response. More...
 
uint32_t ble_gatts_characteristic_add_req_dec (uint8_t const *const p_buf, uint32_t buf_len, uint16_t *p_service_handle, ble_gatts_char_md_t **constpp_char_md, ble_gatts_attr_t **const pp_attr_char_value, ble_gatts_char_handles_t **const pp_handles)
 Decodes sd_ble_gatts_characteristic_add command request. More...
 
uint32_t ble_gatts_characteristic_add_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len, ble_gatts_char_handles_t const *const p_handles)
 Encodes ble_gatts_sys_attr_get_rsp_enc command response. More...
 
uint32_t ble_gatts_include_add_req_dec (uint8_t const *const p_buf, uint16_t packet_len, uint16_t *const p_service_handle, uint16_t *const p_inc_srvc_handle, uint16_t **const pp_include_handle)
 Decodes sd_ble_gatts_include_add command request. More...
 
uint32_t ble_gatts_include_add_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len, uint16_t const *const p_include_handle)
 Encodes ble_gatts_include_add_rsp_enc command response. More...
 
uint32_t ble_gatts_service_add_req_dec (uint8_t const *const p_buf, uint32_t buf_len, uint8_t *const p_type, ble_uuid_t **const pp_uuid, uint16_t **const pp_handle)
 Decodes sd_ble_gatts_service_add command request. More...
 
uint32_t ble_gatts_service_add_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len, uint16_t const *const p_handle)
 Encodes ble_gatts_service_add_rsp_enc command response. More...
 
uint32_t ble_gatts_sys_attr_get_req_dec (uint8_t const *const p_buf, uint32_t packet_len, uint16_t *const p_conn_handle, uint8_t **const pp_sys_attr_data, uint16_t **const pp_sys_attr_data_len, uint32_t *const p_flags)
 Decodes ble_gatts_sys_attr_get_req_dec command request. More...
 
uint32_t ble_gatts_sys_attr_get_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len, uint8_t const *const p_sys_attr_data, uint16_t const *const p_sys_attr_data_len)
 Encodes ble_gatts_sys_attr_get_rsp_enc command response. More...
 
uint32_t ble_gatts_value_set_req_dec (uint8_t const *const p_buf, uint16_t packet_len, uint16_t *p_conn_handle, uint16_t *p_handle, ble_gatts_value_t **const pp_value)
 Decodes sd_ble_gatts_value_set command request. More...
 
uint32_t ble_gatts_value_set_rsp_enc (uint32_t return_code, uint8_t *const p_buff, uint32_t *const p_buff_len, ble_gatts_value_t *p_value)
 Encodes sd_ble_gatts_value_set command response. More...
 
uint32_t ble_gatts_sys_attr_set_req_dec (uint8_t const *const p_buf, uint32_t packet_len, uint16_t *const p_conn_handle, uint8_t **const pp_sys_attr_data, uint16_t *const p_sys_attr_data_len, uint32_t *const p_flags)
 Decodes sd_ble_gatts_sys_attr_set command request. More...
 
uint32_t ble_gatts_sys_attr_set_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len)
 Encodes sd_ble_gatts_sys_attr_set command response. More...
 
uint32_t ble_gatts_hvx_req_dec (uint8_t const *const p_buf, uint32_t packet_len, uint16_t *const p_conn_handle, ble_gatts_hvx_params_t **const pp_hvx_params)
 Decodes ble_gatts_hvx_req_dec command request. More...
 
uint32_t ble_gatts_hvx_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len, uint16_t const *const p_bytes_written)
 Encodes ble_gatts_hvx_rsp_enc command response. More...
 
uint32_t ble_gatts_descriptor_add_req_dec (uint8_t const *const p_buf, uint32_t packet_len, uint16_t *const p_char_handle, ble_gatts_attr_t **const pp_attr, uint16_t **const pp_handle)
 Decodes sd_ble_gatts_descriptor_add command request. More...
 
uint32_t ble_gatts_descriptor_add_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len, uint16_t handle)
 Encodes sd_ble_gatts_descriptor_add command response. More...
 
uint32_t ble_gatts_rw_authorize_reply_req_dec (uint8_t const *const p_buf, uint32_t packet_len, uint16_t *p_conn_handle, ble_gatts_rw_authorize_reply_params_t **const pp_reply_params)
 Decodes sd_ble_gatts_rw_authorize_reply command request. More...
 
uint32_t ble_gatts_rw_authorize_reply_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len)
 Encodes sd_ble_gatts_rw_authorize_reply command response. More...
 
uint32_t ble_gatts_service_changed_req_dec (uint8_t const *const p_buf, uint32_t packet_len, uint16_t *p_conn_handle, uint16_t *p_start_handle, uint16_t *p_end_handle)
 Decodes sd_ble_gatts_service_changed command request. More...
 
uint32_t ble_gatts_service_changed_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len)
 Encodes sd_ble_gatts_service_changed command response. More...
 

Detailed Description

GATTS Connectivity command request decoders and command response encoders.

Function Documentation

uint32_t ble_gatts_characteristic_add_req_dec ( uint8_t const *const  p_buf,
uint32_t  buf_len,
uint16_t *  p_service_handle,
ble_gatts_char_md_t **  constpp_char_md,
ble_gatts_attr_t **const  pp_attr_char_value,
ble_gatts_char_handles_t **const  pp_handles 
)

Decodes sd_ble_gatts_characteristic_add command request.

See Also
0xA2 - sd_ble_gatts_characteristic_add for packet format, ble_gatts_characteristic_add_rsp_enc for response encoding.
Parameters
[in]p_bufPointer to beginning of command request packet.
[in]buf_lenLength (in bytes) of request packet.
[out]p_service_handlePointer to the service_handle.
[out]constpp_char_mdPointer to pointer to the location where Characteristic metadata will be decoded.
[out]pp_attr_char_valuePointer to pointer to the location where GATT Attribute will be decoded.
[out]pp_handlesPointer to pointer to the location where Characteristic definition handles will be decoded.
Return values
NRF_SUCCESSDecoding success.
NRF_ERROR_NULLDecoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
uint32_t ble_gatts_characteristic_add_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len,
ble_gatts_char_handles_t const *const  p_handles 
)

Encodes ble_gatts_sys_attr_get_rsp_enc command response.

See Also
sd_ble_gatts_sys_attr_get for packet format. ble_gatts_sys_attr_get_req_dec for request decoding.
Parameters
[in]return_codeReturn code indicating if command was successful or not.
[out]p_bufPointer to buffer where encoded data command response will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command response packet.
[in]p_handlesPointer to handle struct to be encoded.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.
uint32_t ble_gatts_descriptor_add_req_dec ( uint8_t const *const  p_buf,
uint32_t  packet_len,
uint16_t *const  p_char_handle,
ble_gatts_attr_t **const  pp_attr,
uint16_t **const  pp_handle 
)

Decodes sd_ble_gatts_descriptor_add command request.

See Also
sd_ble_gatts_descriptor_add for packet format, ble_gatts_descriptor_add_rsp_enc for response encoding.
Parameters
[in]p_bufPointer to beginning of command request packet.
[in]packet_lenLength (in bytes) of request packet.
[out]p_char_handlePointer to buffer where characteristic handle will be. returned.
[out]pp_attrPointer to pointer to an attribute structure.
[out]pp_handlePointer to pointer to descriptor handle.
Return values
NRF_SUCCESSDecoding success.
NRF_ERROR_NULLDecoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
uint32_t ble_gatts_descriptor_add_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len,
uint16_t  handle 
)

Encodes sd_ble_gatts_descriptor_add command response.

See Also
sd_ble_gatts_sys_attr_set for packet format. ble_gatts_descriptor_add_req_dec for request decoding.
Parameters
[in]return_codeReturn code indicating if command was successful or not.
[out]p_bufPointer to buffer where encoded data command response will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command response packet.
[in]handleDescriptor handle value.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.
uint32_t ble_gatts_hvx_req_dec ( uint8_t const *const  p_buf,
uint32_t  packet_len,
uint16_t *const  p_conn_handle,
ble_gatts_hvx_params_t **const  pp_hvx_params 
)

Decodes ble_gatts_hvx_req_dec command request.

See Also
sd_ble_gatts_hvx for packet format, ble_gatts_hvx_rsp_enc for response encoding.
Parameters
[in]p_bufPointer to beginning of command request packet.
[in]packet_lenLength (in bytes) of request packet.
[out]p_conn_handlePointer to the buffer raw data to be placed in advertisement packet.
[out]pp_hvx_paramsPointer to an HVx parameters structure.
Return values
NRF_SUCCESSDecoding success.
NRF_ERROR_NULLDecoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
uint32_t ble_gatts_hvx_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len,
uint16_t const *const  p_bytes_written 
)

Encodes ble_gatts_hvx_rsp_enc command response.

See Also
sd_ble_gatts_sys_attr_set for packet format. ble_gatts_hvx_req_dec for request decoding.
Parameters
[in]return_codeReturn code indicating if command was successful or not.
[out]p_bufPointer to buffer where encoded data command response will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command response packet.
[in]p_bytes_writtenPointer to number of bytes written.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.
uint32_t ble_gatts_include_add_req_dec ( uint8_t const *const  p_buf,
uint16_t  packet_len,
uint16_t *const  p_service_handle,
uint16_t *const  p_inc_srvc_handle,
uint16_t **const  pp_include_handle 
)

Decodes sd_ble_gatts_include_add command request.

See Also
0xA1 - sd_ble_gatts_include_add for packet format, ble_gatts_include_add_rsp_enc for response encoding.
Parameters
[in]p_bufPointer to beginning of command request packet.
[in]packet_lenLength (in bytes) of request packet.
[out]p_service_handlePointer to the service_handle.
[out]p_inc_srvc_handlePointer to the handle of the included service.
[out]pp_include_handlePointer to Pointer to 16-bit word where the assigned handle will be stored.
Return values
NRF_SUCCESSDecoding success.
NRF_ERROR_NULLDecoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
uint32_t ble_gatts_include_add_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len,
uint16_t const *const  p_include_handle 
)

Encodes ble_gatts_include_add_rsp_enc command response.

See Also
0xA1 - sd_ble_gatts_include_add for packet format.
Parameters
[in]return_codeReturn code indicating if command was successful or not.
[out]p_bufPointer to buffer where encoded data command response will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command response packet.
[in]p_include_handlePointer to a 16-bit word where the assigned handle was stored.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.
uint32_t ble_gatts_rw_authorize_reply_req_dec ( uint8_t const *const  p_buf,
uint32_t  packet_len,
uint16_t *  p_conn_handle,
ble_gatts_rw_authorize_reply_params_t **const  pp_reply_params 
)

Decodes sd_ble_gatts_rw_authorize_reply command request.

See Also
0xA8 - sd_ble_gatts_rw_authorize_reply for packet format, ble_gatts_rw_authorize_reply_rsp_enc for response encoding.
Parameters
[in]p_bufPointer to beginning of command request packet.
[in]packet_lenLength (in bytes) of response packet.
[out]p_conn_handlePointer to connection handle.
[out]pp_reply_paramsPointer to pointer to ble_gatts_rw_authorize_reply_params_t
Return values
NRF_SUCCESSDecoding success.
NRF_ERROR_NULLDecoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
NRF_ERROR_INVALID_PARAMDecoding failure. Invalid operation type.
uint32_t ble_gatts_rw_authorize_reply_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len 
)

Encodes sd_ble_gatts_rw_authorize_reply command response.

See Also
0xA8 - sd_ble_gatts_rw_authorize_reply for packet format. ble_gatts_rw_authorize_reply_req_dec for request decoding.
Parameters
[in]return_codeReturn code indicating if command was successful or not.
[out]p_bufPointer to buffer where encoded data command response will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command response packet.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.
uint32_t ble_gatts_service_add_req_dec ( uint8_t const *const  p_buf,
uint32_t  buf_len,
uint8_t *const  p_type,
ble_uuid_t **const  pp_uuid,
uint16_t **const  pp_handle 
)

Decodes sd_ble_gatts_service_add command request.

See Also
0xA0 - sd_ble_gatts_service_add for packet format, ble_gatts_service_add_rsp_enc for response encoding.
Parameters
[in]p_bufPointer to beginning of command request packet.
[in]buf_lenLength (in bytes) of request packet.
[out]p_typePointer to the service type.
[out]pp_uuidPointer to pointer to service UUID.
[out]pp_handlePointer to Pointer to a 16-bit word where the assigned handle will be stored.
Return values
NRF_SUCCESSDecoding success.
NRF_ERROR_NULLDecoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
uint32_t ble_gatts_service_add_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len,
uint16_t const *const  p_handle 
)

Encodes ble_gatts_service_add_rsp_enc command response.

See Also
0xA0 - sd_ble_gatts_service_add for packet format.
Parameters
[in]return_codeReturn code indicating if command was successful or not.
[out]p_bufPointer to buffer where encoded data command response will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command response packet.
[in]p_handlePointer to a 16-bit word where the assigned handle was stored.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.
uint32_t ble_gatts_service_changed_req_dec ( uint8_t const *const  p_buf,
uint32_t  packet_len,
uint16_t *  p_conn_handle,
uint16_t *  p_start_handle,
uint16_t *  p_end_handle 
)

Decodes sd_ble_gatts_service_changed command request.

See Also
0xA7 - sd_ble_gatts_service_changed for packet format, ble_gatts_service_changed_rsp_enc for response encoding.
Parameters
[in]p_bufPointer to beginning of command request packet.
[in]packet_lenLength (in bytes) of response packet.
[out]p_conn_handlePointer to connection handle.
[out]p_start_handlePointer to start handle.
[out]p_end_handlePointer to end handle.
Return values
NRF_SUCCESSDecoding success.
NRF_ERROR_NULLDecoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
NRF_ERROR_INVALID_PARAMDecoding failure. Invalid operation type.
uint32_t ble_gatts_service_changed_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len 
)

Encodes sd_ble_gatts_service_changed command response.

See Also
0xA7 - sd_ble_gatts_service_changed for packet format. ble_gatts_service_changed_req_dec for request decoding.
Parameters
[in]return_codeReturn code indicating if command was successful or not.
[out]p_bufPointer to buffer where encoded data command response will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command response packet.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.
uint32_t ble_gatts_sys_attr_get_req_dec ( uint8_t const *const  p_buf,
uint32_t  packet_len,
uint16_t *const  p_conn_handle,
uint8_t **const  pp_sys_attr_data,
uint16_t **const  pp_sys_attr_data_len,
uint32_t *const  p_flags 
)

Decodes ble_gatts_sys_attr_get_req_dec command request.

See Also
sd_ble_gatts_sys_attr_get for packet format, ble_gatts_sys_attr_get_rsp_enc for response encoding.
Parameters
[in]p_bufPointer to beginning of command request packet.
[in]packet_lenLength (in bytes) of response packet.
[out]p_conn_handlePointer to connectiton handle.
[out]pp_sys_attr_dataPointer to pointer to buffer where system attributes data will be filled in.
[out]pp_sys_attr_data_lenPointer to pointer to variable which contains size of buffer for system attributes.
[out]p_flagsPointer to additional optional flags.
Return values
NRF_SUCCESSDecoding success.
NRF_ERROR_NULLDecoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
NRF_ERROR_INVALID_PARAMDecoding failure. Invalid operation type.
uint32_t ble_gatts_sys_attr_get_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len,
uint8_t const *const  p_sys_attr_data,
uint16_t const *const  p_sys_attr_data_len 
)

Encodes ble_gatts_sys_attr_get_rsp_enc command response.

See Also
sd_ble_gatts_sys_attr_get for packet format. ble_gatts_sys_attr_get_req_dec for request decoding.
Parameters
[in]return_codeReturn code indicating if command was successful or not.
[out]p_bufPointer to buffer where encoded data command response will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command response packet.
[in]p_sys_attr_dataPointer to buffer where system attributes data are storred.
[in]p_sys_attr_data_lenPointer to variable which contains size of buffer for system attributes.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.
uint32_t ble_gatts_sys_attr_set_req_dec ( uint8_t const *const  p_buf,
uint32_t  packet_len,
uint16_t *const  p_conn_handle,
uint8_t **const  pp_sys_attr_data,
uint16_t *const  p_sys_attr_data_len,
uint32_t *const  p_flags 
)

Decodes sd_ble_gatts_sys_attr_set command request.

See Also
0xA9 - sd_ble_gatts_sys_attr_set for packet format, ble_gatts_sys_attr_set_rsp_enc for response encoding.
Parameters
[in]p_bufPointer to beginning of command request packet.
[in]packet_lenLength (in bytes) of request packet.
[out]p_conn_handlePointer to the buffer raw data to be placed in advertisement packet.
[out]pp_sys_attr_dataPointer to pointer to system attribute data.
[out]p_sys_attr_data_lenPointer to data length for system attribute data.
[out]p_flagsPointer to additional optional flags.
Return values
NRF_SUCCESSDecoding success.
NRF_ERROR_NULLDecoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
uint32_t ble_gatts_sys_attr_set_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len 
)

Encodes sd_ble_gatts_sys_attr_set command response.

See Also
0xA9 - sd_ble_gatts_sys_attr_set for packet format. ble_gatts_sys_attr_set_req_dec for request decoding.
Parameters
[in]return_codeReturn code indicating if command was successful or not.
[out]p_bufPointer to buffer where encoded data command response will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command response packet.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.
uint32_t ble_gatts_value_get_req_dec ( uint8_t const *const  p_buf,
uint16_t  packet_len,
uint16_t *const  p_conn_handle,
uint16_t *const  p_handle,
ble_gatts_value_t **const  pp_value 
)

Decodes sd_ble_gatts_value_get command request.

See Also
0xA5 - sd_ble_gatts_value_get for packet format, ble_gatts_value_get_rsp_enc for response encoding.
Parameters
[in]p_bufPointer to beginning of command request packet.
[in]packet_lenLength (in bytes) of request packet.
[out]p_conn_handlePointer to the connection_handle.
[out]p_handlePointer to the attribute_handle.
[out]pp_valuePointer to pointer to the Attribute Value structure.
Return values
NRF_SUCCESSDecoding success.
NRF_ERROR_NULLDecoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
uint32_t ble_gatts_value_get_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len,
ble_gatts_value_t *const  p_value 
)

Encodes sd_ble_gatts_value_get command response.

See Also
Response packet format for packet format. ble_gatts_value_get_req_dec for request decoding.
Parameters
[in]return_codeReturn code indicating if command was successful or not.
[out]p_bufPointer to buffer where encoded data command response will be returned.
[in,out]p_buf_lenin: size of p_buf buffer. out: Length of encoded command response packet.
[in]p_valuePointer to Attribute Value structure.
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.
uint32_t ble_gatts_value_set_req_dec ( uint8_t const *const  p_buf,
uint16_t  packet_len,
uint16_t *  p_conn_handle,
uint16_t *  p_handle,
ble_gatts_value_t **const  pp_value 
)

Decodes sd_ble_gatts_value_set command request.

See Also
0xA4 - sd_ble_gatts_value_set for packet format, ble_gatts_value_set_rsp_enc for response encoding.
Parameters
[in]p_bufPointer to beginning of command request packet.
[in]packet_lenLength (in bytes) of response packet.
[out]p_conn_handlePointer to connection handle
[out]p_handlePointer to attribute handle
[out]pp_valuePointer to pointer to attribute value structure
Return values
NRF_SUCCESSDecoding success.
NRF_ERROR_NULLDecoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHDecoding failure. Incorrect buffer length.
NRF_ERROR_INVALID_PARAMDecoding failure. Invalid operation type.
uint32_t ble_gatts_value_set_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buff,
uint32_t *const  p_buff_len,
ble_gatts_value_t p_value 
)

Encodes sd_ble_gatts_value_set command response.

See Also
0xA4 - sd_ble_gatts_value_set for packet format.
Parameters
[in]return_codeReturn code indicating if command was successful or not.
[in]p_buffPointer to buffer where encoded data command response will be returned.
[in,out]p_buff_lenin: size of p_buf buffer. out: Length of encoded command response packet.
[in]p_valuein: size of value returned when value was written with success
Return values
NRF_SUCCESSEncoding success.
NRF_ERROR_NULLEncoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHEncoding failure. Incorrect buffer length.