Mulai 27 Maret 2025, sebaiknya gunakan android-latest-release
, bukan aosp-main
, untuk mem-build dan berkontribusi pada AOSP. Untuk mengetahui informasi selengkapnya, lihat Perubahan pada AOSP.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Referensi Struct GnssConfigurationInterface
#include <
gps.h
>
Antarmuka untuk meneruskan konten konfigurasi GNSS dari platform ke HAL.
Definisi di baris
2188
file
gps.h
.
void(* configuration_update)(const char *config_data, int32_t length)
|
Mengirimkan konten konfigurasi GNSS ke HAL. Parameter: config_data - pointer ke array char yang menyimpan hal yang biasanya diharapkan dari file(/etc/gps.conf), yaitu urutan string UTF8 yang dipisahkan oleh '
'. length - jumlah total karakter UTF8 dalam data konfigurasi.
PENTING: HAL GPS harus mengharapkan fungsi ini dapat dipanggil beberapa kali. Dan dapat dipanggil meskipun GpsLocationProvider sudah dibuat dan diaktifkan. HAL GPS harus mempertahankan permintaan yang ada untuk berbagai callback, terlepas dari perubahan data konfigurasi.
Definisi di baris
2205
dari file
gps.h
.
Tetapkan ke sizeof(GnssConfigurationInterface)
Definisi di baris
2190
dari file
gps.h
.
Dokumentasi untuk struct ini dibuat dari file berikut:
-
hardware/libhardware/include/hardware/
gps.h
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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)"]]