2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
GpsMeasurementInterface 구조체 참조
#include <
gps.h
>
GPS 측정 지원을 위한 인터페이스를 확장했습니다.
gps.h
파일의
1982
라인에 정의되어 있습니다.
HAL의 업데이트를 중지하고 콜백 루틴을 등록 취소합니다. stop을 호출한 후에는 HAL에서 이전에 등록된 콜백을 유효하지 않은 것으로 간주해야 합니다. 이전 'init' 없이 stop이 호출되면 이 함수는 아무 작업도 수행해서는 안 됩니다.
gps.h
파일의
2005
줄에 정의되어 있습니다.
인터페이스를 초기화하고 HAL에 콜백 루틴을 등록합니다. 'init'을 성공적으로 호출한 후 HAL은 자체 단계에서 업데이트를 제공하기 시작해야 합니다.
상태: GPS_MEASUREMENT_OPERATION_SUCCESS GPS_MEASUREMENT_ERROR_ALREADY_INIT - 상응하는 'close' 호출 없이 콜백이 이미 등록된 경우 GPS_MEASUREMENT_ERROR_GENERIC - 다른 오류가 발생한 경우 HAL은 이 오류 코드를 반환할 때 업데이트를 생성하지 않을 것으로 예상됩니다.
gps.h
FILE의
1997
라인에 정의되어 있습니다.
sizeof(GpsMeasurementInterface)로 설정
gps.h
파일의
1984
라인에 정의가 있습니다.
이 구조체에 관한 문서는 다음 파일에서 생성되었습니다.
-
hardware/libhardware/include/hardware/
gps.h
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 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)"]]