bt_gatt_client.h File Reference
#include <stdint.h>
#include "bt_gatt_types.h"
#include "bt_common_types.h"

Go to the source code of this file.

Data Structures

struct  btgatt_unformatted_value_t
 
struct  btgatt_read_params_t
 
struct  btgatt_write_params_t
 
struct  btgatt_notify_params_t
 
struct  btgatt_filt_param_setup_t
 
struct  btgatt_test_params_t
 
struct  btgatt_client_callbacks_t
 
struct  btgatt_client_interface_t
 

Macros

#define BTGATT_MAX_ATTR_LEN   600
 

Typedefs

typedef void(* register_client_callback )(int status, int client_if, bt_uuid_t *app_uuid)
 
typedef void(* scan_result_callback )(bt_bdaddr_t *bda, int rssi, uint8_t *adv_data)
 
typedef void(* connect_callback )(int conn_id, int status, int client_if, bt_bdaddr_t *bda)
 
typedef void(* disconnect_callback )(int conn_id, int status, int client_if, bt_bdaddr_t *bda)
 
typedef void(* search_complete_callback )(int conn_id, int status)
 
typedef void(* search_result_callback )(int conn_id, btgatt_srvc_id_t *srvc_id)
 
typedef void(* get_characteristic_callback )(int conn_id, int status, btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *char_id, int char_prop)
 
typedef void(* get_descriptor_callback )(int conn_id, int status, btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *char_id, btgatt_gatt_id_t *descr_id)
 
typedef void(* get_included_service_callback )(int conn_id, int status, btgatt_srvc_id_t *srvc_id, btgatt_srvc_id_t *incl_srvc_id)
 
typedef void(* register_for_notification_callback )(int conn_id, int registered, int status, btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *char_id)
 
typedef void(* notify_callback )(int conn_id, btgatt_notify_params_t *p_data)
 
typedef void(* read_characteristic_callback )(int conn_id, int status, btgatt_read_params_t *p_data)
 
typedef void(* write_characteristic_callback )(int conn_id, int status, btgatt_write_params_t *p_data)
 
typedef void(* execute_write_callback )(int conn_id, int status)
 
typedef void(* read_descriptor_callback )(int conn_id, int status, btgatt_read_params_t *p_data)
 
typedef void(* write_descriptor_callback )(int conn_id, int status, btgatt_write_params_t *p_data)
 
typedef void(* read_remote_rssi_callback )(int client_if, bt_bdaddr_t *bda, int rssi, int status)
 
typedef void(* listen_callback )(int status, int server_if)
 
typedef void(* configure_mtu_callback )(int conn_id, int status, int mtu)
 
typedef void(* scan_filter_cfg_callback )(int action, int client_if, int status, int filt_type, int avbl_space)
 
typedef void(* scan_filter_param_callback )(int action, int client_if, int status, int avbl_space)
 
typedef void(* scan_filter_status_callback )(int enable, int client_if, int status)
 
typedef void(* multi_adv_enable_callback )(int client_if, int status)
 
typedef void(* multi_adv_update_callback )(int client_if, int status)
 
typedef void(* multi_adv_data_callback )(int client_if, int status)
 
typedef void(* multi_adv_disable_callback )(int client_if, int status)
 
typedef void(* congestion_callback )(int conn_id, bool congested)
 
typedef void(* batchscan_cfg_storage_callback )(int client_if, int status)
 
typedef void(* batchscan_enable_disable_callback )(int action, int client_if, int status)
 
typedef void(* batchscan_reports_callback )(int client_if, int status, int report_format, int num_records, int data_len, uint8_t *rep_data)
 
typedef void(* batchscan_threshold_callback )(int client_if)
 
typedef void(* track_adv_event_callback )(btgatt_track_adv_info_t *p_track_adv_info)
 
typedef void(* scan_parameter_setup_completed_callback )(int client_if, btgattc_error_t status)
 

Enumerations

