bt_interface_t Tham chiếu cấu trúc

bt_interface_t Tham chiếu cấu trúc

#include < bluetooth.h >

Trường dữ liệu

kích thước_t kích cỡ
int(* init )( bt_callbacks_t *gọi lại)
int(* bật )(bool guest_mode)
int(* vô hiệu hóa )(void)
khoảng trống(* dọn dẹp )(void)
int(* get_adapter_properties )(void)
int(* get_adapter_property )( loại bt_property_type_t )
int(* set_adapter_property )(const bt_property_t *property)
int(* get_remote_device_properties )(bt_bdaddr_t *remote_addr)
int(* get_remote_device_property )(bt_bdaddr_t *remote_addr, loại bt_property_type_t )
int(* set_remote_device_property )(bt_bdaddr_t *remote_addr, const bt_property_t *thuộc tính)
int(* get_remote_service_record )(bt_bdaddr_t *remote_addr, bt_uuid_t *uuid)
int(* get_remote_services )(bt_bdaddr_t *remote_addr)
int(* start_discovery )(void)
int(* cancel_discovery )(void)
int(* create_bond )(const bt_bdaddr_t *bd_addr, int Transport)
int(* create_bond_out_of_band )(const bt_bdaddr_t *bd_addr, int Transport, const bt_out_of_band_data_t *oob_data)
int(* Remove_bond )(const bt_bdaddr_t *bd_addr)
int(* cancel_bond )(const bt_bdaddr_t *bd_addr)
int(* get_connection_state )(const bt_bdaddr_t *bd_addr)
int(* pin_reply )(const bt_bdaddr_t *bd_addr, uint8_t chấp nhận, uint8_t pin_len, bt_pin_code_t *pin_code)
int(* ssp_reply )(const bt_bdaddr_t *bd_addr, biến thể bt_ssp_variant_t , chấp nhận uint8_t, mật khẩu uint32_t)
const void *(* get_profile_interface )(const char *profile_id)
int(* dut_mode_configure )(uint8_t kích hoạt )
int(* dut_mode_send )(uint16_t opcode, uint8_t *buf, uint8_t len)
int(* le_test_mode )(uint16_t opcode, uint8_t *buf, uint8_t len)
int(* config_hci_snoop_log )( bật uint8_t)
int(* set_os_callouts )( bt_os_callouts_t *chú thích)
int(* read_energy_info )()
khoảng trống(* dump )(int fd, const char **đối số)
int(* config_clear )(void)
khoảng trống(* interop_database_clear )(void)
khoảng trống(* interop_database_add )(tính năng uint16_t, const bt_bdaddr_t *addr, size_t len)

miêu tả cụ thể

LƯU Ý: Theo mặc định, không có cấu hình nào được khởi tạo tại thời điểm khởi tạo/bật. Bất cứ khi nào ứng dụng gọi API 'init' của một cấu hình thì một trong những điều sau đây sẽ xảy ra:

1.) Nếu Bluetooth không được bật thì lõi Bluetooth sẽ đánh dấu cấu hình là đã bật. Sau đó, khi ứng dụng gọi 'kích hoạt' Bluetooth, như một phần của trình tự kích hoạt, cấu hình đã được đánh dấu sẽ được kích hoạt bằng cách gọi các API ngăn xếp thích hợp. 'adapter_properties_cb' sẽ trả về danh sách UUID của cấu hình đã bật.

2.) Nếu Bluetooth được bật thì lõi Bluetooth sẽ gọi API cấu hình ngăn xếp để khởi tạo cấu hình và kích hoạt 'adapter_properties_cb' với danh sách UUID hiện tại bao gồm UUID của cấu hình mới được thêm vào.

Điều ngược lại sẽ xảy ra bất cứ khi nào API 'dọn dẹp' cấu hình được gọiĐại diện cho giao diện Bluetooth DM tiêu chuẩn.

Định nghĩa tại dòng 456 của file bluetooth.h .

Tài liệu hiện trường

