bt_interface_t การอ้างอิงโครงสร้าง
#include < bluetooth.h >
เขตข้อมูล | |
size_t | ขนาด |
int(* | init )( bt_callbacks_t * โทรกลับ) |
int(* | เปิดใช้ งาน )(บูล guest_mode) |
int(* | ปิดการใช้งาน )(เป็นโมฆะ) |
ถือเป็นโมฆะ(* | การล้างข้อมูล )(เป็นโมฆะ) |
int(* | get_adapter_properties )(เป็นโมฆะ) |
int(* | get_adapter_property )( ประเภท bt_property_type_t ) |
int(* | set_adapter_property )(const bt_property_t *คุณสมบัติ) |
int(* | get_remote_device_properties )(bt_bdaddr_t *remote_addr) |
int(* | get_remote_device_property )(bt_bdaddr_t *remote_addr ประเภท bt_property_type_t ) |
int(* | set_remote_device_property )(bt_bdaddr_t *remote_addr, const bt_property_t * คุณสมบัติ) |
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 )(เป็นโมฆะ) |
int(* | cancel_discovery )(เป็นโมฆะ) |
int(* | create_bond )(const bt_bdaddr_t *bd_addr ขนส่ง int) |
int(* | create_bond_out_of_band )(const bt_bdaddr_t *bd_addr, การขนส่ง int, 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 ยอมรับ, uint8_t pin_len, bt_pin_code_t *pin_code) |
int(* | ssp_reply )(const bt_bdaddr_t *bd_addr, bt_ssp_variant_t ตัวแปร, uint8_t ยอมรับ, รหัสผ่าน uint32_t) |
const เป็นโมฆะ *(* | get_profile_interface )(const ถ่าน *profile_id) |
int(* | dut_mode_configure ) ( เปิดใช้ งาน uint8_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 ) ( เปิดใช้ งาน uint8_t) |
int(* | set_os_callouts )( bt_os_callouts_t * คำบรรยาย) |
int(* | read_energy_info )() |
ถือเป็นโมฆะ(* | dump )(int fd, const char **อาร์กิวเมนต์) |
int(* | config_clear )(เป็นโมฆะ) |
ถือเป็นโมฆะ(* | interop_database_clear )(เป็นโมฆะ) |
ถือเป็นโมฆะ(* | interop_database_add )(คุณสมบัติ uint16_t, const bt_bdaddr_t *addr, size_t len) |
คำอธิบายโดยละเอียด
หมายเหตุ: โดยค่าเริ่มต้น โปรไฟล์จะไม่ถูกเตรียมใช้งานในขณะที่เริ่มต้น/เปิดใช้งาน เมื่อใดก็ตามที่แอปพลิเคชันเรียกใช้ 'init' API ของโปรไฟล์ สิ่งใดสิ่งหนึ่งต่อไปนี้จะเกิดขึ้น:
1.) หากไม่ได้เปิดใช้งาน Bluetooth คอร์ของ Bluetooth จะทำเครื่องหมายโปรไฟล์ว่าเปิดใช้งาน ต่อจากนั้น เมื่อแอปพลิเคชันเรียกใช้ 'เปิดใช้งาน' ของ Bluetooth ซึ่งเป็นส่วนหนึ่งของลำดับการเปิดใช้งาน โปรไฟล์ที่ทำเครื่องหมายไว้จะถูกเปิดใช้งานโดยการเรียก API สแต็กที่เหมาะสม 'adapter_properties_cb' จะส่งคืนรายการ UUID ของโปรไฟล์ที่เปิดใช้งาน
2.) หากเปิดใช้งาน Bluetooth คอร์ของ Bluetooth จะเรียกใช้ API โปรไฟล์สแต็กเพื่อเริ่มต้นโปรไฟล์และทริกเกอร์ 'adapter_properties_cb' ด้วยรายการ UUID ปัจจุบันรวมถึง UUID ของโปรไฟล์ที่เพิ่มใหม่
การย้อนกลับจะเกิดขึ้นทุกครั้งที่มีการเรียกใช้ API 'การล้างข้อมูล' ของโปรไฟล์ หมายถึงอินเทอร์เฟซ Bluetooth DM มาตรฐาน
คำจำกัดความที่บรรทัด 456 ของไฟล์ bluetooth.h
เอกสารภาคสนาม
int(* cancel_bond)(const bt_bdaddr_t *bd_addr) |
ยกเลิกพันธบัตร
คำจำกัดความที่บรรทัด 521 ของไฟล์ bluetooth.h
int(* cancel_discovery)(เป็นโมฆะ) |
ยกเลิก การค้นพบ
คำจำกัดความที่บรรทัด 508 ของไฟล์ bluetooth.h
โมฆะ(* การล้าง)(โมฆะ) |
ปิดอินเทอร์เฟซ
คำจำกัดความที่บรรทัด 472 ของไฟล์ bluetooth.h
int(* config_clear)(เป็นโมฆะ) |
ล้าง /data/misc/bt_config.conf และลบการเชื่อมต่อที่เก็บไว้ทั้งหมด
คำจำกัดความที่บรรทัด 580 ของไฟล์ bluetooth.h
int(* config_hci_snoop_log)( เปิดใช้ งาน uint8_t) |
คำจำกัดความที่บรรทัด 557 ของไฟล์ bluetooth.h
int(* create_bond)(const bt_bdaddr_t *bd_addr, การขนส่ง int) |
สร้างการเชื่อมต่อบลูทูธ
คำจำกัดความที่บรรทัด 511 ของไฟล์ bluetooth.h
int(* create_bond_out_of_band)(const bt_bdaddr_t *bd_addr, การขนส่ง int, const bt_out_of_band_data_t *oob_data) |
สร้าง Bluetooth Bond โดยใช้ข้อมูลนอกวง
คำจำกัดความที่บรรทัด 514 ของไฟล์ bluetooth.h
int(* ปิดการใช้งาน)(เป็นโมฆะ) |
ปิดการใช้งานบลูทูธ
คำจำกัดความที่บรรทัด 469 ของไฟล์ bluetooth.h
void(* dump)(int fd, const char **อาร์กิวเมนต์) |
การสนับสนุนดั้งเดิมสำหรับฟังก์ชัน dumpsys ฟังก์ชันเป็นแบบซิงโครนัสและ |fd| เป็นเจ้าของโดยผู้โทร |ข้อโต้แย้ง| เป็นอาร์กิวเมนต์ที่อาจส่งผลต่อเอาต์พุต ซึ่งเข้ารหัสเป็นสตริง UTF-8
คำจำกัดความที่บรรทัด 575 ของไฟล์ bluetooth.h
int(* dut_mode_configure)( เปิดใช้ งาน uint8_t) |
Bluetooth Test Mode APIs - ต้องเปิดใช้งาน Bluetooth สำหรับ API เหล่านี้
คำจำกัดความที่บรรทัด 548 ของไฟล์ bluetooth.h
int(* dut_mode_send)(uint16_t opcode, uint8_t *buf, uint8_t len) |
คำจำกัดความที่บรรทัด 551 ของไฟล์ bluetooth.h
int(* enable)(บูล guest_mode) |
เปิดใช้งานบลูทูธ
คำจำกัดความที่บรรทัด 466 ของไฟล์ bluetooth.h
int(* get_adapter_properties)(เป็นโมฆะ) |
รับคุณสมบัติ Bluetooth Adapter ทั้งหมดที่ init
คำจำกัดความที่บรรทัด 475 ของไฟล์ bluetooth.h
int(* get_adapter_property)( ประเภท bt_property_type_t ) |
รับคุณสมบัติ Bluetooth Adapter ของ 'type'
คำจำกัดความที่บรรทัด 478 ของไฟล์ bluetooth.h
int(* get_connection_state)(const bt_bdaddr_t *bd_addr) |
รับสถานะการเชื่อมต่อสำหรับอุปกรณ์ระยะไกลที่กำหนด ค่าที่ส่งคืนเป็น 0 หมายถึงไม่ได้เชื่อมต่ออุปกรณ์ สถานะการส่งคืนที่ไม่ใช่ศูนย์หมายถึงการเชื่อมต่อที่ทำงานอยู่
คำจำกัดความที่บรรทัด 528 ของไฟล์ bluetooth.h
const เป็นโมฆะ*(* get_profile_interface)(const ถ่าน *profile_id) |
รับอินเทอร์เฟซโปรไฟล์ Bluetooth
คำจำกัดความที่บรรทัด 544 ของไฟล์ bluetooth.h
int(* get_remote_device_properties)(bt_bdaddr_t *remote_addr) |
รับคุณสมบัติอุปกรณ์ระยะไกลทั้งหมด
คำจำกัดความที่บรรทัด 487 ของไฟล์ bluetooth.h
int(* get_remote_device_property)(bt_bdaddr_t *remote_addr ประเภท bt_property_type_t ) |
รับคุณสมบัติอุปกรณ์ระยะไกลของ 'ประเภท'
คำจำกัดความที่บรรทัด 490 ของไฟล์ bluetooth.h
int(* get_remote_service_record)(bt_bdaddr_t *remote_addr, bt_uuid_t *uuid) |
รับบันทึกการบริการของอุปกรณ์ระยะไกลสำหรับ UUID . ที่กำหนด
คำจำกัดความที่บรรทัด 498 ของไฟล์ bluetooth.h
int(* get_remote_services)(bt_bdaddr_t *remote_addr) |
เริ่ม SDP เพื่อรับบริการระยะไกล
คำจำกัดความที่บรรทัด 502 ของไฟล์ bluetooth.h
int(* init)( bt_callbacks_t *เรียกกลับ) |
เปิดอินเทอร์เฟซและจัดเตรียมรูทีนการโทรกลับเพื่อใช้งานอินเทอร์เฟซนี้
คำจำกัดความที่บรรทัด 463 ของไฟล์ bluetooth.h
เป็นโมฆะ (* interop_database_add) (คุณสมบัติ uint16_t, const bt_bdaddr_t *addr, size_t len) |
เพิ่มวิธีแก้ปัญหาการทำงานร่วมกันของอุปกรณ์ใหม่สำหรับอุปกรณ์ระยะไกลที่มี |len| . เป็นครั้งแรก ไบต์ของที่อยู่อุปกรณ์ตรงกับ |addr| หมายเหตุ: |คุณสมบัติ| ต้องตรงกับรายการที่กำหนดไว้ใน interop_feature_t (interop.h)
คำจำกัดความที่บรรทัด 592 ของไฟล์ bluetooth.h
เป็นโมฆะ(* interop_database_clear)(เป็นโมฆะ) |
ล้าง (รีเซ็ต) ส่วนไดนามิกของฐานข้อมูลการทำงานร่วมกันของอุปกรณ์
คำจำกัดความที่บรรทัด 585 ของไฟล์ bluetooth.h
int(* le_test_mode)(uint16_t opcode, uint8_t *buf, uint8_t len) |
API โหมดทดสอบ BLE
คำจำกัดความที่บรรทัด 554 ของไฟล์ bluetooth.h
int(* pin_reply)(const bt_bdaddr_t *bd_addr, uint8_t ยอมรับ, uint8_t pin_len, bt_pin_code_t *pin_code) |
BT Legacy PinKey Reply หาก accept==FALSE ดังนั้น pin_len และ pin_code จะเป็น 0x0
คำจำกัดความที่บรรทัด 532 ของไฟล์ bluetooth.h
int(* read_energy_info)() |
อ่านรายละเอียดข้อมูลพลังงาน - ค่าที่ส่งคืนระบุ BT_STATUS_SUCCESS หรือ BT_STATUS_NOT_READY Success ระบุว่าคำสั่ง VSC ถูกส่งไปยังคอนโทรลเลอร์
คำจำกัดความที่บรรทัด 567 ของไฟล์ bluetooth.h
int(* remove_bond)(const bt_bdaddr_t *bd_addr) |
ลบบอนด์
คำจำกัดความที่บรรทัด 518 ของไฟล์ bluetooth.h
int(* set_adapter_property)(const bt_property_t *คุณสมบัติ) |
ตั้งค่าคุณสมบัติ Bluetooth Adapter เป็น 'type'
คำจำกัดความที่บรรทัด 484 ของไฟล์ bluetooth.h
int(* set_os_callouts)( bt_os_callouts_t *callouts) |
ตั้งค่าฟังก์ชันการเรียกของระบบปฏิบัติการที่ bluedroid ต้องการสำหรับการเตือนและการล็อกการปลุก ควรเรียกสิ่งนี้ทันทีหลังจาก |init| สำเร็จ
คำจำกัดความที่บรรทัด 562 ของไฟล์ bluetooth.h
int(* set_remote_device_property)(bt_bdaddr_t *remote_addr, const bt_property_t * คุณสมบัติ) |
ตั้งค่าคุณสมบัติอุปกรณ์ระยะไกลของ 'ประเภท'
คำจำกัดความที่บรรทัด 494 ของไฟล์ bluetooth.h
size_t ขนาด |
ตั้งค่าเป็น sizeof(bt_interface_t)
คำจำกัดความที่บรรทัด 458 ของไฟล์ bluetooth.h
int(* ssp_reply)(const bt_bdaddr_t *bd_addr, bt_ssp_variant_t ตัวแปร, uint8_t ยอมรับ, รหัสผ่าน uint32_t) |
BT SSP Reply - ใช้งานได้จริง การเปรียบเทียบตัวเลขและรหัสผ่านของรหัสผ่านจะเป็นศูนย์สำหรับ BT_SSP_VARIANT_PASSKEY_COMPARISON & BT_SSP_VARIANT_CONSENT สำหรับ BT_SSP_VARIANT_PASSKEY_ENTRY หาก accept==FALSE รหัสผ่านจะเป็นศูนย์
คำจำกัดความที่บรรทัด 540 ของไฟล์ bluetooth.h
int(* start_discovery)(เป็นโมฆะ) |
เริ่มการค้นพบ
คำจำกัดความที่บรรทัด 505 ของไฟล์ bluetooth.h
เอกสารประกอบสำหรับ struct นี้สร้างจากไฟล์ต่อไปนี้:
- ฮาร์ดแวร์/libhardware/รวม/ฮาร์ดแวร์/ bluetooth.h