Od 27 marca 2025 r. zalecamy używanie android-latest-release
zamiast aosp-main
do kompilowania i wspołtworzenia AOSP. Więcej informacji znajdziesz w artykule o zmianach w AOSP.
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Odwołania do struktury GpsMeasurementInterface
#include <
gps.h
>
Rozszerzony interfejs do obsługi pomiarów GPS.
Definicja w wierszu
1982
pliku
gps.h
.
Zatrzymuje aktualizacje z HAL i odwołuje rejestrację rutyn wywołania zwrotnego. Po wywołaniu metody stop wcześniej zarejestrowane wywołania zwrotne muszą być uznawane przez HAL za nieważne. Jeśli stop jest wywoływany bez poprzedniego wywołania „init”, ta funkcja nie powinna wykonywać żadnej pracy.
Definicja w wierszu
2005
w pliku
gps.h
.
Inicjował interfejs i rejestruje procedury wywołania zwrotnego w interfejsie HAL. Po wywołaniu metody „init” HAL musi zacząć przesyłać aktualizacje w swojej fazie.
Stan: GPS_MEASUREMENT_OPERATION_SUCCESS GPS_MEASUREMENT_ERROR_ALREADY_INIT – jeśli wywołanie zwrotne zostało już zarejestrowane bez odpowiedniego wywołania „close” GPS_MEASUREMENT_ERROR_GENERIC – jeśli wystąpił inny błąd, HAL nie wygeneruje żadnych aktualizacji po zwróceniu tego kodu błędu.
Definicja w wierszu
1997
pliku
gps.h
.
Ustaw na sizeof(GpsMeasurementInterface)
Definicja w wierszu
1984
pliku
gps.h
.
Dokumentacja tego typu danych została wygenerowana z tego pliku:
-
hardware/libhardware/include/hardware/
gps.h
Treść strony i umieszczone na niej fragmenty kodu podlegają licencjom opisanym w Licencji na treści. Java i OpenJDK są znakami towarowymi lub zastrzeżonymi znakami towarowymi należącymi do firmy Oracle lub jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-27 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-07-27 UTC."],[],[],null,["# Android Hardware Abstraction Layer: GpsMeasurementInterface Struct Reference\n\nGpsMeasurementInterface Struct Reference\n========================================\n\n[Data Fields](#pub-attribs) \nGpsMeasurementInterface 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_gps_measurement_interface#a854352f53b148adc24983a58a1866d66) |\n| ||\n| int(\\* | [init](/reference/hal/struct_gps_measurement_interface#ab662b0cdfbead07de6273f5587f9608c) )( [GpsMeasurementCallbacks](/reference/hal/struct_gps_measurement_callbacks) \\*callbacks) |\n| ||\n| void(\\* | [close](/reference/hal/struct_gps_measurement_interface#a9736ff1cda7d1d558f5cd251e0049c49) )() |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nExtended interface for GPS Measurements support.\n\n\nDefinition at line\n[1982](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(\\* close)() |\n\n\nStops updates from the HAL, and unregisters the callback routines. After a call to stop, the previously registered callbacks must be considered invalid by the HAL. If stop is invoked without a previous 'init', this function should perform no work.\n\n\nDefinition at line\n[2005](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| int(\\* init)( [GpsMeasurementCallbacks](/reference/hal/struct_gps_measurement_callbacks) \\*callbacks) |\n\n\nInitializes the interface and registers the callback routines with the HAL. After a successful call to 'init' the HAL must begin to provide updates at its own phase.\n\n\nStatus: GPS_MEASUREMENT_OPERATION_SUCCESS GPS_MEASUREMENT_ERROR_ALREADY_INIT - if a callback has already been registered without a corresponding call to 'close' GPS_MEASUREMENT_ERROR_GENERIC - if any other error occurred, it is expected that the HAL will not generate any updates upon returning this error code.\n\n\nDefinition at line\n[1997](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(GpsMeasurementInterface)\n\n\nDefinition at line\n[1984](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)"]]