int(* cancel_bond)(const bt_bdaddr_t *bd_addr)

Hủy trái phiếu

Định nghĩa tại dòng 521 của file bluetooth.h .

int(* cancel_discovery)(void)

Hủy khám phá

Định nghĩa tại dòng 508 của file bluetooth.h .

void(* dọn dẹp)(void)

Đóng giao diện.

Định nghĩa tại dòng 472 của file bluetooth.h .

int(* config_clear)(void)

Xóa /data/misc/bt_config.conf và xóa tất cả các kết nối được lưu trữ

Định nghĩa tại dòng 580 của file bluetooth.h .

int(* config_hci_snoop_log)(uint8_t kích hoạt )

Định nghĩa tại dòng 557 của file bluetooth.h .

int(* create_bond)(const bt_bdaddr_t *bd_addr, int Transport)

Tạo liên kết Bluetooth

Định nghĩa tại dòng 511 của file bluetooth.h .

int(* create_bond_out_of_band)(const bt_bdaddr_t *bd_addr, int Transport, const bt_out_of_band_data_t *oob_data)

Tạo Bluetooth Bond bằng cách sử dụng dữ liệu ngoài băng tần

Định nghĩa tại dòng 514 của file bluetooth.h .

int(* vô hiệu hóa)(void)

Tắt Bluetooth.

Định nghĩa tại dòng 469 của file bluetooth.h .

void(* dump)(int fd, const char **arguments)

Hỗ trợ gốc cho hàm dumpsys. Hàm này đồng bộ và |fd| thuộc quyền sở hữu của người gọi. |lý lẽ| là các đối số có thể ảnh hưởng đến đầu ra, được mã hóa dưới dạng chuỗi UTF-8.

Định nghĩa tại dòng 575 của file bluetooth.h .

int(* dut_mode_configure)(uint8_t kích hoạt )

API chế độ kiểm tra Bluetooth - Bluetooth phải được bật cho các API này

Định nghĩa tại dòng 548 của file bluetooth.h .

int(* dut_mode_send)(uint16_t opcode, uint8_t *buf, uint8_t len)

Định nghĩa tại dòng 551 của file bluetooth.h .

int(* kích hoạt)(bool guest_mode)

Kích hoạt Bluetooth.

Định nghĩa tại dòng 466 của file bluetooth.h .

int(* get_adapter_properties)(void)

Nhận tất cả các thuộc tính của Bộ điều hợp Bluetooth tại init

Định nghĩa tại dòng 475 của file bluetooth.h .

int(* get_adapter_property)( loại bt_property_type_t )

Nhận thuộc tính Bộ điều hợp Bluetooth của 'loại'

Định nghĩa tại dòng 478 của file bluetooth.h .

int(* get_connection_state)(const bt_bdaddr_t *bd_addr)

Nhận trạng thái kết nối cho một thiết bị từ xa nhất định. giá trị trả về bằng 0 có nghĩa là thiết bị không được kết nối, trạng thái trả về khác 0 cho biết kết nối đang hoạt động.

Định nghĩa tại dòng 528 của file bluetooth.h .

const void*(* get_profile_interface)(const char *profile_id)

Nhận giao diện hồ sơ Bluetooth

Định nghĩa tại dòng 544 của file bluetooth.h .

int(* get_remote_device_properties)(bt_bdaddr_t *remote_addr)

Nhận tất cả các thuộc tính của Thiết bị từ xa

Định nghĩa tại dòng 487 của file bluetooth.h .

int(* get_remote_device_property)(bt_bdaddr_t *remote_addr, loại bt_property_type_t )

Nhận thuộc tính Thiết bị từ xa của 'loại'

Định nghĩa tại dòng 490 của file bluetooth.h .

int(* get_remote_service_record)(bt_bdaddr_t *remote_addr, bt_uuid_t *uuid)

Nhận bản ghi dịch vụ của Thiết bị từ xa cho UUID đã cho

Định nghĩa tại dòng 498 của file bluetooth.h .

