Retrieve all batched locations currently stored and clear the buffer. flp_location_callback MUST be called in response, even if there are no locations to flush (in which case num_locations should be 0). Subsequent calls to get_batched_location or flush_batched_locations should not return any of the locations returned in this call.
Return the batch size (in number of
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
. This will be used by the upper layer, to decide on the batching interval and whether the AP should be woken up or not.
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.
Opens the interface and provides the callback routines to the implementation of this interface. Once called you should respond by calling the flp_capabilities_callback in
to specify the capabilities that your implementation supports.
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.
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
struct definition. Return value: FLP_RESULT_SUCCESS on success, FLP_RESULT_INSUFFICIENT_MEMORY, FLP_RESULT_ID_EXISTS, FLP_RESULT_ERROR on failure.
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
Return value: FLP_RESULT_SUCCESS on success, FLP_RESULT_ID_UNKNOWN, FLP_RESULT_ERROR on error.