nRF51 SDK - S110 SoftDevice
|
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 handle, uint16_t *const offset, uint16_t **const pp_len, uint8_t **const pp_data) |
uint32_t | ble_gatts_value_get_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len, uint8_t *const p_value, uint16_t *const p_value_len) |
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 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 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 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) |
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_handle, uint16_t *p_offset, uint16_t **const pp_value_len, uint8_t **const pp_value) |
Decodes 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, uint16_t value_len) |
Encodes 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) |
Decodes 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 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 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 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 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 ble_gatts_service_changed command response. More... | |
GATTS Connectivity command request decoders and command response encoders.
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 ble_gatts_characteristic_add command request.
[in] | p_buf | Pointer to beginning of command request packet. |
[in] | buf_len | Length (in bytes) of request packet. |
[out] | p_service_handle | Pointer to the service_handle. |
[out] | pp_char_md | Pointer to pointer to the location where Characteristic metadata will be decoded. |
[out] | pp_attr_char_value | Pointer to pointer to the location where GATT Attribute will be decoded. |
[out] | pp_handles | Pointer to pointer to the location where Characteristic definition handles will be decoded. |
NRF_SUCCESS | Decoding success. |
NRF_ERROR_NULL | Decoding failure. NULL pointer supplied. |
NRF_ERROR_INVALID_LENGTH | Decoding 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.
[in] | return_code | Return code indicating if command was successful or not. |
[out] | p_buf | Pointer to buffer where encoded data command response will be returned. |
[in,out] | p_buf_len | in: size of p_buf buffer. out: Length of encoded command response packet. |
[in] | p_handles | Pointer to handle struct to be encoded. |
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_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.
[in] | p_buf | Pointer to beginning of command request packet. |
[in] | packet_len | Length (in bytes) of request packet. |
[out] | p_char_handle | Pointer to buffer where characteristic handle will be. returned. |
[out] | pp_gatts_attr_t | Pointer to pointer to an attribute structure. |
[out] | pp_handle | Pointer to pointer to descriptor handle. |
NRF_SUCCESS | Decoding success. |
NRF_ERROR_NULL | Decoding failure. NULL pointer supplied. |
NRF_ERROR_INVALID_LENGTH | Decoding 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.
[in] | return_code | Return code indicating if command was successful or not. |
[out] | p_buf | Pointer to buffer where encoded data command response will be returned. |
[in,out] | p_buf_len | in: size of p_buf buffer. out: Length of encoded command response packet. |
[in] | handle | Descriptor handle value. |
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_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.
[in] | p_buf | Pointer to beginning of command request packet. |
[in] | packet_len | Length (in bytes) of request packet. |
[out] | p_conn_handle | Pointer to the buffer raw data to be placed in advertisement packet. |
[out] | pp_hvx_params | Pointer to an HVx parameters structure. |
NRF_SUCCESS | Decoding success. |
NRF_ERROR_NULL | Decoding failure. NULL pointer supplied. |
NRF_ERROR_INVALID_LENGTH | Decoding 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.
[in] | return_code | Return code indicating if command was successful or not. |
[out] | p_buf | Pointer to buffer where encoded data command response will be returned. |
[in,out] | p_buf_len | in: size of p_buf buffer. out: Length of encoded command response packet. |
[in] | p_bytes_written | Pointer to number of bytes written. |
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_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 ble_gatts_include_add command request.
[in] | p_buf | Pointer to beginning of command request packet. |
[in] | buf_len | Length (in bytes) of request packet. |
[out] | p_service_handle | Pointer to the service_handle. |
[out] | p_inc_srvc_handle | Pointer to the handle of the included service. |
[out] | pp_include_handle | Pointer to Pointer to 16-bit word where the assigned handle will be stored. |
NRF_SUCCESS | Decoding success. |
NRF_ERROR_NULL | Decoding failure. NULL pointer supplied. |
NRF_ERROR_INVALID_LENGTH | Decoding 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.
[in] | return_code | Return code indicating if command was successful or not. |
[out] | p_buf | Pointer to buffer where encoded data command response will be returned. |
[in,out] | p_buf_len | in: size of p_buf buffer. out: Length of encoded command response packet. |
[in] | p_include_handle | Pointer to a 16-bit word where the assigned handle was stored. |
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_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 ble_gatts_rw_authorize_reply command request.
[in] | p_buf | Pointer to beginning of command request packet. |
[in] | packet_len | Length (in bytes) of response packet. |
[out] | p_conn_handle | Pointer to connection handle. |
[out] | pp_reply_params | Pointer to pointer to ble_gatts_rw_authorize_reply_params_t |
NRF_SUCCESS | Decoding success. |
NRF_ERROR_NULL | Decoding failure. NULL pointer supplied. |
NRF_ERROR_INVALID_LENGTH | Decoding failure. Incorrect buffer length. |
NRF_ERROR_INVALID_PARAM | Decoding 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 ble_gatts_rw_authorize_reply command response.
[in] | return_code | Return code indicating if command was successful or not. |
[out] | p_buf | Pointer to buffer where encoded data command response will be returned. |
[in,out] | p_buf_len | in: size of p_buf buffer. out: Length of encoded command response packet. |
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_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 ble_gatts_service_add command request.
[in] | p_buf | Pointer to beginning of command request packet. |
[in] | buf_len | Length (in bytes) of request packet. |
[out] | p_type | Pointer to the service type. |
[out] | pp_uuid | Pointer to pointer to service UUID. |
[out] | pp_handle | Pointer to Pointer to a 16-bit word where the assigned handle will be stored. |
NRF_SUCCESS | Decoding success. |
NRF_ERROR_NULL | Decoding failure. NULL pointer supplied. |
NRF_ERROR_INVALID_LENGTH | Decoding 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.
[in] | return_code | Return code indicating if command was successful or not. |
[out] | p_buf | Pointer to buffer where encoded data command response will be returned. |
[in,out] | p_buf_len | in: size of p_buf buffer. out: Length of encoded command response packet. |
[in] | p_handle | Pointer to a 16-bit word where the assigned handle was stored. |
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_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 ble_gatts_service_changed command request.
[in] | p_buf | Pointer to beginning of command request packet. |
[in] | packet_len | Length (in bytes) of response packet. |
[out] | p_conn_handle | Pointer to connection handle. |
[out] | p_start_handle | Pointer to start handle. |
[out] | p_end_handle | Pointer to end handle. |
NRF_SUCCESS | Decoding success. |
NRF_ERROR_NULL | Decoding failure. NULL pointer supplied. |
NRF_ERROR_INVALID_LENGTH | Decoding failure. Incorrect buffer length. |
NRF_ERROR_INVALID_PARAM | Decoding 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 ble_gatts_service_changed command response.
[in] | return_code | Return code indicating if command was successful or not. |
[out] | p_buf | Pointer to buffer where encoded data command response will be returned. |
[in,out] | p_buf_len | in: size of p_buf buffer. out: Length of encoded command response packet. |
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_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 | ||
) |
Decodes ble_gatts_sys_attr_get_req_dec command request.
[in] | p_buf | Pointer to beginning of command request packet. |
[in] | packet_len | Length (in bytes) of response packet. |
[out] | p_conn_handle | Pointer to connectiton handle. |
[out] | pp_sys_attr_data | Pointer to pointer to buffer where system attributes data will be filled in. |
[out] | pp_sys_attr_data_len | Pointer to pointer to variable which contains size of buffer for system attributes. |
NRF_SUCCESS | Decoding success. |
NRF_ERROR_NULL | Decoding failure. NULL pointer supplied. |
NRF_ERROR_INVALID_LENGTH | Decoding failure. Incorrect buffer length. |
NRF_ERROR_INVALID_PARAM | Decoding 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.
[in] | return_code | Return code indicating if command was successful or not. |
[out] | p_buf | Pointer to buffer where encoded data command response will be returned. |
[in,out] | p_buf_len | in: size of p_buf buffer. out: Length of encoded command response packet. |
[in] | p_sys_attr_data | Pointer to buffer where system attributes data are storred. |
[in] | p_sys_attr_data_len | Pointer to variable which contains size of buffer for system attributes. |
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_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 | ||
) |
Decodes ble_gatts_sys_attr_set command request.
[in] | p_buf | Pointer to beginning of command request packet. |
[in] | packet_len | Length (in bytes) of request packet. |
[out] | p_conn_handle | Pointer to the buffer raw data to be placed in advertisement packet. |
[out] | pp_sys_attr_data | Pointer to pointer to system attribute data. |
[out] | p_sys_attr_data_len | Pointer to data length for system attribute data. |
NRF_SUCCESS | Decoding success. |
NRF_ERROR_NULL | Decoding failure. NULL pointer supplied. |
NRF_ERROR_INVALID_LENGTH | Decoding 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 ble_gatts_sys_attr_set command response.
[in] | return_code | Return code indicating if command was successful or not. |
[out] | p_buf | Pointer to buffer where encoded data command response will be returned. |
[in,out] | p_buf_len | in: size of p_buf buffer. out: Length of encoded command response packet. |
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_req_dec | ( | uint8_t const *const | p_buf, |
uint16_t | packet_len, | ||
uint16_t * | p_handle, | ||
uint16_t * | p_offset, | ||
uint16_t **const | pp_value_len, | ||
uint8_t **const | pp_value | ||
) |
Decodes ble_gatts_value_set command request.
[in] | p_buf | Pointer to beginning of command request packet. |
[in] | packet_len | Length (in bytes) of response packet. |
[out] | p_handle | Pointer to attribute handle |
[out] | p_offset | Pointer to offset |
[out] | pp_value_len | Pointer to pointer to attribute length |
[out] | pp_value | Pointer to pointer to attribute value |
NRF_SUCCESS | Decoding success. |
NRF_ERROR_NULL | Decoding failure. NULL pointer supplied. |
NRF_ERROR_INVALID_LENGTH | Decoding failure. Incorrect buffer length. |
NRF_ERROR_INVALID_PARAM | Decoding 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, | ||
uint16_t | value_len | ||
) |
Encodes ble_gatts_value_set command response.
[in] | return_code | Return code indicating if command was successful or not. |
[in] | p_buf | Pointer to buffer where encoded data command response will be returned. |
[in,out] | p_buf_len | in: size of p_buf buffer. out: Length of encoded command response packet. |
[in] | value_len | in: size of value returned when value was written with success |
NRF_SUCCESS | Encoding success. |
NRF_ERROR_NULL | Encoding failure. NULL pointer supplied. |
NRF_ERROR_INVALID_LENGTH | Encoding failure. Incorrect buffer length. |