enum  btgattc_error_t {
  BT_GATTC_COMMAND_SUCCESS = 0, BT_GATTC_COMMAND_STARTED, BT_GATTC_COMMAND_BUSY, BT_GATTC_COMMAND_STORED,
  BT_GATTC_NO_RESOURCES, BT_GATTC_MODE_UNSUPPORTED, BT_GATTC_ILLEGAL_VALUE, BT_GATTC_INCORRECT_STATE,
  BT_GATTC_UNKNOWN_ADDR, BT_GATTC_DEVICE_TIMEOUT, BT_GATTC_INVALID_CONTROLLER_OUTPUT, BT_GATTC_SECURITY_ERROR,
  BT_GATTC_DELAYED_ENCRYPTION_CHECK, BT_GATTC_ERR_PROCESSING
}
 

Macro Definition Documentation

#define BTGATT_MAX_ATTR_LEN   600

Buffer sizes for maximum attribute length and maximum read/write operation buffer size.

Definition at line 31 of file bt_gatt_client.h.

Typedef Documentation

typedef void(* batchscan_cfg_storage_callback)(int client_if, int status)

Callback invoked when batchscan storage config operation has completed

Definition at line 229 of file bt_gatt_client.h.

typedef void(* batchscan_enable_disable_callback)(int action, int client_if, int status)

Callback invoked when batchscan enable / disable operation has completed

Definition at line 232 of file bt_gatt_client.h.

typedef void(* batchscan_reports_callback)(int client_if, int status, int report_format, int num_records, int data_len, uint8_t *rep_data)

Callback invoked when batchscan reports are obtained

Definition at line 235 of file bt_gatt_client.h.

typedef void(* batchscan_threshold_callback)(int client_if)

Callback invoked when batchscan storage threshold limit is crossed

Definition at line 239 of file bt_gatt_client.h.

typedef void(* configure_mtu_callback)(int conn_id, int status, int mtu)

Callback invoked when the MTU for a given connection changes

Definition at line 197 of file bt_gatt_client.h.

typedef void(* congestion_callback)(int conn_id, bool congested)

Callback notifying an application that a remote device connection is currently congested and cannot receive any more data. An application should avoid sending more data until a further callback is received indicating the congestion status has been cleared.

Definition at line 227 of file bt_gatt_client.h.

typedef void(* connect_callback)(int conn_id, int status, int client_if, bt_bdaddr_t *bda)

GATT open callback invoked in response to open

Definition at line 128 of file bt_gatt_client.h.

typedef void(* disconnect_callback)(int conn_id, int status, int client_if, bt_bdaddr_t *bda)

Callback invoked in response to close

Definition at line 131 of file bt_gatt_client.h.

typedef void(* execute_write_callback)(int conn_id, int status)

GATT execute prepared write callback

Definition at line 177 of file bt_gatt_client.h.

typedef void(* get_characteristic_callback)(int conn_id, int status, btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *char_id, int char_prop)

GATT characteristic enumeration result callback

Definition at line 144 of file bt_gatt_client.h.

typedef void(* get_descriptor_callback)(int conn_id, int status, btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *char_id, btgatt_gatt_id_t *descr_id)

GATT descriptor enumeration result callback

Definition at line 149 of file bt_gatt_client.h.

typedef void(* get_included_service_callback)(int conn_id, int status, btgatt_srvc_id_t *srvc_id, btgatt_srvc_id_t *incl_srvc_id)

GATT included service enumeration result callback

Definition at line 154 of file bt_gatt_client.h.

typedef void(* listen_callback)(int status, int server_if)

Callback indicating the status of a listen() operation

Definition at line 194 of file bt_gatt_client.h.

typedef void(* multi_adv_data_callback)(int client_if, int status)

Callback invoked when multi-adv instance data set operation has completed

Definition at line 217 of file bt_gatt_client.h.

typedef void(* multi_adv_disable_callback)(int client_if, int status)

Callback invoked when multi-adv disable operation has completed

Definition at line 220 of file bt_gatt_client.h.

typedef void(* multi_adv_enable_callback)(int client_if, int status)

Callback invoked when multi-adv enable operation has completed

Definition at line 211 of file bt_gatt_client.h.

typedef void(* multi_adv_update_callback)(int client_if, int status)

Callback invoked when multi-adv param update operation has completed

Definition at line 214 of file bt_gatt_client.h.

