החל מ-27 במרץ 2025, מומלץ להשתמש ב-android-latest-release
במקום ב-aosp-main
כדי ליצור תרומות ל-AOSP. מידע נוסף זמין במאמר שינויים ב-AOSP.
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
הפנייה ל-Struct של FlpBatchOptions
#include <
fused_location.h
>
אפשרויות עם ממשקי FLP API לצבירה
ההגדרה מופיעה בשורה
258
בקובץ
fused_location.h
.
FLP_BATCH_WAKEUP_ON_FIFO_FULL – אם ההגדרה מוגדרת, החומרה תעיר את הנקודה לשיתוף (AP) כשהמאגר יהיה מלא. אם לא תגדירו את הערך, החומרה תסיר את אובייקט המיקום הישן ביותר.
FLP_BATCH_CALLBACK_ON_LOCATION_FIX – אם ההגדרה הזו מוגדרת, תיגרם קריאה חוזרת (callback) למיקום בכל פעם שתתבצע תיקון מיקום. השכבות העליונות (מבצע הקריאה) אחראיות לכבות אותו, אם הן יודעות שה-AP עשוי לעבור למצב שינה. כשהביט הזה מופעל במהלך סשן צבירה, הצבירה אמורה להמשיך בזמן שדיווחים על תיקוני מיקום מתקבלים בזמן אמת.
דגלים אחרים שיבוצע להם OR בייטבי בעתיד.
ההגדרה מופיעה בשורה
284
בקובץ
fused_location.h
.
double max_power_allocation_mW
|
ההספק המקסימלי ב-mW שההטמעה הבסיסית יכולה להשתמש בו בקריאה הזו לצבירה. אם הערך של max_power_allocation_mW הוא 0, המערכת תדווח רק על תיקונים שנוצרו ללא עלות נוספת של צריכת חשמל.
ההגדרה מופיעה בשורה
265
בקובץ
fused_location.h
.
התדירות שבה צריך לקבץ את המיקומים בקבוצות (batch) בננו-שניות.
ההגדרה מופיעה בשורה
290
בקובץ
fused_location.h
.
float smallest_displacement_meters
|
ההזזה הקטנה ביותר בין המיקומים שדווחו, במטרים.
אם הערך מוגדר כ-0, צריך לדווח על מיקומים במרווח הזמן המבוקש גם אם המכשיר נייח. אם הערך חיובי, אפשר להשתמש בפרמטר הזה כרמז לחיסכון באנרגיה (למשל, צמצום תקופת המיקום אם המשתמש לא נסע קרוב לסף ההזזה). גם ערכים חיוביים קטנים יכולים להתפרש כמשמעות לכך שאין צורך לחשב את המיקום כשהמכשיר נייח.
אין צורך לסנן את הצגת המיקום על סמך הפרמטר הזה. אפשר להעביר מיקומים גם אם ההזזה שלהם קטנה מהבקשה. אפשר להתעלם מהפרמטר הזה בבטחה, אבל החיסכון הפוטנציאלי בחשמל יהיה קטן יותר.
ההגדרה מופיעה בשורה
307
בקובץ
fused_location.h
.
התיעוד של המבנה הזה נוצר מהקובץ הבא:
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת 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: 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)"]]