nRF5 SDK v13.0.0
Functions
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 packet_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 packet_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_buf, uint32_t *const p_buf_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 *p_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...
 
uint32_t ble_gatts_attr_get_req_dec (uint8_t const *const p_buf, uint32_t packet_len, uint16_t *p_handle, ble_uuid_t **pp_uuid, ble_gatts_attr_md_t **pp_md)
 Decodes ble_gatts_attr_get_req_dec command request. More...
 
uint32_t ble_gatts_attr_get_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len, ble_uuid_t *p_uuid, ble_gatts_attr_md_t *p_md)
 Encodes ble_gatts_attr_get_rsp_enc command response. More...
 
uint32_t ble_gatts_initial_user_handle_get_req_dec (uint8_t const *const p_buf, uint32_t packet_len, uint16_t **pp_handle)
 Decodes ble_gatts_initial_user_handle_get_req_dec command request. More...
 
uint32_t ble_gatts_initial_user_handle_get_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len, uint16_t *p_handle)
 Encodes ble_gatts_initial_user_handle_get_rsp_enc command response. More...
 
uint32_t ble_gatts_exchange_mtu_reply_req_dec (uint8_t const *const p_buf, uint16_t packet_len, uint16_t *const p_conn_handle, uint16_t *const p_server_rx_mtu)
 Decodes sd_ble_gatts_rw_authorize_reply command request. More...
 
uint32_t ble_gatts_exchange_mtu_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...
 

Detailed Description

GATTS Connectivity command request decoders and command response encoders.

Function Documentation

uint32_t ble_gatts_attr_get_req_dec ( uint8_t const *const  p_buf,
uint32_t  packet_len,
uint16_t *  p_handle,
ble_uuid_t **  pp_uuid,
ble_gatts_attr_md_t **  pp_md 
)

Decodes ble_gatts_attr_get_req_dec command request.

See Also
ble_gatts_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_handlePointer to handle.
[out]pp_uuidPointer to pointer to location for decoded uuid structure.
[out]pp_mdPointer to pointer to location for md 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_attr_get_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len,
ble_uuid_t p_uuid,
ble_gatts_attr_md_t p_md 
)

Encodes ble_gatts_attr_get_rsp_enc command response.

See Also
ble_gatts_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_uuidPointer to structure to be encoded.
[in]p_mdPointer to structure 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_characteristic_add_req_dec ( uint8_t const *const  p_buf,
uint32_t  packet_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
ble_gatts_characteristic_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]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
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
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 *  p_handle 
)

Encodes sd_ble_gatts_descriptor_add command response.

See Also
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]p_handlePointer to descriptor 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_exchange_mtu_reply_req_dec ( uint8_t const *const  p_buf,
uint16_t  packet_len,
uint16_t *const  p_conn_handle,
uint16_t *const  p_server_rx_mtu 
)

Decodes sd_ble_gatts_rw_authorize_reply command request.

@ref ble_gatts_exchange_mtu_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]p_server_rx_mtuPointer to Server RX MTU size.
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_exchange_mtu_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.

@ref ble_gatts_exchange_mtu_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_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
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
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
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.

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_initial_user_handle_get_req_dec ( uint8_t const *const  p_buf,
uint32_t  packet_len,
uint16_t **  pp_handle 
)

Decodes ble_gatts_initial_user_handle_get_req_dec command request.

See Also
ble_gatts_initial_user_handle_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]pp_handlePointer to pointer to 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_initial_user_handle_get_rsp_enc ( uint32_t  return_code,
uint8_t *const  p_buf,
uint32_t *const  p_buf_len,
uint16_t *  p_handle 
)

Encodes ble_gatts_initial_user_handle_get_rsp_enc command response.

See Also
ble_gatts_initial_user_handle_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_handlePointer to handle 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_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
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
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  packet_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
ble_gatts_service_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_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.

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
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
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
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
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 stored.
[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
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
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
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
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
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_buf,
uint32_t *const  p_buf_len,
ble_gatts_value_t p_value 
)

Encodes sd_ble_gatts_value_set command response.

Parameters
[in]return_codeReturn code indicating if command was successful or not.
[in]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_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.

Documentation feedback | Developer Zone | Subscribe | Updated