typedef void(* notify_callback)(int conn_id, btgatt_notify_params_t *p_data)

Remote device notification callback, invoked when a remote device sends a notification or indication that a client has registered for.

Definition at line 166 of file bt_gatt_client.h.

typedef void(* read_characteristic_callback)(int conn_id, int status, btgatt_read_params_t *p_data)

Reports result of a GATT read operation

Definition at line 169 of file bt_gatt_client.h.

typedef void(* read_descriptor_callback)(int conn_id, int status, btgatt_read_params_t *p_data)

Callback invoked in response to read_descriptor

Definition at line 180 of file bt_gatt_client.h.

typedef void(* read_remote_rssi_callback)(int client_if, bt_bdaddr_t *bda, int rssi, int status)

Callback triggered in response to read_remote_rssi

Definition at line 188 of file bt_gatt_client.h.

typedef void(* register_client_callback)(int status, int client_if, bt_uuid_t *app_uuid)

BT-GATT Client callback structure. Callback invoked in response to register_client

Definition at line 121 of file bt_gatt_client.h.

typedef void(* register_for_notification_callback)(int conn_id, int registered, int status, btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *char_id)

Callback invoked in response to [de]register_for_notification

Definition at line 158 of file bt_gatt_client.h.

typedef void(* scan_filter_cfg_callback)(int action, int client_if, int status, int filt_type, int avbl_space)

Callback invoked when a scan filter configuration command has completed

Definition at line 200 of file bt_gatt_client.h.

typedef void(* scan_filter_param_callback)(int action, int client_if, int status, int avbl_space)

Callback invoked when scan param has been added, cleared, or deleted

Definition at line 204 of file bt_gatt_client.h.

typedef void(* scan_filter_status_callback)(int enable, int client_if, int status)

Callback invoked when a scan filter configuration command has completed

Definition at line 208 of file bt_gatt_client.h.

typedef void(* scan_parameter_setup_completed_callback)(int client_if, btgattc_error_t status)

Callback invoked when scan parameter setup has completed

Definition at line 245 of file bt_gatt_client.h.

typedef void(* scan_result_callback)(bt_bdaddr_t *bda, int rssi, uint8_t *adv_data)

Callback for scan results

Definition at line 125 of file bt_gatt_client.h.

typedef void(* search_complete_callback)(int conn_id, int status)

Invoked in response to search_service when the GATT service search has been completed.

Definition at line 138 of file bt_gatt_client.h.

typedef void(* search_result_callback)(int conn_id, btgatt_srvc_id_t *srvc_id)

Reports GATT services on a remote device

Definition at line 141 of file bt_gatt_client.h.

typedef void(* track_adv_event_callback)(btgatt_track_adv_info_t *p_track_adv_info)

Track ADV VSE callback invoked when tracked device is found or lost

Definition at line 242 of file bt_gatt_client.h.

typedef void(* write_characteristic_callback)(int conn_id, int status, btgatt_write_params_t *p_data)

GATT write characteristic operation callback

Definition at line 173 of file bt_gatt_client.h.

typedef void(* write_descriptor_callback)(int conn_id, int status, btgatt_write_params_t *p_data)

Callback invoked in response to write_descriptor

Definition at line 184 of file bt_gatt_client.h.

Enumeration Type Documentation

Enumerator
BT_GATTC_COMMAND_SUCCESS 
BT_GATTC_COMMAND_STARTED 
BT_GATTC_COMMAND_BUSY 
BT_GATTC_COMMAND_STORED 
BT_GATTC_NO_RESOURCES 
BT_GATTC_MODE_UNSUPPORTED 
BT_GATTC_ILLEGAL_VALUE 
BT_GATTC_INCORRECT_STATE 
BT_GATTC_UNKNOWN_ADDR 
BT_GATTC_DEVICE_TIMEOUT 
BT_GATTC_INVALID_CONTROLLER_OUTPUT 
BT_GATTC_SECURITY_ERROR 
BT_GATTC_DELAYED_ENCRYPTION_CHECK 
BT_GATTC_ERR_PROCESSING 

Definition at line 100 of file bt_gatt_client.h.