Represents the standard FLP interface.
Definition at line 244 of file fused_location.h.
Closes the interface. If any batch operations are in progress, they should be stopped.
Definition at line 319 of file fused_location.h.
Return the batch size (in number of FlpLocation objects) available in the hardware. Note, different HW implementations may have different sample sizes. This shall return number of samples defined in the format of FlpLocation. This will be used by the upper layer, to decide on the batching interval and whether the AP should be woken up or not.
Definition at line 264 of file fused_location.h.
|void(* get_batched_location)(int last_n_locations)
Get the fused location that was batched. flp_location_callback is used to return the location. The location object is dropped from the buffer only when the buffer is full. Do not remove it from the buffer just because it has been returned using the callback. In other words, when there is no new location object, two calls to get_batched_location(1) should return the same location object. Parameters: last_n_locations - Number of locations to get. This can be one or many. If the last_n_locations is 1, you get the latest location known to the hardware.
Definition at line 333 of file fused_location.h.
|const void*(* get_extension)(const char *name)
Opens the interface and provides the callback routines to the implemenation of this interface.
Definition at line 254 of file fused_location.h.
Injects current location from another location provider latitude and longitude are measured in degrees expected accuracy is measured in meters Parameters: location - The location object being injected. Return value: FLP_RESULT_SUCCESS or FLP_RESULT_ERROR.
Definition at line 343 of file fused_location.h.
Start batching locations. This API is primarily used when the AP is asleep and the device can batch locations in the hardware. flp_location_callback is used to return the locations. When the buffer is full and FLP_BATCH_WAKEUP_ON_FIFO_FULL is used, the AP is woken up. When the buffer is full and FLP_BATCH_WAKEUP_ON_FIFO_FULL is not set, the oldest location object is dropped. In this case the AP will not be woken up. The upper layer will use get_batched_location API to explicitly ask for the location. If FLP_BATCH_CALLBACK_ON_LOCATION_FIX is set, the implementation will call the flp_location_callback every single time there is a location fix. This overrides FLP_BATCH_WAKEUP_ON_FIFO_FULL flag setting. It's the responsibility of the upper layers (caller) to switch it off, if it knows that the AP might go to sleep. This is useful for nagivational applications when the system is in high power mode. Parameters: id - Id for the request. options - See FlpBatchOptions struct definition. Return value: FLP_RESULT_SUCCESS on success, FLP_RESULT_INSUFFICIENT_MEMORY, FLP_RESULT_ID_EXISTS, FLP_RESULT_ERROR on failure.
Definition at line 288 of file fused_location.h.
|int(* stop_batching)(int id)
Stop batching. Parameters: id - Id for the request. Return Value: FLP_RESULT_SUCCESS on success, FLP_RESULT_ID_UNKNOWN or FLP_RESULT_ERROR on failure.
Definition at line 313 of file fused_location.h.
Update FlpBatchOptions associated with a batching request. When a batching operation is in progress and a batching option such as FLP_BATCH_WAKEUP_ON_FIFO_FULL needs to be updated, this API will be used. For instance, this can happen when the AP is awake and the maps application is being used. Parameters: id - Id of an existing batch request. new_options - Updated FlpBatchOptions Return value: FLP_RESULT_SUCCESS on success, FLP_RESULT_ID_UNKNOWN, FLP_RESULT_ERROR on error.
Definition at line 303 of file fused_location.h.
The documentation for this struct was generated from the following file: