Kể từ ngày 27 tháng 3 năm 2025, bạn nên sử dụng android-latest-release
thay vì aosp-main
để xây dựng và đóng góp cho AOSP. Để biết thêm thông tin, hãy xem phần Thay đổi đối với AOSP.
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tham chiếu cấu trúc GnssConfigurationInterface
#include <
gps.h
>
Giao diện để truyền nội dung cấu hình GNSS từ nền tảng đến HAL.
Định nghĩa tại dòng
2188
của tệp
gps.h
.
void(* configuration_update)(const char *config_data, int32_t length)
|
Cung cấp nội dung cấu hình GNSS cho HAL. Tham số: config_data – con trỏ đến một mảng char chứa nội dung thường được mong đợi từ tệp(/etc/gps.conf), tức là một chuỗi các chuỗi UTF8 được phân tách bằng '
'. length – tổng số ký tự UTF8 trong dữ liệu cấu hình.
LƯU Ý QUAN TRỌNG: GPS HAL dự kiến có thể gọi hàm này nhiều lần. Và bạn có thể gọi phương thức này ngay cả khi GpsLocationProvider đã được tạo và bật. GPS HAL phải duy trì các yêu cầu hiện có cho nhiều lệnh gọi lại bất kể thay đổi về dữ liệu cấu hình.
Định nghĩa tại dòng
2205
của tệp
gps.h
.
Đặt thành sizeof(GnssConfigurationInterface)
Định nghĩa tại dòng
2190
của tệp
gps.h
.
Tài liệu cho cấu trúc này được tạo từ tệp sau:
-
hardware/libhardware/include/hardware/
gps.h
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-07-27 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-27 UTC."],[],[],null,["# Android Hardware Abstraction Layer: GnssConfigurationInterface Struct Reference\n\nGnssConfigurationInterface Struct Reference\n===========================================\n\n[Data Fields](#pub-attribs) \nGnssConfigurationInterface Struct Reference \n\n`\n#include \u003c\n`[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)`\n\u003e\n`\n\n|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| size_t | [size](/reference/hal/struct_gnss_configuration_interface#a854352f53b148adc24983a58a1866d66) |\n| ||\n| void(\\* | [configuration_update](/reference/hal/struct_gnss_configuration_interface#aba4127a8b06d8b52f2704706c31dadc5) )(const char \\*config_data, int32_t length) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nInterface for passing GNSS configuration contents from platform to HAL.\n\n\nDefinition at line\n[2188](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\nField Documentation\n-------------------\n\n\n|-------------------------------------------------------------------------|\n| void(\\* configuration_update)(const char \\*config_data, int32_t length) |\n\n\nDeliver GNSS configuration contents to HAL. Parameters: config_data - a pointer to a char array which holds what usually is expected from file(/etc/gps.conf), i.e., a sequence of UTF8 strings separated by '\n\n\n'. length - total number of UTF8 characters in configuraiton data.\n\n\nIMPORTANT: GPS HAL should expect this function can be called multiple times. And it may be called even when GpsLocationProvider is already constructed and enabled. GPS HAL should maintain the existing requests for various callback regardless the change in configuration data.\n\n\nDefinition at line\n[2205](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n|-------------|\n| size_t size |\n\n\nSet to sizeof(GnssConfigurationInterface)\n\n\nDefinition at line\n[2190](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\nof file\n[gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [gps.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h)"]]