int(* get_remote_services)(bt_bdaddr_t *remote_addr)

Khởi động SDP để nhận các dịch vụ từ xa

Định nghĩa tại dòng 502 của file bluetooth.h .

int(* init)( bt_callbacks_t *callbacks)

Mở giao diện và cung cấp các quy trình gọi lại để triển khai giao diện này.

Định nghĩa tại dòng 463 của file bluetooth.h .

void(* interop_database_add)(tính năng uint16_t, const bt_bdaddr_t *addr, size_t len)

Thêm giải pháp mới về khả năng tương tác của thiết bị cho thiết bị từ xa có |len| đầu tiên byte của địa chỉ thiết bị của nó khớp với |addr|. LƯU Ý: |tính năng| phải khớp với một mục được xác định trong interop_feature_t (interop.h).

Định nghĩa tại dòng 592 của file bluetooth.h .

void(* interop_database_clear)(void)

Xóa (đặt lại) phần động của cơ sở dữ liệu về khả năng tương tác của thiết bị.

Định nghĩa tại dòng 585 của file bluetooth.h .

int(* le_test_mode)(uint16_t opcode, uint8_t *buf, uint8_t len)

API chế độ thử nghiệm BLE

Định nghĩa tại dòng 554 của file bluetooth.h .

int(* pin_reply)(const bt_bdaddr_t *bd_addr, uint8_t chấp nhận, uint8_t pin_len, bt_pin_code_t *pin_code)

BT Legacy PinKey Trả lời Nếu chấp nhận==FALSE thì pin_len và pin_code sẽ là 0x0

Định nghĩa tại dòng 532 của file bluetooth.h .

int(* read_energy_info)()

Đọc chi tiết thông tin năng lượng - giá trị trả về cho biết BT_STATUS_SUCCESS hoặc BT_STATUS_NOT_READY Thành công cho biết lệnh VSC đã được gửi đến bộ điều khiển

Định nghĩa tại dòng 567 của file bluetooth.h .

int(* Remove_bond)(const bt_bdaddr_t *bd_addr)

Xóa trái phiếu

Định nghĩa tại dòng 518 của file bluetooth.h .

int(* set_adapter_property)(const bt_property_t *property)

Đặt thuộc tính Bộ điều hợp Bluetooth của 'loại'

Định nghĩa tại dòng 484 của file bluetooth.h .

int(* set_os_callouts)( bt_os_callouts_t *chú thích)

Đặt chức năng gọi ra hệ điều hành mà bluedroid cần cho báo thức và khóa đánh thức. Điều này sẽ được gọi ngay sau khi |init| thành công.

Định nghĩa tại dòng 562 của file bluetooth.h .

int(* set_remote_device_property)(bt_bdaddr_t *remote_addr, const bt_property_t *property)

Đặt thuộc tính Thiết bị từ xa của 'loại'

Định nghĩa tại dòng 494 của file bluetooth.h .

kích thước_t kích thước

được đặt thành sizeof(bt_interface_t)

Định nghĩa tại dòng 458 của file bluetooth.h .

int(* ssp_reply)(const bt_bdaddr_t *bd_addr, biến thể bt_ssp_variant_t , chấp nhận uint8_t, mật mã uint32_t)

Trả lời BT SSP - Chỉ hoạt động, So sánh số và mã khóa mật khẩu sẽ bằng 0 đối với BT_SSP_VARIANT_PASSKEY_COMPARISON & BT_SSP_VARIANT_CONSENT Đối với BT_SSP_VARIANT_PASSKEY_ENTRY, nếu chấp nhận==FALSE thì mã khóa sẽ bằng 0

Định nghĩa tại dòng 540 của file bluetooth.h .

int(* start_discovery)(void)

Bắt đầu khám phá

Định nghĩa tại dòng 505 của file bluetooth.h .


Tài liệu cho cấu trúc này được tạo từ tệp sau:
  • phần cứng/libhardware/bao gồm/phần cứng/ bluetooth.h