از 27 مارس 2025، توصیه می کنیم از android-latest-release
به جای aosp-main
برای ساختن و کمک به AOSP استفاده کنید. برای اطلاعات بیشتر، به تغییرات AOSP مراجعه کنید.
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
مرجع ساختار FlpBatchOptions
#include < fused_location.h >
گزینه هایی با API های دسته ای FLP
تعریف در خط 258 فایل fused_location.h .
FLP_BATCH_WAKEUP_ON_FIFO_FULL - اگر تنظیم شود، سختافزار وقتی بافر پر است، AP را بیدار میکند. اگر تنظیم نشود، سخت افزار قدیمی ترین شی مکان را حذف می کند.
FLP_BATCH_CALLBACK_ON_LOCATION_FIX - اگر تنظیم شده باشد، هر بار که تعمیر مکان وجود داشته باشد، تماس برگشتی مکان فراخوانی می شود. مسئولیت لایه های بالایی (تماس گیرنده) است که آن را خاموش کنند، اگر بدانند که AP ممکن است به خواب برود. وقتی این بیت در میان یک جلسه دستهبندی روشن است، دستهبندی باید ادامه یابد تا زمانی که رفعهای مکان در زمان واقعی گزارش شود.
پرچم های دیگری که در آینده OR یا بیتی می شوند.
تعریف در خط 284 فایل fused_location.h .
دو برابر حداکثر_قدرت_تخصیص_mW |
حداکثر توان بر حسب مگاوات که پیاده سازی اصلی می تواند برای این فراخوانی دسته ای استفاده کند. اگر max_power_allocation_mW 0 باشد، فقط اصلاحاتی که بدون هزینه اضافی برای توان ایجاد میشوند باید گزارش شوند.
تعریف در خط 265 فایل fused_location.h .
float smallest_displacement_meters |
کوچکترین جابجایی بین مکان های گزارش شده بر حسب متر.
اگر روی 0 تنظیم شده باشد، باید مکان ها را در بازه زمانی درخواستی گزارش دهید، حتی اگر دستگاه ثابت باشد. در صورت مثبت بودن، می توانید از این پارامتر به عنوان یک اشاره برای صرفه جویی در مصرف برق استفاده کنید (مثلاً دوره مکان دریچه گاز اگر کاربر نزدیک به آستانه جابجایی حرکت نکرده باشد). حتی مقادیر مثبت کوچک را می توان به این معنا تفسیر کرد که وقتی دستگاه ثابت است نیازی به محاسبه مکان ندارید.
نیازی به فیلتر کردن تحویل مکان بر اساس این پارامتر نیست. مکان ها حتی اگر جابجایی کمتر از درخواستی داشته باشند قابل تحویل هستند. این پارامتر را می توان با خیال راحت با هزینه صرفه جویی در توان نادیده گرفت.
تعریف در خط 307 فایل fused_location.h .
مستندات این ساختار از فایل زیر تولید شده است:
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-29 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Android Hardware Abstraction Layer: FlpBatchOptions Struct Reference\n\nFlpBatchOptions Struct Reference\n================================\n\n[Data Fields](#pub-attribs) \nFlpBatchOptions Struct Reference \n\n`\n#include \u003c\n`[fused_location.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)`\n\u003e\n`\n\n|----------|-----------------------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| double | [max_power_allocation_mW](/reference/hal/struct_flp_batch_options#ae300330f3b7cb10809a7e67735e02410) |\n| ||\n| uint32_t | [sources_to_use](/reference/hal/struct_flp_batch_options#a352dd652f7b9c6033433ad53089fe281) |\n| ||\n| uint32_t | [flags](/reference/hal/struct_flp_batch_options#a773b39d480759f67926cb18ae2219281) |\n| ||\n| int64_t | [period_ns](/reference/hal/struct_flp_batch_options#a9d1968cb4382e5653d8d5a31c8a2ee6b) |\n| ||\n| float | [smallest_displacement_meters](/reference/hal/struct_flp_batch_options#a1b30671f2f5bdad79f87fdd30f6bb8a8) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nOptions with the batching FLP APIs\n\n\nDefinition at line\n[258](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\nof file\n[fused_location.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\n.\n\nField Documentation\n-------------------\n\n\n|----------------|\n| uint32_t flags |\n\n\nFLP_BATCH_WAKEUP_ON_FIFO_FULL - If set the hardware will wake up the AP when the buffer is full. If not set, the hardware will drop the oldest location object.\n\n\nFLP_BATCH_CALLBACK_ON_LOCATION_FIX - If set the location callback will be called every time there is a location fix. Its the responsibility of the upper layers (caller) to switch it off, if it knows that the AP might go to sleep. When this bit is on amidst a batching session, batching should continue while location fixes are reported in real time.\n\n\nOther flags to be bitwised ORed in the future.\n\n\nDefinition at line\n[284](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\nof file\n[fused_location.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\n.\n\n|--------------------------------|\n| double max_power_allocation_mW |\n\n\nMaximum power in mW that the underlying implementation can use for this batching call. If max_power_allocation_mW is 0, only fixes that are generated at no additional cost of power shall be reported.\n\n\nDefinition at line\n[265](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\nof file\n[fused_location.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\n.\n\n|-------------------|\n| int64_t period_ns |\n\n\nFrequency with which location needs to be batched in nano seconds.\n\n\nDefinition at line\n[290](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\nof file\n[fused_location.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\n.\n\n|------------------------------------|\n| float smallest_displacement_meters |\n\n\nThe smallest displacement between reported locations in meters.\n\n\nIf set to 0, then you should report locations at the requested interval even if the device is stationary. If positive, you can use this parameter as a hint to save power (e.g. throttling location period if the user hasn't traveled close to the displacement threshold). Even small positive values can be interpreted to mean that you don't have to compute location when the device is stationary.\n\n\nThere is no need to filter location delivery based on this parameter. Locations can be delivered even if they have a displacement smaller than requested. This parameter can safely be ignored at the cost of potential power savings.\n\n\nDefinition at line\n[307](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\nof file\n[fused_location.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\n.\n\n|-------------------------|\n| uint32_t sources_to_use |\n\n\nBitwise OR of the FLP_TECH_MASKS to use\n\n\nDefinition at line\n[268](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\nof file\n[fused_location.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [fused_location.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/fused_location.h)"]]