From 3088fe911741c9bcdd50c02d299cb81a863e8a4c Mon Sep 17 00:00:00 2001 From: Dante Russo Date: Tue, 17 Jul 2012 16:41:00 -0700 Subject: [PATCH] gps: jb porting with qcom enhanced features based from AU_LINUX_ANDROID_ICS.04.00.04.00.205 Change-Id: I0af1da1438a136e98b59110641ce5c7714da220b --- loc_api/Android.mk | 19 +- loc_api/libloc_api-rpc-50001/Android.mk | 0 .../libloc_api-rpc-glue/Android.mk | 0 .../rpc_inc/LocApiRpcAdapter.h | 15 +- .../libloc_api-rpc-glue/rpc_inc/debug.h | 6 +- .../rpc_inc/loc_api_fixup.h | 0 .../libloc_api-rpc-glue/rpc_inc/loc_api_log.h | 0 .../rpc_inc/loc_api_rpc_glue.h | 0 .../rpc_inc/loc_api_sync_call.h | 0 .../rpc_inc/loc_apicb_appinit.h | 0 .../src/LocApiRpcAdapter.cpp | 120 +- .../libloc_api-rpc-glue/src/loc_api_fixup.c | 0 .../libloc_api-rpc-glue/src/loc_api_log.c | 0 .../src/loc_api_rpc_glue.c | 28 +- .../src/loc_api_sync_call.c | 22 +- .../src/loc_apicb_appinit.c | 0 .../libloc_api-rpc-stub/Android.mk | 0 .../inc/loc_api_rpcgen_cb_rpc.h | 0 .../inc/loc_api_rpcgen_common_rpc.h | 0 .../inc/loc_api_rpcgen_rpc.h | 0 .../inc/loc_apicb_appinit.h | 0 .../src/loc_api_rpcgen_cb_svc.c | 0 .../src/loc_api_rpcgen_cb_xdr.c | 0 .../src/loc_api_rpcgen_clnt.c | 0 .../src/loc_api_rpcgen_common_xdr.c | 0 .../src/loc_api_rpcgen_xdr.c | 0 .../src/loc_apicb_appinit.c | 0 .../libloc_api-rpc-stub/xdr/loc_api.xdr | 0 .../libloc_api-rpc-stub/xdr/loc_api_cb.xdr | 0 .../xdr/loc_api_common.xdr | 0 loc_api/libloc_api-rpc/Android.mk | 0 loc_api/libloc_api-rpc/gen-1240/Makefile.xdr | 0 .../libloc_api-rpc/gen-1240/loc_api_fixup.c | 0 .../gen-1240/loc_api_rpc_glue.c | 0 loc_api/libloc_api-rpc/gen-3200/Makefile.xdr | 0 loc_api/libloc_api-rpc/gen-3200/loc_api.xdr | 0 .../libloc_api-rpc/gen-3200/loc_api_cb.xdr | 0 .../gen-3200/loc_api_common.xdr | 0 .../libloc_api-rpc/gen-3200/loc_api_fixup.c | 0 .../gen-3200/loc_api_rpc_glue.c | 0 .../libloc_api-rpc/inc-1240/loc_api_fixup.h | 0 .../inc-1240/loc_apicb_appinit.h | 0 .../libloc_api-rpc/inc-3200/loc_api_fixup.h | 0 .../inc-3200/loc_apicb_appinit.h | 0 loc_api/libloc_api-rpc/inc/debug.h | 0 loc_api/libloc_api-rpc/inc/loc_api_rpc_glue.h | 0 .../libloc_api-rpc/src/loc_apicb_appinit.c | 0 loc_api/libloc_api/Android.mk | 0 loc_api/libloc_api/loc_eng.cpp | 0 loc_api/libloc_api/loc_eng.h | 0 loc_api/libloc_api/loc_eng_ioctl.cpp | 0 loc_api/libloc_api/loc_eng_ioctl.h | 0 loc_api/libloc_api/loc_eng_ni.cpp | 0 loc_api/libloc_api/loc_eng_ni.h | 0 loc_api/libloc_api/loc_eng_xtra.cpp | 0 loc_api/libloc_api/loc_eng_xtra.h | 0 loc_api/libloc_api_50001/Android.mk | 18 +- loc_api/libloc_api_50001/LocApiAdapter.cpp | 20 +- loc_api/libloc_api_50001/LocApiAdapter.h | 40 +- loc_api/libloc_api_50001/gps.c | 0 loc_api/libloc_api_50001/loc.cpp | 381 +- loc_api/libloc_api_50001/loc.h | 3 + loc_api/libloc_api_50001/loc_eng.cpp | 785 +-- loc_api/libloc_api_50001/loc_eng.h | 88 +- loc_api/libloc_api_50001/loc_eng_agps.cpp | 123 +- loc_api/libloc_api_50001/loc_eng_agps.h | 68 +- loc_api/libloc_api_50001/loc_eng_dmn_conn.cpp | 72 +- loc_api/libloc_api_50001/loc_eng_dmn_conn.h | 8 +- .../loc_eng_dmn_conn_glue_msg.c | 0 .../loc_eng_dmn_conn_glue_msg.h | 0 .../loc_eng_dmn_conn_glue_pipe.c | 0 .../loc_eng_dmn_conn_glue_pipe.h | 0 .../loc_eng_dmn_conn_handler.cpp | 148 +- .../loc_eng_dmn_conn_handler.h | 23 +- .../loc_eng_dmn_conn_thread_helper.c | 0 .../loc_eng_dmn_conn_thread_helper.h | 0 loc_api/libloc_api_50001/loc_eng_log.cpp | 36 +- loc_api/libloc_api_50001/loc_eng_log.h | 4 +- loc_api/libloc_api_50001/loc_eng_msg.cpp | 0 loc_api/libloc_api_50001/loc_eng_msg.h | 431 +- loc_api/libloc_api_50001/loc_eng_msg_id.h | 41 +- loc_api/libloc_api_50001/loc_eng_ni.cpp | 0 loc_api/libloc_api_50001/loc_eng_ni.h | 0 loc_api/libloc_api_50001/loc_eng_xtra.cpp | 0 loc_api/libloc_api_50001/loc_eng_xtra.h | 0 loc_api/loc_api_v02/Android.mk | 0 loc_api/loc_api_v02/LocApiV02Adapter.cpp | 362 +- loc_api/loc_api_v02/LocApiV02Adapter.h | 53 +- loc_api/loc_api_v02/loc_api_sync_req.c | 8 +- loc_api/loc_api_v02/loc_api_sync_req.h | 0 loc_api/loc_api_v02/loc_api_v02_client.c | 421 +- loc_api/loc_api_v02/loc_api_v02_client.h | 142 +- loc_api/loc_api_v02/loc_api_v02_log.c | 23 +- loc_api/loc_api_v02/loc_api_v02_log.h | 0 loc_api/loc_api_v02/loc_util_log.h | 40 +- loc_api/loc_api_v02/location_service_v02.c | 1017 +++- loc_api/loc_api_v02/location_service_v02.h | 4251 ++++++++++++----- loc_api/ulp/inc/ulp.h | 25 +- utils/Android.mk | 2 + utils/linked_list.c | 0 utils/linked_list.h | 0 utils/loc_cfg.cpp | 230 +- utils/loc_cfg.h | 42 +- utils/loc_log.cpp | 0 utils/loc_log.h | 0 utils/log_util.h | 0 utils/msg_q.c | 2 +- utils/msg_q.h | 0 108 files changed, 6524 insertions(+), 2593 deletions(-) mode change 100755 => 100644 loc_api/Android.mk mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/Android.mk mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/Android.mk mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/LocApiRpcAdapter.h mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/debug.h mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/loc_api_fixup.h mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/loc_api_log.h mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/loc_api_rpc_glue.h mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/loc_api_sync_call.h mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/loc_apicb_appinit.h mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/LocApiRpcAdapter.cpp mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_fixup.c mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_log.c mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_rpc_glue.c mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_sync_call.c mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_apicb_appinit.c mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/Android.mk mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/inc/loc_api_rpcgen_cb_rpc.h mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/inc/loc_api_rpcgen_common_rpc.h mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/inc/loc_api_rpcgen_rpc.h mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/inc/loc_apicb_appinit.h mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_api_rpcgen_cb_svc.c mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_api_rpcgen_cb_xdr.c mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_api_rpcgen_clnt.c mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_api_rpcgen_common_xdr.c mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_api_rpcgen_xdr.c mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_apicb_appinit.c mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/xdr/loc_api.xdr mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/xdr/loc_api_cb.xdr mode change 100755 => 100644 loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/xdr/loc_api_common.xdr mode change 100755 => 100644 loc_api/libloc_api-rpc/Android.mk mode change 100755 => 100644 loc_api/libloc_api-rpc/gen-1240/Makefile.xdr mode change 100755 => 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_fixup.c mode change 100755 => 100644 loc_api/libloc_api-rpc/gen-1240/loc_api_rpc_glue.c mode change 100755 => 100644 loc_api/libloc_api-rpc/gen-3200/Makefile.xdr mode change 100755 => 100644 loc_api/libloc_api-rpc/gen-3200/loc_api.xdr mode change 100755 => 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_cb.xdr mode change 100755 => 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_common.xdr mode change 100755 => 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_fixup.c mode change 100755 => 100644 loc_api/libloc_api-rpc/gen-3200/loc_api_rpc_glue.c mode change 100755 => 100644 loc_api/libloc_api-rpc/inc-1240/loc_api_fixup.h mode change 100755 => 100644 loc_api/libloc_api-rpc/inc-1240/loc_apicb_appinit.h mode change 100755 => 100644 loc_api/libloc_api-rpc/inc-3200/loc_api_fixup.h mode change 100755 => 100644 loc_api/libloc_api-rpc/inc-3200/loc_apicb_appinit.h mode change 100755 => 100644 loc_api/libloc_api-rpc/inc/debug.h mode change 100755 => 100644 loc_api/libloc_api-rpc/inc/loc_api_rpc_glue.h mode change 100755 => 100644 loc_api/libloc_api-rpc/src/loc_apicb_appinit.c mode change 100755 => 100644 loc_api/libloc_api/Android.mk mode change 100755 => 100644 loc_api/libloc_api/loc_eng.cpp mode change 100755 => 100644 loc_api/libloc_api/loc_eng.h mode change 100755 => 100644 loc_api/libloc_api/loc_eng_ioctl.cpp mode change 100755 => 100644 loc_api/libloc_api/loc_eng_ioctl.h mode change 100755 => 100644 loc_api/libloc_api/loc_eng_ni.cpp mode change 100755 => 100644 loc_api/libloc_api/loc_eng_ni.h mode change 100755 => 100644 loc_api/libloc_api/loc_eng_xtra.cpp mode change 100755 => 100644 loc_api/libloc_api/loc_eng_xtra.h mode change 100755 => 100644 loc_api/libloc_api_50001/Android.mk mode change 100755 => 100644 loc_api/libloc_api_50001/LocApiAdapter.cpp mode change 100755 => 100644 loc_api/libloc_api_50001/LocApiAdapter.h mode change 100755 => 100644 loc_api/libloc_api_50001/gps.c mode change 100755 => 100644 loc_api/libloc_api_50001/loc.cpp mode change 100755 => 100644 loc_api/libloc_api_50001/loc.h mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng.cpp mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng.h mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_agps.cpp mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_agps.h mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_dmn_conn.cpp mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_dmn_conn.h mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_msg.c mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_msg.h mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_pipe.c mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_pipe.h mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_dmn_conn_handler.cpp mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_dmn_conn_handler.h mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_dmn_conn_thread_helper.c mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_dmn_conn_thread_helper.h mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_log.cpp mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_log.h mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_msg.cpp mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_msg.h mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_msg_id.h mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_ni.cpp mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_ni.h mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_xtra.cpp mode change 100755 => 100644 loc_api/libloc_api_50001/loc_eng_xtra.h mode change 100755 => 100644 loc_api/loc_api_v02/Android.mk mode change 100755 => 100644 loc_api/loc_api_v02/LocApiV02Adapter.cpp mode change 100755 => 100644 loc_api/loc_api_v02/LocApiV02Adapter.h mode change 100755 => 100644 loc_api/loc_api_v02/loc_api_sync_req.c mode change 100755 => 100644 loc_api/loc_api_v02/loc_api_sync_req.h mode change 100755 => 100644 loc_api/loc_api_v02/loc_api_v02_client.c mode change 100755 => 100644 loc_api/loc_api_v02/loc_api_v02_client.h mode change 100755 => 100644 loc_api/loc_api_v02/loc_api_v02_log.c mode change 100755 => 100644 loc_api/loc_api_v02/loc_api_v02_log.h mode change 100755 => 100644 loc_api/loc_api_v02/loc_util_log.h mode change 100755 => 100644 loc_api/loc_api_v02/location_service_v02.c mode change 100755 => 100644 loc_api/loc_api_v02/location_service_v02.h mode change 100755 => 100644 loc_api/ulp/inc/ulp.h mode change 100755 => 100644 utils/Android.mk mode change 100755 => 100644 utils/linked_list.c mode change 100755 => 100644 utils/linked_list.h mode change 100755 => 100644 utils/loc_cfg.cpp mode change 100755 => 100644 utils/loc_cfg.h mode change 100755 => 100644 utils/loc_log.cpp mode change 100755 => 100644 utils/loc_log.h mode change 100755 => 100644 utils/log_util.h mode change 100755 => 100644 utils/msg_q.c mode change 100755 => 100644 utils/msg_q.h diff --git a/loc_api/Android.mk b/loc_api/Android.mk old mode 100755 new mode 100644 index 7e09d5f9..7e1e35f8 --- a/loc_api/Android.mk +++ b/loc_api/Android.mk @@ -1,11 +1,3 @@ -# Copyright (c) 2009, QUALCOMM USA, INC. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -# · Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -# · Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -# · Neither the name of the QUALCOMM USA, INC. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) LOCAL_PATH := $(call my-dir) @@ -19,12 +11,15 @@ GPS_DIR_LIST += $(LOCAL_PATH)/libloc_api-rpc-50001/ GPS_DIR_LIST += $(LOCAL_PATH)/libloc_api-rpc/ GPS_DIR_LIST += $(LOCAL_PATH)/libloc_api/ -else - -GPS_DIR_LIST += $(LOCAL_PATH)/loc_api_v02/ - endif #TARGET_NO_RPC +#add QMI libraries for QMI targets +QMI_BOARD_PLATFORM_LIST := msm8960 + +ifeq ($(call is-board-platform-in-list,$(QMI_BOARD_PLATFORM_LIST)),true) +GPS_DIR_LIST += $(LOCAL_PATH)/loc_api_v02/ +endif #is-board-platform-in-list + GPS_DIR_LIST += $(LOCAL_PATH)/libloc_api_50001/ #call the subfolders diff --git a/loc_api/libloc_api-rpc-50001/Android.mk b/loc_api/libloc_api-rpc-50001/Android.mk old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/Android.mk b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/Android.mk old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/LocApiRpcAdapter.h b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/LocApiRpcAdapter.h old mode 100755 new mode 100644 index 7b1f59ba..4898d7d9 --- a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/LocApiRpcAdapter.h +++ b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/LocApiRpcAdapter.h @@ -38,6 +38,8 @@ class LocApiRpcAdapter : public LocApiAdapter { // RPC communication establishment rpc_loc_client_handle_type client_handle; rpc_loc_event_mask_type eMask; + int dataEnableLastSet; + char apnLastSet[MAX_APN_LEN]; static const rpc_loc_event_mask_type locBits[]; static rpc_loc_event_mask_type convertMask(LOC_API_ADAPTER_EVENT_MASK_T mask); @@ -71,10 +73,11 @@ public: virtual enum loc_api_adapter_err stopFix(); virtual enum loc_api_adapter_err - setPositionMode(LocPositionMode mode, GpsPositionRecurrence recurrence, - uint32_t min_interval, uint32_t preferred_accuracy, uint32_t preferred_time); + setPositionMode(const LocPosMode *mode); + inline virtual enum loc_api_adapter_err + enableData(int enable) { return enableData(enable, false); } virtual enum loc_api_adapter_err - enableData(int enable); + enableData(int enable, boolean force); virtual enum loc_api_adapter_err setTime(GpsUtcTime time, int64_t timeReference, int uncertainty); virtual enum loc_api_adapter_err @@ -83,8 +86,10 @@ public: deleteAidingData(GpsAidingData f); virtual enum loc_api_adapter_err informNiResponse(GpsUserResponseType userResponse, const void* passThroughData); + inline virtual enum loc_api_adapter_err + setAPN(char* apn, int len) { return setAPN(apn, len, false); } virtual enum loc_api_adapter_err - setAPN(char* apn, int len); + setAPN(char* apn, int len, boolean force); virtual enum loc_api_adapter_err setServer(const char* url, int len); virtual enum loc_api_adapter_err @@ -97,6 +102,8 @@ public: atlCloseStatus(int handle, int is_succ); virtual enum loc_api_adapter_err setSUPLVersion(uint32_t version); + + virtual void setInSession(bool inSession); }; #endif //LOC_API_RPC_ADAPTER_H diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/debug.h b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/debug.h old mode 100755 new mode 100644 index 8b20a3f5..3f00b654 --- a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/debug.h +++ b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/debug.h @@ -37,7 +37,7 @@ #define PRINT(x...) do { \ fprintf(stdout, "%s(%d) ", __FUNCTION__, __LINE__); \ fprintf(stdout, ##x); \ - LOGD(x); \ + ALOGD(x); \ } while(0) #ifdef DEBUG @@ -55,14 +55,14 @@ #define E(x...) do { \ fprintf(stderr, "%s(%d) ", __FUNCTION__, __LINE__); \ fprintf(stderr, ##x); \ - LOGE(x); \ + ALOGE(x); \ } while(0) #define FAILIF(cond, msg...) do { \ if (__builtin_expect (cond, 0)) { \ fprintf(stderr, "%s:%s:(%d): ", __FILE__, __FUNCTION__, __LINE__); \ fprintf(stderr, ##msg); \ - LOGE(##msg); \ + ALOGE(##msg); \ } \ } while(0) diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/loc_api_fixup.h b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/loc_api_fixup.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/loc_api_log.h b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/loc_api_log.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/loc_api_rpc_glue.h b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/loc_api_rpc_glue.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/loc_api_sync_call.h b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/loc_api_sync_call.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/loc_apicb_appinit.h b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc/loc_apicb_appinit.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/LocApiRpcAdapter.cpp b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/LocApiRpcAdapter.cpp old mode 100755 new mode 100644 index 48b3a0fe..843a8ae9 --- a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/LocApiRpcAdapter.cpp +++ b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/LocApiRpcAdapter.cpp @@ -119,8 +119,10 @@ const rpc_loc_event_mask_type LocApiRpcAdapter::locBits[] = LocApiRpcAdapter::LocApiRpcAdapter(LocEng &locEng) : LocApiAdapter(locEng), client_handle(RPC_LOC_CLIENT_HANDLE_INVALID), - eMask(convertMask(locEng.eventMask)) + eMask(convertMask(locEng.eventMask)), + dataEnableLastSet(-1) { + memset(apnLastSet, 0, sizeof(apnLastSet)); loc_api_glue_init(); } @@ -298,9 +300,7 @@ LocApiRpcAdapter::stopFix() { } enum loc_api_adapter_err -LocApiRpcAdapter::setPositionMode(LocPositionMode mode, - GpsPositionRecurrence recurrence, uint32_t min_interval, - uint32_t preferred_accuracy, uint32_t preferred_time) +LocApiRpcAdapter::setPositionMode(const LocPosMode *posMode) { rpc_loc_ioctl_data_u_type ioctl_data; rpc_loc_fix_criteria_s_type *fix_criteria_ptr; @@ -308,10 +308,13 @@ LocApiRpcAdapter::setPositionMode(LocPositionMode mode, rpc_loc_operation_mode_e_type op_mode; int ret_val; - LOGD ("loc_eng_set_position mode, client = %d, interval = %d, mode = %d\n", - (int32) client_handle, min_interval, mode); + if (NULL != posMode) + fixCriteria = *posMode; - switch (mode) + ALOGD ("loc_eng_set_position mode, client = %d, interval = %d, mode = %d\n", + (int32) client_handle, fixCriteria.min_interval, fixCriteria.mode); + + switch (fixCriteria.mode) { case LOC_POSITION_MODE_MS_BASED: op_mode = RPC_LOC_OPER_MODE_MSB; @@ -339,29 +342,22 @@ LocApiRpcAdapter::setPositionMode(LocPositionMode mode, fix_criteria_ptr = &ioctl_data.rpc_loc_ioctl_data_u_type_u.fix_criteria; fix_criteria_ptr->valid_mask = RPC_LOC_FIX_CRIT_VALID_PREFERRED_OPERATION_MODE | RPC_LOC_FIX_CRIT_VALID_RECURRENCE_TYPE; - fix_criteria_ptr->min_interval = min_interval; + fix_criteria_ptr->min_interval = fixCriteria.min_interval; fix_criteria_ptr->preferred_operation_mode = op_mode; - if (min_interval > 0) { - fix_criteria_ptr->min_interval = min_interval; - fix_criteria_ptr->valid_mask |= RPC_LOC_FIX_CRIT_VALID_MIN_INTERVAL; - }else if(min_interval == 0) - { - /*If the framework passes in 0 transalate it into the maximum frequency we can report positions - which is 1 Hz or once very second */ - fix_criteria_ptr->min_interval = MIN_POSSIBLE_FIX_INTERVAL; - fix_criteria_ptr->valid_mask |= RPC_LOC_FIX_CRIT_VALID_MIN_INTERVAL; - } - if (preferred_accuracy > 0) { - fix_criteria_ptr->preferred_accuracy = preferred_accuracy; + fix_criteria_ptr->min_interval = fixCriteria.min_interval; + fix_criteria_ptr->valid_mask |= RPC_LOC_FIX_CRIT_VALID_MIN_INTERVAL; + + if (fixCriteria.preferred_accuracy > 0) { + fix_criteria_ptr->preferred_accuracy = fixCriteria.preferred_accuracy; fix_criteria_ptr->valid_mask |= RPC_LOC_FIX_CRIT_VALID_PREFERRED_ACCURACY; } - if (preferred_time > 0) { - fix_criteria_ptr->preferred_response_time = preferred_time; + if (fixCriteria.preferred_time > 0) { + fix_criteria_ptr->preferred_response_time = fixCriteria.preferred_time; fix_criteria_ptr->valid_mask |= RPC_LOC_FIX_CRIT_VALID_PREFERRED_RESPONSE_TIME; } - switch (recurrence) { + switch (fixCriteria.recurrence) { case GPS_POSITION_RECURRENCE_SINGLE: fix_criteria_ptr->recurrence_type = RPC_LOC_SINGLE_FIX; break; @@ -484,20 +480,42 @@ LocApiRpcAdapter::informNiResponse(GpsUserResponseType userResponse, } enum loc_api_adapter_err - LocApiRpcAdapter::setAPN(char* apn, int len) +LocApiRpcAdapter::setAPN(char* apn, int len, boolean force) { - rpc_loc_ioctl_data_u_type ioctl_data = {RPC_LOC_IOCTL_SET_LBS_APN_PROFILE, {0}}; - ioctl_data.rpc_loc_ioctl_data_u_type_u.apn_profiles[0].srv_system_type = LOC_APN_PROFILE_SRV_SYS_MAX; - ioctl_data.rpc_loc_ioctl_data_u_type_u.apn_profiles[0].pdp_type = LOC_APN_PROFILE_PDN_TYPE_IPV4; - memcpy(&(ioctl_data.rpc_loc_ioctl_data_u_type_u.apn_profiles[0].apn_name), apn, len+1); + enum loc_api_adapter_err rtv = LOC_API_ADAPTER_ERR_SUCCESS; + int size = sizeof(apnLastSet); + if (force || memcmp(apnLastSet, apn, size)) { + if (len < size) { + // size will be not larger than its original value + size = len + 1; + } + memcpy(apnLastSet, apn, size); - return convertErr( - loc_eng_ioctl (client_handle, - RPC_LOC_IOCTL_SET_LBS_APN_PROFILE, - &ioctl_data, - LOC_IOCTL_DEFAULT_TIMEOUT, - NULL) - ); + if (false == navigating) { + rpc_loc_ioctl_data_u_type ioctl_data = {RPC_LOC_IOCTL_SET_LBS_APN_PROFILE, {0}}; + ioctl_data.rpc_loc_ioctl_data_u_type_u.apn_profiles[0].srv_system_type = LOC_APN_PROFILE_SRV_SYS_MAX; + ioctl_data.rpc_loc_ioctl_data_u_type_u.apn_profiles[0].pdp_type = LOC_APN_PROFILE_PDN_TYPE_IPV4; + memcpy(&(ioctl_data.rpc_loc_ioctl_data_u_type_u.apn_profiles[0].apn_name), apn, size); + + rtv = convertErr( + loc_eng_ioctl (client_handle, + RPC_LOC_IOCTL_SET_LBS_APN_PROFILE, + &ioctl_data, + LOC_IOCTL_DEFAULT_TIMEOUT, + NULL) + ); + } + } + return rtv; +} + +void LocApiRpcAdapter::setInSession(bool inSession) +{ + LocApiAdapter::setInSession(inSession); + if (false == navigating) { + enableData(dataEnableLastSet, true); + setAPN(apnLastSet, sizeof(apnLastSet)-1, true); + } } enum loc_api_adapter_err @@ -567,18 +585,26 @@ LocApiRpcAdapter::setServer(unsigned int ip, int port, LocServerType type) } enum loc_api_adapter_err -LocApiRpcAdapter::enableData(int enable) +LocApiRpcAdapter::enableData(int enable, boolean force) { - rpc_loc_ioctl_data_u_type ioctl_data = {RPC_LOC_IOCTL_SET_DATA_ENABLE, {0}}; + enum loc_api_adapter_err rtv = LOC_API_ADAPTER_ERR_SUCCESS; + if (force || dataEnableLastSet != enable) { + dataEnableLastSet = enable; - ioctl_data.rpc_loc_ioctl_data_u_type_u.data_enable = enable; - return convertErr( - loc_eng_ioctl (client_handle, - RPC_LOC_IOCTL_SET_DATA_ENABLE, - &ioctl_data, - LOC_IOCTL_DEFAULT_TIMEOUT, - NULL) - ); + if (false == navigating) { + rpc_loc_ioctl_data_u_type ioctl_data = {RPC_LOC_IOCTL_SET_DATA_ENABLE, {0}}; + + ioctl_data.rpc_loc_ioctl_data_u_type_u.data_enable = enable; + rtv = convertErr( + loc_eng_ioctl (client_handle, + RPC_LOC_IOCTL_SET_DATA_ENABLE, + &ioctl_data, + LOC_IOCTL_DEFAULT_TIMEOUT, + NULL) + ); + } + } + return rtv; } enum loc_api_adapter_err @@ -652,7 +678,9 @@ void LocApiRpcAdapter::reportPosition(const rpc_loc_parsed_position_s_type *loca location.flags |= GPS_LOCATION_HAS_ACCURACY; location.accuracy = location_report_ptr->hor_unc_circular; } - + //Mark the location source as from GNSS + location.flags |= LOCATION_HAS_SOURCE_INFO; + location.position_source = ULP_LOCATION_IS_FROM_GNSS; LOC_LOGV("reportPosition: fire callback\n"); LocApiAdapter::reportPosition(location, locEngHandle.extPosInfo((void*)location_report_ptr), diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_fixup.c b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_fixup.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_log.c b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_log.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_rpc_glue.c b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_rpc_glue.c old mode 100755 new mode 100644 index 10b2d221..02eadf7f --- a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_rpc_glue.c +++ b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_rpc_glue.c @@ -62,8 +62,8 @@ /* Logging Improvement */ #include "log_util.h" -/* Uncomment to force LOGD messages */ -// #define LOGD LOGI +/* Uncomment to force ALOGD messages */ +// #define ALOGD ALOGI /*===================================================================== External declarations @@ -316,30 +316,23 @@ rpc_loc_client_handle_type loc_open ( rpc_loc_open_args args; args.event_reg_mask = event_reg_mask; - int i; + int i, j = LOC_API_CB_MAX_CLIENTS; for (i = 0; i < LOC_API_CB_MAX_CLIENTS; i++) { - if (loc_glue_callback_table[i].cb_func == event_callback || - loc_glue_callback_table[i].user == userData) + if (loc_glue_callback_table[i].user == userData) { LOC_LOGW("Client already opened service (callback=%p)...\n", event_callback); break; + } else if (j == LOC_API_CB_MAX_CLIENTS && + loc_glue_callback_table[i].user == NULL) { + j = i; } } if (i == LOC_API_CB_MAX_CLIENTS) { - for (i = 0; i < LOC_API_CB_MAX_CLIENTS; i++) - { - if (loc_glue_callback_table[i].cb_func == NULL) - { - loc_glue_callback_table[i].cb_func = event_callback; - loc_glue_callback_table[i].rpc_cb = rpc_cb; - loc_glue_callback_table[i].user = userData; - break; - } - } + i = j; } if (i == LOC_API_CB_MAX_CLIENTS) @@ -348,6 +341,10 @@ rpc_loc_client_handle_type loc_open ( return RPC_LOC_CLIENT_HANDLE_INVALID; } + loc_glue_callback_table[i].cb_func = event_callback; + loc_glue_callback_table[i].rpc_cb = rpc_cb; + loc_glue_callback_table[i].user = userData; + args.event_callback = loc_glue_callback_table[i].cb_id; LOC_LOGV("cb_id=%d, func=0x%x", i, (unsigned int) event_callback); @@ -405,6 +402,7 @@ void loc_clear(rpc_loc_client_handle_type handle) { loc_glue_callback_table[i].cb_func = NULL; loc_glue_callback_table[i].rpc_cb = NULL; loc_glue_callback_table[i].handle = -1; + loc_glue_callback_table[i].user = NULL; break; } } diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_sync_call.c b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_sync_call.c old mode 100755 new mode 100644 index e2a5786f..c488ff5d --- a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_sync_call.c +++ b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_api_sync_call.c @@ -195,7 +195,7 @@ void loc_api_callback_process_sync_call( { int i; - LOGV("loc_handle = 0x%lx, loc_event = 0x%lx", loc_handle, loc_event); + ALOGV("loc_handle = 0x%lx, loc_event = 0x%lx", loc_handle, loc_event); for (i = 0; i < loc_sync_data.num_of_slots; i++) { loc_sync_call_slot_s_type *slot = &loc_sync_data.slots[i]; @@ -211,7 +211,7 @@ void loc_api_callback_process_sync_call( slot->loc_cb_received_event_mask = loc_event; - LOGV("signal slot %d in_use %d, loc_handle 0x%lx, event_mask 0x%1x, ioctl_type %d", i, slot->in_use, slot->loc_handle, (int) slot->loc_cb_wait_event_mask, (int) slot->ioctl_type); + ALOGV("signal slot %d in_use %d, loc_handle 0x%lx, event_mask 0x%1x, ioctl_type %d", i, slot->in_use, slot->loc_handle, (int) slot->loc_cb_wait_event_mask, (int) slot->ioctl_type); pthread_cond_signal(&slot->loc_cb_arrived_cond); slot->signal_sent = 1; @@ -252,7 +252,7 @@ static int loc_lock_a_slot() loc_sync_call_slot_s_type *slot = &loc_sync_data.slots[i]; if (pthread_mutex_trylock(&slot->lock) == EBUSY) { - LOGV("trylock EBUSY : %d", i); + ALOGV("trylock EBUSY : %d", i); continue; } @@ -266,7 +266,7 @@ static int loc_lock_a_slot() */ break; } - /* LOGV("slot %d in_use = %d, not_available = %d : %d", i, slot->in_use, slot->not_available, i); */ + /* ALOGV("slot %d in_use = %d, not_available = %d : %d", i, slot->in_use, slot->not_available, i); */ pthread_mutex_unlock(&slot->lock); } @@ -417,7 +417,7 @@ static int loc_api_wait_callback( if (rc == ETIMEDOUT) { ret_val = RPC_LOC_API_TIMEOUT; /* Timed out */ - LOGE("TIMEOUT: %d", select_id); + ALOGE("TIMEOUT: %d", select_id); } else { /* Obtained the first awaited callback */ @@ -462,7 +462,7 @@ int loc_api_sync_ioctl if (select_id < 0 || select_id >= loc_sync_data.num_of_slots) { - LOGE("slot not available ioctl_type = %s", + ALOGE("slot not available ioctl_type = %s", loc_get_ioctl_type_name(ioctl_type)); return rc; } @@ -474,17 +474,17 @@ int loc_api_sync_ioctl if (rc != RPC_LOC_API_SUCCESS) { - LOGE("loc_ioctl failed select_id = %d, ioctl_type %s, returned %s", + ALOGE("loc_ioctl failed select_id = %d, ioctl_type %s, returned %s", select_id, loc_get_ioctl_type_name(ioctl_type), loc_get_ioctl_status_name(rc)); } else { - LOGV("select_id = %d, ioctl_type %d, returned RPC_LOC_API_SUCCESS", + ALOGV("select_id = %d, ioctl_type %d, returned RPC_LOC_API_SUCCESS", select_id, ioctl_type); // Wait for the callback of loc_ioctl if ((rc = loc_api_wait_callback(select_id, timeout_msec / 1000, NULL, &callback_data)) != 0) { // Callback waiting failed - LOGE("callback wait failed select_id = %d, ioctl_type %s, returned %s", + ALOGE("callback wait failed select_id = %d, ioctl_type %s, returned %s", select_id, loc_get_ioctl_type_name(ioctl_type), loc_get_ioctl_status_name(rc)); } else @@ -493,10 +493,10 @@ int loc_api_sync_ioctl if (callback_data.status != RPC_LOC_API_SUCCESS) { rc = callback_data.status; - LOGE("callback status failed select_id = %d, ioctl_type %s, returned %s", + ALOGE("callback status failed select_id = %d, ioctl_type %s, returned %s", select_id, loc_get_ioctl_type_name(ioctl_type), loc_get_ioctl_status_name(rc)); } else { - LOGV("callback status success select_id = %d, ioctl_type %d, returned %d", + ALOGV("callback status success select_id = %d, ioctl_type %d, returned %d", select_id, ioctl_type, rc); } } /* wait callback */ diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_apicb_appinit.c b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-glue/src/loc_apicb_appinit.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/Android.mk b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/Android.mk old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/inc/loc_api_rpcgen_cb_rpc.h b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/inc/loc_api_rpcgen_cb_rpc.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/inc/loc_api_rpcgen_common_rpc.h b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/inc/loc_api_rpcgen_common_rpc.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/inc/loc_api_rpcgen_rpc.h b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/inc/loc_api_rpcgen_rpc.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/inc/loc_apicb_appinit.h b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/inc/loc_apicb_appinit.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_api_rpcgen_cb_svc.c b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_api_rpcgen_cb_svc.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_api_rpcgen_cb_xdr.c b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_api_rpcgen_cb_xdr.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_api_rpcgen_clnt.c b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_api_rpcgen_clnt.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_api_rpcgen_common_xdr.c b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_api_rpcgen_common_xdr.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_api_rpcgen_xdr.c b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_api_rpcgen_xdr.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_apicb_appinit.c b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/src/loc_apicb_appinit.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/xdr/loc_api.xdr b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/xdr/loc_api.xdr old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/xdr/loc_api_cb.xdr b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/xdr/loc_api_cb.xdr old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/xdr/loc_api_common.xdr b/loc_api/libloc_api-rpc-50001/libloc_api-rpc-stub/xdr/loc_api_common.xdr old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/Android.mk b/loc_api/libloc_api-rpc/Android.mk old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/gen-1240/Makefile.xdr b/loc_api/libloc_api-rpc/gen-1240/Makefile.xdr old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_fixup.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_fixup.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/gen-1240/loc_api_rpc_glue.c b/loc_api/libloc_api-rpc/gen-1240/loc_api_rpc_glue.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/gen-3200/Makefile.xdr b/loc_api/libloc_api-rpc/gen-3200/Makefile.xdr old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api.xdr b/loc_api/libloc_api-rpc/gen-3200/loc_api.xdr old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_cb.xdr b/loc_api/libloc_api-rpc/gen-3200/loc_api_cb.xdr old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_common.xdr b/loc_api/libloc_api-rpc/gen-3200/loc_api_common.xdr old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_fixup.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_fixup.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/gen-3200/loc_api_rpc_glue.c b/loc_api/libloc_api-rpc/gen-3200/loc_api_rpc_glue.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/inc-1240/loc_api_fixup.h b/loc_api/libloc_api-rpc/inc-1240/loc_api_fixup.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/inc-1240/loc_apicb_appinit.h b/loc_api/libloc_api-rpc/inc-1240/loc_apicb_appinit.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/inc-3200/loc_api_fixup.h b/loc_api/libloc_api-rpc/inc-3200/loc_api_fixup.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/inc-3200/loc_apicb_appinit.h b/loc_api/libloc_api-rpc/inc-3200/loc_apicb_appinit.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/inc/debug.h b/loc_api/libloc_api-rpc/inc/debug.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/inc/loc_api_rpc_glue.h b/loc_api/libloc_api-rpc/inc/loc_api_rpc_glue.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api-rpc/src/loc_apicb_appinit.c b/loc_api/libloc_api-rpc/src/loc_apicb_appinit.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api/Android.mk b/loc_api/libloc_api/Android.mk old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api/loc_eng.cpp b/loc_api/libloc_api/loc_eng.cpp old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api/loc_eng.h b/loc_api/libloc_api/loc_eng.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api/loc_eng_ioctl.cpp b/loc_api/libloc_api/loc_eng_ioctl.cpp old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api/loc_eng_ioctl.h b/loc_api/libloc_api/loc_eng_ioctl.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api/loc_eng_ni.cpp b/loc_api/libloc_api/loc_eng_ni.cpp old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api/loc_eng_ni.h b/loc_api/libloc_api/loc_eng_ni.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api/loc_eng_xtra.cpp b/loc_api/libloc_api/loc_eng_xtra.cpp old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api/loc_eng_xtra.h b/loc_api/libloc_api/loc_eng_xtra.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api_50001/Android.mk b/loc_api/libloc_api_50001/Android.mk old mode 100755 new mode 100644 index 0a5a0a10..4e5973d6 --- a/loc_api/libloc_api_50001/Android.mk +++ b/loc_api/libloc_api_50001/Android.mk @@ -3,6 +3,7 @@ ifneq ($(BUILD_TINY_ANDROID),true) BIT_ENABLED_BOARD_PLATFORM_LIST := msm7630_fusion BIT_ENABLED_BOARD_PLATFORM_LIST += msm8660 +BIT_ENABLED_BOARD_PLATFORM_LIST += msm8960 ifeq ($(call is-board-platform-in-list,$(BIT_ENABLED_BOARD_PLATFORM_LIST)),true) FEATURE_GNSS_BIT_API := true endif # is-board-platform-in-list @@ -57,8 +58,7 @@ LOCAL_SHARED_LIBRARIES := \ libutils \ libcutils \ libloc_adapter \ - libgps.utils \ - libdl + libgps.utils LOCAL_SRC_FILES += \ loc_eng.cpp \ @@ -78,13 +78,17 @@ LOCAL_SRC_FILES += \ loc_eng_dmn_conn_glue_msg.c \ loc_eng_dmn_conn_glue_pipe.c +# if QMI is supported then link to loc_api_v02 +ifeq ($(call is-board-platform-in-list,$(QMI_BOARD_PLATFORM_LIST)),true) +LOCAL_SHARED_LIBRARIES += libloc_api_v02 +else ## Check if RPC is not unsupported ifneq ($(TARGET_NO_RPC),true) LOCAL_SHARED_LIBRARIES += libloc_api-rpc-qc -else -LOCAL_SHARED_LIBRARIES += libloc_api_v02 endif #TARGET_NO_RPC +endif #is-board-platform-in-list + LOCAL_CFLAGS += \ -fno-short-enums \ -D_ANDROID_ @@ -109,7 +113,8 @@ LOCAL_SHARED_LIBRARIES := \ libutils \ libcutils \ libloc_eng \ - libgps.utils + libgps.utils \ + libdl LOCAL_SRC_FILES += \ loc.cpp \ @@ -121,7 +126,8 @@ LOCAL_CFLAGS += \ ## Includes LOCAL_C_INCLUDES:= \ - $(TARGET_OUT_HEADERS)/gps.utils + $(TARGET_OUT_HEADERS)/gps.utils \ + hardware/qcom/gps/loc_api/ulp/inc LOCAL_PRELINK_MODULE := false LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw diff --git a/loc_api/libloc_api_50001/LocApiAdapter.cpp b/loc_api/libloc_api_50001/LocApiAdapter.cpp old mode 100755 new mode 100644 index e631642d..b7ebc6f5 --- a/loc_api/libloc_api_50001/LocApiAdapter.cpp +++ b/loc_api/libloc_api_50001/LocApiAdapter.cpp @@ -44,11 +44,12 @@ LocEng::LocEng(void* caller, gps_acquire_wakelock acqwl, gps_release_wakelock relwl, loc_msg_sender msgSender, + loc_msg_sender msgUlpSender, loc_ext_parser posParser, loc_ext_parser svParser) : owner(caller), eventMask(emask), acquireWakelock(acqwl), - releaseWakeLock(relwl), sendMsge(msgSender), + releaseWakeLock(relwl), sendMsge(msgSender), sendUlpMsg(msgUlpSender), extPosInfo(NULL == posParser ? noProc : posParser), extSvInfo(NULL == svParser ? noProc : svParser) { @@ -56,7 +57,7 @@ LocEng::LocEng(void* caller, } LocApiAdapter::LocApiAdapter(LocEng &locEng) : - locEngHandle(locEng) + locEngHandle(locEng), fixCriteria(), navigating(false) { LOC_LOGD("LocApiAdapter created"); } @@ -119,13 +120,24 @@ void LocApiAdapter::reportPosition(GpsLocation &location, location, locationExt, status)); - locEngHandle.sendMsge(locEngHandle.owner, msg); + if (locEngHandle.sendUlpMsg) { + locEngHandle.sendUlpMsg(locEngHandle.owner, msg); + } else { + locEngHandle.sendMsge(locEngHandle.owner, msg); + } } void LocApiAdapter::reportSv(GpsSvStatus &svStatus, void* svExt) { loc_eng_msg_report_sv *msg(new loc_eng_msg_report_sv(locEngHandle.owner, svStatus, svExt)); - locEngHandle.sendMsge(locEngHandle.owner, msg); + + //We want to send SV info to ULP to help it in determining GNSS signal strength + //ULP will forward the SV reports to HAL without any modifications + if (locEngHandle.sendUlpMsg) { + locEngHandle.sendUlpMsg(locEngHandle.owner, msg); + } else { + locEngHandle.sendMsge(locEngHandle.owner, msg); + } } void LocApiAdapter::reportStatus(GpsStatusValue status) diff --git a/loc_api/libloc_api_50001/LocApiAdapter.h b/loc_api/libloc_api_50001/LocApiAdapter.h old mode 100755 new mode 100644 index 033a034c..1c5e02b2 --- a/loc_api/libloc_api_50001/LocApiAdapter.h +++ b/loc_api/libloc_api_50001/LocApiAdapter.h @@ -32,9 +32,13 @@ #include #include #include +#include #include +#include -#define MIN_POSSIBLE_FIX_INTERVAL 1000 /* msec */ +#define MAX_APN_LEN 100 +#define MAX_URL_LEN 256 +#define smaller_of(a, b) (((a) > (b)) ? (b) : (a)) enum loc_api_adapter_err { LOC_API_ADAPTER_ERR_SUCCESS = 0, @@ -85,6 +89,7 @@ struct LocEng { const gps_acquire_wakelock acquireWakelock; const gps_release_wakelock releaseWakeLock; const loc_msg_sender sendMsge; + const loc_msg_sender sendUlpMsg; const loc_ext_parser extPosInfo; const loc_ext_parser extSvInfo; @@ -93,6 +98,7 @@ struct LocEng { gps_acquire_wakelock acqwl, gps_release_wakelock relwl, loc_msg_sender msgSender, + loc_msg_sender msgUlpSender, loc_ext_parser posParser, loc_ext_parser svParser); }; @@ -100,6 +106,8 @@ struct LocEng { class LocApiAdapter { protected: const LocEng locEngHandle; + LocPosMode fixCriteria; + bool navigating; LocApiAdapter(LocEng &locEng); @@ -157,22 +165,14 @@ public: inline virtual enum loc_api_adapter_err setXtraData(char* data, int length) {LOC_LOGW("%s: default implementation invoked", __func__); return LOC_API_ADAPTER_ERR_SUCCESS;} -#ifdef QCOM_FEATURE_IPV6 inline virtual enum loc_api_adapter_err atlOpenStatus(int handle, int is_succ, char* apn, AGpsBearerType bear, AGpsType agpsType) {LOC_LOGW("%s: default implementation invoked", __func__); return LOC_API_ADAPTER_ERR_SUCCESS;} -#else - inline virtual enum loc_api_adapter_err - atlOpenStatus(int handle, int is_succ, char* apn, AGpsType agpsType) - {LOC_LOGW("%s: default implementation invoked", __func__); return LOC_API_ADAPTER_ERR_SUCCESS;} -#endif inline virtual enum loc_api_adapter_err atlCloseStatus(int handle, int is_succ) {LOC_LOGW("%s: default implementation invoked", __func__); return LOC_API_ADAPTER_ERR_SUCCESS;} inline virtual enum loc_api_adapter_err - setPositionMode(LocPositionMode mode, GpsPositionRecurrence recurrence, - uint32_t min_interval, uint32_t preferred_accuracy, - uint32_t preferred_time) + setPositionMode(const LocPosMode *posMode) {LOC_LOGW("%s: default implementation invoked", __func__); return LOC_API_ADAPTER_ERR_SUCCESS;} inline virtual enum loc_api_adapter_err setServer(const char* url, int len) @@ -187,16 +187,32 @@ public: inline virtual enum loc_api_adapter_err setSUPLVersion(uint32_t version) {LOC_LOGW("%s: default implementation invoked", __func__); return LOC_API_ADAPTER_ERR_SUCCESS;} + inline virtual enum loc_api_adapter_err + setLPPConfig(uint32_t profile) + {LOC_LOGW("%s: default implementation invoked", __func__); + return LOC_API_ADAPTER_ERR_SUCCESS; } inline virtual enum loc_api_adapter_err setSensorControlConfig(int sensorUsage) {LOC_LOGW("%s: default implementation invoked", __func__); return LOC_API_ADAPTER_ERR_SUCCESS;} inline virtual enum loc_api_adapter_err - setSensorProperties(float gyroBiasVarianceRandomWalk) + setSensorProperties(bool gyroBiasVarianceRandomWalk_valid, float gyroBiasVarianceRandomWalk, + bool accelBiasVarianceRandomWalk_valid, float accelBiasVarianceRandomWalk, + bool angleBiasVarianceRandomWalk_valid, float angleBiasVarianceRandomWalk, + bool rateBiasVarianceRandomWalk_valid, float rateBiasVarianceRandomWalk, + bool velocityBiasVarianceRandomWalk_valid, float velocityBiasVarianceRandomWalk) {LOC_LOGW("%s: default implementation invoked", __func__); return LOC_API_ADAPTER_ERR_SUCCESS;} inline virtual enum loc_api_adapter_err setSensorPerfControlConfig(int controlMode, int accelSamplesPerBatch, int accelBatchesPerSec, - int gyroSamplesPerBatch, int gyroBatchesPerSec) + int gyroSamplesPerBatch, int gyroBatchesPerSec, int algorithmConfig) {LOC_LOGW("%s: default implementation invoked", __func__); return LOC_API_ADAPTER_ERR_SUCCESS;} + inline virtual enum loc_api_adapter_err + setExtPowerConfig(int isBatteryCharging) + {LOC_LOGW("%s: default implementation invoked", __func__); return LOC_API_ADAPTER_ERR_SUCCESS;} + + inline const LocPosMode& getPositionMode() const {return fixCriteria;} + + inline bool isInSession() { return navigating; } + inline virtual void setInSession(bool inSession) { navigating = inSession; } }; LocApiAdapter* getLocApiAdapter(LocEng &locEng); diff --git a/loc_api/libloc_api_50001/gps.c b/loc_api/libloc_api_50001/gps.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api_50001/loc.cpp b/loc_api/libloc_api_50001/loc.cpp old mode 100755 new mode 100644 index 16bed3b1..c0378fdf --- a/loc_api/libloc_api_50001/loc.cpp +++ b/loc_api/libloc_api_50001/loc.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011 - 2012, Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -33,7 +33,17 @@ #include #include #include +#include +#include +#include +#include +#include +#include + +//Globals defns +static const ulpInterface * loc_eng_ulp_inf = NULL; +static const ulpInterface * loc_eng_get_ulp_inf(void); static gps_location_callback gps_loc_cb = NULL; static gps_sv_status_callback gps_sv_cb = NULL; @@ -52,9 +62,12 @@ static int loc_set_position_mode(GpsPositionMode mode, GpsPositionRecurrence re uint32_t min_interval, uint32_t preferred_accuracy, uint32_t preferred_time); static const void* loc_get_extension(const char* name); -#ifdef QCOM_FEATURE_ULP -static int loc_update_criteria(UlpLocationCriteria criteria); -#endif +//ULP/Hybrid provider Function definitions +static int loc_update_criteria(UlpLocationCriteria criteria); +static int loc_ulp_network_init(UlpNetworkLocationCallbacks *callbacks); +static int loc_ulp_send_network_position(UlpNetworkPositionReport *position_report); +static int loc_ulp_phone_context_init(UlpPhoneContextCallbacks *callback); +static int loc_ulp_phone_context_settings_update(UlpPhoneContextSettings *settings); // Defines the GpsInterface in gps.h static const GpsInterface sLocEngInterface = @@ -68,24 +81,16 @@ static const GpsInterface sLocEngInterface = loc_inject_location, loc_delete_aiding_data, loc_set_position_mode, - loc_get_extension -#ifdef QCOM_FEATURE_ULP - ,loc_update_criteria -#endif + loc_get_extension, + loc_update_criteria }; // Function declarations for sLocEngAGpsInterface static void loc_agps_init(AGpsCallbacks* callbacks); -#ifdef QCOM_FEATURE_IPV6 static int loc_agps_open(AGpsType agpsType, const char* apn, AGpsBearerType bearerType); static int loc_agps_closed(AGpsType agpsType); static int loc_agps_open_failed(AGpsType agpsType); -#else -static int loc_agps_open(const char* apn); -static int loc_agps_closed(); -static int loc_agps_open_failed(); -#endif static int loc_agps_set_server(AGpsType type, const char *hostname, int port); static const AGpsInterface sLocEngAGpsInterface = @@ -136,7 +141,6 @@ static const AGpsRilInterface sLocEngAGpsRilInterface = loc_agps_ril_update_network_availability }; -#ifdef QCOM_FEATURE_ULP static bool loc_inject_raw_command(char* command, int length); static const InjectRawCmdInterface sLocEngInjectRawCmdInterface = @@ -144,9 +148,81 @@ static const InjectRawCmdInterface sLocEngInjectRawCmdInterface = sizeof(InjectRawCmdInterface), loc_inject_raw_command }; -#endif +//ULP/Hybrid provider interfaces +static const UlpNetworkInterface sUlpNetworkInterface = +{ + sizeof(UlpNetworkInterface), + loc_ulp_network_init, + loc_ulp_send_network_position +}; +static const UlpPhoneContextInterface sLocEngUlpPhoneContextInterface = +{ + sizeof(UlpPhoneContextInterface), + loc_ulp_phone_context_init, + loc_ulp_phone_context_settings_update +}; static loc_eng_data_s_type loc_afw_data; +static int gss_fd = 0; + +#define TARGET_NAME_OTHER 0 +#define TARGET_NAME_APQ8064_STANDALONE 1 +#define TARGET_NAME_APQ8064_FUSION3 2 + +static int read_a_line(const char * file_path, char * line, int line_size) +{ + FILE *fp; + int result = 0; + + * line = '\0'; + fp = fopen(file_path, "r" ); + if( fp == NULL ) { + LOC_LOGE("open failed: %s: %s\n", file_path, strerror(errno)); + result = -1; + } else { + int len; + fgets(line, line_size, fp); + len = strlen(line); + len = len < line_size - 1? len : line_size - 1; + line[len] = '\0'; + LOC_LOGD("cat %s: %s", file_path, line); + fclose(fp); + } + return result; +} + +#define LINE_LEN 100 +#define STR_LIQUID "Liquid" +#define STR_SURF "Surf" +#define STRLEN_LIQUID (sizeof(STR_LIQUID) - 1) +#define STRLEN_SURF (sizeof(STR_SURF) - 1) +#define IS_STR_END(c) ((c) == '\0' || (c) == '\n' || (c) == '\r') + +static int get_target_name(void) +{ + int target_name = TARGET_NAME_OTHER; + + char hw_platform[] = "/sys/devices/system/soc/soc0/hw_platform"; // "Liquid" or "Surf" + char id[] = "/sys/devices/system/soc/soc0/id"; //109 + char mdm[] = "/dev/mdm"; // No such file or directory + + char line[LINE_LEN]; + + read_a_line( hw_platform, line, LINE_LEN); + if(( !memcmp(line, STR_LIQUID, STRLEN_LIQUID) && IS_STR_END(line[STRLEN_LIQUID]) ) || + ( !memcmp(line, STR_SURF, STRLEN_SURF) && IS_STR_END(line[STRLEN_SURF]) ) + ) { + if (!read_a_line( mdm, line, LINE_LEN)) { + target_name = TARGET_NAME_APQ8064_FUSION3; + } else { + read_a_line( id, line, LINE_LEN); + if(!strncmp(line, "109", strlen("109"))) { + target_name = TARGET_NAME_APQ8064_STANDALONE; + } + } + } + return target_name; +} /*=========================================================================== FUNCTION gps_get_hardware_interface @@ -189,8 +265,26 @@ const GpsInterface* gps_get_hardware_interface () // for gps.c extern "C" const GpsInterface* get_gps_interface() { + loc_eng_read_config(); + //We load up libulp module at this point itself if ULP configured to be On + if(gps_conf.CAPABILITIES & ULP_CAPABILITY) { + loc_eng_ulp_inf = loc_eng_get_ulp_inf(); + } return &sLocEngInterface; } + +static void loc_free_msg(void* msg) +{ + delete (loc_eng_msg*)msg; +} + + +void loc_ulp_msg_sender(void* loc_eng_data_p, void* msg) +{ + LocEngContext* loc_eng_context = (LocEngContext*)((loc_eng_data_s_type*)loc_eng_data_p)->context; + msg_q_snd((void*)loc_eng_context->ulp_q, msg, loc_free_msg); +} + /*=========================================================================== FUNCTION loc_init @@ -233,10 +327,28 @@ static int loc_init(GpsCallbacks* callbacks) gps_loc_cb = callbacks->location_cb; gps_sv_cb = callbacks->sv_status_cb; - int ret_val = loc_eng_init(loc_afw_data, &clientCallbacks, event); + if (get_target_name() == TARGET_NAME_APQ8064_STANDALONE) + { + gps_conf.CAPABILITIES &= ~(GPS_CAPABILITY_MSA | GPS_CAPABILITY_MSB); + gss_fd = open("/dev/gss", O_RDONLY); + if (gss_fd < 0) { + LOC_LOGE("GSS open failed: %s\n", strerror(errno)); + return NULL; + } + LOC_LOGD("GSS open success! CAPABILITIES %0x\n", gps_conf.CAPABILITIES); + } - EXIT_LOG(%d, ret_val); - return ret_val; + int retVal = -1; + if (loc_eng_ulp_inf == NULL) + retVal = loc_eng_init(loc_afw_data, &clientCallbacks, event, + NULL); + else + retVal = loc_eng_init(loc_afw_data, &clientCallbacks, event, + loc_ulp_msg_sender); + int ret_val1 = loc_eng_ulp_init(loc_afw_data, loc_eng_ulp_inf); + LOC_LOGD("loc_eng_ulp_init returned %d\n",ret_val1); + EXIT_LOG(%d, retVal); + return retVal; } /*=========================================================================== @@ -261,6 +373,15 @@ static void loc_cleanup() loc_eng_cleanup(loc_afw_data); gps_loc_cb = NULL; gps_sv_cb = NULL; + + /* + * if (get_target_name() == TARGET_NAME_APQ8064_STANDALONE) + * { + * close(gss_fd); + * LOC_LOGD("GSS shutdown.\n"); + * } + */ + EXIT_LOG(%s, VOID_RET); } @@ -349,9 +470,10 @@ static int loc_set_position_mode(GpsPositionMode mode, locMode = LOC_POSITION_MODE_STANDALONE; break; } - int ret_val = loc_eng_set_position_mode(loc_afw_data, locMode, - recurrence, min_interval, - preferred_accuracy, preferred_time); + + LocPosMode params(locMode, recurrence, min_interval, + preferred_accuracy, preferred_time, NULL, NULL); + int ret_val = loc_eng_set_position_mode(loc_afw_data, params); EXIT_LOG(%d, ret_val); return ret_val; @@ -437,7 +559,6 @@ static void loc_delete_aiding_data(GpsAidingData f) EXIT_LOG(%s, VOID_RET); } -#ifdef QCOM_FEATURE_ULP /*=========================================================================== FUNCTION loc_update_criteria @@ -462,7 +583,6 @@ static int loc_update_criteria(UlpLocationCriteria criteria) EXIT_LOG(%d, ret_val); return ret_val; } -#endif /*=========================================================================== FUNCTION loc_get_extension @@ -502,19 +622,32 @@ static const void* loc_get_extension(const char* name) else if (strcmp(name, AGPS_RIL_INTERFACE) == 0) { - ret_val = &sLocEngAGpsRilInterface; + char baseband[PROPERTY_VALUE_MAX]; + property_get("ro.baseband", baseband, "msm"); + if (strcmp(baseband, "csfb") == 0) + { + ret_val = &sLocEngAGpsRilInterface; + } } -#ifdef QCOM_FEATURE_ULP else if (strcmp(name, ULP_RAW_CMD_INTERFACE) == 0) { ret_val = &sLocEngInjectRawCmdInterface; } -#endif + else if(strcmp(name, ULP_PHONE_CONTEXT_INTERFACE) == 0) + { + ret_val = &sLocEngUlpPhoneContextInterface; + } + else if(strcmp(name, ULP_NETWORK_INTERFACE) == 0) + { + //Return a valid value for ULP Network Interface only if ULP + //turned on in gps.conf + if(gps_conf.CAPABILITIES & ULP_CAPABILITY) + ret_val = &sUlpNetworkInterface; + } else { LOC_LOGE ("get_extension: Invalid interface passed in\n"); } - EXIT_LOG(%p, ret_val); return ret_val; } @@ -559,7 +692,6 @@ SIDE EFFECTS N/A ===========================================================================*/ -#ifdef QCOM_FEATURE_IPV6 static int loc_agps_open(AGpsType agpsType, const char* apn, AGpsBearerType bearerType) { @@ -569,16 +701,6 @@ static int loc_agps_open(AGpsType agpsType, EXIT_LOG(%d, ret_val); return ret_val; } -#else -static int loc_agps_open(const char* apn) -{ - ENTRY_LOG(); - int ret_val = loc_eng_agps_open(loc_afw_data, apn); - - EXIT_LOG(%d, ret_val); - return ret_val; -} -#endif /*=========================================================================== FUNCTION loc_agps_closed @@ -597,7 +719,6 @@ SIDE EFFECTS N/A ===========================================================================*/ -#ifdef QCOM_FEATURE_IPV6 static int loc_agps_closed(AGpsType agpsType) { ENTRY_LOG(); @@ -606,16 +727,6 @@ static int loc_agps_closed(AGpsType agpsType) EXIT_LOG(%d, ret_val); return ret_val; } -#else -static int loc_agps_closed() -{ - ENTRY_LOG(); - int ret_val = loc_eng_agps_closed(loc_afw_data); - - EXIT_LOG(%d, ret_val); - return ret_val; -} -#endif /*=========================================================================== FUNCTION loc_agps_open_failed @@ -634,7 +745,6 @@ SIDE EFFECTS N/A ===========================================================================*/ -#ifdef QCOM_FEATURE_IPV6 int loc_agps_open_failed(AGpsType agpsType) { ENTRY_LOG(); @@ -643,16 +753,6 @@ int loc_agps_open_failed(AGpsType agpsType) EXIT_LOG(%d, ret_val); return ret_val; } -#else -int loc_agps_open_failed() -{ - ENTRY_LOG(); - int ret_val = loc_eng_agps_open_failed(loc_afw_data); - - EXIT_LOG(%d, ret_val); - return ret_val; -} -#endif /*=========================================================================== FUNCTION loc_agps_set_server @@ -818,7 +918,6 @@ static void loc_agps_ril_update_network_availability(int available, const char* EXIT_LOG(%s, VOID_RET); } -#ifdef QCOM_FEATURE_ULP /*=========================================================================== FUNCTION loc_inject_raw_command @@ -842,18 +941,13 @@ static bool loc_inject_raw_command(char* command, int length) EXIT_LOG(%s, loc_logger_boolStr[ret_val!=0]); return ret_val; } -#endif static void loc_cb(GpsLocation* location, void* locExt) { ENTRY_LOG(); if (NULL != gps_loc_cb && NULL != location) { -#ifdef QCOM_FEATURE_ULP CALLBACK_LOG_CALLFLOW("location_cb - from", %d, location->position_source); -#else - CALLBACK_LOG_CALLFLOW("location_cb - at", %llu, location->timestamp); -#endif gps_loc_cb(location); } EXIT_LOG(%s, VOID_RET); @@ -868,3 +962,156 @@ static void sv_cb(GpsSvStatus* sv_status, void* svExt) } EXIT_LOG(%s, VOID_RET); } +/*=========================================================================== +FUNCTION loc_eng_get_ulp_inf + +DESCRIPTION + This function checks if ULP is enabled, and loads the libulp2.so and + returns its interface + +DEPENDENCIES + None + +RETURN VALUE + interface pointer to libulp: no error + NULL: errors + +SIDE EFFECTS + N/A + +===========================================================================*/ +const ulpInterface * loc_eng_get_ulp_inf(void) +{ + ENTRY_LOG(); + void *handle; + const char *error; + get_ulp_interface* get_ulp_inf; + const ulpInterface* loc_eng_ulpInf = NULL; + + if (!(gps_conf.CAPABILITIES & ULP_CAPABILITY)) { + LOC_LOGD ("%s, ULP is not configured to be On in gps.conf\n", __func__); + goto exit; + } + dlerror(); /* Clear any existing error */ + + handle = dlopen ("libulp2.so", RTLD_NOW); + + if (!handle) + { + if ((error = dlerror()) != NULL) { + LOC_LOGE ("%s, dlopen for libulp.so failed, error = %s\n", __func__, error); + } + goto exit; + } + dlerror(); /* Clear any existing error */ + get_ulp_inf = (get_ulp_interface*) dlsym(handle, "ulp_get_interface"); + if ((error = dlerror()) != NULL) { + LOC_LOGE ("%s, dlsym for ulpInterface failed, error = %s\n", __func__, error); + goto exit; + } + + // Initialize the ULP interface + loc_eng_ulpInf = get_ulp_inf(); + +exit: + EXIT_LOG(%d, loc_eng_ulpInf == NULL); + return loc_eng_ulpInf; +} + +/*=========================================================================== +FUNCTION loc_ulp_network_init + +DESCRIPTION + Initialize the ULP network interface. + +DEPENDENCIES + NONE + +RETURN VALUE + 0 + +SIDE EFFECTS + N/A + +===========================================================================*/ +static int loc_ulp_phone_context_init(UlpPhoneContextCallbacks *callbacks) +{ + ENTRY_LOG(); + int ret_val = loc_eng_ulp_phone_context_init(loc_afw_data, callbacks); + EXIT_LOG(%d, ret_val); + return ret_val; +} +/*=========================================================================== +FUNCTION loc_ulp_phone_context_settings_update + +DESCRIPTION + This is used to inform the ULP module of phone settings changes carried out + by the users +DEPENDENCIES + N/A + +RETURN VALUE + 0: success + +SIDE EFFECTS + N/A + +===========================================================================*/ + +static int loc_ulp_phone_context_settings_update(UlpPhoneContextSettings *settings) +{ + ENTRY_LOG(); + int ret_val = -1; + ret_val = loc_eng_ulp_phone_context_settings_update(loc_afw_data, settings); + EXIT_LOG(%d, ret_val); + return ret_val; +} + +/*=========================================================================== +FUNCTION loc_ulp_network_init + +DESCRIPTION + Initialize the ULP network interface. + +DEPENDENCIES + NONE + +RETURN VALUE + 0 + +SIDE EFFECTS + N/A + +===========================================================================*/ +static int loc_ulp_network_init(UlpNetworkLocationCallbacks *callbacks) +{ + ENTRY_LOG(); + int ret_val = loc_eng_ulp_network_init(loc_afw_data, callbacks); + EXIT_LOG(%d, ret_val); + return ret_val; +} + +/*=========================================================================== +FUNCTION loc_eng_ulp_send_network_position + +DESCRIPTION + Ulp send data + +DEPENDENCIES + NONE + +RETURN VALUE + 0 + +SIDE EFFECTS + N/A + +===========================================================================*/ +int loc_ulp_send_network_position(UlpNetworkPositionReport *position_report) +{ + ENTRY_LOG(); + int ret_val = -1; + ret_val = loc_eng_ulp_send_network_position(loc_afw_data, position_report); + EXIT_LOG(%d, ret_val); + return ret_val; +} diff --git a/loc_api/libloc_api_50001/loc.h b/loc_api/libloc_api_50001/loc.h old mode 100755 new mode 100644 index bf942373..233b34c3 --- a/loc_api/libloc_api_50001/loc.h +++ b/loc_api/libloc_api_50001/loc.h @@ -38,6 +38,8 @@ extern "C" { #include #include +#define MIN_POSSIBLE_FIX_INTERVAL 1000 /* msec */ + typedef enum loc_server_type { LOC_AGPS_CDMA_PDE_SERVER, LOC_AGPS_CUSTOM_PDE_SERVER, @@ -78,6 +80,7 @@ enum loc_sess_status { LOC_SESS_FAILURE }; +void loc_ulp_msg_sender(void* loc_eng_data_p, void* msg); #ifdef __cplusplus } diff --git a/loc_api/libloc_api_50001/loc_eng.cpp b/loc_api/libloc_api_50001/loc_eng.cpp old mode 100755 new mode 100644 index 4d032dce..9958ca56 --- a/loc_api/libloc_api_50001/loc_eng.cpp +++ b/loc_api/libloc_api_50001/loc_eng.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2009,2011 Code Aurora Forum. All rights reserved. +/* Copyright (c) 2009-2012 Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -43,7 +43,6 @@ #include #include #include -#include #include "LocApiAdapter.h" @@ -59,8 +58,7 @@ #include #include #include - -#include "ulp.h" +#include #include "log_util.h" #include "loc_eng_log.h" @@ -68,31 +66,79 @@ #define SUCCESS TRUE #define FAILURE FALSE - static void loc_eng_deferred_action_thread(void* context); static void* loc_eng_create_msg_q(); static void loc_eng_free_msg(void* msg); -struct LocEngContext { - // Data variables used by deferred action thread - const void* deferred_q; - const pthread_t deferred_action_thread; - static LocEngContext* get(gps_create_thread threadCreator); - void drop(); - static pthread_mutex_t lock; - static pthread_cond_t cond; -private: - int counter; - static LocEngContext *me; - LocEngContext(gps_create_thread threadCreator); -}; - pthread_mutex_t LocEngContext::lock = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t LocEngContext::cond = PTHREAD_COND_INITIALIZER; LocEngContext* LocEngContext::me = NULL; +boolean gpsConfigAlreadyRead = false; + +loc_gps_cfg_s_type gps_conf; + +/* Parameter spec table */ +static loc_param_s_type loc_parameter_table[] = +{ + {"INTERMEDIATE_POS", &gps_conf.INTERMEDIATE_POS, NULL, 'n'}, + {"ACCURACY_THRES", &gps_conf.ACCURACY_THRES, NULL, 'n'}, + {"ENABLE_WIPER", &gps_conf.ENABLE_WIPER, NULL, 'n'}, + {"SUPL_VER", &gps_conf.SUPL_VER, NULL, 'n'}, + {"CAPABILITIES", &gps_conf.CAPABILITIES, NULL, 'n'}, + {"GYRO_BIAS_RANDOM_WALK", &gps_conf.GYRO_BIAS_RANDOM_WALK, &gps_conf.GYRO_BIAS_RANDOM_WALK_VALID, 'f'}, + {"ACCEL_RANDOM_WALK_SPECTRAL_DENSITY", &gps_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY, &gps_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY_VALID, 'f'}, + {"ANGLE_RANDOM_WALK_SPECTRAL_DENSITY", &gps_conf.ANGLE_RANDOM_WALK_SPECTRAL_DENSITY, &gps_conf.ANGLE_RANDOM_WALK_SPECTRAL_DENSITY_VALID, 'f'}, + {"RATE_RANDOM_WALK_SPECTRAL_DENSITY", &gps_conf.RATE_RANDOM_WALK_SPECTRAL_DENSITY, &gps_conf.RATE_RANDOM_WALK_SPECTRAL_DENSITY_VALID, 'f'}, + {"VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY", &gps_conf.VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY, &gps_conf.VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY_VALID, 'f'}, + {"SENSOR_ACCEL_BATCHES_PER_SEC", &gps_conf.SENSOR_ACCEL_BATCHES_PER_SEC, NULL, 'n'}, + {"SENSOR_ACCEL_SAMPLES_PER_BATCH", &gps_conf.SENSOR_ACCEL_SAMPLES_PER_BATCH, NULL, 'n'}, + {"SENSOR_GYRO_BATCHES_PER_SEC", &gps_conf.SENSOR_GYRO_BATCHES_PER_SEC, NULL, 'n'}, + {"SENSOR_GYRO_SAMPLES_PER_BATCH", &gps_conf.SENSOR_GYRO_SAMPLES_PER_BATCH, NULL, 'n'}, + {"SENSOR_CONTROL_MODE", &gps_conf.SENSOR_CONTROL_MODE, NULL, 'n'}, + {"SENSOR_USAGE", &gps_conf.SENSOR_USAGE, NULL, 'n'}, + {"QUIPC_ENABLED", &gps_conf.QUIPC_ENABLED, NULL, 'n'}, + {"LPP_PROFILE", &gps_conf.LPP_PROFILE, NULL, 'n'}, +}; + +static void loc_default_parameters(void) +{ + /* defaults */ + gps_conf.INTERMEDIATE_POS = 0; + gps_conf.ACCURACY_THRES = 0; + gps_conf.ENABLE_WIPER = 0; + gps_conf.SUPL_VER = 0x10000; + gps_conf.CAPABILITIES = 0x7; + + gps_conf.GYRO_BIAS_RANDOM_WALK = 0; + gps_conf.SENSOR_ACCEL_BATCHES_PER_SEC = 2; + gps_conf.SENSOR_ACCEL_SAMPLES_PER_BATCH = 5; + gps_conf.SENSOR_GYRO_BATCHES_PER_SEC = 2; + gps_conf.SENSOR_GYRO_SAMPLES_PER_BATCH = 5; + gps_conf.SENSOR_CONTROL_MODE = 0; /* AUTO */ + gps_conf.SENSOR_USAGE = 0; /* Enabled */ + gps_conf.SENSOR_ALGORITHM_CONFIG_MASK = 0; /* INS Disabled = FALSE*/ + + /* Values MUST be set by OEMs in configuration for sensor-assisted + navigation to work. There are NO default values */ + gps_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY = 0; + gps_conf.ANGLE_RANDOM_WALK_SPECTRAL_DENSITY = 0; + gps_conf.RATE_RANDOM_WALK_SPECTRAL_DENSITY = 0; + gps_conf.VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY = 0; + + gps_conf.GYRO_BIAS_RANDOM_WALK_VALID = 0; + gps_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY_VALID = 0; + gps_conf.ANGLE_RANDOM_WALK_SPECTRAL_DENSITY_VALID = 0; + gps_conf.RATE_RANDOM_WALK_SPECTRAL_DENSITY_VALID = 0; + gps_conf.VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY_VALID = 0; + + /* LTE Positioning Profile configuration is disable by default*/ + gps_conf.LPP_PROFILE = 0; +} LocEngContext::LocEngContext(gps_create_thread threadCreator) : deferred_q((const void*)loc_eng_create_msg_q()), + //TODO: should we conditionally create ulp msg q? + ulp_q((const void*)loc_eng_create_msg_q()), deferred_action_thread(threadCreator("loc_eng",loc_eng_deferred_action_thread, this)), counter(0) { @@ -106,11 +152,6 @@ LocEngContext* LocEngContext::get(gps_create_thread threadCreator) pthread_mutex_lock(&lock); // gonna need mutex protection here... if (NULL == me) { - // gps.conf is not part of the context class. But we only want to parse the conf - // file once. This is the only good place to ensure that. - // In fact one day the conf file should go into context as well. - loc_read_gps_conf(); - me = new LocEngContext(threadCreator); } me->counter++; @@ -134,6 +175,7 @@ void LocEngContext::drop() pthread_cond_wait(&cond, &lock); msg_q_destroy((void**)&deferred_q); + msg_q_destroy((void**)&ulp_q); delete me; me = NULL; } @@ -162,13 +204,6 @@ static void loc_eng_handle_engine_down(loc_eng_data_s_type &loc_eng_data) ; static void loc_eng_handle_engine_up(loc_eng_data_s_type &loc_eng_data) ; static char extra_data[100]; - -#ifdef QCOM_FEATURE_ULP -// ULP integration -static const ulpInterface* locEngUlpInf = NULL; -static int loc_eng_ulp_init(void* handle) ; -#endif - /********************************************************************* * Initialization checking macros *********************************************************************/ @@ -221,14 +256,15 @@ SIDE EFFECTS ===========================================================================*/ int loc_eng_init(loc_eng_data_s_type &loc_eng_data, LocCallbacks* callbacks, - LOC_API_ADAPTER_EVENT_MASK_T event) + LOC_API_ADAPTER_EVENT_MASK_T event, + void (*loc_external_msg_sender) (void*, void*)) + { ENTRY_LOG_CALLFLOW(); - if (NULL == callbacks || 0 == event) { LOC_LOGE("loc_eng_init: bad parameters cb %p eMask %d", callbacks, event); EXIT_LOG(%d, 0); - return 0; + return NULL; } STATE_CHECK((NULL == loc_eng_data.context), @@ -258,12 +294,8 @@ int loc_eng_init(loc_eng_data_s_type &loc_eng_data, LocCallbacks* callbacks, // loc_eng_data.fix_session_status -- GPS_STATUS_NONE; // loc_eng_data.mute_session_state -- LOC_MUTE_SESS_NONE; -#ifdef QCOM_FEATURE_ULP - loc_eng_ulp_init(&loc_eng_data); -#endif - LocEng locEngHandle(&loc_eng_data, event, loc_eng_data.acquire_wakelock_cb, - loc_eng_data.release_wakelock_cb, loc_eng_msg_sender, + loc_eng_data.release_wakelock_cb, loc_eng_msg_sender, loc_external_msg_sender, callbacks->location_ext_parser, callbacks->sv_ext_parser); loc_eng_data.client_handle = getLocApiAdapter(locEngHandle); @@ -302,16 +334,35 @@ static int loc_eng_reinit(loc_eng_data_s_type &loc_eng_data) msg_q_snd((void*)((LocEngContext*)(loc_eng_data.context))->deferred_q, supl_msg, loc_eng_free_msg); + loc_eng_msg_lpp_config *lpp_msg(new loc_eng_msg_lpp_config(&loc_eng_data, + gps_conf.LPP_PROFILE)); + msg_q_snd((void*)((LocEngContext*)(loc_eng_data.context))->deferred_q, + lpp_msg, loc_eng_free_msg); + loc_eng_msg_sensor_control_config *sensor_control_config_msg( new loc_eng_msg_sensor_control_config(&loc_eng_data, gps_conf.SENSOR_USAGE)); msg_q_snd((void*)((LocEngContext*)(loc_eng_data.context))->deferred_q, sensor_control_config_msg, loc_eng_free_msg); - /* Make sure this is specified by the user in the gps.conf file */ - if(gps_conf.GYRO_BIAS_RANDOM_WALK_VALID) + /* Make sure at least one of the sensor property is specified by the user in the gps.conf file. */ + if( gps_conf.GYRO_BIAS_RANDOM_WALK_VALID || + gps_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY_VALID || + gps_conf.ANGLE_RANDOM_WALK_SPECTRAL_DENSITY_VALID || + gps_conf.RATE_RANDOM_WALK_SPECTRAL_DENSITY_VALID || + gps_conf.VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY_VALID ) { loc_eng_msg_sensor_properties *sensor_properties_msg( - new loc_eng_msg_sensor_properties(&loc_eng_data, gps_conf.GYRO_BIAS_RANDOM_WALK)); + new loc_eng_msg_sensor_properties(&loc_eng_data, + gps_conf.GYRO_BIAS_RANDOM_WALK_VALID, + gps_conf.GYRO_BIAS_RANDOM_WALK, + gps_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY_VALID, + gps_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY, + gps_conf.ANGLE_RANDOM_WALK_SPECTRAL_DENSITY_VALID, + gps_conf.ANGLE_RANDOM_WALK_SPECTRAL_DENSITY, + gps_conf.RATE_RANDOM_WALK_SPECTRAL_DENSITY_VALID, + gps_conf.RATE_RANDOM_WALK_SPECTRAL_DENSITY, + gps_conf.VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY_VALID, + gps_conf.VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY)); msg_q_snd((void*)((LocEngContext*)(loc_eng_data.context))->deferred_q, sensor_properties_msg, loc_eng_free_msg); } @@ -322,7 +373,8 @@ static int loc_eng_reinit(loc_eng_data_s_type &loc_eng_data) gps_conf.SENSOR_ACCEL_SAMPLES_PER_BATCH, gps_conf.SENSOR_ACCEL_BATCHES_PER_SEC, gps_conf.SENSOR_GYRO_SAMPLES_PER_BATCH, - gps_conf.SENSOR_GYRO_BATCHES_PER_SEC)); + gps_conf.SENSOR_GYRO_BATCHES_PER_SEC, + gps_conf.SENSOR_ALGORITHM_CONFIG_MASK)); msg_q_snd((void*)((LocEngContext*)(loc_eng_data.context))->deferred_q, sensor_perf_control_conf_msg, loc_eng_free_msg); } @@ -355,7 +407,7 @@ void loc_eng_cleanup(loc_eng_data_s_type &loc_eng_data) // XTRA has no state, so we are fine with it. // we need to check and clear NI - +#if 0 // we need to check and clear ATL if (NULL != loc_eng_data.agnss_nif) { delete loc_eng_data.agnss_nif; @@ -365,8 +417,8 @@ void loc_eng_cleanup(loc_eng_data_s_type &loc_eng_data) delete loc_eng_data.internet_nif; loc_eng_data.internet_nif = NULL; } - - if (loc_eng_data.navigating) +#endif + if (loc_eng_data.client_handle->isInSession()) { LOC_LOGD("loc_eng_cleanup: fix not stopped. stop it now."); loc_eng_stop(loc_eng_data); @@ -380,8 +432,8 @@ void loc_eng_cleanup(loc_eng_data_s_type &loc_eng_data) // De-initialize ulp if (locEngUlpInf != NULL) { - locEngUlpInf->destroy (); locEngUlpInf = NULL; + msg_q_destroy( &loc_eng_data.ulp_q); } if (loc_eng_data.client_handle != NULL) @@ -430,10 +482,18 @@ int loc_eng_start(loc_eng_data_s_type &loc_eng_data) ENTRY_LOG_CALLFLOW(); INIT_CHECK(loc_eng_data.context, return -1); - loc_eng_msg *msg(new loc_eng_msg(&loc_eng_data, LOC_ENG_MSG_START_FIX)); - msg_q_snd((void*)((LocEngContext*)(loc_eng_data.context))->deferred_q, - msg, loc_eng_free_msg); - + if((loc_eng_data.ulp_initialized == true) && (gps_conf.CAPABILITIES & ULP_CAPABILITY)) + { + //Pass the start messgage to ULP if present & activated + loc_eng_msg *msg(new loc_eng_msg(&loc_eng_data, ULP_MSG_START_FIX)); + msg_q_snd( (void*)((LocEngContext*)(loc_eng_data.context))->ulp_q, + msg, loc_eng_free_msg); + }else + { + loc_eng_msg *msg(new loc_eng_msg(&loc_eng_data, LOC_ENG_MSG_START_FIX)); + msg_q_snd((void*)((LocEngContext*)(loc_eng_data.context))->deferred_q, + msg, loc_eng_free_msg); + } EXIT_LOG(%d, 0); return 0; } @@ -443,20 +503,13 @@ static int loc_eng_start_handler(loc_eng_data_s_type &loc_eng_data) ENTRY_LOG(); int ret_val = LOC_API_ADAPTER_ERR_SUCCESS; - if (!loc_eng_data.navigating) { -#ifdef QCOM_FEATURE_ULP - if (NULL == locEngUlpInf || - locEngUlpInf->start_fix () == 1) { - ret_val = loc_eng_data.client_handle->startFix(); - } -#else + if (!loc_eng_data.client_handle->isInSession()) { ret_val = loc_eng_data.client_handle->startFix(); -#endif if (ret_val == LOC_API_ADAPTER_ERR_SUCCESS || ret_val == LOC_API_ADAPTER_ERR_ENGINE_DOWN) { - loc_eng_data.navigating = TRUE; + loc_eng_data.client_handle->setInSession(TRUE); } } @@ -465,7 +518,7 @@ static int loc_eng_start_handler(loc_eng_data_s_type &loc_eng_data) } /*=========================================================================== -FUNCTION loc_eng_stop +FUNCTION loc_eng_stop_wrapper DESCRIPTION Stops the tracking session @@ -485,9 +538,18 @@ int loc_eng_stop(loc_eng_data_s_type &loc_eng_data) ENTRY_LOG_CALLFLOW(); INIT_CHECK(loc_eng_data.context, return -1); - loc_eng_msg *msg(new loc_eng_msg(&loc_eng_data, LOC_ENG_MSG_STOP_FIX)); - msg_q_snd((void*)((LocEngContext*)(loc_eng_data.context))->deferred_q, - msg, loc_eng_free_msg); + if((loc_eng_data.ulp_initialized == true) && (gps_conf.CAPABILITIES & ULP_CAPABILITY)) + { + //Pass the start messgage to ULP if present & activated + loc_eng_msg *msg(new loc_eng_msg(&loc_eng_data, ULP_MSG_STOP_FIX)); + msg_q_snd( (void*)((LocEngContext*)(loc_eng_data.context))->ulp_q, + msg, loc_eng_free_msg); + }else + { + loc_eng_msg *msg(new loc_eng_msg(&loc_eng_data, LOC_ENG_MSG_STOP_FIX)); + msg_q_snd((void*)((LocEngContext*)(loc_eng_data.context))->deferred_q, + msg, loc_eng_free_msg); + } EXIT_LOG(%d, 0); return 0; @@ -498,14 +560,7 @@ static int loc_eng_stop_handler(loc_eng_data_s_type &loc_eng_data) ENTRY_LOG(); int ret_val = LOC_API_ADAPTER_ERR_SUCCESS; - if (loc_eng_data.navigating) { -#ifdef QCOM_FEATURE_ULP - // Stops the ULP - if (locEngUlpInf != NULL) - { - locEngUlpInf->stop_fix (); - } -#endif + if (loc_eng_data.client_handle->isInSession()) { ret_val = loc_eng_data.client_handle->stopFix(); if (ret_val == LOC_API_ADAPTER_ERR_SUCCESS && @@ -514,7 +569,7 @@ static int loc_eng_stop_handler(loc_eng_data_s_type &loc_eng_data) loc_inform_gps_status(loc_eng_data, GPS_STATUS_SESSION_END); } - loc_eng_data.navigating = FALSE; + loc_eng_data.client_handle->setInSession(FALSE); } EXIT_LOG(%d, ret_val); @@ -561,18 +616,12 @@ SIDE EFFECTS ===========================================================================*/ int loc_eng_set_position_mode(loc_eng_data_s_type &loc_eng_data, - LocPositionMode mode, - GpsPositionRecurrence recurrence, - uint32_t min_interval, - uint32_t preferred_accuracy, - uint32_t preferred_time) + LocPosMode ¶ms) { ENTRY_LOG_CALLFLOW(); INIT_CHECK(loc_eng_data.context, return -1); loc_eng_msg_position_mode *msg( - new loc_eng_msg_position_mode(&loc_eng_data, mode, - recurrence, min_interval, - preferred_accuracy, preferred_time)); + new loc_eng_msg_position_mode(&loc_eng_data, params)); msg_q_snd((void*)((LocEngContext*)(loc_eng_data.context))->deferred_q, msg, loc_eng_free_msg); @@ -683,6 +732,7 @@ void loc_eng_delete_aiding_data(loc_eng_data_s_type &loc_eng_data, GpsAidingData } /*=========================================================================== + FUNCTION loc_inform_gps_state DESCRIPTION @@ -760,7 +810,7 @@ static void loc_eng_agps_reinit(loc_eng_data_s_type &loc_eng_data) loc_eng_data.c2k_host_buf, loc_eng_data.c2k_port_buf); } - EXIT_LOG(%p, VOID_RET); + EXIT_LOG(%s, VOID_RET); } /*=========================================================================== FUNCTION loc_eng_agps_init @@ -788,20 +838,21 @@ void loc_eng_agps_init(loc_eng_data_s_type &loc_eng_data, AGpsCallbacks* callbac loc_eng_data.agps_status_cb = callbacks->status_cb; loc_eng_data.agnss_nif = new AgpsStateMachine(loc_eng_data.agps_status_cb, - AGPS_TYPE_SUPL); -#ifdef QCOM_FEATURE_IPV6 + AGPS_TYPE_SUPL, + false); loc_eng_data.internet_nif = new AgpsStateMachine(loc_eng_data.agps_status_cb, - AGPS_TYPE_WWAN_ANY); -#else - loc_eng_data.internet_nif = new AgpsStateMachine(loc_eng_data.agps_status_cb, - AGPS_TYPE_SUPL); -#endif + AGPS_TYPE_WWAN_ANY, + false); + loc_eng_data.wifi_nif = new AgpsStateMachine(loc_eng_data.agps_status_cb, + AGPS_TYPE_WIFI, + true); #ifdef FEATURE_GNSS_BIT_API { char baseband[PROPERTY_VALUE_MAX]; property_get("ro.baseband", baseband, "msm"); - if ((strcmp(baseband,"svlte2a") == 0)) + if ((strcmp(baseband,"svlte2a") == 0) || + (strcmp(baseband,"msm") == 0)) { loc_eng_dmn_conn_loc_api_server_launch(callbacks->create_thread_cb, NULL, NULL, &loc_eng_data); @@ -810,7 +861,7 @@ void loc_eng_agps_init(loc_eng_data_s_type &loc_eng_data, AGpsCallbacks* callbac #endif /* FEATURE_GNSS_BIT_API */ loc_eng_agps_reinit(loc_eng_data); - EXIT_LOG(%p, VOID_RET); + EXIT_LOG(%s, VOID_RET); } /*=========================================================================== @@ -830,7 +881,6 @@ SIDE EFFECTS N/A ===========================================================================*/ -#ifdef QCOM_FEATURE_IPV6 int loc_eng_agps_open(loc_eng_data_s_type &loc_eng_data, AGpsType agpsType, const char* apn, AGpsBearerType bearerType) { @@ -856,33 +906,6 @@ int loc_eng_agps_open(loc_eng_data_s_type &loc_eng_data, AGpsType agpsType, EXIT_LOG(%d, 0); return 0; } -#else -int loc_eng_agps_open(loc_eng_data_s_type &loc_eng_data, - const char* apn) -{ - ENTRY_LOG_CALLFLOW(); - INIT_CHECK(loc_eng_data.context && loc_eng_data.agps_status_cb, - return -1); - - if (apn == NULL) - { - LOC_LOGE("APN Name NULL\n"); - return 0; - } - - LOC_LOGD("loc_eng_agps_open APN name = [%s]", apn); - - int apn_len = smaller_of(strlen (apn), MAX_APN_LEN); - loc_eng_msg_atl_open_success *msg( - new loc_eng_msg_atl_open_success(&loc_eng_data, apn, - apn_len)); - msg_q_snd((void*)((LocEngContext*)(loc_eng_data.context))->deferred_q, - msg, loc_eng_free_msg); - - EXIT_LOG(%d, 0); - return 0; -} -#endif /*=========================================================================== FUNCTION loc_eng_agps_closed @@ -901,7 +924,6 @@ SIDE EFFECTS N/A ===========================================================================*/ -#ifdef QCOM_FEATURE_IPV6 int loc_eng_agps_closed(loc_eng_data_s_type &loc_eng_data, AGpsType agpsType) { ENTRY_LOG_CALLFLOW(); @@ -915,21 +937,6 @@ int loc_eng_agps_closed(loc_eng_data_s_type &loc_eng_data, AGpsType agpsType) EXIT_LOG(%d, 0); return 0; } -#else -int loc_eng_agps_closed(loc_eng_data_s_type &loc_eng_data) -{ - ENTRY_LOG_CALLFLOW(); - INIT_CHECK(loc_eng_data.context && loc_eng_data.agps_status_cb, - return -1); - - loc_eng_msg_atl_closed *msg(new loc_eng_msg_atl_closed(&loc_eng_data)); - msg_q_snd((void*)((LocEngContext*)(loc_eng_data.context))->deferred_q, - msg, loc_eng_free_msg); - - EXIT_LOG(%d, 0); - return 0; -} -#endif /*=========================================================================== FUNCTION loc_eng_agps_open_failed @@ -948,7 +955,6 @@ SIDE EFFECTS N/A ===========================================================================*/ -#ifdef QCOM_FEATURE_IPV6 int loc_eng_agps_open_failed(loc_eng_data_s_type &loc_eng_data, AGpsType agpsType) { ENTRY_LOG_CALLFLOW(); @@ -962,21 +968,6 @@ int loc_eng_agps_open_failed(loc_eng_data_s_type &loc_eng_data, AGpsType agpsTyp EXIT_LOG(%d, 0); return 0; } -#else -int loc_eng_agps_open_failed(loc_eng_data_s_type &loc_eng_data) -{ - ENTRY_LOG_CALLFLOW(); - INIT_CHECK(loc_eng_data.context && loc_eng_data.agps_status_cb, - return -1); - - loc_eng_msg_atl_open_failed *msg(new loc_eng_msg_atl_open_failed(&loc_eng_data)); - msg_q_snd((void*)((LocEngContext*)(loc_eng_data.context))->deferred_q, - msg, loc_eng_free_msg); - - EXIT_LOG(%d, 0); - return 0; -} -#endif /*=========================================================================== @@ -1205,9 +1196,10 @@ static void loc_eng_report_status (loc_eng_data_s_type &loc_eng_data, GpsStatusV } // Session End is not reported during Android navigating state + boolean navigating = loc_eng_data.client_handle->isInSession(); if (status != GPS_STATUS_NONE && - !(status == GPS_STATUS_SESSION_END && loc_eng_data.navigating) && - !(status == GPS_STATUS_SESSION_BEGIN && !loc_eng_data.navigating)) + !(status == GPS_STATUS_SESSION_END && navigating) && + !(status == GPS_STATUS_SESSION_BEGIN && !navigating)) { if (loc_eng_data.mute_session_state != LOC_MUTE_SESS_IN_SESSION) { @@ -1275,15 +1267,10 @@ void loc_eng_handle_engine_up(loc_eng_data_s_type &loc_eng_data) loc_eng_report_status(loc_eng_data, GPS_STATUS_ENGINE_ON); // modem is back up. If we crashed in the middle of navigating, we restart. - if (loc_eng_data.navigating) { - loc_eng_data.client_handle->setPositionMode( - loc_eng_data.position_mode.pMode, - loc_eng_data.position_mode.pRecurrence, - loc_eng_data.position_mode.minInterval, - loc_eng_data.position_mode.preferredAccuracy, - loc_eng_data.position_mode.preferredTime); - // not mutex protected, assuming fw won't call start twice without a - // stop call in between. + if (loc_eng_data.client_handle->isInSession()) { + // This sets the copy in adapter to modem + loc_eng_data.client_handle->setPositionMode(NULL); + loc_eng_data.client_handle->setInSession(false); loc_eng_start_handler(loc_eng_data); } EXIT_LOG(%s, VOID_RET); @@ -1380,10 +1367,7 @@ static void loc_eng_deferred_action_thread(void* arg) case LOC_ENG_MSG_SET_POSITION_MODE: { loc_eng_msg_position_mode *pmMsg = (loc_eng_msg_position_mode*)msg; - loc_eng_data_p->client_handle->setPositionMode(pmMsg->pMode, pmMsg->pRecurrence, - pmMsg->minInterval,pmMsg->preferredAccuracy, - pmMsg->preferredTime); - memcpy((void*)&loc_eng_data_p->position_mode, (void*)pmMsg, sizeof(*pmMsg)); + loc_eng_data_p->client_handle->setPositionMode(&(pmMsg->pMode)); } break; @@ -1426,6 +1410,13 @@ static void loc_eng_deferred_action_thread(void* arg) } break; + case LOC_ENG_MSG_LPP_CONFIG: + { + loc_eng_msg_lpp_config *svMsg = (loc_eng_msg_lpp_config*)msg; + loc_eng_data_p->client_handle->setLPPConfig(svMsg->lpp_config); + } + break; + case LOC_ENG_MSG_SET_SENSOR_CONTROL_CONFIG: { loc_eng_msg_sensor_control_config *sccMsg = (loc_eng_msg_sensor_control_config*)msg; @@ -1436,7 +1427,16 @@ static void loc_eng_deferred_action_thread(void* arg) case LOC_ENG_MSG_SET_SENSOR_PROPERTIES: { loc_eng_msg_sensor_properties *spMsg = (loc_eng_msg_sensor_properties*)msg; - loc_eng_data_p->client_handle->setSensorProperties(spMsg->gyroBiasVarianceRandomWalk); + loc_eng_data_p->client_handle->setSensorProperties(spMsg->gyroBiasVarianceRandomWalk_valid, + spMsg->gyroBiasVarianceRandomWalk, + spMsg->accelRandomWalk_valid, + spMsg->accelRandomWalk, + spMsg->angleRandomWalk_valid, + spMsg->angleRandomWalk, + spMsg->rateRandomWalk_valid, + spMsg->rateRandomWalk, + spMsg->velocityRandomWalk_valid, + spMsg->velocityRandomWalk); } break; @@ -1444,18 +1444,27 @@ static void loc_eng_deferred_action_thread(void* arg) { loc_eng_msg_sensor_perf_control_config *spccMsg = (loc_eng_msg_sensor_perf_control_config*)msg; loc_eng_data_p->client_handle->setSensorPerfControlConfig(spccMsg->controlMode, spccMsg->accelSamplesPerBatch, spccMsg->accelBatchesPerSec, - spccMsg->gyroSamplesPerBatch, spccMsg->gyroBatchesPerSec); + spccMsg->gyroSamplesPerBatch, spccMsg->gyroBatchesPerSec, spccMsg->algorithmConfig); + } + break; + + case LOC_ENG_MSG_EXT_POWER_CONFIG: + { + loc_eng_msg_ext_power_config *pwrMsg = (loc_eng_msg_ext_power_config*)msg; + loc_eng_data_p->client_handle->setExtPowerConfig(pwrMsg->isBatteryCharging); } break; case LOC_ENG_MSG_REPORT_POSITION: if (loc_eng_data_p->mute_session_state != LOC_MUTE_SESS_IN_SESSION) { + bool reported = false; loc_eng_msg_report_position *rpMsg = (loc_eng_msg_report_position*)msg; if (loc_eng_data_p->location_cb != NULL) { if (LOC_SESS_FAILURE == rpMsg->status) { // in case we want to handle the failure case loc_eng_data_p->location_cb(NULL, NULL); + reported = true; } // what's in the else if is... (line by line) // 1. this is a good fix; or @@ -1472,8 +1481,23 @@ static void loc_eng_deferred_action_thread(void* arg) (rpMsg->location.accuracy > gps_conf.ACCURACY_THRES)))) { loc_eng_data_p->location_cb((GpsLocation*)&(rpMsg->location), (void*)rpMsg->locationExt); + reported = true; } } + + // if we have reported this fix + if (reported && + // and if this is a singleshot + GPS_POSITION_RECURRENCE_SINGLE == + loc_eng_data_p->client_handle->getPositionMode().recurrence) { + if (LOC_SESS_INTERMEDIATE == rpMsg->status) { + // modem could be still working for a final fix, + // although we no longer need it. So stopFix(). + loc_eng_data_p->client_handle->stopFix(); + } + // turn off the session flag. + loc_eng_data_p->client_handle->setInSession(false); + } } break; @@ -1500,15 +1524,22 @@ static void loc_eng_deferred_action_thread(void* arg) gettimeofday(&tv, (struct timezone *) NULL); int64_t now = tv.tv_sec * 1000LL + tv.tv_usec / 1000; CALLBACK_LOG_CALLFLOW("nmea_cb", %p, nmMsg->nmea); + loc_eng_data_p->nmea_cb(now, nmMsg->nmea, nmMsg->length); } break; case LOC_ENG_MSG_REQUEST_BIT: { + AgpsStateMachine* stateMachine; loc_eng_msg_request_bit* brqMsg = (loc_eng_msg_request_bit*)msg; - AgpsStateMachine* stateMachine = (brqMsg->isSupl) ? - loc_eng_data_p->agnss_nif : - loc_eng_data_p->internet_nif; + if (brqMsg->ifType == LOC_ENG_IF_REQUEST_TYPE_SUPL) { + stateMachine = loc_eng_data_p->agnss_nif; + } else if (brqMsg->ifType == LOC_ENG_IF_REQUEST_TYPE_ANY) { + stateMachine = loc_eng_data_p->internet_nif; + } else { + LOC_LOGD("%s]%d: unknown I/F request type = 0x%x\n", __func__, __LINE__, brqMsg->ifType); + break; + } BITSubscriber subscriber(stateMachine, brqMsg->ipv4Addr, brqMsg->ipv6Addr); stateMachine->subscribeRsrc((Subscriber*)&subscriber); @@ -1517,10 +1548,16 @@ static void loc_eng_deferred_action_thread(void* arg) case LOC_ENG_MSG_RELEASE_BIT: { + AgpsStateMachine* stateMachine; loc_eng_msg_release_bit* brlMsg = (loc_eng_msg_release_bit*)msg; - AgpsStateMachine* stateMachine = (brlMsg->isSupl) ? - loc_eng_data_p->agnss_nif : - loc_eng_data_p->internet_nif; + if (brlMsg->ifType == LOC_ENG_IF_REQUEST_TYPE_SUPL) { + stateMachine = loc_eng_data_p->agnss_nif; + } else if (brlMsg->ifType == LOC_ENG_IF_REQUEST_TYPE_ANY) { + stateMachine = loc_eng_data_p->internet_nif; + } else { + LOC_LOGD("%s]%d: unknown I/F request type = 0x%x\n", __func__, __LINE__, brlMsg->ifType); + break; + } BITSubscriber subscriber(stateMachine, brlMsg->ipv4Addr, brlMsg->ipv6Addr); stateMachine->unsubscribeRsrc((Subscriber*)&subscriber); @@ -1530,12 +1567,15 @@ static void loc_eng_deferred_action_thread(void* arg) case LOC_ENG_MSG_REQUEST_ATL: { loc_eng_msg_request_atl* arqMsg = (loc_eng_msg_request_atl*)msg; - AgpsStateMachine* stateMachine = (AGPS_TYPE_SUPL == arqMsg->type) ? + boolean backwardCompatibleMode = AGPS_TYPE_INVALID == arqMsg->type; + AgpsStateMachine* stateMachine = (AGPS_TYPE_SUPL == arqMsg->type || + backwardCompatibleMode) ? loc_eng_data_p->agnss_nif : loc_eng_data_p->internet_nif; ATLSubscriber subscriber(arqMsg->handle, stateMachine, - loc_eng_data_p->client_handle); + loc_eng_data_p->client_handle, + backwardCompatibleMode); stateMachine->subscribeRsrc((Subscriber*)&subscriber); } @@ -1546,18 +1586,44 @@ static void loc_eng_deferred_action_thread(void* arg) loc_eng_msg_release_atl* arlMsg = (loc_eng_msg_release_atl*)msg; ATLSubscriber s1(arlMsg->handle, loc_eng_data_p->agnss_nif, - loc_eng_data_p->client_handle); + loc_eng_data_p->client_handle, + false); // attempt to unsubscribe from agnss_nif first if (! loc_eng_data_p->agnss_nif->unsubscribeRsrc((Subscriber*)&s1)) { ATLSubscriber s2(arlMsg->handle, loc_eng_data_p->internet_nif, - loc_eng_data_p->client_handle); + loc_eng_data_p->client_handle, + false); // if unsuccessful, try internet_nif loc_eng_data_p->internet_nif->unsubscribeRsrc((Subscriber*)&s2); } } break; + case LOC_ENG_MSG_REQUEST_WIFI: + { + loc_eng_msg_request_wifi *wrqMsg = (loc_eng_msg_request_wifi *)msg; + if (wrqMsg->senderId == LOC_ENG_IF_REQUEST_SENDER_ID_QUIPC || + wrqMsg->senderId == LOC_ENG_IF_REQUEST_SENDER_ID_MSAPM) { + AgpsStateMachine* stateMachine = loc_eng_data_p->wifi_nif; + WIFISubscriber subscriber(stateMachine, wrqMsg->ssid, wrqMsg->password, wrqMsg->senderId); + stateMachine->subscribeRsrc((Subscriber*)&subscriber); + } else { + LOC_LOGE("%s]%d ERROR: unknown sender ID", __func__, __LINE__); + break; + } + } + break; + + case LOC_ENG_MSG_RELEASE_WIFI: + { + AgpsStateMachine* stateMachine = loc_eng_data_p->wifi_nif; + loc_eng_msg_release_wifi* wrlMsg = (loc_eng_msg_release_wifi*)msg; + WIFISubscriber subscriber(stateMachine, wrlMsg->ssid, wrlMsg->password, wrlMsg->senderId); + stateMachine->unsubscribeRsrc((Subscriber*)&subscriber); + } + break; + case LOC_ENG_MSG_REQUEST_XTRA_DATA: if (loc_eng_data_p->xtra_module_data.download_request_cb != NULL) { @@ -1593,15 +1659,22 @@ static void loc_eng_deferred_action_thread(void* arg) case LOC_ENG_MSG_ATL_OPEN_SUCCESS: { loc_eng_msg_atl_open_success *aosMsg = (loc_eng_msg_atl_open_success*)msg; -#ifdef QCOM_FEATURE_IPV6 - AgpsStateMachine* stateMachine = (AGPS_TYPE_SUPL == aosMsg->agpsType) ? - loc_eng_data_p->agnss_nif : - loc_eng_data_p->internet_nif; + AgpsStateMachine* stateMachine; + switch (aosMsg->agpsType) { + case AGPS_TYPE_WIFI: { + stateMachine = loc_eng_data_p->wifi_nif; + break; + } + case AGPS_TYPE_SUPL: { + stateMachine = loc_eng_data_p->agnss_nif; + break; + } + default: { + stateMachine = loc_eng_data_p->internet_nif; + } + } stateMachine->setBearer(aosMsg->bearerType); -#else - AgpsStateMachine* stateMachine = loc_eng_data_p->agnss_nif; -#endif stateMachine->setAPN(aosMsg->apn, aosMsg->length); stateMachine->onRsrcEvent(RSRC_GRANTED); } @@ -1610,13 +1683,20 @@ static void loc_eng_deferred_action_thread(void* arg) case LOC_ENG_MSG_ATL_CLOSED: { loc_eng_msg_atl_closed *acsMsg = (loc_eng_msg_atl_closed*)msg; -#ifdef QCOM_FEATURE_IPV6 - AgpsStateMachine* stateMachine = (AGPS_TYPE_SUPL == acsMsg->agpsType) ? - loc_eng_data_p->agnss_nif : - loc_eng_data_p->internet_nif; -#else - AgpsStateMachine* stateMachine = loc_eng_data_p->agnss_nif; -#endif + AgpsStateMachine* stateMachine; + switch (acsMsg->agpsType) { + case AGPS_TYPE_WIFI: { + stateMachine = loc_eng_data_p->wifi_nif; + break; + } + case AGPS_TYPE_SUPL: { + stateMachine = loc_eng_data_p->agnss_nif; + break; + } + default: { + stateMachine = loc_eng_data_p->internet_nif; + } + } stateMachine->onRsrcEvent(RSRC_RELEASED); } @@ -1625,13 +1705,20 @@ static void loc_eng_deferred_action_thread(void* arg) case LOC_ENG_MSG_ATL_OPEN_FAILED: { loc_eng_msg_atl_open_failed *aofMsg = (loc_eng_msg_atl_open_failed*)msg; -#ifdef QCOM_FEATURE_IPV6 - AgpsStateMachine* stateMachine = (AGPS_TYPE_SUPL == aofMsg->agpsType) ? - loc_eng_data_p->agnss_nif : - loc_eng_data_p->internet_nif; -#else - AgpsStateMachine* stateMachine = loc_eng_data_p->agnss_nif; -#endif + AgpsStateMachine* stateMachine; + switch (aofMsg->agpsType) { + case AGPS_TYPE_WIFI: { + stateMachine = loc_eng_data_p->wifi_nif; + break; + } + case AGPS_TYPE_SUPL: { + stateMachine = loc_eng_data_p->agnss_nif; + break; + } + default: { + stateMachine = loc_eng_data_p->internet_nif; + } + } stateMachine->onRsrcEvent(RSRC_DENIED); } @@ -1645,6 +1732,36 @@ static void loc_eng_deferred_action_thread(void* arg) loc_eng_handle_engine_up(*loc_eng_data_p); break; + case LOC_ENG_MSG_REQUEST_NETWORK_POSIITON: + { + loc_eng_msg_request_network_position *nlprequestmsg = (loc_eng_msg_request_network_position*)msg; + //loc_eng_handle_request_network_position(nlprequestmsg ); + LOC_LOGD("Received n/w position request from ULP.Request type %d Periodicity: %d\n", + nlprequestmsg->networkPosRequest.request_type, + nlprequestmsg->networkPosRequest.interval_ms); + if(loc_eng_data_p->ulp_network_callback != NULL) + { + loc_eng_data_p->ulp_network_callback((UlpNetworkRequestPos*)&(nlprequestmsg->networkPosRequest)); + } + else + LOC_LOGE("Ulp Network call back not initialized"); + } + break; + + case LOC_ENG_MSG_REQUEST_PHONE_CONTEXT: + { + loc_eng_msg_request_phone_context *contextReqMsg = (loc_eng_msg_request_phone_context*)msg; + LOC_LOGD("Received phone context request from ULP.context_type 0x%x,request_type 0x%x ", + contextReqMsg->contextRequest.context_type,contextReqMsg->contextRequest.request_type) + if(loc_eng_data_p->ulp_phone_context_req_cb != NULL) + { + loc_eng_data_p->ulp_phone_context_req_cb((UlpPhoneContextRequest*)&(contextReqMsg->contextRequest)); + } + else + LOC_LOGE("Ulp Phone context request call back not initialized"); + } + break; + default: LOC_LOGE("unsupported msgid = %d\n", msg->msgid); break; @@ -1675,52 +1792,6 @@ static void loc_eng_deferred_action_thread(void* arg) EXIT_LOG(%s, VOID_RET); } -/*=========================================================================== -FUNCTION loc_eng_report_position_ulp - -DESCRIPTION - Report a ULP position - p_ulp_pos_absolute, ULP position in absolute coordinates - -DEPENDENCIES - None - -RETURN VALUE - 0: SUCCESS - others: error - -SIDE EFFECTS - N/A - -===========================================================================*/ -static int loc_eng_report_position_ulp (void* handle, - const GpsLocation* location_report_ptr, - unsigned int ext_data_length, - unsigned char* ext_data) -{ - ENTRY_LOG(); - loc_eng_data_s_type* loc_eng_data_p = (loc_eng_data_s_type*)handle; - - INIT_CHECK(loc_eng_data_p->context && loc_eng_data_p->client_handle, - return -1); - - if (ext_data_length > sizeof (extra_data)) - { - ext_data_length = sizeof (extra_data); - } - - memcpy(extra_data, - ext_data, - ext_data_length); - - loc_eng_data_p->client_handle->reportPosition((GpsLocation&)*location_report_ptr, - NULL, LOC_SESS_SUCCESS); - - EXIT_LOG(%d, 0); - return 0; -} - -#ifdef QCOM_FEATURE_ULP /*=========================================================================== FUNCTION loc_eng_ulp_init @@ -1739,41 +1810,17 @@ SIDE EFFECTS N/A ===========================================================================*/ -static int loc_eng_ulp_init(void* owner) +int loc_eng_ulp_init(loc_eng_data_s_type &loc_eng_data, const ulpInterface * loc_eng_ulpInf) { ENTRY_LOG(); - int ret_val; - void *handle; - const char *error; - get_ulp_interface* get_ulp_inf; + int ret_val=-1; - if (!(gps_conf.CAPABILITIES & ULP_CAPABILITY)) { - LOC_LOGD ("%s, ULP is not supported\n", __func__); - ret_val = -1; - goto exit; - } - - handle = dlopen ("libulp.so", RTLD_NOW); - if (!handle) + if(loc_eng_ulpInf != NULL) { - LOC_LOGE ("%s, dlopen for libulp.so failed\n", __func__); - ret_val = -1; - goto exit; + // Initialize the ULP interface + ((ulpInterface *)loc_eng_ulpInf)->init(loc_eng_data); + loc_eng_data.ulp_initialized = TRUE; } - dlerror(); /* Clear any existing error */ - - get_ulp_inf = (get_ulp_interface*) dlsym(handle, "ulp_get_interface"); - if ((error = dlerror()) != NULL) { - LOC_LOGE ("%s, dlsym for ulpInterface failed, error = %s\n", __func__, error); - ret_val = -1; - goto exit; - } - - locEngUlpInf = get_ulp_inf(); - - // Initialize the ULP interface - locEngUlpInf->init (owner, loc_eng_report_position_ulp); - ret_val = 0; exit: EXIT_LOG(%d, ret_val); @@ -1830,9 +1877,193 @@ int loc_eng_update_criteria(loc_eng_data_s_type &loc_eng_data, ENTRY_LOG_CALLFLOW(); INIT_CHECK(loc_eng_data.context, return -1); int ret_val; - ret_val = 0; + + if((loc_eng_data.ulp_initialized == true) && (gps_conf.CAPABILITIES & ULP_CAPABILITY)) + { + LOC_LOGD("SJ:loc_eng_update_criteria: valid 0x%x action:%d, minTime:%ld, minDistance:%f, singleShot:%d, horizontalAccuracy:%d, powerRequirement:%d \n", + criteria.valid_mask, criteria.action, criteria.min_interval, criteria.min_distance, criteria.recurrence_type, criteria.preferred_horizontal_accuracy, + criteria.preferred_power_consumption ); + ulp_msg_update_criteria *msg( + new ulp_msg_update_criteria(&loc_eng_data,criteria)); + msg_q_snd( (void*)((LocEngContext*)(loc_eng_data.context))->ulp_q + , msg, loc_eng_free_msg); + ret_val = 0; + }else + { + ret_val = -1; + } + EXIT_LOG(%d, ret_val); + return ret_val; +} + +/*=========================================================================== +FUNCTION loc_eng_ulp_phone_context_settings_update + +DESCRIPTION + This is used to inform the ULP module of phone settings changes carried out + by the users +DEPENDENCIES + N/A + +RETURN VALUE + 0: success + +SIDE EFFECTS + N/A + +===========================================================================*/ + +int loc_eng_ulp_phone_context_settings_update(loc_eng_data_s_type &loc_eng_data, + UlpPhoneContextSettings *settings) +{ + ENTRY_LOG(); + int ret_val = -1; + + LOC_LOGD("loc_eng_ulp_phone_context_settings: context_type - 0x%x is_agps_enabled - %d " + "is_battery_charging %d ,is_gps_enabled %d, is_network_position_available %d," + "is_wifi_setting_enabled %d, is_agps_setting_enabled %d, is_enh_location_services_enabled %d\n", + settings->context_type ,settings->is_agps_enabled,settings->is_battery_charging, + settings->is_gps_enabled, settings->is_network_position_available, + settings->is_wifi_setting_enabled, settings->is_agps_enabled, + settings->is_enh_location_services_enabled ); + + if((loc_eng_data.ulp_initialized == true) && (gps_conf.CAPABILITIES & ULP_CAPABILITY)) + { + ulp_msg_inject_phone_context_settings *msg + (new ulp_msg_inject_phone_context_settings(&loc_eng_data, *settings)); + msg_q_snd( (void*)((LocEngContext*)(loc_eng_data.context))->ulp_q, msg, loc_eng_free_msg); + ret_val = 0; + } + + // Send battery information to modem for processing. + if(settings->context_type & ULP_PHONE_CONTEXT_BATTERY_CHARGING_STATE) + { + loc_eng_msg_ext_power_config *msg(new loc_eng_msg_ext_power_config(&loc_eng_data, settings->is_battery_charging)); + msg_q_snd( (void*)((LocEngContext*)(loc_eng_data.context))->deferred_q, msg, loc_eng_free_msg); + } EXIT_LOG(%d, ret_val); return ret_val; } -#endif +/*=========================================================================== +FUNCTION loc_eng_ulp_network_init + +DESCRIPTION + Initialize the ULP network interface. + +DEPENDENCIES + NONE + +RETURN VALUE + 0 + +SIDE EFFECTS + N/A + +===========================================================================*/ +int loc_eng_ulp_phone_context_init(loc_eng_data_s_type &loc_eng_data,UlpPhoneContextCallbacks *callback) +{ + ENTRY_LOG(); + loc_eng_data.ulp_phone_context_req_cb = callback->ulp_request_phone_context_cb ; + int ret_val =0; + EXIT_LOG(%d, ret_val); + return ret_val; +} + +/*=========================================================================== +FUNCTION loc_eng_ulp_network_init + +DESCRIPTION + Initialize the ULP network interface. + +DEPENDENCIES + NONE + +RETURN VALUE + 0 + +SIDE EFFECTS + N/A + +===========================================================================*/ +int loc_eng_ulp_network_init(loc_eng_data_s_type &loc_eng_data, + UlpNetworkLocationCallbacks *callbacks) +{ + ENTRY_LOG_CALLFLOW(); + loc_eng_data.ulp_network_callback = callbacks->ulp_network_location_request_cb; + int ret_val =0; + EXIT_LOG(%d, ret_val); + return ret_val; +} + + +/*=========================================================================== +FUNCTION loc_eng_ulp_send_network_position + +DESCRIPTION + Ulp send data + +DEPENDENCIES + NONE + +RETURN VALUE + 0 + +SIDE EFFECTS + N/A + +===========================================================================*/ +int loc_eng_ulp_send_network_position(loc_eng_data_s_type &loc_eng_data, + UlpNetworkPositionReport *position_report) +{ + ENTRY_LOG(); + int ret_val = 0; + if((loc_eng_data.ulp_initialized == true) && (gps_conf.CAPABILITIES & ULP_CAPABILITY)) + { + ulp_msg_inject_network_position *msg + (new ulp_msg_inject_network_position(&loc_eng_data, *position_report)); + msg_q_snd( (void*)((LocEngContext*)(loc_eng_data.context))->ulp_q + , msg, loc_eng_free_msg); + ret_val = 0; + }else + { + ret_val = -1; + } + EXIT_LOG(%d, ret_val); + return ret_val; +} +/*=========================================================================== +FUNCTION loc_eng_read_config + +DESCRIPTION + Initiates the reading of the gps config file stored in /etc dir + +DEPENDENCIES + None + +RETURN VALUE + 0: success + +SIDE EFFECTS + N/A + +===========================================================================*/ +int loc_eng_read_config(void) +{ + ENTRY_LOG_CALLFLOW(); + if(gpsConfigAlreadyRead == false) + { + // Initialize our defaults before reading of configuration file overwrites them. + loc_default_parameters(); + // Ee only want to parse the conf file once. This is a good place to ensure that. + // In fact one day the conf file should go into context. + UTIL_READ_CONF(GPS_CONF_FILE, loc_parameter_table); + gpsConfigAlreadyRead = true; + } else { + LOC_LOGV("GPS Config file has already been read\n"); + } + + EXIT_LOG(%d, 0); + return 0; +} + diff --git a/loc_api/libloc_api_50001/loc_eng.h b/loc_api/libloc_api_50001/loc_eng.h old mode 100755 new mode 100644 index 73578ec8..e1cf95cc --- a/loc_api/libloc_api_50001/loc_eng.h +++ b/loc_api/libloc_api_50001/loc_eng.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2009,2011 Code Aurora Forum. All rights reserved. +/* Copyright (c) 2009-2012 Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -36,6 +36,7 @@ extern "C" { // Uncomment to keep all LOG messages (LOGD, LOGI, LOGV, etc.) #define MAX_NUM_ATL_CONNECTIONS 2 + // Define boolean type to be used by libgps on loc api module typedef unsigned char boolean; @@ -67,16 +68,27 @@ typedef unsigned char boolean; #define FAILURE FALSE #define INVALID_ATL_CONNECTION_HANDLE -1 -#define MAX_APN_LEN 100 -#define MAX_URL_LEN 256 -#define smaller_of(a, b) (((a) > (b)) ? (b) : (a)) - enum loc_mute_session_e_type { LOC_MUTE_SESS_NONE = 0, LOC_MUTE_SESS_WAIT, LOC_MUTE_SESS_IN_SESSION }; +struct LocEngContext { + // Data variables used by deferred action thread + const void* deferred_q; + const void* ulp_q; + const pthread_t deferred_action_thread; + static LocEngContext* get(gps_create_thread threadCreator); + void drop(); + static pthread_mutex_t lock; + static pthread_cond_t cond; +private: + int counter; + static LocEngContext *me; + LocEngContext(gps_create_thread threadCreator); +}; + // Module data typedef struct { @@ -89,6 +101,8 @@ typedef struct gps_ni_notify_callback ni_notify_cb; gps_acquire_wakelock acquire_wakelock_cb; gps_release_wakelock release_wakelock_cb; + ulp_network_location_request ulp_network_callback; + ulp_request_phone_context ulp_phone_context_req_cb; boolean intermediateFix; AGpsStatusValue agps_status; // used to defer stopping the GPS engine until AGPS data calls are done @@ -97,11 +111,10 @@ typedef struct loc_eng_xtra_data_s_type xtra_module_data; loc_eng_ni_data_s_type loc_eng_ni_data; - boolean navigating; - // AGPS state machines AgpsStateMachine* agnss_nif; AgpsStateMachine* internet_nif; + AgpsStateMachine* wifi_nif; // GPS engine status GpsStatusValue engine_status; @@ -112,8 +125,6 @@ typedef struct void* context; - loc_eng_msg_position_mode position_mode; - // For muting session broadcast loc_mute_session_e_type mute_session_state; @@ -127,12 +138,47 @@ typedef struct int mpc_host_set; char mpc_host_buf[101]; int mpc_port_buf; + bool ulp_initialized; } loc_eng_data_s_type; +#include "ulp.h" + +/* GPS.conf support */ +typedef struct loc_gps_cfg_s +{ + unsigned long INTERMEDIATE_POS; + unsigned long ACCURACY_THRES; + unsigned long ENABLE_WIPER; + unsigned long SUPL_VER; + unsigned long CAPABILITIES; + uint8_t GYRO_BIAS_RANDOM_WALK_VALID; + double GYRO_BIAS_RANDOM_WALK; + unsigned long SENSOR_ACCEL_BATCHES_PER_SEC; + unsigned long SENSOR_ACCEL_SAMPLES_PER_BATCH; + unsigned long SENSOR_GYRO_BATCHES_PER_SEC; + unsigned long SENSOR_GYRO_SAMPLES_PER_BATCH; + unsigned long SENSOR_CONTROL_MODE; + unsigned long SENSOR_USAGE; + unsigned long QUIPC_ENABLED; + unsigned long LPP_PROFILE; + unsigned long SENSOR_ALGORITHM_CONFIG_MASK; + uint8_t ACCEL_RANDOM_WALK_SPECTRAL_DENSITY_VALID; + double ACCEL_RANDOM_WALK_SPECTRAL_DENSITY; + uint8_t ANGLE_RANDOM_WALK_SPECTRAL_DENSITY_VALID; + double ANGLE_RANDOM_WALK_SPECTRAL_DENSITY; + uint8_t RATE_RANDOM_WALK_SPECTRAL_DENSITY_VALID; + double RATE_RANDOM_WALK_SPECTRAL_DENSITY; + uint8_t VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY_VALID; + double VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY; +} loc_gps_cfg_s_type; + +extern loc_gps_cfg_s_type gps_conf; int loc_eng_init(loc_eng_data_s_type &loc_eng_data, LocCallbacks* callbacks, - LOC_API_ADAPTER_EVENT_MASK_T event); + LOC_API_ADAPTER_EVENT_MASK_T event, + void (*loc_external_msg_sender) (void*, void*)); +int loc_eng_ulp_init(loc_eng_data_s_type &loc_eng_data, const ulpInterface * loc_eng_ulpInf); int loc_eng_start(loc_eng_data_s_type &loc_eng_data); int loc_eng_stop(loc_eng_data_s_type &loc_eng_data); void loc_eng_cleanup(loc_eng_data_s_type &loc_eng_data); @@ -145,29 +191,19 @@ int loc_eng_inject_location(loc_eng_data_s_type &loc_eng_data, void loc_eng_delete_aiding_data(loc_eng_data_s_type &loc_eng_data, GpsAidingData f); int loc_eng_set_position_mode(loc_eng_data_s_type &loc_eng_data, - LocPositionMode mode, GpsPositionRecurrence recurrence, - uint32_t min_interval, uint32_t preferred_accuracy, - uint32_t preferred_time); + LocPosMode ¶ms); const void* loc_eng_get_extension(loc_eng_data_s_type &loc_eng_data, const char* name); -#ifdef QCOM_FEATURE_ULP int loc_eng_update_criteria(loc_eng_data_s_type &loc_eng_data, UlpLocationCriteria criteria); -#endif + void loc_eng_agps_init(loc_eng_data_s_type &loc_eng_data, AGpsCallbacks* callbacks); -#ifdef QCOM_FEATURE_IPV6 int loc_eng_agps_open(loc_eng_data_s_type &loc_eng_data, AGpsType agpsType, const char* apn, AGpsBearerType bearerType); int loc_eng_agps_closed(loc_eng_data_s_type &loc_eng_data, AGpsType agpsType); int loc_eng_agps_open_failed(loc_eng_data_s_type &loc_eng_data, AGpsType agpsType); -#else -int loc_eng_agps_open(loc_eng_data_s_type &loc_eng_data, const char* apn); -int loc_eng_agps_closed(loc_eng_data_s_type &loc_eng_data); -int loc_eng_agps_open_failed(loc_eng_data_s_type &loc_eng_data); -#endif - int loc_eng_set_server_proxy(loc_eng_data_s_type &loc_eng_data, LocServerType type, const char *hostname, int port); @@ -196,7 +232,15 @@ extern void loc_eng_ni_request_handler(loc_eng_data_s_type &loc_eng_data, const GpsNiNotification *notif, const void* passThrough); extern void loc_eng_ni_reset_on_engine_restart(loc_eng_data_s_type &loc_eng_data); +int loc_eng_ulp_network_init(loc_eng_data_s_type &loc_eng_data, UlpNetworkLocationCallbacks *callbacks); +int loc_eng_ulp_phone_context_settings_update(loc_eng_data_s_type &loc_eng_data, + UlpPhoneContextSettings *settings); +int loc_eng_ulp_phone_context_init(loc_eng_data_s_type &loc_eng_data, + UlpPhoneContextCallbacks *callback); +int loc_eng_ulp_send_network_position(loc_eng_data_s_type &loc_eng_data, + UlpNetworkPositionReport *position_report); +int loc_eng_read_config(void); #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/loc_api/libloc_api_50001/loc_eng_agps.cpp b/loc_api/libloc_api_50001/loc_eng_agps.cpp old mode 100755 new mode 100644 index 07475680..e9524d57 --- a/loc_api/libloc_api_50001/loc_eng_agps.cpp +++ b/loc_api/libloc_api_50001/loc_eng_agps.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011,2012, Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -87,7 +87,7 @@ const int Notification::BROADCAST_INACTIVE = 0x80000002; //====================================================================== -// Subscriber: BITSubscriber / ATLSubscriber +// Subscriber: BITSubscriber / ATLSubscriber / WIFISubscriber //====================================================================== bool Subscriber::forMe(Notification ¬ification) { @@ -120,14 +120,17 @@ bool BITSubscriber::notifyRsrcStatus(Notification ¬ification) case RSRC_UNSUBSCRIBE: case RSRC_RELEASED: loc_eng_dmn_conn_loc_api_server_data_conn( + LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON, GPSONE_LOC_API_IF_RELEASE_SUCCESS); break; case RSRC_DENIED: loc_eng_dmn_conn_loc_api_server_data_conn( + LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON, GPSONE_LOC_API_IF_FAILURE); break; case RSRC_GRANTED: loc_eng_dmn_conn_loc_api_server_data_conn( + LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON, GPSONE_LOC_API_IF_REQUEST_SUCCESS); break; default: @@ -150,20 +153,56 @@ bool ATLSubscriber::notifyRsrcStatus(Notification ¬ification) ((LocApiAdapter*)mLocAdapter)->atlCloseStatus(ID, 1); break; case RSRC_DENIED: + { + AGpsType type = mBackwardCompatibleMode ? + AGPS_TYPE_INVALID : mStateMachine->getType(); ((LocApiAdapter*)mLocAdapter)->atlOpenStatus(ID, 0, (char*)mStateMachine->getAPN(), -#ifdef QCOM_FEATURE_IPV6 mStateMachine->getBearer(), -#endif - mStateMachine->getType()); + type); + } break; case RSRC_GRANTED: + { + AGpsType type = mBackwardCompatibleMode ? + AGPS_TYPE_INVALID : mStateMachine->getType(); ((LocApiAdapter*)mLocAdapter)->atlOpenStatus(ID, 1, (char*)mStateMachine->getAPN(), -#ifdef QCOM_FEATURE_IPV6 mStateMachine->getBearer(), -#endif - mStateMachine->getType()); + type); + } + break; + default: + notify = false; + } + } + + return notify; +} + +bool WIFISubscriber::notifyRsrcStatus(Notification ¬ification) +{ + bool notify = forMe(notification); + + if (notify) { + switch(notification.rsrcStatus) + { + case RSRC_UNSUBSCRIBE: + break; + case RSRC_RELEASED: + loc_eng_dmn_conn_loc_api_server_data_conn( + senderId, + GPSONE_LOC_API_IF_RELEASE_SUCCESS); + break; + case RSRC_DENIED: + loc_eng_dmn_conn_loc_api_server_data_conn( + senderId, + GPSONE_LOC_API_IF_FAILURE); + break; + case RSRC_GRANTED: + loc_eng_dmn_conn_loc_api_server_data_conn( + senderId, + GPSONE_LOC_API_IF_REQUEST_SUCCESS); break; default: notify = false; @@ -276,23 +315,25 @@ AgpsState* AgpsPendingState::onRsrcEvent(AgpsRsrcStatus event, void* data) Subscriber* subscriber = (Subscriber*) data; if (subscriber->waitForCloseComplete()) { subscriber->setInactive(); - if (!mStateMachine->hasActiveSubscribers()) { - // no more subscribers, move to RELEASED state - nextState = mReleasingState; - } } else { // auto notify this subscriber of the unsubscribe Notification notification(subscriber, event, true); mStateMachine->notifySubscribers(notification); + } - // now check if there is any subscribers left - if (!mStateMachine->hasSubscribers()) { - // no more subscribers, move to RELEASED state - nextState = mReleasedState; + // now check if there is any subscribers left + if (!mStateMachine->hasSubscribers()) { + // no more subscribers, move to RELEASED state + nextState = mReleasedState; - // tell connecivity service we can release NIF - mStateMachine->sendRsrcRequest(GPS_RELEASE_AGPS_DATA_CONN); - } + // tell connecivity service we can release NIF + mStateMachine->sendRsrcRequest(GPS_RELEASE_AGPS_DATA_CONN); + } else if (!mStateMachine->hasActiveSubscribers()) { + // only inactive subscribers, move to RELEASING state + nextState = mReleasingState; + + // tell connecivity service we can release NIF + mStateMachine->sendRsrcRequest(GPS_RELEASE_AGPS_DATA_CONN); } } break; @@ -381,13 +422,13 @@ AgpsState* AgpsAcquiredState::onRsrcEvent(AgpsRsrcStatus event, void* data) // now check if there is any subscribers left if (!mStateMachine->hasSubscribers()) { // no more subscribers, move to RELEASED state - nextState = mReleasingState; + nextState = mReleasedState; // tell connecivity service we can release NIF mStateMachine->sendRsrcRequest(GPS_RELEASE_AGPS_DATA_CONN); } else if (!mStateMachine->hasActiveSubscribers()) { - // no more subscribers, move to RELEASED state - nextState = mReleasedState; + // only inactive subscribers, move to RELEASING state + nextState = mReleasingState; // tell connecivity service we can release NIF mStateMachine->sendRsrcRequest(GPS_RELEASE_AGPS_DATA_CONN); @@ -469,21 +510,14 @@ AgpsState* AgpsReleasingState::onRsrcEvent(AgpsRsrcStatus event, void* data) // now check if there is any subscribers left if (!mStateMachine->hasSubscribers()) { - // no more subscribers, move to RELEASED state - nextState = mReleasingState; - - // tell connecivity service we can release NIF - mStateMachine->sendRsrcRequest(GPS_RELEASE_AGPS_DATA_CONN); - } else if (!mStateMachine->hasActiveSubscribers()) { // no more subscribers, move to RELEASED state nextState = mReleasedState; - - // tell connecivity service we can release NIF - mStateMachine->sendRsrcRequest(GPS_RELEASE_AGPS_DATA_CONN); } } break; + case RSRC_DENIED: + // A race condition subscriber unsubscribes before AFW denies resource. case RSRC_RELEASED: { nextState = mAcquiredState; @@ -503,7 +537,6 @@ AgpsState* AgpsReleasingState::onRsrcEvent(AgpsRsrcStatus event, void* data) break; case RSRC_GRANTED: - case RSRC_DENIED: default: LOC_LOGE("%s: unrecognized event %d", whoami(), event); // no state change. @@ -520,11 +553,13 @@ AgpsState* AgpsReleasingState::onRsrcEvent(AgpsRsrcStatus event, void* data) //====================================================================== AgpsStateMachine::AgpsStateMachine(void (*servicer)(AGpsStatus* status), - AGpsType type) : + AGpsType type, + bool enforceSingleSubscriber) : mServicer(servicer), mType(type), mStatePtr(new AgpsReleasedState(this)), mAPN(NULL), - mAPNLen(0) + mAPNLen(0), + mEnforceSingleSubscriber(enforceSingleSubscriber) { linked_list_init(&mSubscribers); @@ -643,7 +678,7 @@ void AgpsStateMachine::addSubscriber(Subscriber* subscriber) const void AgpsStateMachine::sendRsrcRequest(AGpsStatusValue action) const { Subscriber* s = NULL; - Notification notification(Notification::BROADCAST_ALL); + Notification notification(Notification::BROADCAST_ACTIVE); linked_list_search(mSubscribers, (void**)&s, hasSubscriber, (void*)¬ification, false); @@ -653,20 +688,15 @@ void AgpsStateMachine::sendRsrcRequest(AGpsStatusValue action) const nifRequest.type = mType; nifRequest.status = action; -#ifdef QCOM_FEATURE_IPV6 if (s == NULL) { nifRequest.ipv4_addr = INADDR_NONE; nifRequest.ipv6_addr[0] = 0; + nifRequest.ssid[0] = '\0'; + nifRequest.password[0] = '\0'; } else { s->setIPAddresses(nifRequest.ipv4_addr, (char*)nifRequest.ipv6_addr); + s->setWifiInfo(nifRequest.ssid, nifRequest.password); } -#else - if (s == NULL) { - nifRequest.ipaddr = INADDR_NONE; - } else { - nifRequest.ipaddr = s->ID; - } -#endif CALLBACK_LOG_CALLFLOW("agps_cb", %s, loc_get_agps_status_name(action)); (*mServicer)(&nifRequest); @@ -675,7 +705,12 @@ void AgpsStateMachine::sendRsrcRequest(AGpsStatusValue action) const void AgpsStateMachine::subscribeRsrc(Subscriber *subscriber) { - mStatePtr = mStatePtr->onRsrcEvent(RSRC_SUBSCRIBE, (void*)subscriber); + if (mEnforceSingleSubscriber && hasSubscribers()) { + Notification notification(Notification::BROADCAST_ALL, RSRC_DENIED, true); + notifySubscriber(¬ification, subscriber); + } else { + mStatePtr = mStatePtr->onRsrcEvent(RSRC_SUBSCRIBE, (void*)subscriber); + } } bool AgpsStateMachine::unsubscribeRsrc(Subscriber *subscriber) diff --git a/loc_api/libloc_api_50001/loc_eng_agps.h b/loc_api/libloc_api_50001/loc_eng_agps.h old mode 100755 new mode 100644 index 1fd0f450..a0873d04 --- a/loc_api/libloc_api_50001/loc_eng_agps.h +++ b/loc_api/libloc_api_50001/loc_eng_agps.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011,2012, Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -37,6 +37,7 @@ #include #include #include +#include "loc_eng_msg.h" // forward declaration class AgpsStateMachine; @@ -149,23 +150,20 @@ class AgpsStateMachine { char* mAPN; // for convenience, we don't do strlen each time. unsigned int mAPNLen; -#ifdef QCOM_FEATURE_IPV6 // bear AGpsBearerType mBearer; -#endif // ipv4 address for routing + bool mEnforceSingleSubscriber; public: - AgpsStateMachine(void (*servicer)(AGpsStatus* status), AGpsType type); + AgpsStateMachine(void (*servicer)(AGpsStatus* status), AGpsType type, bool enforceSingleSubscriber); virtual ~AgpsStateMachine(); // self explanatory methods below void setAPN(const char* apn, unsigned int len); inline const char* getAPN() const { return (const char*)mAPN; } -#ifdef QCOM_FEATURE_IPV6 inline void setBearer(AGpsBearerType bearer) { mBearer = bearer; } inline AGpsBearerType getBearer() const { return mBearer; } -#endif inline AGpsType getType() const { return (AGpsType)mType; } // someone, a ATL client or BIT, is asking for NIF @@ -206,6 +204,7 @@ struct Subscriber { inline virtual ~Subscriber() {} virtual void setIPAddresses(int &v4, char* v6) = 0; + inline virtual void setWifiInfo(char* ssid, char* password) {} inline virtual bool equals(const Subscriber *s) const { return ID == s->ID; } @@ -256,10 +255,13 @@ private: // ATLSubscriber, created with requests from ATL struct ATLSubscriber : public Subscriber { const LocApiAdapter* mLocAdapter; + const bool mBackwardCompatibleMode; inline ATLSubscriber(const int id, const AgpsStateMachine* stateMachine, - const LocApiAdapter* adapter) : - Subscriber(id, stateMachine), mLocAdapter(adapter) {} + const LocApiAdapter* adapter, + const bool compatibleMode) : + Subscriber(id, stateMachine), mLocAdapter(adapter), + mBackwardCompatibleMode(compatibleMode){} virtual bool notifyRsrcStatus(Notification ¬ification); inline virtual void setIPAddresses(int &v4, char* v6) @@ -267,7 +269,55 @@ struct ATLSubscriber : public Subscriber { inline virtual Subscriber* clone() { - return new ATLSubscriber(ID, mStateMachine, mLocAdapter); + return new ATLSubscriber(ID, mStateMachine, mLocAdapter, + mBackwardCompatibleMode); + } +}; + +// WIFISubscriber, created with requests from MSAPM or QuIPC +struct WIFISubscriber : public Subscriber { + char * mSSID; + char * mPassword; + loc_if_req_sender_id_e_type senderId; + bool mIsInactive; + inline WIFISubscriber(const AgpsStateMachine* stateMachine, + char * ssid, char * password, loc_if_req_sender_id_e_type sender_id) : + Subscriber(sender_id, stateMachine), + mSSID(NULL == ssid ? NULL : new char[SSID_BUF_SIZE]), + mPassword(NULL == password ? NULL : new char[SSID_BUF_SIZE]), + senderId(sender_id) + { + if (NULL != mSSID) + strlcpy(mSSID, ssid, SSID_BUF_SIZE); + if (NULL != mPassword) + strlcpy(mPassword, password, SSID_BUF_SIZE); + mIsInactive = false; + } + + virtual bool notifyRsrcStatus(Notification ¬ification); + + inline virtual void setIPAddresses(int &v4, char* v6) {} + + inline virtual void setWifiInfo(char* ssid, char* password) + { + if (NULL != mSSID) + strlcpy(ssid, mSSID, SSID_BUF_SIZE); + else + ssid[0] = '\0'; + if (NULL != mPassword) + strlcpy(password, mPassword, SSID_BUF_SIZE); + else + password[0] = '\0'; + } + + inline virtual bool waitForCloseComplete() { return true; } + + inline virtual void setInactive() { mIsInactive = true; } + inline virtual bool isInactive() { return mIsInactive; } + + virtual Subscriber* clone() + { + return new WIFISubscriber(mStateMachine, mSSID, mPassword, senderId); } }; diff --git a/loc_api/libloc_api_50001/loc_eng_dmn_conn.cpp b/loc_api/libloc_api_50001/loc_eng_dmn_conn.cpp old mode 100755 new mode 100644 index f2f9a501..2bb2d810 --- a/loc_api/libloc_api_50001/loc_eng_dmn_conn.cpp +++ b/loc_api/libloc_api_50001/loc_eng_dmn_conn.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011,2012, Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -33,23 +33,54 @@ #include #include #include +#include +#include +#include #include "log_util.h" #include "loc_eng_dmn_conn_glue_msg.h" #include "loc_eng_dmn_conn_handler.h" #include "loc_eng_dmn_conn.h" +#include "loc_eng_msg.h" static int loc_api_server_msgqid; static int loc_api_resp_msgqid; +static int quipc_msgqid; +static int msapm_msgqid; static const char * global_loc_api_q_path = GPSONE_LOC_API_Q_PATH; static const char * global_loc_api_resp_q_path = GPSONE_LOC_API_RESP_Q_PATH; +static const char * global_quipc_ctrl_q_path = QUIPC_CTRL_Q_PATH; +static const char * global_msapm_ctrl_q_path = MSAPM_CTRL_Q_PATH; static int loc_api_server_proc_init(void *context) { loc_api_server_msgqid = loc_eng_dmn_conn_glue_msgget(global_loc_api_q_path, O_RDWR); + //change mode/group for the global_loc_api_q_path pipe + int result = chmod (global_loc_api_q_path, 0660); + if (result != 0) + { + LOC_LOGE("failed to change mode for %s, error = %s\n", global_loc_api_q_path, strerror(errno)); + } + + struct group * gps_group = getgrnam("gps"); + if (gps_group != NULL) + { + result = chown (global_loc_api_q_path, -1, gps_group->gr_gid); + if (result != 0) + { + LOC_LOGE("chown for pipe failed, gid = %d, result = %d, error = %s\n", gps_group->gr_gid, result, strerror(errno)); + } + } + else + { + LOC_LOGE("getgrnam for gps failed, error code = %d\n", errno); + } + loc_api_resp_msgqid = loc_eng_dmn_conn_glue_msgget(global_loc_api_resp_q_path, O_RDWR); + quipc_msgqid = loc_eng_dmn_conn_glue_msgget(global_quipc_ctrl_q_path, O_RDWR); + msapm_msgqid = loc_eng_dmn_conn_glue_msgget(global_msapm_ctrl_q_path , O_RDWR); LOC_LOGD("%s:%d] loc_api_server_msgqid = %d\n", __func__, __LINE__, loc_api_server_msgqid); return 0; @@ -80,6 +111,7 @@ static int loc_api_server_proc(void *context) LOC_LOGD("%s:%d] %d listening on %s...\n", __func__, __LINE__, cnt, (char *) context); length = loc_eng_dmn_conn_glue_msgrcv(loc_api_server_msgqid, p_cmsgbuf, sz); if (length <= 0) { + free(p_cmsgbuf); LOC_LOGE("%s:%d] fail receiving msg from gpsone_daemon, retry later\n", __func__, __LINE__); usleep(1000); return 0; @@ -114,6 +146,8 @@ static int loc_api_server_proc_post(void *context) LOC_LOGD("%s:%d]\n", __func__, __LINE__); loc_eng_dmn_conn_glue_msgremove( global_loc_api_q_path, loc_api_server_msgqid); loc_eng_dmn_conn_glue_msgremove( global_loc_api_resp_q_path, loc_api_resp_msgqid); + loc_eng_dmn_conn_glue_msgremove( global_quipc_ctrl_q_path, quipc_msgqid); + loc_eng_dmn_conn_glue_msgremove( global_msapm_ctrl_q_path, msapm_msgqid); return 0; } @@ -165,16 +199,40 @@ int loc_eng_dmn_conn_loc_api_server_join(void) return 0; } -int loc_eng_dmn_conn_loc_api_server_data_conn(int status) { +int loc_eng_dmn_conn_loc_api_server_data_conn(int sender_id, int status) { struct ctrl_msgbuf cmsgbuf; + LOC_LOGD("%s:%d] quipc_msgqid = %d\n", __func__, __LINE__, quipc_msgqid); cmsgbuf.ctrl_type = GPSONE_LOC_API_RESPONSE; cmsgbuf.cmsg.cmsg_response.result = status; - LOC_LOGD("%s:%d] status = %d",__func__, __LINE__, status); - if (loc_eng_dmn_conn_glue_msgsnd(loc_api_resp_msgqid, & cmsgbuf, sizeof(struct ctrl_msgbuf)) < 0) { - LOC_LOGD("%s:%d] error! conn_glue_msgsnd failed\n", __func__, __LINE__); - return -1; + switch (sender_id) { + case LOC_ENG_IF_REQUEST_SENDER_ID_QUIPC: { + LOC_LOGD("%s:%d] sender_id = LOC_ENG_IF_REQUEST_SENDER_ID_QUIPC", __func__, __LINE__); + if (loc_eng_dmn_conn_glue_msgsnd(quipc_msgqid, & cmsgbuf, sizeof(struct ctrl_msgbuf)) < 0) { + LOC_LOGD("%s:%d] error! conn_glue_msgsnd failed\n", __func__, __LINE__); + return -1; + } + break; + } + case LOC_ENG_IF_REQUEST_SENDER_ID_MSAPM: { + LOC_LOGD("%s:%d] sender_id = LOC_ENG_IF_REQUEST_SENDER_ID_MSAPM", __func__, __LINE__); + if (loc_eng_dmn_conn_glue_msgsnd(msapm_msgqid, & cmsgbuf, sizeof(struct ctrl_msgbuf)) < 0) { + LOC_LOGD("%s:%d] error! conn_glue_msgsnd failed\n", __func__, __LINE__); + return -1; + } + break; + } + case LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON: { + LOC_LOGD("%s:%d] sender_id = LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON", __func__, __LINE__); + if (loc_eng_dmn_conn_glue_msgsnd(loc_api_resp_msgqid, & cmsgbuf, sizeof(struct ctrl_msgbuf)) < 0) { + LOC_LOGD("%s:%d] error! conn_glue_msgsnd failed\n", __func__, __LINE__); + return -1; + } + break; + } + default: { + LOC_LOGD("%s:%d] invalid sender ID!", __func__, __LINE__); + } } return 0; - } diff --git a/loc_api/libloc_api_50001/loc_eng_dmn_conn.h b/loc_api/libloc_api_50001/loc_eng_dmn_conn.h old mode 100755 new mode 100644 index 414fd553..f6692487 --- a/loc_api/libloc_api_50001/loc_eng_dmn_conn.h +++ b/loc_api/libloc_api_50001/loc_eng_dmn_conn.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011,2012, Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -35,11 +35,15 @@ #define GPSONE_LOC_API_Q_PATH "/data/misc/gpsone_d/gpsone_loc_api_q" #define GPSONE_LOC_API_RESP_Q_PATH "/data/misc/gpsone_d/gpsone_loc_api_resp_q" +#define QUIPC_CTRL_Q_PATH "/data/misc/gpsone_d/quipc_ctrl_q" +#define MSAPM_CTRL_Q_PATH "/data/misc/gpsone_d/msapm_ctrl_q" #else #define GPSONE_LOC_API_Q_PATH "/tmp/gpsone_loc_api_q" #define GPSONE_LOC_API_RESP_Q_PATH "/tmp/gpsone_loc_api_resp_q" +#define QUIPC_CTRL_Q_PATH "/tmp/quipc_ctrl_q" +#define MSAPM_CTRL_Q_PATH "/tmp/msapm_ctrl_q" #endif @@ -47,7 +51,7 @@ int loc_eng_dmn_conn_loc_api_server_launch(thelper_create_thread create_thread const char * loc_api_q_path, const char * ctrl_q_path, void *agps_handle); int loc_eng_dmn_conn_loc_api_server_unblock(void); int loc_eng_dmn_conn_loc_api_server_join(void); -int loc_eng_dmn_conn_loc_api_server_data_conn(int); +int loc_eng_dmn_conn_loc_api_server_data_conn(int, int); #endif /* LOC_ENG_DATA_SERVER_H */ diff --git a/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_msg.c b/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_msg.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_msg.h b/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_msg.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_pipe.c b/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_pipe.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_pipe.h b/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_pipe.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api_50001/loc_eng_dmn_conn_handler.cpp b/loc_api/libloc_api_50001/loc_eng_dmn_conn_handler.cpp old mode 100755 new mode 100644 index fd15f001..6077b721 --- a/loc_api/libloc_api_50001/loc_eng_dmn_conn_handler.cpp +++ b/loc_api/libloc_api_50001/loc_eng_dmn_conn_handler.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011,2012, Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -47,15 +47,79 @@ int loc_eng_dmn_conn_loc_api_server_if_request_handler(struct ctrl_msgbuf *pmsg, return 1; } - loc_eng_msg_request_bit *msg( - new loc_eng_msg_request_bit(loc_api_handle, - pmsg->cmsg.cmsg_if_request.is_supl, - pmsg->cmsg.cmsg_if_request.ipv4_addr, - (char*)pmsg->cmsg.cmsg_if_request.ipv6_addr)); - loc_eng_msg_sender(loc_api_handle, msg); + if (NULL != loc_api_handle) { + loc_if_req_type_e_type type; + switch (pmsg->cmsg.cmsg_if_request.type) { + case IF_REQUEST_TYPE_SUPL: + { + LOC_LOGD("IF_REQUEST_TYPE_SUPL"); + type = LOC_ENG_IF_REQUEST_TYPE_SUPL; + break; + } + case IF_REQUEST_TYPE_WIFI: + { + LOC_LOGD("IF_REQUEST_TYPE_WIFI"); + type = LOC_ENG_IF_REQUEST_TYPE_WIFI; + break; + } + case IF_REQUEST_TYPE_ANY: + { + LOC_LOGD("IF_REQUEST_TYPE_ANY"); + type = LOC_ENG_IF_REQUEST_TYPE_ANY; + break; + } + default: + { + LOC_LOGD("invalid IF_REQUEST_TYPE!"); + return -1; + } + } + switch (pmsg->cmsg.cmsg_if_request.sender_id) { + case IF_REQUEST_SENDER_ID_QUIPC: + { + LOC_LOGD("IF_REQUEST_SENDER_ID_QUIPC"); + loc_eng_msg_request_wifi *msg( + new loc_eng_msg_request_wifi(loc_api_handle, + type, + LOC_ENG_IF_REQUEST_SENDER_ID_QUIPC, + (char*)pmsg->cmsg.cmsg_if_request.ssid, + (char*)pmsg->cmsg.cmsg_if_request.password)); + loc_eng_msg_sender(loc_api_handle, msg); + break; + } + case IF_REQUEST_SENDER_ID_MSAPM: + { + LOC_LOGD("IF_REQUEST_SENDER_ID_MSAPM"); + loc_eng_msg_request_wifi *msg( + new loc_eng_msg_request_wifi(loc_api_handle, + type, + LOC_ENG_IF_REQUEST_SENDER_ID_MSAPM, + (char*)pmsg->cmsg.cmsg_if_request.ssid, + (char*)pmsg->cmsg.cmsg_if_request.password)); + loc_eng_msg_sender(loc_api_handle, msg); + break; + } + case IF_REQUEST_SENDER_ID_GPSONE_DAEMON: + { + LOC_LOGD("IF_REQUEST_SENDER_ID_GPSONE_DAEMON"); + loc_eng_msg_request_bit *msg( + new loc_eng_msg_request_bit(loc_api_handle, + type, + pmsg->cmsg.cmsg_if_request.ipv4_addr, + (char*)pmsg->cmsg.cmsg_if_request.ipv6_addr)); + loc_eng_msg_sender(loc_api_handle, msg); + break; + } + default: + { + LOC_LOGD("invalid IF_REQUEST_SENDER_ID!"); + return -1; + } + } + } #else - loc_eng_dmn_conn_loc_api_server_data_conn(GPSONE_LOC_API_IF_REQUEST_SUCCESS); + loc_eng_dmn_conn_loc_api_server_data_conn(LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON, GPSONE_LOC_API_IF_REQUEST_SUCCESS); #endif return 0; } @@ -64,14 +128,76 @@ int loc_eng_dmn_conn_loc_api_server_if_release_handler(struct ctrl_msgbuf *pmsg, { LOC_LOGD("%s:%d]\n", __func__, __LINE__); #ifndef DEBUG_DMN_LOC_API - loc_eng_msg_release_bit *msg( + loc_if_req_type_e_type type; + switch (pmsg->cmsg.cmsg_if_request.type) { + case IF_REQUEST_TYPE_SUPL: + { + LOC_LOGD("IF_REQUEST_TYPE_SUPL"); + type = LOC_ENG_IF_REQUEST_TYPE_SUPL; + break; + } + case IF_REQUEST_TYPE_WIFI: + { + LOC_LOGD("IF_REQUEST_TYPE_WIFI"); + type = LOC_ENG_IF_REQUEST_TYPE_WIFI; + break; + } + case IF_REQUEST_TYPE_ANY: + { + LOC_LOGD("IF_REQUEST_TYPE_ANY"); + type = LOC_ENG_IF_REQUEST_TYPE_ANY; + break; + } + default: + { + LOC_LOGD("invalid IF_REQUEST_TYPE!"); + return -1; + } + } + switch (pmsg->cmsg.cmsg_if_request.sender_id) { + case IF_REQUEST_SENDER_ID_QUIPC: + { + LOC_LOGD("IF_REQUEST_SENDER_ID_QUIPC"); + loc_eng_msg_release_wifi *msg( + new loc_eng_msg_release_wifi(loc_api_handle, + type, + LOC_ENG_IF_REQUEST_SENDER_ID_QUIPC, + (char*)pmsg->cmsg.cmsg_if_request.ssid, + (char*)pmsg->cmsg.cmsg_if_request.password)); + loc_eng_msg_sender(loc_api_handle, msg); + break; + } + case IF_REQUEST_SENDER_ID_MSAPM: + { + LOC_LOGD("IF_REQUEST_SENDER_ID_MSAPM"); + loc_eng_msg_release_wifi *msg( + new loc_eng_msg_release_wifi(loc_api_handle, + type, + LOC_ENG_IF_REQUEST_SENDER_ID_MSAPM, + (char*)pmsg->cmsg.cmsg_if_request.ssid, + (char*)pmsg->cmsg.cmsg_if_request.password)); + loc_eng_msg_sender(loc_api_handle, msg); + break; + } + case IF_REQUEST_SENDER_ID_GPSONE_DAEMON: + { + LOC_LOGD("IF_REQUEST_SENDER_ID_GPSONE_DAEMON"); + loc_eng_msg_release_bit *msg( new loc_eng_msg_release_bit(loc_api_handle, - pmsg->cmsg.cmsg_if_request.is_supl, + type, pmsg->cmsg.cmsg_if_request.ipv4_addr, (char*)pmsg->cmsg.cmsg_if_request.ipv6_addr)); loc_eng_msg_sender(loc_api_handle, msg); + break; + } + default: + { + LOC_LOGD("invalid IF_REQUEST_SENDER_ID!"); + return -1; + } + } #else - loc_eng_dmn_conn_loc_api_server_data_conn(GPSONE_LOC_API_IF_RELEASE_SUCCESS); + loc_eng_dmn_conn_loc_api_server_data_conn(LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON, GPSONE_LOC_API_IF_RELEASE_SUCCESS); #endif return 0; } diff --git a/loc_api/libloc_api_50001/loc_eng_dmn_conn_handler.h b/loc_api/libloc_api_50001/loc_eng_dmn_conn_handler.h old mode 100755 new mode 100644 index 833e971b..7aa22bfb --- a/loc_api/libloc_api_50001/loc_eng_dmn_conn_handler.h +++ b/loc_api/libloc_api_50001/loc_eng_dmn_conn_handler.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011,2012, Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -32,6 +32,9 @@ #include #include +//for SSID_BUF_SIZE +#include + enum { /* 0x0 - 0xEF is reserved for daemon internal */ GPSONE_LOC_API_IF_REQUEST = 0xF0, @@ -55,10 +58,26 @@ struct ctrl_msg_unblock { int reserved; }; +typedef enum { + IF_REQUEST_TYPE_SUPL = 0, + IF_REQUEST_TYPE_WIFI, + IF_REQUEST_TYPE_ANY +} ctrl_if_req_type_e_type; + +typedef enum { + IF_REQUEST_SENDER_ID_QUIPC = 0, + IF_REQUEST_SENDER_ID_MSAPM, + IF_REQUEST_SENDER_ID_GPSONE_DAEMON, + IF_REQUEST_SENDER_ID_MODEM +} ctrl_if_req_sender_id_e_type; + struct ctrl_msg_if_request { - unsigned is_supl; /* 1: use Android SUPL connection; 0: use Android default internet connection */ + ctrl_if_req_type_e_type type; + ctrl_if_req_sender_id_e_type sender_id; unsigned long ipv4_addr; unsigned char ipv6_addr[16]; + char ssid[SSID_BUF_SIZE]; + char password[SSID_BUF_SIZE]; }; /* do not change this structure */ diff --git a/loc_api/libloc_api_50001/loc_eng_dmn_conn_thread_helper.c b/loc_api/libloc_api_50001/loc_eng_dmn_conn_thread_helper.c old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api_50001/loc_eng_dmn_conn_thread_helper.h b/loc_api/libloc_api_50001/loc_eng_dmn_conn_thread_helper.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api_50001/loc_eng_log.cpp b/loc_api/libloc_api_50001/loc_eng_log.cpp old mode 100755 new mode 100644 index d813cd65..843f558f --- a/loc_api/libloc_api_50001/loc_eng_log.cpp +++ b/loc_api/libloc_api_50001/loc_eng_log.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2011 Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011,2012 Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -31,7 +31,6 @@ #define LOG_TAG "LocSvc_eng" #include "hardware/gps.h" -#include "loc.h" #include "loc_log.h" #include "loc_eng_log.h" #include "loc_eng_msg_id.h" @@ -88,10 +87,24 @@ static loc_name_val_s_type loc_eng_msgs[] = NAME_VAL( LOC_ENG_MSG_RELEASE_ATL ), NAME_VAL( LOC_ENG_MSG_REQUEST_BIT ), NAME_VAL( LOC_ENG_MSG_RELEASE_BIT ), + NAME_VAL( LOC_ENG_MSG_REQUEST_WIFI ), + NAME_VAL( LOC_ENG_MSG_RELEASE_WIFI ), NAME_VAL( LOC_ENG_MSG_REQUEST_NI ), NAME_VAL( LOC_ENG_MSG_INFORM_NI_RESPONSE ), NAME_VAL( LOC_ENG_MSG_REQUEST_XTRA_DATA ), - NAME_VAL( LOC_ENG_MSG_REQUEST_TIME ) + NAME_VAL( LOC_ENG_MSG_REQUEST_TIME ), + NAME_VAL( LOC_ENG_MSG_EXT_POWER_CONFIG ), + NAME_VAL( LOC_ENG_MSG_REQUEST_POSITION ), + NAME_VAL( LOC_ENG_MSG_REQUEST_PHONE_CONTEXT ), + NAME_VAL( LOC_ENG_MSG_REQUEST_NETWORK_POSIITON ), + NAME_VAL( ULP_MSG_UPDATE_CRITERIA ), + NAME_VAL( ULP_MSG_START_FIX ), + NAME_VAL( ULP_MSG_STOP_FIX ), + NAME_VAL( ULP_MSG_INJECT_PHONE_CONTEXT_SETTINGS ), + NAME_VAL( ULP_MSG_INJECT_NETWORK_POSITION ), + NAME_VAL( ULP_MSG_REPORT_QUIPC_POSITION ), + NAME_VAL( ULP_MSG_REQUEST_COARSE_POSITION ), + NAME_VAL( LOC_ENG_MSG_LPP_CONFIG ) }; static int loc_eng_msgs_num = sizeof(loc_eng_msgs) / sizeof(loc_name_val_s_type); @@ -149,9 +162,8 @@ static loc_name_val_s_type loc_eng_aiding_data_bits[] = NAME_VAL( GPS_DELETE_SVSTEER ), NAME_VAL( GPS_DELETE_SADATA ), NAME_VAL( GPS_DELETE_RTI ), - NAME_VAL( GPS_DELETE_CELLDB_INFO ) -#ifdef QCOM_FEATURE_DELEXT - ,NAME_VAL( GPS_DELETE_ALMANAC_CORR ), + NAME_VAL( GPS_DELETE_CELLDB_INFO ), + NAME_VAL( GPS_DELETE_ALMANAC_CORR ), NAME_VAL( GPS_DELETE_FREQ_BIAS_EST ), NAME_VAL( GPS_DELETE_EPHEMERIS_GLO ), NAME_VAL( GPS_DELETE_ALMANAC_GLO ), @@ -160,7 +172,6 @@ static loc_name_val_s_type loc_eng_aiding_data_bits[] = NAME_VAL( GPS_DELETE_ALMANAC_CORR_GLO ), NAME_VAL( GPS_DELETE_TIME_GPS ), NAME_VAL( GPS_DELETE_TIME_GLO ) -#endif }; static int loc_eng_aiding_data_bit_num = sizeof(loc_eng_aiding_data_bits) / sizeof(loc_name_val_s_type); @@ -172,15 +183,11 @@ const char* loc_get_aiding_data_mask_names(GpsAidingData data) static loc_name_val_s_type loc_eng_agps_types[] = { -#ifdef QCOM_FEATURE_IPV6 NAME_VAL( AGPS_TYPE_INVALID ), NAME_VAL( AGPS_TYPE_ANY ), -#endif NAME_VAL( AGPS_TYPE_SUPL ), - NAME_VAL( AGPS_TYPE_C2K ) -#ifdef QCOM_FEATURE_IPV6 - ,NAME_VAL( AGPS_TYPE_WWAN_ANY ) -#endif + NAME_VAL( AGPS_TYPE_C2K ), + NAME_VAL( AGPS_TYPE_WWAN_ANY ) }; static int loc_eng_agps_type_num = sizeof(loc_eng_agps_types) / sizeof(loc_name_val_s_type); @@ -233,7 +240,7 @@ const char* loc_get_ni_encoding_name(GpsNiEncodingType encoding) return loc_get_name_from_val(loc_eng_ni_encodings, loc_eng_ni_encoding_num, (long) encoding); } -#ifdef QCOM_FEATURE_IPV6 + static loc_name_val_s_type loc_eng_agps_bears[] = { NAME_VAL( AGPS_APN_BEARER_INVALID ), @@ -247,7 +254,6 @@ const char* loc_get_agps_bear_name(AGpsBearerType bearer) { return loc_get_name_from_val(loc_eng_agps_bears, loc_eng_agps_bears_num, (long) bearer); } -#endif static loc_name_val_s_type loc_eng_server_types[] = { diff --git a/loc_api/libloc_api_50001/loc_eng_log.h b/loc_api/libloc_api_50001/loc_eng_log.h old mode 100755 new mode 100644 index eff1593b..e8a82793 --- a/loc_api/libloc_api_50001/loc_eng_log.h +++ b/loc_api/libloc_api_50001/loc_eng_log.h @@ -37,7 +37,7 @@ extern "C" #include #include -#include "loc_eng_msg_id.h" +#include const char* loc_get_gps_status_name(GpsStatusValue gps_status); const char* loc_get_msg_name(int id); @@ -48,9 +48,7 @@ const char* loc_get_agps_type_name(AGpsType type); const char* loc_get_ni_type_name(GpsNiType type); const char* loc_get_ni_response_name(GpsUserResponseType response); const char* loc_get_ni_encoding_name(GpsNiEncodingType encoding); -#ifdef QCOM_FEATURE_IPV6 const char* loc_get_agps_bear_name(AGpsBearerType bear); -#endif const char* loc_get_server_type_name(LocServerType type); const char* loc_get_position_sess_status_name(enum loc_sess_status status); const char* loc_get_agps_status_name(AGpsStatusValue status); diff --git a/loc_api/libloc_api_50001/loc_eng_msg.cpp b/loc_api/libloc_api_50001/loc_eng_msg.cpp old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api_50001/loc_eng_msg.h b/loc_api/libloc_api_50001/loc_eng_msg.h old mode 100755 new mode 100644 index 41548f09..4a1cae63 --- a/loc_api/libloc_api_50001/loc_eng_msg.h +++ b/loc_api/libloc_api_50001/loc_eng_msg.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011,2012 Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -35,14 +35,83 @@ #include #include "log_util.h" #include "loc.h" -#include "loc_eng_log.h" +#include #include "loc_eng_msg_id.h" - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ +struct LocPosMode +{ + LocPositionMode mode; + GpsPositionRecurrence recurrence; + uint32_t min_interval; + uint32_t preferred_accuracy; + uint32_t preferred_time; + char credentials[14]; + char provider[8]; + LocPosMode(LocPositionMode m, GpsPositionRecurrence recr, + uint32_t gap, uint32_t accu, uint32_t time, + const char* cred, const char* prov) : + mode(m), recurrence(recr), + min_interval(gap < MIN_POSSIBLE_FIX_INTERVAL ? MIN_POSSIBLE_FIX_INTERVAL : gap), + preferred_accuracy(accu), preferred_time(time) { + memset(credentials, 0, sizeof(credentials)); + memset(provider, 0, sizeof(provider)); + if (NULL != cred) { + memcpy(credentials, cred, sizeof(credentials)-1); + } + if (NULL != prov) { + memcpy(provider, prov, sizeof(provider)-1); + } + } + + LocPosMode() : + mode(LOC_POSITION_MODE_MS_BASED), recurrence(GPS_POSITION_RECURRENCE_PERIODIC), + min_interval(MIN_POSSIBLE_FIX_INTERVAL), preferred_accuracy(50), preferred_time(120000) { + memset(credentials, 0, sizeof(credentials)); + memset(provider, 0, sizeof(provider)); + } + + inline bool equals(const LocPosMode &anotherMode) const + { + return anotherMode.mode == mode && + anotherMode.recurrence == recurrence && + anotherMode.min_interval == min_interval && + anotherMode.preferred_accuracy == preferred_accuracy && + anotherMode.preferred_time == preferred_time && + !strncmp(anotherMode.credentials, credentials, sizeof(credentials)-1) && + !strncmp(anotherMode.provider, provider, sizeof(provider)-1); + } + + inline void logv() const + { + LOC_LOGV ("Position mode: %s\n Position recurrence: %s\n min interval: %d\n preferred accuracy: %d\n preferred time: %d\n credentials: %s provider: %s", + loc_get_position_mode_name(mode), + loc_get_position_recurrence_name(recurrence), + min_interval, + preferred_accuracy, + preferred_time, + credentials, + provider); + } +}; + +typedef enum { + LOC_ENG_IF_REQUEST_TYPE_SUPL = 0, + LOC_ENG_IF_REQUEST_TYPE_WIFI, + LOC_ENG_IF_REQUEST_TYPE_ANY +} loc_if_req_type_e_type; + +typedef enum { + LOC_ENG_IF_REQUEST_SENDER_ID_QUIPC = 0, + LOC_ENG_IF_REQUEST_SENDER_ID_MSAPM, + LOC_ENG_IF_REQUEST_SENDER_ID_GPSONE_DAEMON, + LOC_ENG_IF_REQUEST_SENDER_ID_MODEM, + LOC_ENG_IF_REQUEST_SENDER_ID_UNKNOWN +} loc_if_req_sender_id_e_type; + struct loc_eng_msg { const void* owner; const int msgid; @@ -50,10 +119,12 @@ struct loc_eng_msg { owner(instance), msgid(id) { LOC_LOGV("creating msg %s", loc_get_msg_name(msgid)); + LOC_LOGV("creating msg ox%x", msgid); } virtual ~loc_eng_msg() { LOC_LOGV("deleting msg %s", loc_get_msg_name(msgid)); + LOC_LOGV("deleting msg ox%x", msgid); } }; @@ -67,6 +138,26 @@ struct loc_eng_msg_suple_version : public loc_eng_msg { } }; +struct loc_eng_msg_lpp_config : public loc_eng_msg { + const int lpp_config; + inline loc_eng_msg_lpp_config(void *instance, int profile) : + loc_eng_msg(instance, LOC_ENG_MSG_LPP_CONFIG), + lpp_config(profile) + { + LOC_LOGV("lpp profile: %d", profile); + } +}; + +struct loc_eng_msg_ext_power_config : public loc_eng_msg { + const int isBatteryCharging; + inline loc_eng_msg_ext_power_config(void* instance, int isBattCharging) : + loc_eng_msg(instance, LOC_ENG_MSG_EXT_POWER_CONFIG), + isBatteryCharging(isBattCharging) + { + LOC_LOGV("isBatteryCharging: %d", isBatteryCharging); + } +}; + struct loc_eng_msg_sensor_control_config : public loc_eng_msg { const int sensorsDisabled; inline loc_eng_msg_sensor_control_config(void* instance, int disabled) : @@ -78,12 +169,51 @@ struct loc_eng_msg_sensor_control_config : public loc_eng_msg { }; struct loc_eng_msg_sensor_properties : public loc_eng_msg { + const bool gyroBiasVarianceRandomWalk_valid; const float gyroBiasVarianceRandomWalk; - inline loc_eng_msg_sensor_properties(void* instance, float gyroBiasRandomWalk) : + const bool accelRandomWalk_valid; + const float accelRandomWalk; + const bool angleRandomWalk_valid; + const float angleRandomWalk; + const bool rateRandomWalk_valid; + const float rateRandomWalk; + const bool velocityRandomWalk_valid; + const float velocityRandomWalk; + inline loc_eng_msg_sensor_properties(void* instance, bool gyroBiasRandomWalk_valid, float gyroBiasRandomWalk, + bool accelRandomWalk_valid, float accelRandomWalk, + bool angleRandomWalk_valid, float angleRandomWalk, + bool rateRandomWalk_valid, float rateRandomWalk, + bool velocityRandomWalk_valid, float velocityRandomWalk) : loc_eng_msg(instance, LOC_ENG_MSG_SET_SENSOR_PROPERTIES), - gyroBiasVarianceRandomWalk(gyroBiasRandomWalk) + gyroBiasVarianceRandomWalk_valid(gyroBiasRandomWalk_valid), + gyroBiasVarianceRandomWalk(gyroBiasRandomWalk), + accelRandomWalk_valid(accelRandomWalk_valid), + accelRandomWalk(accelRandomWalk), + angleRandomWalk_valid(angleRandomWalk_valid), + angleRandomWalk(angleRandomWalk), + rateRandomWalk_valid(rateRandomWalk_valid), + rateRandomWalk(rateRandomWalk), + velocityRandomWalk_valid(velocityRandomWalk_valid), + velocityRandomWalk(velocityRandomWalk) { - LOC_LOGV("Gyro Bias Random Walk: %f", gyroBiasRandomWalk); + LOC_LOGV("Sensor properties validity, Gyro Random walk: %d Accel Random Walk: %d " + "Angle Random Walk: %d Rate Random Walk: %d " + "Velocity Random Walk: %d", + gyroBiasRandomWalk_valid, + accelRandomWalk_valid, + angleRandomWalk_valid, + rateRandomWalk_valid, + velocityRandomWalk_valid + ); + LOC_LOGV("Sensor properties, Gyro Random walk: %f Accel Random Walk: %f " + "Angle Random Walk: %f Rate Random Walk: %f " + "Velocity Random Walk: %f", + gyroBiasRandomWalk, + accelRandomWalk, + angleRandomWalk, + rateRandomWalk, + velocityRandomWalk + ); } }; @@ -93,55 +223,40 @@ struct loc_eng_msg_sensor_perf_control_config : public loc_eng_msg { const int accelBatchesPerSec; const int gyroSamplesPerBatch; const int gyroBatchesPerSec; + const int algorithmConfig; inline loc_eng_msg_sensor_perf_control_config(void* instance, int controlMode, int accelSamplesPerBatch, int accelBatchesPerSec, - int gyroSamplesPerBatch, int gyroBatchesPerSec) : + int gyroSamplesPerBatch, int gyroBatchesPerSec, + int algorithmConfig) : loc_eng_msg(instance, LOC_ENG_MSG_SET_SENSOR_PERF_CONTROL_CONFIG), controlMode(controlMode), accelSamplesPerBatch(accelSamplesPerBatch), accelBatchesPerSec(accelBatchesPerSec), gyroSamplesPerBatch(gyroSamplesPerBatch), - gyroBatchesPerSec(gyroBatchesPerSec) + gyroBatchesPerSec(gyroBatchesPerSec), + algorithmConfig(algorithmConfig) { LOC_LOGV("Sensor Perf Control Config (performanceControlMode)(%u) " - "accel(#smp,#batches) (%u,%u) gyro(#smp,#batches) (%u,%u)\n", + "accel(#smp,#batches) (%u,%u) gyro(#smp,#batches) (%u,%u), algorithmConfig(%u)\n", controlMode, accelSamplesPerBatch, accelBatchesPerSec, gyroSamplesPerBatch, - gyroBatchesPerSec + gyroBatchesPerSec, + algorithmConfig ); } }; struct loc_eng_msg_position_mode : public loc_eng_msg { - const LocPositionMode pMode; - const GpsPositionRecurrence pRecurrence; - const uint32_t minInterval; - const uint32_t preferredAccuracy; - const uint32_t preferredTime; - inline loc_eng_msg_position_mode() : - loc_eng_msg(NULL, LOC_ENG_MSG_SET_POSITION_MODE), - pMode(LOC_POSITION_MODE_STANDALONE), - pRecurrence(0), minInterval(0), - preferredAccuracy(0), preferredTime(0) {} + const LocPosMode pMode; inline loc_eng_msg_position_mode(void* instance, - LocPositionMode mode, - GpsPositionRecurrence recurrence, - uint32_t min_interval, - uint32_t preferred_accuracy, - uint32_t preferred_time) : + LocPosMode &mode) : loc_eng_msg(instance, LOC_ENG_MSG_SET_POSITION_MODE), - pMode(mode), pRecurrence(recurrence), minInterval(min_interval), - preferredAccuracy(preferred_accuracy), preferredTime(preferred_time) + pMode(mode) { - LOC_LOGV("Position mode: %s\n Position recurrence: %s\n min interval: %d\n preferred accuracy: %d\n preferred time: %d", - loc_get_position_mode_name(pMode), - loc_get_position_recurrence_name(pRecurrence), - minInterval, - preferredAccuracy, - preferredTime); + pMode.logv(); } }; @@ -193,18 +308,10 @@ struct loc_eng_msg_report_position : public loc_eng_msg { loc_eng_msg(instance, LOC_ENG_MSG_REPORT_POSITION), location(loc), locationExt(locExt), status(st) { -#ifdef QCOM_FEATURE_ULP - LOC_LOGV("flags: %d\n source: %d\n latitude: %f\n longitude: %f\n altitude: %f\n speed: %f\n bearing: %f\n accuracy: %f\n timestamp: %lld\n rawDataSize: %d\n rawData: %p\n Session status: %s", + LOC_LOGV("flags: %d\n source: %d\n latitude: %f\n longitude: %f\n altitude: %f\n speed: %f\n bearing: %f\n accuracy: %f\n timestamp: %lld\n rawDataSize: %d\n rawData: %p\n Session status: %d", location.flags, location.position_source, location.latitude, location.longitude, location.altitude, location.speed, location.bearing, location.accuracy, - location.timestamp, location.rawDataSize, location.rawData, - loc_get_position_sess_status_name(status)); -#else - LOC_LOGV("flags: %d\n latitude: %f\n longitude: %f\n altitude: %f\n speed: %f\n bearing: %f\n accuracy: %f\n timestamp: %lld\n Session status: %s", - location.flags, location.latitude, location.longitude, - location.altitude, location.speed, location.bearing, location.accuracy, - location.timestamp, loc_get_position_sess_status_name(status)); -#endif + location.timestamp, location.rawDataSize, location.rawData,status); } }; @@ -256,23 +363,23 @@ struct loc_eng_msg_report_nmea : public loc_eng_msg { }; struct loc_eng_msg_request_bit : public loc_eng_msg { - const unsigned int isSupl; + const loc_if_req_type_e_type ifType; const int ipv4Addr; char* const ipv6Addr; inline loc_eng_msg_request_bit(void* instance, - unsigned int is_supl, + loc_if_req_type_e_type type, int ipv4, char* ipv6) : loc_eng_msg(instance, LOC_ENG_MSG_REQUEST_BIT), - isSupl(is_supl), ipv4Addr(ipv4), + ifType(type), ipv4Addr(ipv4), ipv6Addr(NULL == ipv6 ? NULL : new char[16]) { if (NULL != ipv6Addr) memcpy(ipv6Addr, ipv6, 16); - LOC_LOGV("isSupl: %d, ipv4: %d.%d.%d.%d, ipv6: %s", isSupl, - (unsigned char)ipv4>>24, - (unsigned char)ipv4>>16, - (unsigned char)ipv4>>8, + LOC_LOGV("ifType: %d, ipv4: %d.%d.%d.%d, ipv6: %s", ifType, + (unsigned char)(ipv4>>24), + (unsigned char)(ipv4>>16), + (unsigned char)(ipv4>>8), (unsigned char)ipv4, NULL != ipv6Addr ? ipv6Addr : ""); } @@ -285,24 +392,61 @@ struct loc_eng_msg_request_bit : public loc_eng_msg { } }; +struct loc_eng_msg_request_wifi : public loc_eng_msg { + const loc_if_req_type_e_type ifType; + const loc_if_req_sender_id_e_type senderId; + char* const ssid; + char* const password; + inline loc_eng_msg_request_wifi(void* instance, + loc_if_req_type_e_type type, + loc_if_req_sender_id_e_type sender_id, + char* s, + char* p) : + loc_eng_msg(instance, LOC_ENG_MSG_REQUEST_WIFI), + ifType(type), senderId(sender_id), + ssid(NULL == s ? NULL : new char[SSID_BUF_SIZE]), + password(NULL == p ? NULL : new char[SSID_BUF_SIZE]) + { + if (NULL != ssid) + strlcpy(ssid, s, SSID_BUF_SIZE); + if (NULL != password) + strlcpy(password, p, SSID_BUF_SIZE); + LOC_LOGV("ifType: %d, senderId: %d, ssid: %s, password: %s", + ifType, + senderId, + NULL != ssid ? ssid : "", + NULL != password ? password : ""); + } + + inline ~loc_eng_msg_request_wifi() + { + if (NULL != ssid) { + delete[] ssid; + } + if (NULL != password) { + delete[] password; + } + } +}; + struct loc_eng_msg_release_bit : public loc_eng_msg { - const unsigned int isSupl; + const loc_if_req_type_e_type ifType; const int ipv4Addr; char* const ipv6Addr; inline loc_eng_msg_release_bit(void* instance, - unsigned int is_supl, + loc_if_req_type_e_type type, int ipv4, char* ipv6) : loc_eng_msg(instance, LOC_ENG_MSG_RELEASE_BIT), - isSupl(is_supl), ipv4Addr(ipv4), + ifType(type), ipv4Addr(ipv4), ipv6Addr(NULL == ipv6 ? NULL : new char[16]) { if (NULL != ipv6Addr) memcpy(ipv6Addr, ipv6, 16); - LOC_LOGV("isSupl: %d, ipv4: %d.%d.%d.%d, ipv6: %s", isSupl, - (unsigned char)ipv4>>24, - (unsigned char)ipv4>>16, - (unsigned char)ipv4>>8, + LOC_LOGV("ifType: %d, ipv4: %d.%d.%d.%d, ipv6: %s", ifType, + (unsigned char)(ipv4>>24), + (unsigned char)(ipv4>>16), + (unsigned char)(ipv4>>8), (unsigned char)ipv4, NULL != ipv6Addr ? ipv6Addr : ""); } @@ -315,6 +459,44 @@ struct loc_eng_msg_release_bit : public loc_eng_msg { } }; +struct loc_eng_msg_release_wifi : public loc_eng_msg { + const loc_if_req_type_e_type ifType; + const loc_if_req_sender_id_e_type senderId; + char* const ssid; + char* const password; + inline loc_eng_msg_release_wifi(void* instance, + loc_if_req_type_e_type type, + loc_if_req_sender_id_e_type sender_id, + char* s, + char* p) : + loc_eng_msg(instance, LOC_ENG_MSG_RELEASE_WIFI), + ifType(type), senderId(sender_id), + ssid(NULL == s ? NULL : new char[SSID_BUF_SIZE]), + password(NULL == p ? NULL : new char[SSID_BUF_SIZE]) + { + if (NULL != s) + strlcpy(ssid, s, SSID_BUF_SIZE); + if (NULL != p) + strlcpy(password, p, SSID_BUF_SIZE); + LOC_LOGV("ifType: %d, senderId: %d, ssid: %s, password: %s", + ifType, + senderId, + NULL != ssid ? ssid : "", + NULL != password ? password : ""); + } + + inline ~loc_eng_msg_release_wifi() + { + if (NULL != ssid) { + delete[] ssid; + } + if (NULL != password) { + delete[] password; + } + } +}; + + struct loc_eng_msg_request_atl : public loc_eng_msg { const int handle; const AGpsType type; @@ -452,7 +634,6 @@ struct loc_eng_msg_inject_xtra_data : public loc_eng_msg { } }; -#ifdef QCOM_FEATURE_IPV6 struct loc_eng_msg_atl_open_success : public loc_eng_msg { const AGpsStatusValue agpsType; const int length; @@ -479,30 +660,7 @@ struct loc_eng_msg_atl_open_success : public loc_eng_msg { delete[] apn; } }; -#else -struct loc_eng_msg_atl_open_success : public loc_eng_msg { - const int length; - char* const apn; - inline loc_eng_msg_atl_open_success(void* instance, - const char* name, - int len) : - loc_eng_msg(instance, LOC_ENG_MSG_ATL_OPEN_SUCCESS), - length(len), - apn(new char[len+1]) - { - memcpy((void*)apn, (void*)name, len); - apn[len] = 0; - LOC_LOGV("apn: %s\n", - apn); - } - inline ~loc_eng_msg_atl_open_success() - { - delete[] apn; - } -}; -#endif -#ifdef QCOM_FEATURE_IPV6 struct loc_eng_msg_atl_open_failed : public loc_eng_msg { const AGpsStatusValue agpsType; inline loc_eng_msg_atl_open_failed(void* instance, @@ -514,17 +672,7 @@ struct loc_eng_msg_atl_open_failed : public loc_eng_msg { loc_get_agps_type_name(agpsType)); } }; -#else -struct loc_eng_msg_atl_open_failed : public loc_eng_msg { - inline loc_eng_msg_atl_open_failed(void* instance) : - loc_eng_msg(instance, LOC_ENG_MSG_ATL_OPEN_FAILED) - { - LOC_LOGV(""); - } -}; -#endif -#ifdef QCOM_FEATURE_IPV6 struct loc_eng_msg_atl_closed : public loc_eng_msg { const AGpsStatusValue agpsType; inline loc_eng_msg_atl_closed(void* instance, @@ -536,15 +684,6 @@ struct loc_eng_msg_atl_closed : public loc_eng_msg { loc_get_agps_type_name(agpsType)); } }; -#else -struct loc_eng_msg_atl_closed : public loc_eng_msg { - inline loc_eng_msg_atl_closed(void* instance) : - loc_eng_msg(instance, LOC_ENG_MSG_ATL_CLOSED) - { - LOC_LOGV(""); - } -}; -#endif struct loc_eng_msg_set_data_enable : public loc_eng_msg { const int enable; @@ -567,6 +706,98 @@ struct loc_eng_msg_set_data_enable : public loc_eng_msg { } }; +struct loc_eng_msg_request_network_position : public loc_eng_msg { + const UlpNetworkRequestPos networkPosRequest; + inline loc_eng_msg_request_network_position (void* instance, UlpNetworkRequestPos networkPosReq) : + loc_eng_msg(instance, LOC_ENG_MSG_REQUEST_NETWORK_POSIITON), + networkPosRequest(networkPosReq) + { + LOC_LOGV("network position request: desired pos source %d\n request type: %d\n interval ms: %d ", + networkPosReq.desired_position_source, + networkPosReq.request_type, + networkPosReq.interval_ms); + } +}; + +struct loc_eng_msg_request_phone_context : public loc_eng_msg { + const UlpPhoneContextRequest contextRequest; + inline loc_eng_msg_request_phone_context (void* instance, UlpPhoneContextRequest contextReq) : + loc_eng_msg(instance, LOC_ENG_MSG_REQUEST_PHONE_CONTEXT), + contextRequest(contextReq) + { + LOC_LOGV("phone context request: request type 0x%x context type: 0x%x ", + contextRequest.request_type, + contextRequest.context_type); + } +}; + +struct ulp_msg_update_criteria : public loc_eng_msg { + const UlpLocationCriteria locationCriteria; + inline ulp_msg_update_criteria (void* instance, UlpLocationCriteria criteria) : + loc_eng_msg(instance, ULP_MSG_UPDATE_CRITERIA), + locationCriteria(criteria) + { + LOC_LOGV("location criteria: aciton %d\n valid mask: %d\n provider source: %d\n accuracy %d\n recurrence type %d\n min interval %d\n power consumption %d\n intermediate pos %d ", + locationCriteria.action, + locationCriteria.valid_mask, + locationCriteria.provider_source, + locationCriteria.preferred_horizontal_accuracy, + locationCriteria.recurrence_type, + locationCriteria.min_interval, + locationCriteria.preferred_power_consumption, + locationCriteria.intermediate_pos_report_enabled); + } +}; + +struct ulp_msg_inject_phone_context_settings : public loc_eng_msg { + const UlpPhoneContextSettings phoneSetting; + inline ulp_msg_inject_phone_context_settings(void* instance, UlpPhoneContextSettings setting) : + loc_eng_msg(instance, ULP_MSG_INJECT_PHONE_CONTEXT_SETTINGS), + phoneSetting(setting) + { + LOC_LOGV("context type: %d\n gps enabled: %d\n network position available %d\n wifi setting enabled %d\n battery charging %d" + "is_agps_setting_enabled %d, is_enh_location_services_enabled %d\n", + phoneSetting.context_type, + phoneSetting.is_gps_enabled, + phoneSetting.is_network_position_available, + phoneSetting.is_wifi_setting_enabled, + phoneSetting.is_battery_charging, + phoneSetting.is_agps_enabled, + phoneSetting.is_enh_location_services_enabled); + } +}; + +struct ulp_msg_inject_network_position : public loc_eng_msg { + const UlpNetworkPositionReport networkPosition; + inline ulp_msg_inject_network_position(void* instance, UlpNetworkPositionReport networkPos) : + loc_eng_msg(instance, ULP_MSG_INJECT_NETWORK_POSITION), + networkPosition(networkPos) + { + LOC_LOGV("flags: %d\n source: %d\n latitude: %f\n longitude: %f\n accuracy %d", + networkPosition.valid_flag, + networkPosition.position.pos_source, + networkPosition.position.latitude, + networkPosition.position.longitude, + networkPosition.position.HEPE); + } +}; + +struct ulp_msg_report_quipc_position : public loc_eng_msg { + const GpsLocation location; + const int quipc_error_code; + inline ulp_msg_report_quipc_position(void* instance, GpsLocation &loc, + int quipc_err) : + loc_eng_msg(instance, ULP_MSG_REPORT_QUIPC_POSITION), + location(loc), quipc_error_code(quipc_err) + { + LOC_LOGV("flags: %d\n source: %d\n latitude: %f\n longitude: %f\n altitude: %f\n speed: %f\n bearing: %f\n accuracy: %f\n timestamp: %lld\n rawDataSize: %d\n rawData: %p\n Quipc error: %d", + location.flags, location.position_source, location.latitude, location.longitude, + location.altitude, location.speed, location.bearing, location.accuracy, + location.timestamp, location.rawDataSize, location.rawData, + quipc_error_code); + } +}; + void loc_eng_msg_sender(void* loc_eng_data_p, void* msg); int loc_eng_msgget(int * p_req_msgq); int loc_eng_msgremove(int req_msgq); diff --git a/loc_api/libloc_api_50001/loc_eng_msg_id.h b/loc_api/libloc_api_50001/loc_eng_msg_id.h old mode 100755 new mode 100644 index f05f1f44..ff5a6bd7 --- a/loc_api/libloc_api_50001/loc_eng_msg_id.h +++ b/loc_api/libloc_api_50001/loc_eng_msg_id.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011,2012 Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -76,11 +76,48 @@ enum loc_eng_msg_ids_t { LOC_ENG_MSG_RELEASE_BIT, LOC_ENG_MSG_REQUEST_ATL, LOC_ENG_MSG_RELEASE_ATL, + LOC_ENG_MSG_REQUEST_WIFI, + LOC_ENG_MSG_RELEASE_WIFI, LOC_ENG_MSG_REQUEST_NI, LOC_ENG_MSG_INFORM_NI_RESPONSE, LOC_ENG_MSG_REQUEST_XTRA_DATA, LOC_ENG_MSG_REQUEST_TIME, - LOC_ENG_MSG_REQUEST_POSITION + LOC_ENG_MSG_REQUEST_POSITION, + LOC_ENG_MSG_EXT_POWER_CONFIG, + + // The following messages are added for ulp + LOC_ENG_MSG_REQUEST_PHONE_CONTEXT, + LOC_ENG_MSG_REQUEST_NETWORK_POSIITON, + + /* Following messages are for ulp, start at index 0x600 */ + + // Message is sent by GPS HAL layer to add/remove unique request criteria + ULP_MSG_UPDATE_CRITERIA = 0x600, + + // Message is sent by GPS HAL layer to request ULP to start producing position fixes + + ULP_MSG_START_FIX, + + // Message is sent by Android framework(GpsLocationProvider) + // to request ULP to stop producing position fixes + ULP_MSG_STOP_FIX, + + // Message is sent by Android framework(GpsLocationProvider) + // to inject phone context setting include initial phone context setting and subsequent changes + ULP_MSG_INJECT_PHONE_CONTEXT_SETTINGS, + + // Message is sent by network provider to INJECT the position in UlpNetworkPositionReport format + ULP_MSG_INJECT_NETWORK_POSITION, + + // Message is sent by QUIPC provider in order to report the position in GpsPosition format with QUIPC status + ULP_MSG_REPORT_QUIPC_POSITION, + + // Message is sent by QUIPC module in order to request some info from ULP + ULP_MSG_REQUEST_COARSE_POSITION, + + /* Message is sent by HAL to LOC API to configure LTE Positioning + Profile in modem */ + LOC_ENG_MSG_LPP_CONFIG }; #ifdef __cplusplus diff --git a/loc_api/libloc_api_50001/loc_eng_ni.cpp b/loc_api/libloc_api_50001/loc_eng_ni.cpp old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api_50001/loc_eng_ni.h b/loc_api/libloc_api_50001/loc_eng_ni.h old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api_50001/loc_eng_xtra.cpp b/loc_api/libloc_api_50001/loc_eng_xtra.cpp old mode 100755 new mode 100644 diff --git a/loc_api/libloc_api_50001/loc_eng_xtra.h b/loc_api/libloc_api_50001/loc_eng_xtra.h old mode 100755 new mode 100644 diff --git a/loc_api/loc_api_v02/Android.mk b/loc_api/loc_api_v02/Android.mk old mode 100755 new mode 100644 diff --git a/loc_api/loc_api_v02/LocApiV02Adapter.cpp b/loc_api/loc_api_v02/LocApiV02Adapter.cpp old mode 100755 new mode 100644 index e223983b..92acfc75 --- a/loc_api/loc_api_v02/LocApiV02Adapter.cpp +++ b/loc_api/loc_api_v02/LocApiV02Adapter.cpp @@ -26,6 +26,9 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#define LOG_NDEBUG 0 +#define LOG_TAG "LocSvc_adapter" + #include #include #include @@ -40,9 +43,6 @@ #include "loc_api_v02_log.h" #include "loc_api_sync_req.h" #include "LocApiAdapter.h" - -#define LOG_NDEBUG 0 -#define LOG_TAG "LocSvc_adapter" #include "loc_util_log.h" @@ -161,10 +161,7 @@ locClientCallbacksType globalCallbacks = /* Constructor for LocApiV02Adapter */ LocApiV02Adapter :: LocApiV02Adapter(LocEng &locEng): LocApiAdapter(locEng), clientHandle( LOC_CLIENT_INVALID_HANDLE_VALUE), - eventMask(convertMask(locEng.eventMask)), navigating(false), - fixCriteria (LOC_POSITION_MODE_MS_BASED, GPS_POSITION_RECURRENCE_PERIODIC, - LOC_API_V02_DEF_MIN_INTERVAL, LOC_API_V02_DEF_HORZ_ACCURACY, - LOC_API_V02_DEF_TIMEOUT ) + eventMask(convertMask(locEng.eventMask)) { // initialize loc_sync_req interface loc_sync_req_init(); @@ -236,6 +233,7 @@ enum loc_api_adapter_err LocApiV02Adapter :: startFix() memset (&set_mode_ind, 0, sizeof(set_mode_ind)); LOC_LOGV("%s:%d]: start \n", __func__, __LINE__); + fixCriteria.logv(); // fill in the start request switch(fixCriteria.mode) @@ -277,28 +275,27 @@ enum loc_api_adapter_err LocApiV02Adapter :: startFix() return LOC_API_ADAPTER_ERR_GENERAL_FAILURE; // error } - if(fixCriteria.min_interval > 0) - { - start_msg.minInterval_valid = 1; - start_msg.minInterval = fixCriteria.min_interval; - } + start_msg.minInterval_valid = 1; + start_msg.minInterval = fixCriteria.min_interval; - start_msg.horizontalAccuracyLevel_valid = 1; + if (fixCriteria.preferred_accuracy > 0) { + start_msg.horizontalAccuracyLevel_valid = 1; - if (fixCriteria.preferred_accuracy <= 100) - { - // fix needs high accuracy - start_msg.horizontalAccuracyLevel = eQMI_LOC_ACCURACY_HIGH_V02; - } - else if (fixCriteria.preferred_accuracy <= 1000) - { - //fix needs med accuracy - start_msg.horizontalAccuracyLevel = eQMI_LOC_ACCURACY_MED_V02; - } - else - { - //fix needs low accuracy - start_msg.horizontalAccuracyLevel = eQMI_LOC_ACCURACY_LOW_V02; + if (fixCriteria.preferred_accuracy <= 100) + { + // fix needs high accuracy + start_msg.horizontalAccuracyLevel = eQMI_LOC_ACCURACY_HIGH_V02; + } + else if (fixCriteria.preferred_accuracy <= 1000) + { + //fix needs med accuracy + start_msg.horizontalAccuracyLevel = eQMI_LOC_ACCURACY_MED_V02; + } + else + { + //fix needs low accuracy + start_msg.horizontalAccuracyLevel = eQMI_LOC_ACCURACY_LOW_V02; + } } start_msg.fixRecurrence_valid = 1; @@ -313,7 +310,25 @@ enum loc_api_adapter_err LocApiV02Adapter :: startFix() //dummy session id // TBD: store session ID, check for session id in pos reports. - start_msg.sessionId = LOC_API_V02_DEF_SESSION_ID;; + start_msg.sessionId = LOC_API_V02_DEF_SESSION_ID; + + if (fixCriteria.credentials[0] != 0) { + int size1 = sizeof(start_msg.applicationId.applicationName); + int size2 = sizeof(fixCriteria.credentials); + int len = ((size1 < size2) ? size1 : size2) - 1; + memcpy(start_msg.applicationId.applicationName, + fixCriteria.credentials, + len); + + size1 = sizeof(start_msg.applicationId.applicationProvider); + size2 = sizeof(fixCriteria.provider); + len = ((size1 < size2) ? size1 : size2) - 1; + memcpy(start_msg.applicationId.applicationProvider, + fixCriteria.provider, + len); + + start_msg.applicationId_valid = 1; + } req_union.pStartReq = &start_msg; @@ -322,13 +337,9 @@ enum loc_api_adapter_err LocApiV02Adapter :: startFix() if( eLOC_CLIENT_SUCCESS == status) { - navigating = true; return LOC_API_ADAPTER_ERR_SUCCESS; } - // start_fix failed so MO fix is not in progress - navigating = false; - return LOC_API_ADAPTER_ERR_GENERAL_FAILURE; } @@ -355,7 +366,6 @@ enum loc_api_adapter_err LocApiV02Adapter :: stopFix() if( eLOC_CLIENT_SUCCESS == status) { - navigating = false; return LOC_API_ADAPTER_ERR_SUCCESS; } @@ -366,42 +376,28 @@ enum loc_api_adapter_err LocApiV02Adapter :: stopFix() /* set the positioning fix criteria */ enum loc_api_adapter_err LocApiV02Adapter :: setPositionMode( - LocPositionMode mode, GpsPositionRecurrence recurrence, - uint32_t min_interval, uint32_t preferred_accuracy, - uint32_t preferred_time) + const LocPosMode *posMode) { + LOC_LOGV ("%s:%d]: posMode %p",__func__, __LINE__, posMode); - LOC_LOGV ("%s:%d]: interval = %d, mode = %d, recurrence = %d, preferred_accuracy = %d\n",__func__, __LINE__, - min_interval, mode, recurrence, preferred_accuracy); + if (NULL != posMode && + !fixCriteria.equals(*posMode)) { + //making a copy of the fix criteria + fixCriteria = *posMode; - //store the fix criteria - fixCriteria.mode = mode; + LOC_LOGD ("%s:%d]: new fix criteria", __func__, __LINE__); - fixCriteria.recurrence = recurrence; + if(true == navigating) + { + //fix is in progress, send a restart + LOC_LOGD ("%s:%d]: fix is in progress restarting the fix with new " + "criteria\n", __func__, __LINE__); - if(min_interval == 0) - { - fixCriteria.min_interval = MIN_POSSIBLE_FIX_INTERVAL; - } - else - { - fixCriteria.min_interval = min_interval; - } + return( startFix()); + } + } - fixCriteria.preferred_accuracy = preferred_accuracy; - - fixCriteria.preferred_time = preferred_time; - - if(true == navigating) - { - //fix is in progress, send a restart - LOC_LOGD ("%s:%d]: fix is in progress restarting the fix with new " - "criteria\n", __func__, __LINE__); - - return( startFix()); - } - - return LOC_API_ADAPTER_ERR_SUCCESS; + return LOC_API_ADAPTER_ERR_SUCCESS; } /* inject time into the position engine */ @@ -563,13 +559,12 @@ enum loc_api_adapter_err LocApiV02Adapter :: deleteAidingData(GpsAidingData f) } -#ifdef QCOM_FEATURE_DELEXT if( f & GPS_DELETE_TIME_GPS ) { delete_req.deleteGnssDataMask_valid = 1; delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_GPS_TIME_V02; } -#endif + if(f & GPS_DELETE_POSITION ) { delete_req.deleteGnssDataMask_valid = 1; @@ -631,7 +626,6 @@ enum loc_api_adapter_err LocApiV02Adapter :: deleteAidingData(GpsAidingData f) QMI_LOC_MASK_DELETE_CELLDB_NEIGHBOR_INFO_V02) ; } -#ifdef QCOM_FEATURE_DELEXT if(f & GPS_DELETE_ALMANAC_CORR ) { delete_req.deleteGnssDataMask_valid = 1; @@ -705,7 +699,6 @@ enum loc_api_adapter_err LocApiV02Adapter :: deleteAidingData(GpsAidingData f) delete_req.deleteGnssDataMask_valid = 1; delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_GLO_TIME_V02; } -#endif } req_union.pDeleteAssistDataReq = &delete_req; @@ -1002,7 +995,7 @@ enum loc_api_adapter_err LocApiV02Adapter :: setXtraData( return LOC_API_ADAPTER_ERR_SUCCESS; } -#ifdef QCOM_FEATURE_IPV6 + enum loc_api_adapter_err LocApiV02Adapter :: atlOpenStatus( int handle, int is_succ, char* apn, AGpsBearerType bear, AGpsType agpsType) @@ -1082,68 +1075,7 @@ enum loc_api_adapter_err LocApiV02Adapter :: atlOpenStatus( return LOC_API_ADAPTER_ERR_SUCCESS; } -#else -enum loc_api_adapter_err LocApiV02Adapter :: atlOpenStatus( - int handle, int is_succ, char* apn, AGpsType agpsType) -{ - locClientStatusEnumType result = eLOC_CLIENT_SUCCESS; - locClientReqUnionType req_union; - qmiLocInformLocationServerConnStatusReqMsgT_v02 conn_status_req; - qmiLocInformLocationServerConnStatusIndMsgT_v02 conn_status_ind; - LOC_LOGD("%s:%d]: ATL open handle = %d, is_succ = %d, " - "APN = [%s] \n", __func__, __LINE__, - handle, is_succ, apn); - - memset(&conn_status_req, 0, sizeof(conn_status_req)); - memset(&conn_status_ind, 0, sizeof(conn_status_ind)); - - // Fill in data - conn_status_req.connHandle = handle; - - conn_status_req.requestType = eQMI_LOC_SERVER_REQUEST_OPEN_V02; - - if(is_succ) - { - conn_status_req.statusType = eQMI_LOC_SERVER_REQ_STATUS_SUCCESS_V02; - - strlcpy(conn_status_req.apnProfile.apnName, apn, - sizeof(conn_status_req.apnProfile.apnName) ); - - - conn_status_req.apnProfile.pdnType = - eQMI_LOC_APN_PROFILE_PDN_TYPE_IPV4_V02; - - conn_status_req.apnProfile_valid = 1; - } - else - { - conn_status_req.statusType = eQMI_LOC_SERVER_REQ_STATUS_FAILURE_V02; - } - - req_union.pInformLocationServerConnStatusReq = &conn_status_req; - - result = loc_sync_send_req(clientHandle, - QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02, - req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT, - QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02, - &conn_status_ind); - - if(result != eLOC_CLIENT_SUCCESS || - eQMI_LOC_SUCCESS_V02 != conn_status_ind.status) - { - LOC_LOGE ("%s:%d]: Error status = %s, ind..status = %s ", - __func__, __LINE__, - loc_get_v02_client_status_name(result), - loc_get_v02_qmi_status_name(conn_status_ind.status)); - - return LOC_API_ADAPTER_ERR_GENERAL_FAILURE; - } - - return LOC_API_ADAPTER_ERR_SUCCESS; - -} -#endif /* close atl connection */ enum loc_api_adapter_err LocApiV02Adapter :: atlCloseStatus( int handle, int is_succ) @@ -1239,6 +1171,67 @@ enum loc_api_adapter_err LocApiV02Adapter :: setSUPLVersion(uint32_t version) return LOC_API_ADAPTER_ERR_SUCCESS; } +/* set the configuration for LTE positioning profile (LPP) */ +enum loc_api_adapter_err LocApiV02Adapter :: setLPPConfig(uint32_t profile) +{ + locClientStatusEnumType result = eLOC_CLIENT_SUCCESS; + locClientReqUnionType req_union; + qmiLocSetProtocolConfigParametersReqMsgT_v02 lpp_config_req; + qmiLocSetProtocolConfigParametersIndMsgT_v02 lpp_config_ind; + + LOC_LOGD("%s:%d]: lpp profile = %d\n", __func__, __LINE__, profile); + + memset(&lpp_config_req, 0, sizeof(lpp_config_req)); + memset(&lpp_config_ind, 0, sizeof(lpp_config_ind)); + + lpp_config_req.lppConfig_valid = 1; + // Default RRLP or User or Control plane configuration + switch(profile) + { + /* RRLP */ + case 0: + lpp_config_req.lppConfig = profile; + break; + + /* User plane */ + case 1: + lpp_config_req.lppConfig = QMI_LOC_LPP_CONFIG_ENABLE_USER_PLANE_V02; + break; + + case 2: + lpp_config_req.lppConfig = QMI_LOC_LPP_CONFIG_ENABLE_CONTROL_PLANE_V02; + break; + + default: + LOC_LOGE("%s:%d]: Invalid LPP Profile Config Setting Provided in gps.conf = %d!", + __FUNCTION__, + __LINE__, + profile); + return LOC_API_ADAPTER_ERR_INVALID_PARAMETER; + break; + } + + req_union.pSetProtocolConfigParametersReq = &lpp_config_req; + + result = loc_sync_send_req(clientHandle, + QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02, + req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT, + QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02, + &lpp_config_ind); + + if(result != eLOC_CLIENT_SUCCESS || + eQMI_LOC_SUCCESS_V02 != lpp_config_ind.status) + { + LOC_LOGE ("%s:%d]: Error status = %s, ind..status = %s ", + __func__, __LINE__, + loc_get_v02_client_status_name(result), + loc_get_v02_qmi_status_name(lpp_config_ind.status)); + + return LOC_API_ADAPTER_ERR_GENERAL_FAILURE; + } + return LOC_API_ADAPTER_ERR_SUCCESS; +} + /* set the Sensor Configuration */ enum loc_api_adapter_err LocApiV02Adapter :: setSensorControlConfig(int sensorsDisabled) { @@ -1280,7 +1273,11 @@ enum loc_api_adapter_err LocApiV02Adapter :: setSensorControlConfig(int sensorsD } /* set the Sensor Properties */ -enum loc_api_adapter_err LocApiV02Adapter :: setSensorProperties(float gyroBiasVarianceRandomWalk) +enum loc_api_adapter_err LocApiV02Adapter :: setSensorProperties(bool gyroBiasVarianceRandomWalk_valid, float gyroBiasVarianceRandomWalk, + bool accelBiasVarianceRandomWalk_valid, float accelBiasVarianceRandomWalk, + bool angleBiasVarianceRandomWalk_valid, float angleBiasVarianceRandomWalk, + bool rateBiasVarianceRandomWalk_valid, float rateBiasVarianceRandomWalk, + bool velocityBiasVarianceRandomWalk_valid, float velocityBiasVarianceRandomWalk) { locClientStatusEnumType result = eLOC_CLIENT_SUCCESS; locClientReqUnionType req_union; @@ -1288,15 +1285,30 @@ enum loc_api_adapter_err LocApiV02Adapter :: setSensorProperties(float gyroBiasV qmiLocSetSensorPropertiesReqMsgT_v02 sensor_prop_req; qmiLocSetSensorPropertiesIndMsgT_v02 sensor_prop_ind; - LOC_LOGI("%s:%d]: sensors prop gyroBiasRandomWalk = %f\n", - __func__, __LINE__, gyroBiasVarianceRandomWalk); + LOC_LOGI("%s:%d]: sensors prop: gyroBiasRandomWalk = %f, accelRandomWalk = %f, " + "angleRandomWalk = %f, rateRandomWalk = %f, velocityRandomWalk = %f\n", + __func__, __LINE__, gyroBiasVarianceRandomWalk, accelBiasVarianceRandomWalk, + angleBiasVarianceRandomWalk, rateBiasVarianceRandomWalk, velocityBiasVarianceRandomWalk); memset(&sensor_prop_req, 0, sizeof(sensor_prop_req)); memset(&sensor_prop_ind, 0, sizeof(sensor_prop_ind)); - sensor_prop_req.gyroBiasVarianceRandomWalk_valid = 1; + /* Set the validity bit and value for each sensor property */ + sensor_prop_req.gyroBiasVarianceRandomWalk_valid = gyroBiasVarianceRandomWalk_valid; sensor_prop_req.gyroBiasVarianceRandomWalk = gyroBiasVarianceRandomWalk; + sensor_prop_req.accelerationRandomWalkSpectralDensity_valid = accelBiasVarianceRandomWalk_valid; + sensor_prop_req.accelerationRandomWalkSpectralDensity = accelBiasVarianceRandomWalk; + + sensor_prop_req.angleRandomWalkSpectralDensity_valid = angleBiasVarianceRandomWalk_valid; + sensor_prop_req.angleRandomWalkSpectralDensity = angleBiasVarianceRandomWalk; + + sensor_prop_req.rateRandomWalkSpectralDensity_valid = rateBiasVarianceRandomWalk_valid; + sensor_prop_req.rateRandomWalkSpectralDensity = rateBiasVarianceRandomWalk; + + sensor_prop_req.velocityRandomWalkSpectralDensity_valid = velocityBiasVarianceRandomWalk_valid; + sensor_prop_req.velocityRandomWalkSpectralDensity = velocityBiasVarianceRandomWalk; + req_union.pSetSensorPropertiesReq = &sensor_prop_req; result = loc_sync_send_req(clientHandle, @@ -1322,7 +1334,8 @@ enum loc_api_adapter_err LocApiV02Adapter :: setSensorProperties(float gyroBiasV /* set the Sensor Performance Config */ enum loc_api_adapter_err LocApiV02Adapter :: setSensorPerfControlConfig(int controlMode, int accelSamplesPerBatch, int accelBatchesPerSec, - int gyroSamplesPerBatch, int gyroBatchesPerSec) + int gyroSamplesPerBatch, int gyroBatchesPerSec, + int algorithmConfig) { locClientStatusEnumType result = eLOC_CLIENT_SUCCESS; locClientReqUnionType req_union; @@ -1331,14 +1344,16 @@ enum loc_api_adapter_err LocApiV02Adapter :: setSensorPerfControlConfig(int cont qmiLocSetSensorPerformanceControlConfigIndMsgT_v02 sensor_perf_config_ind; LOC_LOGD("%s:%d]: Sensor Perf Control Config (performanceControlMode)(%u) " - "accel(#smp,#batches) (%u,%u) gyro(#smp,#batches) (%u,%u)\n", + "accel(#smp,#batches) (%u,%u) gyro(#smp,#batches) (%u,%u) " + "algorithmConfig(%u)\n", __FUNCTION__, __LINE__, controlMode, accelSamplesPerBatch, accelBatchesPerSec, gyroSamplesPerBatch, - gyroBatchesPerSec + gyroBatchesPerSec, + algorithmConfig ); memset(&sensor_perf_config_req, 0, sizeof(sensor_perf_config_req)); @@ -1352,6 +1367,8 @@ enum loc_api_adapter_err LocApiV02Adapter :: setSensorPerfControlConfig(int cont sensor_perf_config_req.gyroSamplingSpec_valid = 1; sensor_perf_config_req.gyroSamplingSpec.batchesPerSecond = gyroBatchesPerSec; sensor_perf_config_req.gyroSamplingSpec.samplesPerBatch = gyroSamplesPerBatch; + sensor_perf_config_req.algorithmConfig_valid = 1; + sensor_perf_config_req.algorithmConfig = algorithmConfig; req_union.pSetSensorPerformanceControlConfigReq = &sensor_perf_config_req; @@ -1375,6 +1392,65 @@ enum loc_api_adapter_err LocApiV02Adapter :: setSensorPerfControlConfig(int cont return LOC_API_ADAPTER_ERR_SUCCESS; } +/* set the External Power Config */ +enum loc_api_adapter_err LocApiV02Adapter :: setExtPowerConfig(int isBatteryCharging) +{ + locClientStatusEnumType result = eLOC_CLIENT_SUCCESS; + locClientReqUnionType req_union; + + qmiLocSetExternalPowerConfigReqMsgT_v02 ext_pwr_req; + qmiLocGetExternalPowerConfigIndMsgT_v02 ext_pwr_ind; + + LOC_LOGI("%s:%d]: Ext Pwr Config (isBatteryCharging)(%u)", + __FUNCTION__, + __LINE__, + isBatteryCharging + ); + + memset(&ext_pwr_req, 0, sizeof(ext_pwr_req)); + memset(&ext_pwr_ind, 0, sizeof(ext_pwr_ind)); + + switch(isBatteryCharging) + { + /* Charging */ + case 1: + ext_pwr_req.externalPowerState = eQMI_LOC_EXTERNAL_POWER_CONNECTED_V02; + break; + + /* Not charging */ + case 0: + ext_pwr_req.externalPowerState = eQMI_LOC_EXTERNAL_POWER_NOT_CONNECTED_V02; + break; + + default: + LOC_LOGE("%s:%d]: Invalid ext power state = %d!", + __FUNCTION__, + __LINE__, + isBatteryCharging); + return LOC_API_ADAPTER_ERR_INVALID_PARAMETER; + break; + } + + req_union.pSetExternalPowerConfigReq = &ext_pwr_req; + + result = loc_sync_send_req(clientHandle, + QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02, + req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT, + QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02, + &ext_pwr_ind); + + if(result != eLOC_CLIENT_SUCCESS || + eQMI_LOC_SUCCESS_V02 != ext_pwr_ind.status) + { + LOC_LOGE ("%s:%d]: Error status = %d, ind..status = %d ", + __func__, __LINE__, result, ext_pwr_ind.status); + + return LOC_API_ADAPTER_ERR_GENERAL_FAILURE; + } + + return LOC_API_ADAPTER_ERR_SUCCESS; +} + /* Convert event mask from loc eng to loc_api_v02 format */ locClientEventMaskType LocApiV02Adapter :: convertMask( LOC_API_ADAPTER_EVENT_MASK_T mask) @@ -1461,7 +1537,7 @@ void LocApiV02Adapter :: reportPosition ( const qmiLocEventPositionReportIndMsgT_v02 *location_report_ptr) { GpsLocation location; - + LOC_LOGD("Reporting postion from V2 Adapter\n"); memset(&location, 0, sizeof (GpsLocation)); location.size = sizeof(location); // Process the position from final and intermediate reports @@ -1518,7 +1594,9 @@ void LocApiV02Adapter :: reportPosition ( location.flags |= GPS_LOCATION_HAS_ACCURACY; location.accuracy = location_report_ptr->horUncCircular; } - + //Mark the location source as from GNSS + location.flags |= LOCATION_HAS_SOURCE_INFO; + location.position_source = ULP_LOCATION_IS_FROM_GNSS; LocApiAdapter::reportPosition( location, locEngHandle.extPosInfo((void*)location_report_ptr), (location_report_ptr->sessionStatus @@ -1639,7 +1717,7 @@ void LocApiV02Adapter :: reportSv ( } } - if (SvStatus.num_svs != 0) + if (SvStatus.num_svs >= 0) { LOC_LOGV ("%s:%d]: firing SV callback\n", __func__, __LINE__); LocApiAdapter::reportSv(SvStatus, @@ -1713,8 +1791,7 @@ void LocApiV02Adapter :: reportAtlRequest( // service ATL open request; copy the WWAN type if(server_request_ptr->requestType == eQMI_LOC_SERVER_REQUEST_OPEN_V02 ) { - AGpsType agpsType; -#ifdef QCOM_FEATURE_IPV6 + AGpsType agpsType = AGPS_TYPE_WWAN_ANY; switch(server_request_ptr->wwanType) { case eQMI_LOC_WWAN_TYPE_INTERNET_V02: @@ -1729,9 +1806,6 @@ void LocApiV02Adapter :: reportAtlRequest( agpsType = AGPS_TYPE_WWAN_ANY; break; } -#else - agpsType = AGPS_TYPE_SUPL; -#endif LocApiAdapter::requestATL(connHandle, agpsType); } diff --git a/loc_api/loc_api_v02/LocApiV02Adapter.h b/loc_api/loc_api_v02/LocApiV02Adapter.h old mode 100755 new mode 100644 index 487e98eb..04f931ee --- a/loc_api/loc_api_v02/LocApiV02Adapter.h +++ b/loc_api/loc_api_v02/LocApiV02Adapter.h @@ -34,25 +34,6 @@ #include #include -/* Fix criteria structure*/ -struct LocApiV02FixCriteria -{ - LocPositionMode mode; - GpsPositionRecurrence recurrence; - uint32_t min_interval ; - uint32_t preferred_accuracy ; - uint32_t preferred_time; - - /* Constructor for the structure */ - inline LocApiV02FixCriteria (LocPositionMode mode, - GpsPositionRecurrence recur, - uint32_t min_int, - uint32_t pref_acc, - uint32_t pref_time) : - mode(mode), recurrence(recur), min_interval(min_int), - preferred_accuracy(pref_acc), preferred_time(pref_time) {} -}; - /* This class derives from the LocApiAdapter class. The members of this class are responsible for converting the Loc API V02 data structures into Loc Engine data structures. @@ -66,15 +47,6 @@ class LocApiV02Adapter : public LocApiAdapter { /* events the client is registered for */ locClientEventMaskType eventMask; - /* current session state */ - bool navigating; - - /* current fix criteria, for Loc aPI V02 this is - stored when set_position_mode is called and - sent out with Loc aPI V02 start message when the - start_fix() is called by loc engine. */ - LocApiV02FixCriteria fixCriteria; - /* Convert event mask from loc eng to loc_api_v02 format */ locClientEventMaskType convertMask(LOC_API_ADAPTER_EVENT_MASK_T mask); @@ -145,9 +117,7 @@ public: virtual enum loc_api_adapter_err stopFix(); virtual enum loc_api_adapter_err - setPositionMode(LocPositionMode mode, GpsPositionRecurrence recurrence, - uint32_t min_interval, uint32_t preferred_accuracy, - uint32_t preferred_time); + setPositionMode(const LocPosMode *mode); virtual enum loc_api_adapter_err setTime(GpsUtcTime time, int64_t timeReference, int uncertainty); @@ -168,30 +138,27 @@ public: setServer(unsigned int ip, int port, LocServerType type); virtual enum loc_api_adapter_err setXtraData(char* data, int length); -#ifdef QCOM_FEATURE_IPV6 virtual enum loc_api_adapter_err atlOpenStatus(int handle, int is_succ, char* apn, AGpsBearerType bear, AGpsType agpsType); -#else - virtual enum loc_api_adapter_err - atlOpenStatus(int handle, int is_succ, char* apn, - AGpsType agpsType); -#endif virtual enum loc_api_adapter_err atlCloseStatus(int handle, int is_succ); virtual enum loc_api_adapter_err setSUPLVersion(uint32_t version); + virtual enum loc_api_adapter_err setLPPConfig(uint32_t profile); virtual enum loc_api_adapter_err setSensorControlConfig(int sensorUsage); virtual enum loc_api_adapter_err - setSensorProperties(float gyroBiasVarianceRandomWalk); + setSensorProperties(bool gyroBiasVarianceRandomWalk_valid, float gyroBiasVarianceRandomWalk, + bool accelBiasVarianceRandomWalk_valid, float accelBiasVarianceRandomWalk, + bool angleBiasVarianceRandomWalk_valid, float angleBiasVarianceRandomWalk, + bool rateBiasVarianceRandomWalk_valid, float rateBiasVarianceRandomWalk, + bool velocityBiasVarianceRandomWalk_valid, float velocityBiasVarianceRandomWalk); virtual enum loc_api_adapter_err - setSensorPerfControlConfig(int controlMode, - int accelSamplesPerBatch, - int accelBatchesPerSec, - int gyroSamplesPerBatch, - int gyroBatchesPerSec); + setSensorPerfControlConfig(int controlMode, int accelSamplesPerBatch, int accelBatchesPerSec, + int gyroSamplesPerBatch, int gyroBatchesPerSec, int algorithmConfig); + virtual enum loc_api_adapter_err setExtPowerConfig(int isBatteryCharging); }; #endif //LOC_API_V_0_2_ADAPTER_H diff --git a/loc_api/loc_api_v02/loc_api_sync_req.c b/loc_api/loc_api_v02/loc_api_sync_req.c old mode 100755 new mode 100644 index b75f1630..596a8d35 --- a/loc_api/loc_api_v02/loc_api_sync_req.c +++ b/loc_api/loc_api_v02/loc_api_sync_req.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -25,7 +25,6 @@ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #include #include #include @@ -36,7 +35,6 @@ #include #include "loc_api_v02_client.h" -#include "loc_api_v02_log.h" #include "loc_api_sync_req.h" /* Logging */ @@ -162,7 +160,7 @@ void loc_sync_process_ind( ) { - LOC_LOGV("%s:%d]: received indication, handle = %d ind_id = %d \n", + LOC_LOGV("%s:%d]: received indication, handle = %p ind_id = %u \n", __func__,__LINE__, client_handle, ind_id); pthread_mutex_lock(&loc_sync_call_mutex); @@ -353,7 +351,7 @@ static int loc_sync_select_ind( { int select_id = loc_alloc_slot(); - LOC_LOGV("%s:%d]: client handle %d, ind_id %u, req_id %u \n", + LOC_LOGV("%s:%d]: client handle %p, ind_id %u, req_id %u \n", __func__, __LINE__, client_handle, ind_id, req_id); if (select_id < 0) diff --git a/loc_api/loc_api_v02/loc_api_sync_req.h b/loc_api/loc_api_v02/loc_api_sync_req.h old mode 100755 new mode 100644 diff --git a/loc_api/loc_api_v02/loc_api_v02_client.c b/loc_api/loc_api_v02/loc_api_v02_client.c old mode 100755 new mode 100644 index 4d34adc4..26ecfd26 --- a/loc_api/loc_api_v02/loc_api_v02_client.c +++ b/loc_api/loc_api_v02/loc_api_v02_client.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -26,6 +26,7 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include "qmi_client.h" #include "qmi_idl_lib.h" #include "qmi_cci_target_ext.h" @@ -33,23 +34,15 @@ #if defined( _ANDROID_) #include "qmi_cci_target.h" #include "qmi_cci_common.h" -#elif defined(LOC_UTIL_TARGET_OFF_TARGET) -#include -#include -#include +#define LOG_NDEBUG 0 +#define LOG_TAG "LocSvc_api_v02" #endif //_ANDROID_ #include #include -#include #include #include #include "loc_api_v02_client.h" -#include "loc_api_v02_log.h" - -#define LOG_NDEBUG 0 -#define LOG_TAG "LocSvc_api_v02" - #include "loc_util_log.h" #ifdef LOC_UTIL_TARGET_OFF_TARGET @@ -71,7 +64,8 @@ #endif //LOC_UTIL_TARGET_OFF_TARGET //timeout in ms to wait for the service to come up -#define LOC_CLIENT_SERVICE_TIMEOUT (20000) +#define LOC_CLIENT_SERVICE_TIMEOUT_UNIT (4000) +#define LOC_CLIENT_SERVICE_TIMEOUT_TOTAL (40000) /* Table to relate eventId, size and mask value used to enable the event*/ typedef struct @@ -152,7 +146,22 @@ static locClientEventIndTableStructT locClientEventIndTable[]= { //Location Server Connection Request event { QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02, sizeof(qmiLocEventLocationServerConnectionReqIndMsgT_v02), - QMI_LOC_EVENT_MASK_LOCATION_SERVER_CONNECTION_REQ_V02 } + QMI_LOC_EVENT_MASK_LOCATION_SERVER_CONNECTION_REQ_V02 }, + + // NI Geofence Event + { QMI_LOC_EVENT_NI_GEOFENCE_NOTIFICATION_IND_V02, + sizeof(qmiLocEventNiGeofenceNotificationIndMsgT_v02), + QMI_LOC_EVENT_MASK_NI_GEOFENCE_NOTIFICATION_V02}, + + // Geofence General Alert Event + { QMI_LOC_EVENT_GEOFENCE_GEN_ALERT_IND_V02, + sizeof(qmiLocEventGeofenceGenAlertIndMsgT_v02), + QMI_LOC_EVENT_MASK_GEOFENCE_GEN_ALERT_V02}, + + //Geofence Breach event + { QMI_LOC_EVENT_GEOFENCE_BREACH_NOTIFICATION_IND_V02, + sizeof(qmiLocEventGeofenceBreachIndMsgT_v02), + QMI_LOC_EVENT_MASK_GEOFENCE_BREACH_NOTIFICATION_V02} }; /* table to relate the respInd Id with its size */ @@ -345,8 +354,27 @@ static locClientRespIndTableStructT locClientRespIndTable[]= { // Get Position Engine Config { QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02, - sizeof(qmiLocGetPositionEngineConfigParametersIndMsgT_v02)} + sizeof(qmiLocGetPositionEngineConfigParametersIndMsgT_v02)}, + //Add a Circular Geofence + { QMI_LOC_ADD_CIRCULAR_GEOFENCE_IND_V02, + sizeof(qmiLocAddCircularGeofenceIndMsgT_v02)}, + + //Delete a Geofence + { QMI_LOC_DELETE_GEOFENCE_IND_V02, + sizeof(qmiLocDeleteGeofenceIndMsgT_v02)} , + + //Query a Geofence + { QMI_LOC_QUERY_GEOFENCE_IND_V02, + sizeof(qmiLocQueryGeofenceIndMsgT_v02)}, + + //Edit a Geofence + { QMI_LOC_EDIT_GEOFENCE_IND_V02, + sizeof(qmiLocEditGeofenceIndMsgT_v02)}, + + //Get best available position + { QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02, + sizeof(qmiLocGetBestAvailablePositionIndMsgT_v02)} }; @@ -467,7 +495,7 @@ static locClientStatusEnumType convertQmiResponseToLocStatus( locClientStatusEnumType status = eLOC_CLIENT_FAILURE_INTERNAL; // if result == SUCCESS don't look at error code - if(pResponse->resp.result == QMI_RESULT_SUCCESS ) + if(pResponse->resp.result == QMI_RESULT_SUCCESS_V01 ) { status = eLOC_CLIENT_SUCCESS; } @@ -476,6 +504,7 @@ static locClientStatusEnumType convertQmiResponseToLocStatus( switch(pResponse->resp.error) { case QMI_ERR_MALFORMED_MSG_V01: + case QMI_ERR_INVALID_ARG_V01: status = eLOC_CLIENT_FAILURE_INVALID_PARAMETER; break; @@ -749,6 +778,27 @@ static bool locClientHandleIndication( break; } + case QMI_LOC_EVENT_NI_GEOFENCE_NOTIFICATION_IND_V02: + { + //locClientHandleNiGeofenceNotificationInd(user_handle, msg_id, ind_buf, ind_buf_len); + status = true; + break; + } + + case QMI_LOC_EVENT_GEOFENCE_GEN_ALERT_IND_V02: + { + //locClientHandleGeofenceGenAlertInd(user_handle, msg_id, ind_buf, ind_buf_len); + status = true; + break; + } + + case QMI_LOC_EVENT_GEOFENCE_BREACH_NOTIFICATION_IND_V02: + { + //locClientHandleGeofenceBreachInd(user_handle, msg_id, ind_buf, ind_buf_len); + status = true; + break; + } + //------------------------------------------------------------------------- // handle the response indications @@ -761,6 +811,13 @@ static bool locClientHandleIndication( indBuffer, indSize); break; } + + case QMI_LOC_GET_FIX_CRITERIA_IND_V02: + { + status = true; + break; + } + // predicted orbits data response indication case QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02: { @@ -847,6 +904,50 @@ static bool locClientHandleIndication( status = true; break; } + + case QMI_LOC_ADD_CIRCULAR_GEOFENCE_IND_V02: + { + // locClientHandleAddCircularGeofenceInd( + // user_handle, msg_id, ind_buf, ind_buf_len); + status = true; + break; + } + + case QMI_LOC_DELETE_GEOFENCE_IND_V02: + { + // locClientHandleDeleteGeofenceInd( + // user_handle, msg_id, ind_buf, ind_buf_len); + status = true; + break; + } + + case QMI_LOC_EDIT_GEOFENCE_IND_V02: + { + // locClientHandleEditGeofenceInd( + // user_handle, msg_id, ind_buf, ind_buf_len); + status = true; + break; + } + + case QMI_LOC_QUERY_GEOFENCE_IND_V02: + { + // locClientHandleQueryGeofenceInd( + // user_handle, msg_id, ind_buf, ind_buf_len); + status = true; + break; + } + + case QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02: + { + status = true; + break; + } + case QMI_LOC_GET_ENGINE_LOCK_IND_V02: + { + status = true; + break; + } + // for indications that only have a "status" field case QMI_LOC_NI_USER_RESPONSE_IND_V02: case QMI_LOC_INJECT_UTC_TIME_IND_V02: @@ -971,7 +1072,7 @@ static void locClientIndCb // check user handle if(memcmp(&pCallbackData->userHandle, &user_handle, sizeof(user_handle))) { - LOC_LOGE("%s:%d]: invalid user_handle got 0x%x expected 0x%x\n", + LOC_LOGE("%s:%d]: invalid user_handle got %p expected %p\n", __func__, __LINE__, user_handle, pCallbackData->userHandle); return; @@ -1315,6 +1416,12 @@ static bool validateRequest( break; } + case QMI_LOC_GET_SENSOR_PROPERTIES_REQ_V02: + { + *pOutLen = sizeof(qmiLocGetSensorPropertiesReqMsgT_v02); + break; + } + case QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02: { *pOutLen = sizeof(qmiLocSetSensorPropertiesReqMsgT_v02); @@ -1347,6 +1454,31 @@ static bool validateRequest( *pOutLen = sizeof(qmiLocGetPositionEngineConfigParametersReqMsgT_v02); break; } + case QMI_LOC_ADD_CIRCULAR_GEOFENCE_REQ_V02: + { + *pOutLen = sizeof(qmiLocAddCircularGeofenceReqMsgT_v02); + break; + } + case QMI_LOC_DELETE_GEOFENCE_REQ_V02: + { + *pOutLen = sizeof(qmiLocDeleteGeofenceReqMsgT_v02); + break; + } + case QMI_LOC_QUERY_GEOFENCE_REQ_V02: + { + *pOutLen = sizeof(qmiLocQueryGeofenceReqMsgT_v02); + break; + } + case QMI_LOC_EDIT_GEOFENCE_REQ_V02: + { + *pOutLen = sizeof(qmiLocEditGeofenceReqMsgT_v02); + break; + } + case QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02: + { + *pOutLen = sizeof(qmiLocGetBestAvailablePositionReqMsgT_v02); + break; + } // ALL requests with no payload case QMI_LOC_GET_SERVICE_REVISION_REQ_V02: @@ -1364,7 +1496,6 @@ static bool validateRequest( case QMI_LOC_GET_CRADLE_MOUNT_CONFIG_REQ_V02: case QMI_LOC_GET_EXTERNAL_POWER_CONFIG_REQ_V02: case QMI_LOC_GET_SENSOR_CONTROL_CONFIG_REQ_V02: - case QMI_LOC_GET_SENSOR_PROPERTIES_REQ_V02: case QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02: { noPayloadFlag = true; @@ -1401,121 +1532,176 @@ static bool validateRequest( static locClientStatusEnumType locClientQmiCtrlPointInit( locClientCallbackDataType *pLocClientCbData) { - uint32_t num_services, num_entries = 10; qmi_client_type clnt, notifier; - qmi_client_os_params os_params; + bool notifierInitFlag = false; + locClientStatusEnumType status = eLOC_CLIENT_SUCCESS; + // instances of this service + qmi_service_info *pServiceInfo = NULL; - // num instances of this service - qmi_service_info serviceInfo[5]; - - qmi_client_error_type rc = QMI_NO_ERR; - - // Get the service object for the qmiLoc Service - qmi_idl_service_object_type locClientServiceObject = - loc_get_service_object_v02(); - - // Verify that qmiLoc_get_service_object did not return NULL - if (NULL == locClientServiceObject) + do { - LOC_LOGE("%s:%d]: qmiLoc_get_service_object_v02 failed\n" , - __func__, __LINE__ ); - return(eLOC_CLIENT_FAILURE_INTERNAL); - } + uint32_t num_services = 0, num_entries = 0; + qmi_client_error_type rc = QMI_NO_ERR; + bool nosignal = false; + // Get the service object for the qmiLoc Service + qmi_idl_service_object_type locClientServiceObject = + loc_get_service_object_v02(); - // register for service notification - rc = qmi_client_notifier_init(locClientServiceObject, &os_params, ¬ifier); + // Verify that qmiLoc_get_service_object did not return NULL + if (NULL == locClientServiceObject) + { + LOC_LOGE("%s:%d]: qmiLoc_get_service_object_v02 failed\n" , + __func__, __LINE__ ); + status = eLOC_CLIENT_FAILURE_INTERNAL; + break; + } - if(rc != QMI_NO_ERR) - { - LOC_LOGE("%s:%d]: qmi_client_notifier_init failed\n", - __func__, __LINE__ ); - return(eLOC_CLIENT_FAILURE_INTERNAL); - } - - /* If service is not up wait on a signal until the service is up - * or a timeout occurs. */ - - QMI_CCI_OS_SIGNAL_WAIT(&os_params, LOC_CLIENT_SERVICE_TIMEOUT); - - if(QMI_CCI_OS_SIGNAL_TIMED_OUT(&os_params)) - { - // timed out, return with error - LOC_LOGE("%s:%d]: timed out waiting for service\n", - __func__, __LINE__); - - return(eLOC_CLIENT_FAILURE_TIMEOUT); - } - else - { // get the service addressing information rc = qmi_client_get_service_list( locClientServiceObject, NULL, NULL, &num_services); - LOC_LOGV("%s:%d]: qmi_client_get_service_list() returned %d " - "num_services = %d\n", __func__, __LINE__, rc, - num_services); + LOC_LOGV("%s:%d]: qmi_client_get_service_list() first try rc %d, " + "num_services %d", __func__, __LINE__, rc, num_services); + + if (rc != QMI_NO_ERR) { + // bummer, service list is not up. + // We need to try again after a timed wait + qmi_client_os_params os_params; + int timeout = 0; + + // register for service notification + rc = qmi_client_notifier_init(locClientServiceObject, &os_params, ¬ifier); + notifierInitFlag = (NULL != notifier); + + if (rc != QMI_NO_ERR) { + LOC_LOGE("%s:%d]: qmi_client_notifier_init failed %d\n", + __func__, __LINE__, rc); + status = eLOC_CLIENT_FAILURE_INTERNAL; + break; + } + + do { + QMI_CCI_OS_SIGNAL_CLEAR(&os_params); + /* If service is not up wait on a signal until the service is up + * or a timeout occurs. */ + QMI_CCI_OS_SIGNAL_WAIT(&os_params, LOC_CLIENT_SERVICE_TIMEOUT_UNIT); + nosignal = QMI_CCI_OS_SIGNAL_TIMED_OUT(&os_params); + + // get the service addressing information + rc = qmi_client_get_service_list(locClientServiceObject, NULL, NULL, + &num_services); + + timeout += LOC_CLIENT_SERVICE_TIMEOUT_UNIT; + + LOC_LOGV("%s:%d]: qmi_client_get_service_list() rc %d, nosignal %d, " + "total timeout %d", __func__, __LINE__, rc, nosignal, timeout); + } while (timeout < LOC_CLIENT_SERVICE_TIMEOUT_TOTAL && nosignal && rc != QMI_NO_ERR); + } + + if (0 == num_services || rc != QMI_NO_ERR) { + if (!nosignal) { + LOC_LOGE("%s:%d]: qmi_client_get_service_list failed even though" + "service is up !!! Error %d \n", __func__, __LINE__, rc); + status = eLOC_CLIENT_FAILURE_INTERNAL; + } else { + LOC_LOGE("%s:%d]: qmi_client_get_service_list failed after retries," + " final Err %d", __func__, __LINE__, rc); + status = eLOC_CLIENT_FAILURE_TIMEOUT; + } + break; + } + + pServiceInfo = + (qmi_service_info *)malloc(num_services * sizeof(qmi_service_info)); + + if(NULL == pServiceInfo) + { + LOC_LOGE("%s:%d]: could not allocate memory for serviceInfo !!\n", + __func__, __LINE__); + + status = eLOC_CLIENT_FAILURE_INTERNAL; + break; + } + + //set the number of entries to get equal to the total number of + //services. + num_entries = num_services; + //populate the serviceInfo + rc = qmi_client_get_service_list( locClientServiceObject, pServiceInfo, + &num_entries, &num_services); + + + LOC_LOGV("%s:%d]: qmi_client_get_service_list()" + " returned %d num_entries = %d num_services = %d\n", + __func__, __LINE__, + rc, num_entries, num_services); if(rc != QMI_NO_ERR) { - LOC_LOGE("%s:%d]: qmi_client_get_service_list failed even though" - "service is up !!!\n", __func__, __LINE__); + LOC_LOGE("%s:%d]: qmi_client_get_service_list Error %d \n", + __func__, __LINE__, rc); - return(eLOC_CLIENT_FAILURE_INTERNAL); + status = eLOC_CLIENT_FAILURE_INTERNAL; + break; } - } + LOC_LOGV("%s:%d]: passing the pointer %p to qmi_client_init \n", + __func__, __LINE__, pLocClientCbData); - //get service info to be used in qmi_client_init - rc = qmi_client_get_service_list( locClientServiceObject, serviceInfo, - &num_entries, &num_services); + // initialize the client + //sent the address of the first service found + // if IPC router is present, this will go to the service instance + // enumerated over IPC router, else it will go over the next transport where + // the service was enumerated. + rc = qmi_client_init(&pServiceInfo[0], locClientServiceObject, + locClientIndCb, (void *) pLocClientCbData, + NULL, &clnt); - LOC_LOGV("%s:%d]: qmi_client_get_service_list()" - " returned %d num_entries = %d num_services = %d\n", - __func__, __LINE__, - rc, num_entries, num_services); + if(rc != QMI_NO_ERR) + { + LOC_LOGE("%s:%d]: qmi_client_init error %d\n", + __func__, __LINE__, rc); - if(rc != QMI_NO_ERR) + status = eLOC_CLIENT_FAILURE_INTERNAL; + break; + } + + LOC_LOGV("%s:%d]: passing the pointer %p to" + "qmi_client_register_error_cb \n", + __func__, __LINE__, pLocClientCbData); + + // register error callback + rc = qmi_client_register_error_cb(clnt, + locClientErrorCb, (void *) pLocClientCbData); + + if( QMI_NO_ERR != rc) + { + LOC_LOGE("%s:%d]: could not register QCCI error callback error:%d\n", + __func__, __LINE__, rc); + + status = eLOC_CLIENT_FAILURE_INTERNAL; + break; + } + + // copy the clnt handle returned in qmi_client_init + memcpy(&(pLocClientCbData->userHandle), &clnt, sizeof(qmi_client_type)); + + status = eLOC_CLIENT_SUCCESS; + + } while(0); + + /* release the notifier handle */ + if(true == notifierInitFlag) { - LOC_LOGE("%s:%d]: qmi_client_get_service_list Error %d \n", - __func__, __LINE__, rc); - - return(eLOC_CLIENT_FAILURE_INTERNAL); + qmi_client_release(notifier); } - LOC_LOGV("%s:%d]: passing the pointer %p to qmi_client_init \n", - __func__, __LINE__, pLocClientCbData); - // initialize the client - rc = qmi_client_init(&serviceInfo[0], locClientServiceObject, - locClientIndCb, (void *) pLocClientCbData, - NULL, &clnt); - - if(rc != QMI_NO_ERR) + if(NULL != pServiceInfo) { - LOC_LOGE("%s:%d]: qmi_client_init error %d\n", - __func__, __LINE__, rc); - return(eLOC_CLIENT_FAILURE_INTERNAL); + free((void *)pServiceInfo); } - LOC_LOGV("%s:%d]: passing the pointer %p to" - "qmi_client_register_error_cb \n", - __func__, __LINE__, pLocClientCbData); - - // register error callback - rc = qmi_client_register_error_cb(clnt, - locClientErrorCb, (void *) pLocClientCbData); - - if( QMI_NO_ERR != rc) - { - LOC_LOGE("%s:%d]: could not register QCCI error callback error:%d\n", - __func__, __LINE__, rc); - return (eLOC_CLIENT_FAILURE_INTERNAL); - } - - // copy the clnt handle returned in qmi_client_init - memcpy(&(pLocClientCbData->userHandle), &clnt, sizeof(qmi_client_type)); - - return(eLOC_CLIENT_SUCCESS); - + return status; } //----------------------- END INTERNAL FUNCTIONS ---------------------------------------- @@ -1592,6 +1778,8 @@ locClientStatusEnumType locClientOpen ( { free(pCallbackData); pCallbackData = NULL; + LOC_LOGE ("%s:%d] locClientQmiCtrlPointInit returned %d\n", + __func__, __LINE__, status); break; } @@ -1638,6 +1826,7 @@ locClientStatusEnumType locClientOpen ( if(eLOC_CLIENT_SUCCESS != status) { *pLocClientHandle = LOC_CLIENT_INVALID_HANDLE_VALUE; + LOC_LOGE("%s:%d]: Error! status = %d\n", __func__, __LINE__,status); } return(status); @@ -1684,7 +1873,7 @@ locClientStatusEnumType locClientClose( return(eLOC_CLIENT_FAILURE_INVALID_HANDLE); } - LOC_LOGV("locClientClose releasing handle 0x%x, user handle 0x%x\n", + LOC_LOGV("locClientClose releasing handle %p, user handle %p\n", *pLocClientHandle, pCallbackData->userHandle ); // NEXT call goes out to modem. We log the callflow before it @@ -1692,6 +1881,7 @@ locClientStatusEnumType locClientClose( // back from the modem, to avoid confusing log order. We trust // that the QMI framework is robust. EXIT_LOG_CALLFLOW(%s, "loc client close"); + // release the handle rc = qmi_client_release(pCallbackData->userHandle); if(QMI_NO_ERR != rc ) @@ -1713,7 +1903,6 @@ locClientStatusEnumType locClientClose( // set the handle to invalid value *pLocClientHandle = LOC_CLIENT_INVALID_HANDLE_VALUE; - return eLOC_CLIENT_SUCCESS; } @@ -1779,7 +1968,6 @@ locClientStatusEnumType locClientSendReq( // back from the modem, to avoid confusing log order. We trust // that the QMI framework is robust. EXIT_LOG_CALLFLOW(%s, loc_get_v02_event_name(reqId)); - rc = qmi_client_send_msg_sync( pCallbackData->userHandle, reqId, @@ -1801,6 +1989,17 @@ locClientStatusEnumType locClientSendReq( // map the QCCI response to Loc API v02 status status = convertQmiResponseToLocStatus(&resp); + // if the request is to change registered events, update the + // loc api copy of that + if(eLOC_CLIENT_SUCCESS == status && + QMI_LOC_REG_EVENTS_REQ_V02 == reqId) + { + if(NULL != reqPayload.pRegEventsReq ) + { + pCallbackData->eventRegMask = + (locClientEventMaskType)(reqPayload.pRegEventsReq->eventRegMask); + } + } return(status); } diff --git a/loc_api/loc_api_v02/loc_api_v02_client.h b/loc_api/loc_api_v02/loc_api_v02_client.h old mode 100755 new mode 100644 index 2807ad47..0ce7a2e8 --- a/loc_api/loc_api_v02/loc_api_v02_client.h +++ b/loc_api/loc_api_v02/loc_api_v02_client.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -112,9 +112,12 @@ typedef enum eLOC_CLIENT_FAILURE_INTERNAL = 11, /**< Failed because of an internal error in the service. */ - eLOC_CLIENT_FAILURE_NOT_INITIALIZED = 12 + eLOC_CLIENT_FAILURE_NOT_INITIALIZED = 12, /**< Failed because the service has not been initialized. */ + eLOC_CLIENT_FAILURE_NOT_ENOUGH_MEMORY = 13 + /**< Failed because not rnough memory to do the operation.*/ + }locClientStatusEnumType; /** Loc Client error values @@ -154,6 +157,8 @@ typedef enum - GetOperationMode - GetCradleMountConfig - GetExternalPowerConfig + - GetSensorControlConfig + - GetSensorPerformanceControlConfiguration */ typedef union { @@ -451,6 +456,17 @@ typedef union QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02. @newpage */ + const qmiLocGetSensorPropertiesReqMsgT_v02* pGetSensorPropertiesReq; + /**< Retrieves the sensor properties from the engine. + + If the request is accepted by the service, the client receives the + following indication containing a response: + QMI_LOC_GET_SENSOR_PROPERTIES_IND_V02. + + To send this request, set the reqId field in locClientSendReq() to + QMI_LOC_GET_SENSOR_PROPERTIES_REQ_V02. + @newpage */ + const qmiLocSetSensorPropertiesReqMsgT_v02* pSetSensorPropertiesReq; /**< Sets the sensor properties in the engine. @@ -508,6 +524,65 @@ typedef union QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02. @newpage */ + const qmiLocAddCircularGeofenceReqMsgT_v02* pAddCircularGeofenceReq; + /**< Adds a Circular Geofence. + + If the request is accepted by the service, the client receives the + following indication containing a response: + QMI_LOC_ADD_CIRCULAR_GEOFENCE_IND_V02. + + To send this request, set the reqId field in locClientSendReq() to + QMI_LOC_ADD_CIRCULAR_GEOFENCE_REQ_V02 + @newpage */ + + const qmiLocDeleteGeofenceReqMsgT_v02* pDeleteGeofenceReq; + /**< Deletes a Geofence. + + If the request is accepted by the service, the client receives the + following indication containing a response: + QMI_LOC_DELETE_GEOFENCE_IND_V02. + + To send this request, set the reqId field in locClientSendReq() to + QMI_LOC_DELETE_GEOFENCE_REQ_V02 + @newpage */ + + const qmiLocQueryGeofenceReqMsgT_v02* pQueryGeofenceReq; + /**< Queries a Geofence. + + If the request is accepted by the service, the client receives the + following indication containing a response: + QMI_LOC_QUERY_GEOFENCE_IND_V02 + + To send this request, set the reqId field in locClientSendReq() to + QMI_LOC_QUERY_GEOFENCE_REQ_V02 + + @newpage */ + + const qmiLocEditGeofenceReqMsgT_v02* pEditGeofenceReq; + /**< Edits Geofence Parameters. + + If the request is accepted by the service, the client receives the + following indication containing a response: + QMI_LOC_EDIT_GEOFENCE_IND_V02 + + To send this request, set the reqId field in locClientSendReq() to + QMI_LOC_EDIT_GEOFENCE_REQ_V02 + + @newpage */ + + const qmiLocGetBestAvailablePositionReqMsgT_v02* + pGetBestAvailablePositionReq; + /**< Get the best available position from location engine + + If the request is accepted by the service, the client receives the + following indication containing a response: + QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02 + + To send this request, set the reqId field in locClientSendReq() to + QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02 + + @newpage */ + }locClientReqUnionType; @@ -636,6 +711,31 @@ typedef union QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02. @newpage */ + const qmiLocEventNiGeofenceNotificationIndMsgT_v02* + pNiGeofenceNotificationEvent; + /**< Sent by the engine to notify the client about changes to a + Network Initiated Geofence. + + The eventIndId field in the event indication callback is set to + QMI_LOC_EVENT_NI_GEOFENCE_NOTIFICATION_IND_V02. + @newpage */ + + const qmiLocEventGeofenceGenAlertIndMsgT_v02* pGeofenceGenAlertEvent; + /**< Sent by the engine to notify the client about updates that may + affect a Geofence operation. + + The eventIndId field in the event indication callback is set to + QMI_LOC_EVENT_GEOFENCE_GEN_ALERT_IND_V02. + @newpage */ + + const qmiLocEventGeofenceBreachIndMsgT_v02* pGeofenceBreachEvent; + /**< Sent by the engine to notify the client about a Geofence Breach + Event. + + The eventIndId field in the event indication callback is set to + QMI_LOC_EVENT_GEOFENCE_BREACH_NOTIFICATION_IND_V02. + @newpage */ + }locClientEventIndUnionType; @@ -951,7 +1051,43 @@ typedef union /**< Response to the request, QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02 The respIndId field in the response indication callback is set to - QMI_LOC_ET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02. + QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02. + @newpage */ + + const qmiLocAddCircularGeofenceIndMsgT_v02* pAddCircularGeofenceInd; + /**< Response to the request, + QMI_LOC_ADD_CIRCULAR_GEOFENCE_REQ_V02 + The respIndId field in the response indication callback is set to + QMI_LOC_ADD_CIRCULAR_GEOFENCE_IND_V02 + @newpage */ + + const qmiLocDeleteGeofenceIndMsgT_v02* pDeleteGeofenceInd; + /**< Response to the request, + QMI_LOC_DELETE_GEOFENCE_REQ_V02 + The respIndId field in the response indication callback is set to + QMI_LOC_DELETE_GEOFENCE_IND_V02 + @newpage */ + + const qmiLocQueryGeofenceIndMsgT_v02* pQueryGeofenceInd; + /**< Response to the request, + QMI_LOC_QUERY_GEOFENCE_REQ_V02 + The respIndId field in the response indication callback is set to + QMI_LOC_QUERY_GEOFENCE_IND_V02 + @newpage */ + + const qmiLocEditGeofenceIndMsgT_v02* pEditGeofenceInd; + /**< Response to the request, + QMI_LOC_EDIT_GEOFENCE_REQ_V02 + The respIndId field in the response indication callback is set to + QMI_LOC_EDIT_GEOFENCE_IND_V02 + @newpage */ + + const qmiLocGetBestAvailablePositionIndMsgT_v02* + pGetBestAvailablePositionInd; + /**< Response to the request, + QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02 + The respIndId field in the response indication callback is set to + QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02 @newpage */ }locClientRespIndUnionType; diff --git a/loc_api/loc_api_v02/loc_api_v02_log.c b/loc_api/loc_api_v02/loc_api_v02_log.c old mode 100755 new mode 100644 index 78792607..6f60ee58 --- a/loc_api/loc_api_v02/loc_api_v02_log.c +++ b/loc_api/loc_api_v02/loc_api_v02_log.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -191,6 +191,24 @@ static loc_name_val_s_type loc_v02_event_name[] = NAME_VAL(QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02), NAME_VAL(QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_RESP_V02), NAME_VAL(QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02), + NAME_VAL(QMI_LOC_EVENT_NI_GEOFENCE_NOTIFICATION_IND_V02), + NAME_VAL(QMI_LOC_EVENT_GEOFENCE_GEN_ALERT_IND_V02), + NAME_VAL(QMI_LOC_EVENT_GEOFENCE_BREACH_NOTIFICATION_IND_V02), + NAME_VAL(QMI_LOC_ADD_CIRCULAR_GEOFENCE_REQ_V02), + NAME_VAL(QMI_LOC_ADD_CIRCULAR_GEOFENCE_RESP_V02), + NAME_VAL(QMI_LOC_ADD_CIRCULAR_GEOFENCE_IND_V02), + NAME_VAL(QMI_LOC_DELETE_GEOFENCE_REQ_V02), + NAME_VAL(QMI_LOC_DELETE_GEOFENCE_RESP_V02), + NAME_VAL(QMI_LOC_DELETE_GEOFENCE_IND_V02), + NAME_VAL(QMI_LOC_QUERY_GEOFENCE_REQ_V02), + NAME_VAL(QMI_LOC_QUERY_GEOFENCE_RESP_V02), + NAME_VAL(QMI_LOC_QUERY_GEOFENCE_IND_V02), + NAME_VAL(QMI_LOC_EDIT_GEOFENCE_REQ_V02), + NAME_VAL(QMI_LOC_EDIT_GEOFENCE_RESP_V02), + NAME_VAL(QMI_LOC_EDIT_GEOFENCE_IND_V02), + NAME_VAL(QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02), + NAME_VAL(QMI_LOC_GET_BEST_AVAILABLE_POSITION_RESP_V02), + NAME_VAL(QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02), }; static int loc_v02_event_num = sizeof(loc_v02_event_name) / sizeof(loc_name_val_s_type); @@ -214,6 +232,7 @@ static loc_name_val_s_type loc_v02_client_status_name[] = NAME_VAL(eLOC_CLIENT_FAILURE_INVALID_HANDLE), NAME_VAL(eLOC_CLIENT_FAILURE_INTERNAL), NAME_VAL(eLOC_CLIENT_FAILURE_NOT_INITIALIZED), + NAME_VAL(eLOC_CLIENT_FAILURE_NOT_ENOUGH_MEMORY), }; static int loc_v02_client_status_num = sizeof(loc_v02_client_status_name) / sizeof(loc_name_val_s_type); @@ -233,6 +252,8 @@ static loc_name_val_s_type loc_v02_qmi_status_name[] = eQMI_LOC_ENGINE_BUSY_V02, eQMI_LOC_PHONE_OFFLINE_V02, eQMI_LOC_TIMEOUT_V02, + eQMI_LOC_CONFIG_NOT_SUPPORTED_V02, + eQMI_LOC_INSUFFICIENT_MEMORY_V02, QMILOCSTATUSENUMT_MAX_ENUM_VAL_V02 }; static int loc_v02_qmi_status_num = sizeof(loc_v02_qmi_status_name) / sizeof(loc_name_val_s_type); diff --git a/loc_api/loc_api_v02/loc_api_v02_log.h b/loc_api/loc_api_v02/loc_api_v02_log.h old mode 100755 new mode 100644 diff --git a/loc_api/loc_api_v02/loc_util_log.h b/loc_api/loc_api_v02/loc_util_log.h old mode 100755 new mode 100644 index f1b675e3..4c18a229 --- a/loc_api/loc_api_v02/loc_util_log.h +++ b/loc_api/loc_api_v02/loc_util_log.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2009,2011 Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -24,13 +24,18 @@ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * */ - #ifndef LOC_UTIL_LOG_H #define LOC_UTIL_LOG_H -#ifdef FEATURE_LOC_API_V02_QNX_MOD +#if defined(_ANDROID_) +#include "loc_api_v02_log.h" +#include + +#else // no _ANDROID_ + +// common for QNX and Griffon + //error logs #define LOC_LOGE(...) printf(__VA_ARGS__) //warning logs @@ -45,22 +50,17 @@ #define MODEM_LOG_CALLFLOW(SPEC, VAL) #define EXIT_LOG_CALLFLOW(SPEC, VAL) -#endif //FEATURE_LOC_API_V02_QNX_MOD +#define loc_get_v02_event_name(X) #X +#define loc_get_v02_client_status_name(X) #X +#define loc_get_v02_qmi_status_name(X) #X + +//specific to OFF TARGET #ifdef LOC_UTIL_TARGET_OFF_TARGET #include - -//error logs -#define LOC_LOGE(...) printf(__VA_ARGS__) -//warning logs -#define LOC_LOGW(...) printf(__VA_ARGS__) -// debug logs -#define LOC_LOGD(...) printf(__VA_ARGS__) -//info logs -#define LOC_LOGI(...) printf(__VA_ARGS__) -//verbose logs -#define LOC_LOGV(...) printf(__VA_ARGS__) +# include +# include // get around strl*: not found in glibc // TBD:look for presence of eglibc other libraries @@ -68,14 +68,8 @@ #define strlcpy(X,Y,Z) strcpy(X,Y) #define strlcat(X,Y,Z) strcat(X,Y) -#define MODEM_LOG_CALLFLOW(SPEC, VAL) -#define EXIT_LOG_CALLFLOW(SPEC, VAL) - -#elif defined(_ANDROID_) - -#include - #endif //LOC_UTIL_TARGET_OFF_TARGET +#endif //_ANDROID_ #endif //LOC_UTIL_LOG_H diff --git a/loc_api/loc_api_v02/location_service_v02.c b/loc_api/loc_api_v02/location_service_v02.c old mode 100755 new mode 100644 index 37d93f6f..ebd1a376 --- a/loc_api/loc_api_v02/location_service_v02.c +++ b/loc_api/loc_api_v02/location_service_v02.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -26,6 +26,15 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* + + L O C A T I O N _ S E R V I C E _ V 0 2 . C + +GENERAL DESCRIPTION + This is the file which defines the loc service Data structures. + +*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ + #include "stdint.h" #include "qmi_idl_lib_internal.h" #include "location_service_v02.h" @@ -33,6 +42,25 @@ /*Type Definitions*/ +static const uint8_t qmiLocApplicationIdStructT_data_v02[] = { + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_STRING, + QMI_IDL_OFFSET8(qmiLocApplicationIdStructT_v02, applicationProvider), + QMI_LOC_MAX_APP_ID_PROVIDER_LENGTH_V02, + + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_STRING, + QMI_IDL_OFFSET8(qmiLocApplicationIdStructT_v02, applicationName), + QMI_LOC_MAX_APP_ID_NAME_LENGTH_V02, + + QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_OFFSET8(qmiLocApplicationIdStructT_v02, applicationVersion_valid), + + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_STRING, + QMI_IDL_OFFSET8(qmiLocApplicationIdStructT_v02, applicationVersion), + QMI_LOC_MAX_APP_ID_VERSION_LENGTH_V02, + + QMI_IDL_FLAG_END_VALUE +}; + static const uint8_t qmiLocGPSTimeStructT_data_v02[] = { QMI_IDL_GENERIC_2_BYTE, QMI_IDL_OFFSET8(qmiLocGPSTimeStructT_v02, gpsWeek), @@ -116,7 +144,7 @@ static const uint8_t qmiLocNiVxNotifyVerifyStructT_data_v02[] = { QMI_IDL_GENERIC_4_BYTE, QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, encodingScheme), - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_GENERIC_1_BYTE, QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, requestorId), QMI_LOC_NI_MAX_REQUESTOR_ID_LENGTH_V02, QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, requestorId) - QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, requestorId_len), @@ -131,7 +159,7 @@ static const uint8_t qmiLocNiSuplFormattedStringStructT_data_v02[] = { QMI_IDL_GENERIC_4_BYTE, QMI_IDL_OFFSET8(qmiLocNiSuplFormattedStringStructT_v02, formatType), - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_GENERIC_1_BYTE, QMI_IDL_OFFSET8(qmiLocNiSuplFormattedStringStructT_v02, formattedString), QMI_LOC_NI_MAX_CLIENT_NAME_LENGTH_V02, QMI_IDL_OFFSET8(qmiLocNiSuplFormattedStringStructT_v02, formattedString) - QMI_IDL_OFFSET8(qmiLocNiSuplFormattedStringStructT_v02, formattedString_len), @@ -169,7 +197,7 @@ static const uint8_t qmiLocIpV4AddrStructType_data_v02[] = { }; static const uint8_t qmiLocIpV6AddrStructType_data_v02[] = { - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_GENERIC_2_BYTE, + QMI_IDL_FLAGS_IS_ARRAY |QMI_IDL_GENERIC_2_BYTE, QMI_IDL_OFFSET8(qmiLocIpV6AddrStructType_v02, addr), QMI_LOC_IPV6_ADDR_LENGTH_V02, @@ -185,11 +213,11 @@ static const uint8_t qmiLocNiSuplServerInfoStructT_data_v02[] = { QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocNiSuplServerInfoStructT_v02, ipv4Addr), - 7, 0, + 8, 0, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocNiSuplServerInfoStructT_v02, ipv6Addr), - 8, 0, - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_STRING, + 9, 0, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_STRING, QMI_IDL_OFFSET8(qmiLocNiSuplServerInfoStructT_v02, urlAddr), QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02, @@ -202,12 +230,12 @@ static const uint8_t qmiLocNiSuplNotifyVerifyStructT_data_v02[] = { QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocNiSuplNotifyVerifyStructT_v02, suplServerInfo), - 9, 0, - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_GENERIC_1_BYTE, + 10, 0, + QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_FLAGS_IS_ARRAY |QMI_IDL_GENERIC_1_BYTE, QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, suplSessionId), QMI_LOC_NI_SUPL_SLP_SESSION_ID_BYTE_LENGTH_V02, - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_FLAGS_IS_ARRAY |QMI_IDL_GENERIC_1_BYTE, QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, suplHash), QMI_LOC_NI_SUPL_HASH_LENGTH_V02, @@ -219,13 +247,13 @@ static const uint8_t qmiLocNiSuplNotifyVerifyStructT_data_v02[] = { QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, requestorId), - 5, 0, + 6, 0, QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, clientName), - 5, 0, + 6, 0, QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, suplQop), - 6, 0, + 7, 0, QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_2_BYTE, QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, userResponseTimer), @@ -236,7 +264,7 @@ static const uint8_t qmiLocNiUmtsCpCodedStringStructT_data_v02[] = { QMI_IDL_GENERIC_4_BYTE, QMI_IDL_OFFSET8(qmiLocNiUmtsCpCodedStringStructT_v02, dataCodingScheme), - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_GENERIC_1_BYTE, QMI_IDL_OFFSET8(qmiLocNiUmtsCpCodedStringStructT_v02, codedString), QMI_LOC_NI_CODEWORD_MAX_LENGTH_V02, QMI_IDL_OFFSET8(qmiLocNiUmtsCpCodedStringStructT_v02, codedString) - QMI_IDL_OFFSET8(qmiLocNiUmtsCpCodedStringStructT_v02, codedString_len), @@ -254,12 +282,12 @@ static const uint8_t qmiLocNiUmtsCpNotifyVerifyStructT_data_v02[] = { QMI_IDL_GENERIC_4_BYTE, QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, dataCodingScheme), - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_GENERIC_1_BYTE, QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, notificationText), QMI_LOC_NI_MAX_CLIENT_NAME_LENGTH_V02, QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, notificationText) - QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, notificationText_len), - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_GENERIC_1_BYTE, QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, clientAddress), QMI_LOC_NI_MAX_EXT_CLIENT_ADDRESS_V02, QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, clientAddress) - QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, clientAddress_len), @@ -269,10 +297,10 @@ static const uint8_t qmiLocNiUmtsCpNotifyVerifyStructT_data_v02[] = { QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, requestorId), - 11, 0, + 12, 0, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, codewordString), - 11, 0, + 12, 0, QMI_IDL_GENERIC_1_BYTE, QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, lcsServiceTypeId), @@ -285,7 +313,7 @@ static const uint8_t qmiLocNiUmtsCpNotifyVerifyStructT_data_v02[] = { static const uint8_t qmiLocNiVxServiceInteractionStructT_data_v02[] = { QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocNiVxServiceInteractionStructT_v02, niVxReq), - 4, 0, + 5, 0, QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE, QMI_IDL_OFFSET16ARRAY(qmiLocNiVxServiceInteractionStructT_v02, serviceInteractionType), @@ -293,7 +321,7 @@ static const uint8_t qmiLocNiVxServiceInteractionStructT_data_v02[] = { }; static const uint8_t qmiLocAssistanceServerUrlStructT_data_v02[] = { - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_STRING, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_STRING, QMI_IDL_OFFSET8(qmiLocAssistanceServerUrlStructT_v02, serverUrl), QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02, @@ -304,11 +332,11 @@ static const uint8_t qmiLocTimeServerListStructT_data_v02[] = { QMI_IDL_GENERIC_4_BYTE, QMI_IDL_OFFSET8(qmiLocTimeServerListStructT_v02, delayThreshold), - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_AGGREGATE, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocTimeServerListStructT_v02, timeServerList), QMI_LOC_MAX_NTP_SERVERS_V02, QMI_IDL_OFFSET8(qmiLocTimeServerListStructT_v02, timeServerList) - QMI_IDL_OFFSET8(qmiLocTimeServerListStructT_v02, timeServerList_len), - 14, 0, + 15, 0, QMI_IDL_FLAG_END_VALUE }; @@ -323,11 +351,11 @@ static const uint8_t qmiLocPredictedOrbitsAllowedSizesStructT_data_v02[] = { }; static const uint8_t qmiLocPredictedOrbitsServerListStructT_data_v02[] = { - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_AGGREGATE, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocPredictedOrbitsServerListStructT_v02, serverList), QMI_LOC_MAX_PREDICTED_ORBITS_SERVERS_V02, QMI_IDL_OFFSET8(qmiLocPredictedOrbitsServerListStructT_v02, serverList) - QMI_IDL_OFFSET8(qmiLocPredictedOrbitsServerListStructT_v02, serverList_len), - 14, 0, + 15, 0, QMI_IDL_FLAG_END_VALUE }; @@ -347,7 +375,59 @@ static const uint8_t qmiLocSensorReadyStatusStructT_data_v02[] = { QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocSensorReadyStatusStructT_v02, dataFrequency), - 18, 0, + 19, 0, + QMI_IDL_FLAG_END_VALUE +}; + +static const uint8_t qmiLocGeofencePositionStructT_data_v02[] = { + QMI_IDL_GENERIC_8_BYTE, + QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, timestampUtc), + + QMI_IDL_GENERIC_8_BYTE, + QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, latitude), + + QMI_IDL_GENERIC_8_BYTE, + QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, longitude), + + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, horUncEllipseSemiMinor), + + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, horUncEllipseSemiMajor), + + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, horUncEllipseOrientAzimuth), + + QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, speedHorizontal_valid), + + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, speedHorizontal), + + QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, altitudeWrtEllipsoid_valid), + + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, altitudeWrtEllipsoid), + + QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, vertUnc_valid), + + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, vertUnc), + + QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, speedVertical_valid), + + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, speedVertical), + + QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, heading_valid), + + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGeofencePositionStructT_v02, heading), + QMI_IDL_FLAG_END_VALUE }; @@ -414,7 +494,7 @@ static const uint8_t qmiLocWifiFixPosStructT_data_v02[] = { }; static const uint8_t qmiLocWifiApInfoStructT_data_v02[] = { - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_FLAGS_IS_ARRAY |QMI_IDL_GENERIC_1_BYTE, QMI_IDL_OFFSET8(qmiLocWifiApInfoStructT_v02, macAddr), QMI_LOC_WIFI_MAC_ADDR_LENGTH_V02, @@ -453,11 +533,11 @@ static const uint8_t qmiLoc3AxisSensorSampleListStructT_data_v02[] = { QMI_IDL_GENERIC_1_BYTE, QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleListStructT_v02, flags), - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_AGGREGATE, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleListStructT_v02, sensorData), QMI_LOC_SENSOR_DATA_MAX_SAMPLES_V02, QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleListStructT_v02, sensorData) - QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleListStructT_v02, sensorData_len), - 26, 0, + 28, 0, QMI_IDL_FLAG_END_VALUE }; @@ -465,13 +545,39 @@ static const uint8_t qmiLocApnProfilesStructT_data_v02[] = { QMI_IDL_GENERIC_4_BYTE, QMI_IDL_OFFSET8(qmiLocApnProfilesStructT_v02, pdnType), - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_STRING, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN |QMI_IDL_STRING, QMI_IDL_OFFSET8(qmiLocApnProfilesStructT_v02, apnName), QMI_LOC_MAX_APN_NAME_LENGTH_V02, QMI_IDL_FLAG_END_VALUE }; +static const uint8_t qmiLocCircularGeofenceArgsStructT_data_v02[] = { + QMI_IDL_GENERIC_8_BYTE, + QMI_IDL_OFFSET8(qmiLocCircularGeofenceArgsStructT_v02, latitude), + + QMI_IDL_GENERIC_8_BYTE, + QMI_IDL_OFFSET8(qmiLocCircularGeofenceArgsStructT_v02, longitude), + + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocCircularGeofenceArgsStructT_v02, radius), + + QMI_IDL_FLAG_END_VALUE +}; + +static const uint8_t qmiLocNiSuplVer2ExtStructT_data_v02[] = { + QMI_IDL_GENERIC_2_BYTE, + QMI_IDL_OFFSET8(qmiLocNiSuplVer2ExtStructT_v02, supportedNetworksMask), + + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocNiSuplVer2ExtStructT_v02, triggerType), + + QMI_IDL_GENERIC_2_BYTE, + QMI_IDL_OFFSET8(qmiLocNiSuplVer2ExtStructT_v02, gnssType), + + QMI_IDL_FLAG_END_VALUE +}; + /*Message Definitions*/ static const uint8_t qmiLocGenRespMsgT_data_v02[] = { QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02, @@ -512,10 +618,16 @@ static const uint8_t qmiLocStartReqMsgT_data_v02[] = { QMI_IDL_GENERIC_4_BYTE, QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, intermediateReportState), - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, minInterval) - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, minInterval_valid)), + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, minInterval) - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, minInterval_valid)), 0x13, QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, minInterval) + QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, minInterval), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, applicationId) - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, applicationId_valid)), + 0x14, + QMI_IDL_AGGREGATE, + QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, applicationId), + 0, 0 }; static const uint8_t qmiLocStopReqMsgT_data_v02[] = { @@ -637,7 +749,7 @@ static const uint8_t qmiLocEventPositionReportIndMsgT_data_v02[] = { 0x24, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, DOP), - 1, 0, + 2, 0, QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, timestampUtc) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, timestampUtc_valid)), 0x25, @@ -653,7 +765,7 @@ static const uint8_t qmiLocEventPositionReportIndMsgT_data_v02[] = { 0x27, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, gpsTime), - 0, 0, + 1, 0, QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, timeUnc) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, timeUnc_valid)), 0x28, @@ -669,12 +781,19 @@ static const uint8_t qmiLocEventPositionReportIndMsgT_data_v02[] = { 0x2A, QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET16ARRAY(qmiLocEventPositionReportIndMsgT_v02, sensorDataUsage), - 2, 0, + 3, 0, - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, fixId) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, fixId_valid)), + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, fixId) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, fixId_valid)), 0x2B, QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET16ARRAY(qmiLocEventPositionReportIndMsgT_v02, fixId) + QMI_IDL_OFFSET16ARRAY(qmiLocEventPositionReportIndMsgT_v02, fixId), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, gnssSvUsedList) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, gnssSvUsedList_valid)), + 0x2C, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_2_BYTE, + QMI_IDL_OFFSET16ARRAY(qmiLocEventPositionReportIndMsgT_v02, gnssSvUsedList), + QMI_LOC_MAX_SV_USED_LIST_LENGTH_V02, + QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, gnssSvUsedList) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, gnssSvUsedList_len) }; static const uint8_t qmiLocEventGnssSvInfoIndMsgT_data_v02[] = { @@ -684,16 +803,16 @@ static const uint8_t qmiLocEventGnssSvInfoIndMsgT_data_v02[] = { QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGnssSvInfoIndMsgT_v02, svList) - QMI_IDL_OFFSET8(qmiLocEventGnssSvInfoIndMsgT_v02, svList_valid)), 0x10, - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_AGGREGATE, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocEventGnssSvInfoIndMsgT_v02, svList), QMI_LOC_SV_INFO_LIST_MAX_SIZE_V02, QMI_IDL_OFFSET8(qmiLocEventGnssSvInfoIndMsgT_v02, svList) - QMI_IDL_OFFSET8(qmiLocEventGnssSvInfoIndMsgT_v02, svList_len), - 3, 0 + 4, 0 }; static const uint8_t qmiLocEventNmeaIndMsgT_data_v02[] = { QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_STRING, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_STRING, QMI_IDL_OFFSET8(qmiLocEventNmeaIndMsgT_v02, nmea), QMI_LOC_NMEA_STRING_MAX_LENGTH_V02 }; @@ -707,25 +826,31 @@ static const uint8_t qmiLocEventNiNotifyVerifyReqIndMsgT_data_v02[] = { 0x10, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiVxInd), - 4, 0, + 5, 0, QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiSuplInd) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiSuplInd_valid)), 0x11, QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET16ARRAY(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiSuplInd), - 10, 0, + 11, 0, QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiUmtsCpInd) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiUmtsCpInd_valid)), 0x12, QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET16ARRAY(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiUmtsCpInd), - 12, 0, + 13, 0, - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiVxServiceInteractionInd) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiVxServiceInteractionInd_valid)), + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiVxServiceInteractionInd) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiVxServiceInteractionInd_valid)), 0x13, QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET16ARRAY(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiVxServiceInteractionInd), - 13, 0 + 14, 0, + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiSuplVer2ExtInd) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiSuplVer2ExtInd_valid)), + 0x14, + QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, + QMI_IDL_OFFSET16ARRAY(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiSuplVer2ExtInd), + 32, 0 }; static const uint8_t qmiLocEventInjectTimeReqIndMsgT_data_v02[] = { @@ -733,20 +858,20 @@ static const uint8_t qmiLocEventInjectTimeReqIndMsgT_data_v02[] = { 0x10, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocEventInjectTimeReqIndMsgT_v02, timeServerInfo), - 15, 0 + 16, 0 }; static const uint8_t qmiLocEventInjectPredictedOrbitsReqIndMsgT_data_v02[] = { 0x01, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02, allowedSizes), - 16, 0, + 17, 0, QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02, serverList) - QMI_IDL_OFFSET8(qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02, serverList_valid)), 0x10, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02, serverList), - 17, 0 + 18, 0 }; static const uint8_t qmiLocEventInjectPositionReqIndMsgT_data_v02[] = { @@ -800,13 +925,13 @@ static const uint8_t qmiLocEventSensorStreamingReadyStatusIndMsgT_data_v02[] = { 0x10, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, accelReady), - 19, 0, + 20, 0, QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, gyroReady) - QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, gyroReady_valid)), 0x11, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, gyroReady), - 19, 0 + 20, 0 }; static const uint8_t qmiLocEventTimeSyncReqIndMsgT_data_v02[] = { @@ -835,6 +960,38 @@ static const uint8_t qmiLocEventLocationServerConnectionReqIndMsgT_data_v02[] = QMI_IDL_OFFSET8(qmiLocEventLocationServerConnectionReqIndMsgT_v02, wwanType) }; +static const uint8_t qmiLocEventNiGeofenceNotificationIndMsgT_data_v02[] = { + 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocEventNiGeofenceNotificationIndMsgT_v02, geofenceId), + + QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocEventNiGeofenceNotificationIndMsgT_v02, operationType) +}; + +static const uint8_t qmiLocEventGeofenceGenAlertIndMsgT_data_v02[] = { + QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocEventGeofenceGenAlertIndMsgT_v02, geofenceAlert) +}; + +static const uint8_t qmiLocEventGeofenceBreachIndMsgT_data_v02[] = { + 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocEventGeofenceBreachIndMsgT_v02, geofenceId), + + 0x02, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocEventGeofenceBreachIndMsgT_v02, breachType), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventGeofenceBreachIndMsgT_v02, geofencePosition) - QMI_IDL_OFFSET8(qmiLocEventGeofenceBreachIndMsgT_v02, geofencePosition_valid)), + 0x10, + QMI_IDL_AGGREGATE, + QMI_IDL_OFFSET8(qmiLocEventGeofenceBreachIndMsgT_v02, geofencePosition), + 21, 0 +}; + /* * qmiLocGetServiceRevisionReqMsgT is empty * static const uint8_t qmiLocGetServiceRevisionReqMsgT_data_v02[] = { @@ -846,9 +1003,27 @@ static const uint8_t qmiLocGetServiceRevisionIndMsgT_data_v02[] = { QMI_IDL_GENERIC_4_BYTE, QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, status), - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02, + 0x02, QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, revision) + QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, revision), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, gnssMeFWVerString) - QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, gnssMeFWVerString_valid)), + 0x10, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_STRING, + QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, gnssMeFWVerString), + QMI_LOC_GNSS_ME_VERSION_STRING_MAX_LENGTH_V02, + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, gnssHostSWVerString) - QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, gnssHostSWVerString_valid)), + 0x11, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_STRING, + QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, gnssHostSWVerString), + QMI_LOC_GNSS_HOSTED_SW_VERSION_STRING_MAX_LENGTH_V02, + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocGetServiceRevisionIndMsgT_v02, gnssSWVerString) - QMI_IDL_OFFSET16RELATIVE(qmiLocGetServiceRevisionIndMsgT_v02, gnssSWVerString_valid)), + 0x12, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_STRING, + QMI_IDL_OFFSET16ARRAY(qmiLocGetServiceRevisionIndMsgT_v02, gnssSWVerString), + QMI_LOC_GNSS_SW_VERSION_STRING_MAX_LENGTH_V02 }; /* @@ -872,10 +1047,16 @@ static const uint8_t qmiLocGetFixCriteriaIndMsgT_data_v02[] = { QMI_IDL_GENERIC_4_BYTE, QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, intermediateReportState), - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, minInterval) - QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, minInterval_valid)), + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, minInterval) - QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, minInterval_valid)), 0x12, QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, minInterval) + QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, minInterval), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, applicationId) - QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, applicationId_valid)), + 0x13, + QMI_IDL_AGGREGATE, + QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, applicationId), + 0, 0 }; static const uint8_t qmiLocNiUserRespReqMsgT_data_v02[] = { @@ -891,25 +1072,31 @@ static const uint8_t qmiLocNiUserRespReqMsgT_data_v02[] = { 0x10, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocNiUserRespReqMsgT_v02, NiVxPayload), - 4, 0, + 5, 0, QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiSuplPayload) - QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiSuplPayload_valid)), 0x11, QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET16ARRAY(qmiLocNiUserRespReqMsgT_v02, NiSuplPayload), - 10, 0, + 11, 0, QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiUmtsCpPayload) - QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiUmtsCpPayload_valid)), 0x12, QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET16ARRAY(qmiLocNiUserRespReqMsgT_v02, NiUmtsCpPayload), - 12, 0, + 13, 0, - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiVxServiceInteractionPayload) - QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiVxServiceInteractionPayload_valid)), + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiVxServiceInteractionPayload) - QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiVxServiceInteractionPayload_valid)), 0x13, QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET16ARRAY(qmiLocNiUserRespReqMsgT_v02, NiVxServiceInteractionPayload), - 13, 0 + 14, 0, + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiSuplVer2ExtPayload) - QMI_IDL_OFFSET16RELATIVE(qmiLocNiUserRespReqMsgT_v02, NiSuplVer2ExtPayload_valid)), + 0x14, + QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, + QMI_IDL_OFFSET16ARRAY(qmiLocNiUserRespReqMsgT_v02, NiSuplVer2ExtPayload), + 32, 0 }; static const uint8_t qmiLocNiUserRespIndMsgT_data_v02[] = { @@ -969,13 +1156,13 @@ static const uint8_t qmiLocGetPredictedOrbitsDataSourceIndMsgT_data_v02[] = { 0x10, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02, allowedSizes), - 16, 0, + 17, 0, QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02, serverList) - QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02, serverList_valid)), 0x11, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02, serverList), - 17, 0 + 18, 0 }; /* @@ -993,7 +1180,7 @@ static const uint8_t qmiLocGetPredictedOrbitsDataValidityIndMsgT_data_v02[] = { 0x10, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02, validityInfo), - 20, 0 + 22, 0 }; static const uint8_t qmiLocInjectUtcTimeReqMsgT_data_v02[] = { @@ -1067,7 +1254,7 @@ static const uint8_t qmiLocInjectPositionReqMsgT_data_v02[] = { 0x1A, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altSourceInfo), - 21, 0, + 23, 0, QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, timestampUtc) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, timestampUtc_valid)), 0x1B, @@ -1216,17 +1403,17 @@ static const uint8_t qmiLocSetServerReqMsgT_data_v02[] = { 0x10, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, ipv4Addr), - 7, 0, + 8, 0, QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, ipv6Addr) - QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, ipv6Addr_valid)), 0x11, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, ipv6Addr), - 8, 0, + 9, 0, QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, urlAddr) - QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, urlAddr_valid)), 0x12, - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_STRING, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_STRING, QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, urlAddr), QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02 }; @@ -1261,17 +1448,17 @@ static const uint8_t qmiLocGetServerIndMsgT_data_v02[] = { 0x10, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, ipv4Addr), - 7, 0, + 8, 0, QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, ipv6Addr) - QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, ipv6Addr_valid)), 0x11, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, ipv6Addr), - 8, 0, + 9, 0, QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, urlAddr) - QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, urlAddr_valid)), 0x12, - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_STRING, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_STRING, QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, urlAddr), QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02 }; @@ -1283,11 +1470,11 @@ static const uint8_t qmiLocDeleteAssistDataReqMsgT_data_v02[] = { QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocDeleteAssistDataReqMsgT_v02, deleteSvInfoList) - QMI_IDL_OFFSET8(qmiLocDeleteAssistDataReqMsgT_v02, deleteSvInfoList_valid)), 0x10, - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_AGGREGATE, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocDeleteAssistDataReqMsgT_v02, deleteSvInfoList), QMI_LOC_DELETE_MAX_SV_INFO_LENGTH_V02, QMI_IDL_OFFSET8(qmiLocDeleteAssistDataReqMsgT_v02, deleteSvInfoList) - QMI_IDL_OFFSET8(qmiLocDeleteAssistDataReqMsgT_v02, deleteSvInfoList_len), - 22, 0, + 24, 0, QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteGnssDataMask) - QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteGnssDataMask_valid)), 0x11, @@ -1345,21 +1532,21 @@ static const uint8_t qmiLocInjectWifiPositionReqMsgT_data_v02[] = { 0x10, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, wifiFixTime), - 23, 0, + 25, 0, QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, wifiFixPosition) - QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, wifiFixPosition_valid)), 0x11, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, wifiFixPosition), - 24, 0, + 26, 0, QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, apInfo) - QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, apInfo_valid)), 0x12, - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_AGGREGATE, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, apInfo), QMI_LOC_WIFI_MAX_REPORTED_APS_PER_MSG_V02, QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, apInfo) - QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, apInfo_len), - 25, 0, + 27, 0, QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectWifiPositionReqMsgT_v02, horizontalReliability) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectWifiPositionReqMsgT_v02, horizontalReliability_valid)), 0x13, @@ -1458,13 +1645,13 @@ static const uint8_t qmiLocInjectSensorDataReqMsgT_data_v02[] = { 0x11, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocInjectSensorDataReqMsgT_v02, threeAxisAccelData), - 27, 0, + 29, 0, QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectSensorDataReqMsgT_v02, threeAxisGyroData) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectSensorDataReqMsgT_v02, threeAxisGyroData_valid)), 0x12, QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, QMI_IDL_OFFSET16ARRAY(qmiLocInjectSensorDataReqMsgT_v02, threeAxisGyroData), - 27, 0 + 29, 0 }; static const uint8_t qmiLocInjectSensorDataIndMsgT_data_v02[] = { @@ -1593,7 +1780,7 @@ static const uint8_t qmiLocInformLocationServerConnStatusReqMsgT_data_v02[] = { 0x10, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocInformLocationServerConnStatusReqMsgT_v02, apnProfile), - 28, 0 + 30, 0 }; static const uint8_t qmiLocInformLocationServerConnStatusIndMsgT_data_v02[] = { @@ -1613,10 +1800,15 @@ static const uint8_t qmiLocSetProtocolConfigParametersReqMsgT_data_v02[] = { QMI_IDL_GENERIC_4_BYTE, QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, vxVersion), - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplVersion) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplVersion_valid)), + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplVersion) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplVersion_valid)), 0x12, QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplVersion) + QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplVersion), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, lppConfig) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, lppConfig_valid)), + 0x13, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, lppConfig) }; static const uint8_t qmiLocSetProtocolConfigParametersIndMsgT_data_v02[] = { @@ -1651,10 +1843,15 @@ static const uint8_t qmiLocGetProtocolConfigParametersIndMsgT_data_v02[] = { QMI_IDL_GENERIC_4_BYTE, QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, vxVersion), - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplVersion) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplVersion_valid)), + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplVersion) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplVersion_valid)), 0x12, QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplVersion) + QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplVersion), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, lppConfig) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, lppConfig_valid)), + 0x13, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, lppConfig) }; static const uint8_t qmiLocSetSensorControlConfigReqMsgT_data_v02[] = { @@ -1688,33 +1885,78 @@ static const uint8_t qmiLocGetSensorControlConfigIndMsgT_data_v02[] = { }; static const uint8_t qmiLocSetSensorPropertiesReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, gyroBiasVarianceRandomWalk) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, gyroBiasVarianceRandomWalk_valid)), + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, gyroBiasVarianceRandomWalk) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, gyroBiasVarianceRandomWalk_valid)), 0x10, QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, gyroBiasVarianceRandomWalk) + QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, gyroBiasVarianceRandomWalk), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, velocityRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, velocityRandomWalkSpectralDensity_valid)), + 0x11, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, velocityRandomWalkSpectralDensity), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, accelerationRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, accelerationRandomWalkSpectralDensity_valid)), + 0x12, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, accelerationRandomWalkSpectralDensity), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, angleRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, angleRandomWalkSpectralDensity_valid)), + 0x13, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, angleRandomWalkSpectralDensity), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, rateRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, rateRandomWalkSpectralDensity_valid)), + 0x14, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, rateRandomWalkSpectralDensity) }; static const uint8_t qmiLocSetSensorPropertiesIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, + 0x01, QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesIndMsgT_v02, status) + QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesIndMsgT_v02, status), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesIndMsgT_v02, failedSensorPropertiesMask) - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesIndMsgT_v02, failedSensorPropertiesMask_valid)), + 0x10, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesIndMsgT_v02, failedSensorPropertiesMask) }; -/* - * qmiLocGetSensorPropertiesReqMsgT is empty - * static const uint8_t qmiLocGetSensorPropertiesReqMsgT_data_v02[] = { - * }; - */ +static const uint8_t qmiLocGetSensorPropertiesReqMsgT_data_v02[] = { + QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesReqMsgT_v02, getSensorPropertiesMask) +}; static const uint8_t qmiLocGetSensorPropertiesIndMsgT_data_v02[] = { 0x01, QMI_IDL_GENERIC_4_BYTE, QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, status), - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, gyroBiasVarianceRandomWalk) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, gyroBiasVarianceRandomWalk_valid)), + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, gyroBiasVarianceRandomWalk) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, gyroBiasVarianceRandomWalk_valid)), 0x10, QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, gyroBiasVarianceRandomWalk) + QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, gyroBiasVarianceRandomWalk), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, velocityRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, velocityRandomWalkSpectralDensity_valid)), + 0x11, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, velocityRandomWalkSpectralDensity), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, accelerationRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, accelerationRandomWalkSpectralDensity_valid)), + 0x12, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, accelerationRandomWalkSpectralDensity), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, angleRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, angleRandomWalkSpectralDensity_valid)), + 0x13, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, angleRandomWalkSpectralDensity), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, rateRandomWalkSpectralDensity) - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, rateRandomWalkSpectralDensity_valid)), + 0x14, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, rateRandomWalkSpectralDensity) }; static const uint8_t qmiLocSetSensorPerformanceControlConfigReqMsgT_data_v02[] = { @@ -1727,13 +1969,18 @@ static const uint8_t qmiLocSetSensorPerformanceControlConfigReqMsgT_data_v02[] = 0x11, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, accelSamplingSpec), - 18, 0, + 19, 0, - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, gyroSamplingSpec) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, gyroSamplingSpec_valid)), + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, gyroSamplingSpec) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, gyroSamplingSpec_valid)), 0x12, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, gyroSamplingSpec), - 18, 0 + 19, 0, + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, algorithmConfig) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, algorithmConfig_valid)), + 0x13, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, algorithmConfig) }; static const uint8_t qmiLocSetSensorPerformanceControlConfigIndMsgT_data_v02[] = { @@ -1767,13 +2014,18 @@ static const uint8_t qmiLocGetSensorPerformanceControlConfigIndMsgT_data_v02[] = 0x11, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, accelSamplingSpec), - 18, 0, + 19, 0, - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, gyroSamplingSpec) - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, gyroSamplingSpec_valid)), + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, gyroSamplingSpec) - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, gyroSamplingSpec_valid)), 0x12, QMI_IDL_AGGREGATE, QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, gyroSamplingSpec), - 18, 0 + 19, 0, + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, algorithmConfig) - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, algorithmConfig_valid)), + 0x13, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, algorithmConfig) }; static const uint8_t qmiLocInjectSuplCertificateReqMsgT_data_v02[] = { @@ -1862,8 +2114,335 @@ static const uint8_t qmiLocGetPositionEngineConfigParametersIndMsgT_data_v02[] = QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, storeAssistData) }; +static const uint8_t qmiLocAddCircularGeofenceReqMsgT_data_v02[] = { + 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, transactionId), + + 0x02, + QMI_IDL_AGGREGATE, + QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, circularGeofenceArgs), + 31, 0, + + 0x03, + QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, breachMask), + + 0x04, + QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, includePosition), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, responsiveness) - QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, responsiveness_valid)), + 0x10, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, responsiveness), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, confidence) - QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, confidence_valid)), + 0x11, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceReqMsgT_v02, confidence) +}; + +static const uint8_t qmiLocAddCircularGeofenceIndMsgT_data_v02[] = { + 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceIndMsgT_v02, status), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceIndMsgT_v02, transactionId_valid)), + 0x10, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceIndMsgT_v02, transactionId), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceIndMsgT_v02, geofenceId) - QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceIndMsgT_v02, geofenceId_valid)), + 0x11, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocAddCircularGeofenceIndMsgT_v02, geofenceId) +}; + +static const uint8_t qmiLocDeleteGeofenceReqMsgT_data_v02[] = { + 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocDeleteGeofenceReqMsgT_v02, geofenceId), + + QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocDeleteGeofenceReqMsgT_v02, transactionId) +}; + +static const uint8_t qmiLocDeleteGeofenceIndMsgT_data_v02[] = { + 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocDeleteGeofenceIndMsgT_v02, status), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocDeleteGeofenceIndMsgT_v02, geofenceId) - QMI_IDL_OFFSET8(qmiLocDeleteGeofenceIndMsgT_v02, geofenceId_valid)), + 0x10, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocDeleteGeofenceIndMsgT_v02, geofenceId), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocDeleteGeofenceIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocDeleteGeofenceIndMsgT_v02, transactionId_valid)), + 0x11, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocDeleteGeofenceIndMsgT_v02, transactionId) +}; + +static const uint8_t qmiLocQueryGeofenceReqMsgT_data_v02[] = { + 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocQueryGeofenceReqMsgT_v02, geofenceId), + + QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocQueryGeofenceReqMsgT_v02, transactionId) +}; + +static const uint8_t qmiLocQueryGeofenceIndMsgT_data_v02[] = { + 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, status), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceId) - QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceId_valid)), + 0x10, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceId), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, transactionId_valid)), + 0x11, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, transactionId), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceOrigin) - QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceOrigin_valid)), + 0x12, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceOrigin), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, posWrtGeofence) - QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, posWrtGeofence_valid)), + 0x13, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, posWrtGeofence), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, circularGeofenceArgs) - QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, circularGeofenceArgs_valid)), + 0x14, + QMI_IDL_AGGREGATE, + QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, circularGeofenceArgs), + 31, 0, + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceState) - QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceState_valid)), + 0x15, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocQueryGeofenceIndMsgT_v02, geofenceState) +}; + +static const uint8_t qmiLocEditGeofenceReqMsgT_data_v02[] = { + 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, geofenceId), + + 0x02, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, transactionId), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, geofenceState) - QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, geofenceState_valid)), + 0x10, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, geofenceState), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, breachMask) - QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, breachMask_valid)), + 0x11, + QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_OFFSET8(qmiLocEditGeofenceReqMsgT_v02, breachMask) +}; + +static const uint8_t qmiLocEditGeofenceIndMsgT_data_v02[] = { + 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, status), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, geofenceId) - QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, geofenceId_valid)), + 0x10, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, geofenceId), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, transactionId_valid)), + 0x11, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, transactionId), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, failedParams) - QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, failedParams_valid)), + 0x12, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocEditGeofenceIndMsgT_v02, failedParams) +}; + +static const uint8_t qmiLocGetBestAvailablePositionReqMsgT_data_v02[] = { + QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionReqMsgT_v02, transactionId) +}; + +static const uint8_t qmiLocGetBestAvailablePositionIndMsgT_data_v02[] = { + 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, status), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, transactionId_valid)), + 0x10, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, transactionId), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, latitude) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, latitude_valid)), + 0x11, + QMI_IDL_GENERIC_8_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, latitude), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, longitude) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, longitude_valid)), + 0x12, + QMI_IDL_GENERIC_8_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, longitude), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncCircular) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncCircular_valid)), + 0x13, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncCircular), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, altitudeWrtEllipsoid) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, altitudeWrtEllipsoid_valid)), + 0x14, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, altitudeWrtEllipsoid), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertUnc) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertUnc_valid)), + 0x15, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertUnc), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, timestampUtc) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, timestampUtc_valid)), + 0x16, + QMI_IDL_GENERIC_8_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, timestampUtc), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, timeUnc) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, timeUnc_valid)), + 0x17, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, timeUnc), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseSemiMinor) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseSemiMinor_valid)), + 0x18, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseSemiMinor), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseSemiMajor) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseSemiMajor_valid)), + 0x19, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseSemiMajor), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseOrientAzimuth) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseOrientAzimuth_valid)), + 0x1A, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horUncEllipseOrientAzimuth), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horCircularConfidence) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horCircularConfidence_valid)), + 0x1B, + QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horCircularConfidence), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horEllipticalConfidence) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horEllipticalConfidence_valid)), + 0x1C, + QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horEllipticalConfidence), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horReliability) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horReliability_valid)), + 0x1D, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horReliability), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horSpeed) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horSpeed_valid)), + 0x1E, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horSpeed), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horSpeedUnc) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horSpeedUnc_valid)), + 0x1F, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, horSpeedUnc), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, altitudeWrtMeanSeaLevel) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, altitudeWrtMeanSeaLevel_valid)), + 0x20, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, altitudeWrtMeanSeaLevel), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertConfidence) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertConfidence_valid)), + 0x21, + QMI_IDL_GENERIC_1_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertConfidence), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertReliability) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertReliability_valid)), + 0x22, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertReliability), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertSpeed) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertSpeed_valid)), + 0x23, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertSpeed), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertSpeedUnc) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertSpeedUnc_valid)), + 0x24, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, vertSpeedUnc), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, heading) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, heading_valid)), + 0x25, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, heading), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, headingUnc) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, headingUnc_valid)), + 0x26, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, headingUnc), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, magneticDeviation) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, magneticDeviation_valid)), + 0x27, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, magneticDeviation), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, technologyMask) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, technologyMask_valid)), + 0x28, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, technologyMask), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, DOP) - QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, DOP_valid)), + 0x29, + QMI_IDL_AGGREGATE, + QMI_IDL_OFFSET8(qmiLocGetBestAvailablePositionIndMsgT_v02, DOP), + 2, 0, + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, gpsTime) - QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, gpsTime_valid)), + 0x2A, + QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, + QMI_IDL_OFFSET16ARRAY(qmiLocGetBestAvailablePositionIndMsgT_v02, gpsTime), + 1, 0, + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, timeSrc) - QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, timeSrc_valid)), + 0x2B, + QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET16ARRAY(qmiLocGetBestAvailablePositionIndMsgT_v02, timeSrc), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, sensorDataUsage) - QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, sensorDataUsage_valid)), + 0x2C, + QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, + QMI_IDL_OFFSET16ARRAY(qmiLocGetBestAvailablePositionIndMsgT_v02, sensorDataUsage), + 3, 0, + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, gnssSvUsedList) - QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, gnssSvUsedList_valid)), + 0x2D, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_2_BYTE, + QMI_IDL_OFFSET16ARRAY(qmiLocGetBestAvailablePositionIndMsgT_v02, gnssSvUsedList), + QMI_LOC_MAX_SV_USED_LIST_LENGTH_V02, + QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, gnssSvUsedList) - QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, gnssSvUsedList_len) +}; + /* Type Table */ static const qmi_idl_type_table_entry loc_type_table_v02[] = { + {sizeof(qmiLocApplicationIdStructT_v02), qmiLocApplicationIdStructT_data_v02}, {sizeof(qmiLocGPSTimeStructT_v02), qmiLocGPSTimeStructT_data_v02}, {sizeof(qmiLocDOPStructT_v02), qmiLocDOPStructT_data_v02}, {sizeof(qmiLocSensorUsageIndicatorStructT_v02), qmiLocSensorUsageIndicatorStructT_data_v02}, @@ -1884,6 +2463,7 @@ static const qmi_idl_type_table_entry loc_type_table_v02[] = { {sizeof(qmiLocPredictedOrbitsServerListStructT_v02), qmiLocPredictedOrbitsServerListStructT_data_v02}, {sizeof(qmiLocSensorControlConfigSamplingSpecStructT_v02), qmiLocSensorControlConfigSamplingSpecStructT_data_v02}, {sizeof(qmiLocSensorReadyStatusStructT_v02), qmiLocSensorReadyStatusStructT_data_v02}, + {sizeof(qmiLocGeofencePositionStructT_v02), qmiLocGeofencePositionStructT_data_v02}, {sizeof(qmiLocPredictedOrbitsDataValidityStructT_v02), qmiLocPredictedOrbitsDataValidityStructT_data_v02}, {sizeof(qmiLocAltitudeSrcInfoStructT_v02), qmiLocAltitudeSrcInfoStructT_data_v02}, {sizeof(qmiLocDeleteSvInfoStructT_v02), qmiLocDeleteSvInfoStructT_data_v02}, @@ -1892,7 +2472,9 @@ static const qmi_idl_type_table_entry loc_type_table_v02[] = { {sizeof(qmiLocWifiApInfoStructT_v02), qmiLocWifiApInfoStructT_data_v02}, {sizeof(qmiLoc3AxisSensorSampleStructT_v02), qmiLoc3AxisSensorSampleStructT_data_v02}, {sizeof(qmiLoc3AxisSensorSampleListStructT_v02), qmiLoc3AxisSensorSampleListStructT_data_v02}, - {sizeof(qmiLocApnProfilesStructT_v02), qmiLocApnProfilesStructT_data_v02} + {sizeof(qmiLocApnProfilesStructT_v02), qmiLocApnProfilesStructT_data_v02}, + {sizeof(qmiLocCircularGeofenceArgsStructT_v02), qmiLocCircularGeofenceArgsStructT_data_v02}, + {sizeof(qmiLocNiSuplVer2ExtStructT_v02), qmiLocNiSuplVer2ExtStructT_data_v02} }; /* Message Table */ @@ -1916,6 +2498,9 @@ static const qmi_idl_message_table_entry loc_message_table_v02[] = { {sizeof(qmiLocEventTimeSyncReqIndMsgT_v02), qmiLocEventTimeSyncReqIndMsgT_data_v02}, {sizeof(qmiLocEventSetSpiStreamingReportIndMsgT_v02), qmiLocEventSetSpiStreamingReportIndMsgT_data_v02}, {sizeof(qmiLocEventLocationServerConnectionReqIndMsgT_v02), qmiLocEventLocationServerConnectionReqIndMsgT_data_v02}, + {sizeof(qmiLocEventNiGeofenceNotificationIndMsgT_v02), qmiLocEventNiGeofenceNotificationIndMsgT_data_v02}, + {sizeof(qmiLocEventGeofenceGenAlertIndMsgT_v02), qmiLocEventGeofenceGenAlertIndMsgT_data_v02}, + {sizeof(qmiLocEventGeofenceBreachIndMsgT_v02), qmiLocEventGeofenceBreachIndMsgT_data_v02}, {0, 0}, {sizeof(qmiLocGetServiceRevisionIndMsgT_v02), qmiLocGetServiceRevisionIndMsgT_data_v02}, {0, 0}, @@ -1994,7 +2579,7 @@ static const qmi_idl_message_table_entry loc_message_table_v02[] = { {sizeof(qmiLocGetSensorControlConfigIndMsgT_v02), qmiLocGetSensorControlConfigIndMsgT_data_v02}, {sizeof(qmiLocSetSensorPropertiesReqMsgT_v02), qmiLocSetSensorPropertiesReqMsgT_data_v02}, {sizeof(qmiLocSetSensorPropertiesIndMsgT_v02), qmiLocSetSensorPropertiesIndMsgT_data_v02}, - {0, 0}, + {sizeof(qmiLocGetSensorPropertiesReqMsgT_v02), qmiLocGetSensorPropertiesReqMsgT_data_v02}, {sizeof(qmiLocGetSensorPropertiesIndMsgT_v02), qmiLocGetSensorPropertiesIndMsgT_data_v02}, {sizeof(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02), qmiLocSetSensorPerformanceControlConfigReqMsgT_data_v02}, {sizeof(qmiLocSetSensorPerformanceControlConfigIndMsgT_v02), qmiLocSetSensorPerformanceControlConfigIndMsgT_data_v02}, @@ -2007,7 +2592,17 @@ static const qmi_idl_message_table_entry loc_message_table_v02[] = { {sizeof(qmiLocSetPositionEngineConfigParametersReqMsgT_v02), qmiLocSetPositionEngineConfigParametersReqMsgT_data_v02}, {sizeof(qmiLocSetPositionEngineConfigParametersIndMsgT_v02), qmiLocSetPositionEngineConfigParametersIndMsgT_data_v02}, {sizeof(qmiLocGetPositionEngineConfigParametersReqMsgT_v02), qmiLocGetPositionEngineConfigParametersReqMsgT_data_v02}, - {sizeof(qmiLocGetPositionEngineConfigParametersIndMsgT_v02), qmiLocGetPositionEngineConfigParametersIndMsgT_data_v02} + {sizeof(qmiLocGetPositionEngineConfigParametersIndMsgT_v02), qmiLocGetPositionEngineConfigParametersIndMsgT_data_v02}, + {sizeof(qmiLocAddCircularGeofenceReqMsgT_v02), qmiLocAddCircularGeofenceReqMsgT_data_v02}, + {sizeof(qmiLocAddCircularGeofenceIndMsgT_v02), qmiLocAddCircularGeofenceIndMsgT_data_v02}, + {sizeof(qmiLocDeleteGeofenceReqMsgT_v02), qmiLocDeleteGeofenceReqMsgT_data_v02}, + {sizeof(qmiLocDeleteGeofenceIndMsgT_v02), qmiLocDeleteGeofenceIndMsgT_data_v02}, + {sizeof(qmiLocQueryGeofenceReqMsgT_v02), qmiLocQueryGeofenceReqMsgT_data_v02}, + {sizeof(qmiLocQueryGeofenceIndMsgT_v02), qmiLocQueryGeofenceIndMsgT_data_v02}, + {sizeof(qmiLocEditGeofenceReqMsgT_v02), qmiLocEditGeofenceReqMsgT_data_v02}, + {sizeof(qmiLocEditGeofenceIndMsgT_v02), qmiLocEditGeofenceIndMsgT_data_v02}, + {sizeof(qmiLocGetBestAvailablePositionReqMsgT_v02), qmiLocGetBestAvailablePositionReqMsgT_data_v02}, + {sizeof(qmiLocGetBestAvailablePositionIndMsgT_v02), qmiLocGetBestAvailablePositionIndMsgT_data_v02} }; /* Predefine the Type Table Object */ @@ -2031,54 +2626,59 @@ static const qmi_idl_type_table_object loc_qmi_idl_type_table_object_v02 = { static const qmi_idl_service_message_table_entry loc_service_command_messages_v02[] = { {QMI_LOC_INFORM_CLIENT_REVISION_REQ_V02, TYPE16(0, 1), 7}, {QMI_LOC_REG_EVENTS_REQ_V02, TYPE16(0, 2), 11}, - {QMI_LOC_START_REQ_V02, TYPE16(0, 3), 32}, + {QMI_LOC_START_REQ_V02, TYPE16(0, 3), 103}, {QMI_LOC_STOP_REQ_V02, TYPE16(0, 4), 4}, - {QMI_LOC_GET_SERVICE_REVISION_REQ_V02, TYPE16(0, 19), 0}, - {QMI_LOC_GET_FIX_CRITERIA_REQ_V02, TYPE16(0, 21), 0}, - {QMI_LOC_NI_USER_RESPONSE_REQ_V02, TYPE16(0, 23), 1075}, - {QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02, TYPE16(0, 25), 1053}, - {QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_REQ_V02, TYPE16(0, 27), 0}, - {QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_REQ_V02, TYPE16(0, 29), 0}, - {QMI_LOC_INJECT_UTC_TIME_REQ_V02, TYPE16(0, 31), 18}, - {QMI_LOC_INJECT_POSITION_REQ_V02, TYPE16(0, 33), 112}, - {QMI_LOC_SET_ENGINE_LOCK_REQ_V02, TYPE16(0, 35), 7}, - {QMI_LOC_GET_ENGINE_LOCK_REQ_V02, TYPE16(0, 37), 0}, - {QMI_LOC_SET_SBAS_CONFIG_REQ_V02, TYPE16(0, 39), 4}, - {QMI_LOC_GET_SBAS_CONFIG_REQ_V02, TYPE16(0, 41), 0}, - {QMI_LOC_SET_NMEA_TYPES_REQ_V02, TYPE16(0, 43), 7}, - {QMI_LOC_GET_NMEA_TYPES_REQ_V02, TYPE16(0, 45), 0}, - {QMI_LOC_SET_LOW_POWER_MODE_REQ_V02, TYPE16(0, 47), 4}, - {QMI_LOC_GET_LOW_POWER_MODE_REQ_V02, TYPE16(0, 49), 0}, - {QMI_LOC_SET_SERVER_REQ_V02, TYPE16(0, 51), 297}, - {QMI_LOC_GET_SERVER_REQ_V02, TYPE16(0, 53), 11}, - {QMI_LOC_DELETE_ASSIST_DATA_REQ_V02, TYPE16(0, 55), 929}, - {QMI_LOC_SET_XTRA_T_SESSION_CONTROL_REQ_V02, TYPE16(0, 57), 4}, - {QMI_LOC_GET_XTRA_T_SESSION_CONTROL_REQ_V02, TYPE16(0, 59), 0}, - {QMI_LOC_INJECT_WIFI_POSITION_REQ_V02, TYPE16(0, 61), 694}, - {QMI_LOC_NOTIFY_WIFI_STATUS_REQ_V02, TYPE16(0, 63), 7}, - {QMI_LOC_GET_REGISTERED_EVENTS_REQ_V02, TYPE16(0, 65), 0}, - {QMI_LOC_SET_OPERATION_MODE_REQ_V02, TYPE16(0, 67), 7}, - {QMI_LOC_GET_OPERATION_MODE_REQ_V02, TYPE16(0, 69), 0}, - {QMI_LOC_SET_SPI_STATUS_REQ_V02, TYPE16(0, 71), 8}, - {QMI_LOC_INJECT_SENSOR_DATA_REQ_V02, TYPE16(0, 73), 1425}, - {QMI_LOC_INJECT_TIME_SYNC_DATA_REQ_V02, TYPE16(0, 75), 21}, - {QMI_LOC_SET_CRADLE_MOUNT_CONFIG_REQ_V02, TYPE16(0, 79), 11}, - {QMI_LOC_GET_CRADLE_MOUNT_CONFIG_REQ_V02, TYPE16(0, 77), 0}, - {QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02, TYPE16(0, 83), 7}, - {QMI_LOC_GET_EXTERNAL_POWER_CONFIG_REQ_V02, TYPE16(0, 81), 0}, - {QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02, TYPE16(0, 85), 129}, - {QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02, TYPE16(0, 87), 18}, - {QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02, TYPE16(0, 89), 11}, - {QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02, TYPE16(0, 91), 7}, - {QMI_LOC_GET_SENSOR_CONTROL_CONFIG_REQ_V02, TYPE16(0, 93), 0}, - {QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02, TYPE16(0, 95), 7}, - {QMI_LOC_GET_SENSOR_PROPERTIES_REQ_V02, TYPE16(0, 97), 0}, - {QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02, TYPE16(0, 99), 21}, - {QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02, TYPE16(0, 101), 0}, - {QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02, TYPE16(0, 103), 2009}, - {QMI_LOC_DELETE_SUPL_CERTIFICATE_REQ_V02, TYPE16(0, 105), 4}, - {QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02, TYPE16(0, 107), 12}, - {QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02, TYPE16(0, 109), 7} + {QMI_LOC_GET_SERVICE_REVISION_REQ_V02, TYPE16(0, 22), 0}, + {QMI_LOC_GET_FIX_CRITERIA_REQ_V02, TYPE16(0, 24), 0}, + {QMI_LOC_NI_USER_RESPONSE_REQ_V02, TYPE16(0, 26), 1086}, + {QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02, TYPE16(0, 28), 1053}, + {QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_REQ_V02, TYPE16(0, 30), 0}, + {QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_REQ_V02, TYPE16(0, 32), 0}, + {QMI_LOC_INJECT_UTC_TIME_REQ_V02, TYPE16(0, 34), 18}, + {QMI_LOC_INJECT_POSITION_REQ_V02, TYPE16(0, 36), 112}, + {QMI_LOC_SET_ENGINE_LOCK_REQ_V02, TYPE16(0, 38), 7}, + {QMI_LOC_GET_ENGINE_LOCK_REQ_V02, TYPE16(0, 40), 0}, + {QMI_LOC_SET_SBAS_CONFIG_REQ_V02, TYPE16(0, 42), 4}, + {QMI_LOC_GET_SBAS_CONFIG_REQ_V02, TYPE16(0, 44), 0}, + {QMI_LOC_SET_NMEA_TYPES_REQ_V02, TYPE16(0, 46), 7}, + {QMI_LOC_GET_NMEA_TYPES_REQ_V02, TYPE16(0, 48), 0}, + {QMI_LOC_SET_LOW_POWER_MODE_REQ_V02, TYPE16(0, 50), 4}, + {QMI_LOC_GET_LOW_POWER_MODE_REQ_V02, TYPE16(0, 52), 0}, + {QMI_LOC_SET_SERVER_REQ_V02, TYPE16(0, 54), 297}, + {QMI_LOC_GET_SERVER_REQ_V02, TYPE16(0, 56), 11}, + {QMI_LOC_DELETE_ASSIST_DATA_REQ_V02, TYPE16(0, 58), 929}, + {QMI_LOC_SET_XTRA_T_SESSION_CONTROL_REQ_V02, TYPE16(0, 60), 4}, + {QMI_LOC_GET_XTRA_T_SESSION_CONTROL_REQ_V02, TYPE16(0, 62), 0}, + {QMI_LOC_INJECT_WIFI_POSITION_REQ_V02, TYPE16(0, 64), 694}, + {QMI_LOC_NOTIFY_WIFI_STATUS_REQ_V02, TYPE16(0, 66), 7}, + {QMI_LOC_GET_REGISTERED_EVENTS_REQ_V02, TYPE16(0, 68), 0}, + {QMI_LOC_SET_OPERATION_MODE_REQ_V02, TYPE16(0, 70), 7}, + {QMI_LOC_GET_OPERATION_MODE_REQ_V02, TYPE16(0, 72), 0}, + {QMI_LOC_SET_SPI_STATUS_REQ_V02, TYPE16(0, 74), 8}, + {QMI_LOC_INJECT_SENSOR_DATA_REQ_V02, TYPE16(0, 76), 1425}, + {QMI_LOC_INJECT_TIME_SYNC_DATA_REQ_V02, TYPE16(0, 78), 21}, + {QMI_LOC_SET_CRADLE_MOUNT_CONFIG_REQ_V02, TYPE16(0, 82), 11}, + {QMI_LOC_GET_CRADLE_MOUNT_CONFIG_REQ_V02, TYPE16(0, 80), 0}, + {QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02, TYPE16(0, 86), 7}, + {QMI_LOC_GET_EXTERNAL_POWER_CONFIG_REQ_V02, TYPE16(0, 84), 0}, + {QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02, TYPE16(0, 88), 129}, + {QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02, TYPE16(0, 90), 25}, + {QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02, TYPE16(0, 92), 11}, + {QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02, TYPE16(0, 94), 7}, + {QMI_LOC_GET_SENSOR_CONTROL_CONFIG_REQ_V02, TYPE16(0, 96), 0}, + {QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02, TYPE16(0, 98), 35}, + {QMI_LOC_GET_SENSOR_PROPERTIES_REQ_V02, TYPE16(0, 100), 7}, + {QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02, TYPE16(0, 102), 28}, + {QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02, TYPE16(0, 104), 0}, + {QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02, TYPE16(0, 106), 2009}, + {QMI_LOC_DELETE_SUPL_CERTIFICATE_REQ_V02, TYPE16(0, 108), 4}, + {QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02, TYPE16(0, 110), 12}, + {QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02, TYPE16(0, 112), 7}, + {QMI_LOC_ADD_CIRCULAR_GEOFENCE_REQ_V02, TYPE16(0, 114), 52}, + {QMI_LOC_DELETE_GEOFENCE_REQ_V02, TYPE16(0, 116), 14}, + {QMI_LOC_QUERY_GEOFENCE_REQ_V02, TYPE16(0, 118), 14}, + {QMI_LOC_EDIT_GEOFENCE_REQ_V02, TYPE16(0, 120), 25}, + {QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02, TYPE16(0, 122), 7} }; static const qmi_idl_service_message_table_entry loc_service_response_messages_v02[] = { @@ -2131,14 +2731,19 @@ static const qmi_idl_service_message_table_entry loc_service_response_messages_v {QMI_LOC_INJECT_SUPL_CERTIFICATE_RESP_V02, TYPE16(0, 0), 7}, {QMI_LOC_DELETE_SUPL_CERTIFICATE_RESP_V02, TYPE16(0, 0), 7}, {QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_RESP_V02, TYPE16(0, 0), 7} + {QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_RESP_V02, TYPE16(0, 0), 7}, + {QMI_LOC_ADD_CIRCULAR_GEOFENCE_RESP_V02, TYPE16(0, 0), 7}, + {QMI_LOC_DELETE_GEOFENCE_RESP_V02, TYPE16(0, 0), 7}, + {QMI_LOC_QUERY_GEOFENCE_RESP_V02, TYPE16(0, 0), 7}, + {QMI_LOC_EDIT_GEOFENCE_RESP_V02, TYPE16(0, 0), 7}, + {QMI_LOC_GET_BEST_AVAILABLE_POSITION_RESP_V02, TYPE16(0, 0), 7} }; static const qmi_idl_service_message_table_entry loc_service_indication_messages_v02[] = { - {QMI_LOC_EVENT_POSITION_REPORT_IND_V02, TYPE16(0, 5), 224}, + {QMI_LOC_EVENT_POSITION_REPORT_IND_V02, TYPE16(0, 5), 388}, {QMI_LOC_EVENT_GNSS_SV_INFO_IND_V02, TYPE16(0, 6), 2248}, {QMI_LOC_EVENT_NMEA_IND_V02, TYPE16(0, 7), 203}, - {QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_IND_V02, TYPE16(0, 8), 1068}, + {QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_IND_V02, TYPE16(0, 8), 1079}, {QMI_LOC_EVENT_INJECT_TIME_REQ_IND_V02, TYPE16(0, 9), 776}, {QMI_LOC_EVENT_INJECT_PREDICTED_ORBITS_REQ_IND_V02, TYPE16(0, 10), 783}, {QMI_LOC_EVENT_INJECT_POSITION_REQ_IND_V02, TYPE16(0, 11), 40}, @@ -2149,65 +2754,75 @@ static const qmi_idl_service_message_table_entry loc_service_indication_messages {QMI_LOC_EVENT_TIME_SYNC_REQ_IND_V02, TYPE16(0, 16), 7}, {QMI_LOC_EVENT_SET_SPI_STREAMING_REPORT_IND_V02, TYPE16(0, 17), 4}, {QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02, TYPE16(0, 18), 21}, - {QMI_LOC_GET_SERVICE_REVISION_IND_V02, TYPE16(0, 20), 14}, - {QMI_LOC_GET_FIX_CRITERIA_IND_V02, TYPE16(0, 22), 28}, - {QMI_LOC_NI_USER_RESPONSE_IND_V02, TYPE16(0, 24), 7}, - {QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02, TYPE16(0, 26), 12}, - {QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_IND_V02, TYPE16(0, 28), 790}, - {QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_IND_V02, TYPE16(0, 30), 20}, - {QMI_LOC_INJECT_UTC_TIME_IND_V02, TYPE16(0, 32), 7}, - {QMI_LOC_INJECT_POSITION_IND_V02, TYPE16(0, 34), 7}, - {QMI_LOC_SET_ENGINE_LOCK_IND_V02, TYPE16(0, 36), 7}, - {QMI_LOC_GET_ENGINE_LOCK_IND_V02, TYPE16(0, 38), 14}, - {QMI_LOC_SET_SBAS_CONFIG_IND_V02, TYPE16(0, 40), 7}, - {QMI_LOC_GET_SBAS_CONFIG_IND_V02, TYPE16(0, 42), 11}, - {QMI_LOC_SET_NMEA_TYPES_IND_V02, TYPE16(0, 44), 7}, - {QMI_LOC_GET_NMEA_TYPES_IND_V02, TYPE16(0, 46), 14}, - {QMI_LOC_SET_LOW_POWER_MODE_IND_V02, TYPE16(0, 48), 7}, - {QMI_LOC_GET_LOW_POWER_MODE_IND_V02, TYPE16(0, 50), 11}, - {QMI_LOC_SET_SERVER_IND_V02, TYPE16(0, 52), 7}, - {QMI_LOC_GET_SERVER_IND_V02, TYPE16(0, 54), 304}, - {QMI_LOC_DELETE_ASSIST_DATA_IND_V02, TYPE16(0, 56), 7}, - {QMI_LOC_SET_XTRA_T_SESSION_CONTROL_IND_V02, TYPE16(0, 58), 7}, - {QMI_LOC_GET_XTRA_T_SESSION_CONTROL_IND_V02, TYPE16(0, 60), 11}, - {QMI_LOC_INJECT_WIFI_POSITION_IND_V02, TYPE16(0, 62), 7}, - {QMI_LOC_NOTIFY_WIFI_STATUS_IND_V02, TYPE16(0, 64), 7}, - {QMI_LOC_GET_REGISTERED_EVENTS_IND_V02, TYPE16(0, 66), 18}, - {QMI_LOC_SET_OPERATION_MODE_IND_V02, TYPE16(0, 68), 7}, - {QMI_LOC_GET_OPERATION_MODE_IND_V02, TYPE16(0, 70), 14}, - {QMI_LOC_SET_SPI_STATUS_IND_V02, TYPE16(0, 72), 7}, - {QMI_LOC_INJECT_SENSOR_DATA_IND_V02, TYPE16(0, 74), 22}, - {QMI_LOC_INJECT_TIME_SYNC_DATA_IND_V02, TYPE16(0, 76), 7}, - {QMI_LOC_SET_CRADLE_MOUNT_CONFIG_IND_V02, TYPE16(0, 80), 7}, - {QMI_LOC_GET_CRADLE_MOUNT_CONFIG_IND_V02, TYPE16(0, 78), 18}, - {QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02, TYPE16(0, 84), 7}, - {QMI_LOC_GET_EXTERNAL_POWER_CONFIG_IND_V02, TYPE16(0, 82), 14}, - {QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02, TYPE16(0, 86), 7}, - {QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02, TYPE16(0, 88), 18}, - {QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02, TYPE16(0, 90), 25}, - {QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02, TYPE16(0, 92), 7}, - {QMI_LOC_GET_SENSOR_CONTROL_CONFIG_IND_V02, TYPE16(0, 94), 14}, - {QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02, TYPE16(0, 96), 7}, - {QMI_LOC_GET_SENSOR_PROPERTIES_IND_V02, TYPE16(0, 98), 14}, - {QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02, TYPE16(0, 100), 14}, - {QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02, TYPE16(0, 102), 28}, - {QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02, TYPE16(0, 104), 7}, - {QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02, TYPE16(0, 106), 7}, - {QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02, TYPE16(0, 108), 14}, - {QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02, TYPE16(0, 110), 19} + {QMI_LOC_GET_SERVICE_REVISION_IND_V02, TYPE16(0, 23), 532}, + {QMI_LOC_GET_FIX_CRITERIA_IND_V02, TYPE16(0, 25), 99}, + {QMI_LOC_NI_USER_RESPONSE_IND_V02, TYPE16(0, 27), 7}, + {QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02, TYPE16(0, 29), 12}, + {QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_IND_V02, TYPE16(0, 31), 790}, + {QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_IND_V02, TYPE16(0, 33), 20}, + {QMI_LOC_INJECT_UTC_TIME_IND_V02, TYPE16(0, 35), 7}, + {QMI_LOC_INJECT_POSITION_IND_V02, TYPE16(0, 37), 7}, + {QMI_LOC_SET_ENGINE_LOCK_IND_V02, TYPE16(0, 39), 7}, + {QMI_LOC_GET_ENGINE_LOCK_IND_V02, TYPE16(0, 41), 14}, + {QMI_LOC_SET_SBAS_CONFIG_IND_V02, TYPE16(0, 43), 7}, + {QMI_LOC_GET_SBAS_CONFIG_IND_V02, TYPE16(0, 45), 11}, + {QMI_LOC_SET_NMEA_TYPES_IND_V02, TYPE16(0, 47), 7}, + {QMI_LOC_GET_NMEA_TYPES_IND_V02, TYPE16(0, 49), 14}, + {QMI_LOC_SET_LOW_POWER_MODE_IND_V02, TYPE16(0, 51), 7}, + {QMI_LOC_GET_LOW_POWER_MODE_IND_V02, TYPE16(0, 53), 11}, + {QMI_LOC_SET_SERVER_IND_V02, TYPE16(0, 55), 7}, + {QMI_LOC_GET_SERVER_IND_V02, TYPE16(0, 57), 304}, + {QMI_LOC_DELETE_ASSIST_DATA_IND_V02, TYPE16(0, 59), 7}, + {QMI_LOC_SET_XTRA_T_SESSION_CONTROL_IND_V02, TYPE16(0, 61), 7}, + {QMI_LOC_GET_XTRA_T_SESSION_CONTROL_IND_V02, TYPE16(0, 63), 11}, + {QMI_LOC_INJECT_WIFI_POSITION_IND_V02, TYPE16(0, 65), 7}, + {QMI_LOC_NOTIFY_WIFI_STATUS_IND_V02, TYPE16(0, 67), 7}, + {QMI_LOC_GET_REGISTERED_EVENTS_IND_V02, TYPE16(0, 69), 18}, + {QMI_LOC_SET_OPERATION_MODE_IND_V02, TYPE16(0, 71), 7}, + {QMI_LOC_GET_OPERATION_MODE_IND_V02, TYPE16(0, 73), 14}, + {QMI_LOC_SET_SPI_STATUS_IND_V02, TYPE16(0, 75), 7}, + {QMI_LOC_INJECT_SENSOR_DATA_IND_V02, TYPE16(0, 77), 22}, + {QMI_LOC_INJECT_TIME_SYNC_DATA_IND_V02, TYPE16(0, 79), 7}, + {QMI_LOC_SET_CRADLE_MOUNT_CONFIG_IND_V02, TYPE16(0, 83), 7}, + {QMI_LOC_GET_CRADLE_MOUNT_CONFIG_IND_V02, TYPE16(0, 81), 18}, + {QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02, TYPE16(0, 87), 7}, + {QMI_LOC_GET_EXTERNAL_POWER_CONFIG_IND_V02, TYPE16(0, 85), 14}, + {QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02, TYPE16(0, 89), 7}, + {QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02, TYPE16(0, 91), 18}, + {QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02, TYPE16(0, 93), 32}, + {QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02, TYPE16(0, 95), 7}, + {QMI_LOC_GET_SENSOR_CONTROL_CONFIG_IND_V02, TYPE16(0, 97), 14}, + {QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02, TYPE16(0, 99), 14}, + {QMI_LOC_GET_SENSOR_PROPERTIES_IND_V02, TYPE16(0, 101), 42}, + {QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02, TYPE16(0, 103), 14}, + {QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02, TYPE16(0, 105), 35}, + {QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02, TYPE16(0, 107), 7}, + {QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02, TYPE16(0, 109), 7}, + {QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02, TYPE16(0, 111), 14}, + {QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02, TYPE16(0, 113), 19}, + {QMI_LOC_EVENT_NI_GEOFENCE_NOTIFICATION_IND_V02, TYPE16(0, 19), 14}, + {QMI_LOC_EVENT_GEOFENCE_GEN_ALERT_IND_V02, TYPE16(0, 20), 7}, + {QMI_LOC_EVENT_GEOFENCE_BREACH_NOTIFICATION_IND_V02, TYPE16(0, 21), 78}, + {QMI_LOC_ADD_CIRCULAR_GEOFENCE_IND_V02, TYPE16(0, 115), 21}, + {QMI_LOC_DELETE_GEOFENCE_IND_V02, TYPE16(0, 117), 21}, + {QMI_LOC_QUERY_GEOFENCE_IND_V02, TYPE16(0, 119), 65}, + {QMI_LOC_EDIT_GEOFENCE_IND_V02, TYPE16(0, 121), 28}, + {QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02, TYPE16(0, 123), 391} }; /*Service Object*/ -const struct qmi_idl_service_object loc_qmi_idl_service_object_v02 = { +struct qmi_idl_service_object loc_qmi_idl_service_object_v02 = { + 0x05, 0x02, - 0x02, - 16, + 0x10, 2248, { sizeof(loc_service_command_messages_v02)/sizeof(qmi_idl_service_message_table_entry), sizeof(loc_service_response_messages_v02)/sizeof(qmi_idl_service_message_table_entry), sizeof(loc_service_indication_messages_v02)/sizeof(qmi_idl_service_message_table_entry) }, { loc_service_command_messages_v02, loc_service_response_messages_v02, loc_service_indication_messages_v02}, - &loc_qmi_idl_type_table_object_v02 + &loc_qmi_idl_type_table_object_v02, + 0x0B, + NULL }; /* Service Object Accessor */ diff --git a/loc_api/loc_api_v02/location_service_v02.h b/loc_api/loc_api_v02/location_service_v02.h old mode 100755 new mode 100644 index 2f288145..c3d67702 --- a/loc_api/loc_api_v02/location_service_v02.h +++ b/loc_api/loc_api_v02/location_service_v02.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -82,11 +82,11 @@ extern "C" { /** Major Version Number of the IDL used to generate this file */ #define LOC_V02_IDL_MAJOR_VERS 0x02 /** Revision Number of the IDL used to generate this file */ -#define LOC_V02_IDL_MINOR_VERS 0x04 +#define LOC_V02_IDL_MINOR_VERS 0x0B /** Major Version Number of the qmi_idl_compiler used to generate this file */ -#define LOC_V02_IDL_TOOL_VERS 0x02 +#define LOC_V02_IDL_TOOL_VERS 0x05 /** Maximum Defined Message ID */ -#define LOC_V02_MAX_MESSAGE_ID 0x005F; +#define LOC_V02_MAX_MESSAGE_ID 0x0067; /** @} */ @@ -96,6 +96,19 @@ extern "C" { @{ */ +/** Maximum string length for the Provider field in the application ID. */ +#define QMI_LOC_MAX_APP_ID_PROVIDER_LENGTH_V02 24 + +/** Maximum string length for the Name field in the application ID. */ +#define QMI_LOC_MAX_APP_ID_NAME_LENGTH_V02 32 + +/** Maximum string length for the Version field in the application ID. */ +#define QMI_LOC_MAX_APP_ID_VERSION_LENGTH_V02 8 + +/** Maximum length of the list containing the SVs that were used to generate + a position report. */ +#define QMI_LOC_MAX_SV_USED_LIST_LENGTH_V02 80 + /** Maximum number of satellites in the satellite report. */ #define QMI_LOC_SV_INFO_LIST_MAX_SIZE_V02 80 @@ -133,6 +146,15 @@ extern "C" { engine. */ #define QMI_LOC_MAX_PREDICTED_ORBITS_SERVERS_V02 3 +/** Maximum GNSS Measurement Engine Firmware Version String length. */ +#define QMI_LOC_GNSS_ME_VERSION_STRING_MAX_LENGTH_V02 127 + +/** Maximum GNSS Measurement Engine Hosted Software Version String length. */ +#define QMI_LOC_GNSS_HOSTED_SW_VERSION_STRING_MAX_LENGTH_V02 127 + +/** Maximum GNSS Measurement Engine Full Version String length. */ +#define QMI_LOC_GNSS_SW_VERSION_STRING_MAX_LENGTH_V02 255 + /** Maximum part length that can be injected. The client should also look at the maxPartSize field in the predicted orbits injection request indication and pick the minimum of the two. */ @@ -156,7 +178,7 @@ extern "C" { /** Maximum APN profiles supported. */ #define QMI_LOC_MAX_APN_PROFILES_V02 6 -/** Maximum length of SUPL CERT. */ +/** Maximum length of the SUPL certificate. */ #define QMI_LOC_MAX_SUPL_CERT_LENGTH_V02 2000 /** @} @@ -188,45 +210,54 @@ typedef struct { /* Mandatory */ /* Revision */ uint32_t revision; - /**< Revision that the control point is using. \n - - Type: Unsigned integer */ + /**< Revision that the control point is using. */ }qmiLocInformClientRevisionReqMsgT_v02; /* Message */ /** @} */ typedef uint64_t qmiLocEventRegMaskT_v02; -#define QMI_LOC_EVENT_MASK_POSITION_REPORT_V02 ((qmiLocEventRegMaskT_v02)0x00000001) /**< The control point must enable this mask to receive position report +#define QMI_LOC_EVENT_MASK_POSITION_REPORT_V02 ((qmiLocEventRegMaskT_v02)0x00000001ull) /**< The control point must enable this mask to receive position report event indications. */ -#define QMI_LOC_EVENT_MASK_GNSS_SV_INFO_V02 ((qmiLocEventRegMaskT_v02)0x00000002) /**< The control point must enable this mask to receive satellite report +#define QMI_LOC_EVENT_MASK_GNSS_SV_INFO_V02 ((qmiLocEventRegMaskT_v02)0x00000002ull) /**< The control point must enable this mask to receive satellite report event indications. These reports are sent at a 1 Hz rate. */ -#define QMI_LOC_EVENT_MASK_NMEA_V02 ((qmiLocEventRegMaskT_v02)0x00000004) /**< The control point must enable this mask to receive NMEA reports for +#define QMI_LOC_EVENT_MASK_NMEA_V02 ((qmiLocEventRegMaskT_v02)0x00000004ull) /**< The control point must enable this mask to receive NMEA reports for position and satellites in view. The report is at a 1 Hz rate. */ -#define QMI_LOC_EVENT_MASK_NI_NOTIFY_VERIFY_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000008) /**< The control point must enable this mask to receive NI notify verify request +#define QMI_LOC_EVENT_MASK_NI_NOTIFY_VERIFY_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000008ull) /**< The control point must enable this mask to receive NI notify verify request event indications. */ -#define QMI_LOC_EVENT_MASK_INJECT_TIME_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000010) /**< The control point must enable this mask to receive time injection request +#define QMI_LOC_EVENT_MASK_INJECT_TIME_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000010ull) /**< The control point must enable this mask to receive time injection request event indications. */ -#define QMI_LOC_EVENT_MASK_INJECT_PREDICTED_ORBITS_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000020) /**< The control point must enable this mask to receive predicted orbits request +#define QMI_LOC_EVENT_MASK_INJECT_PREDICTED_ORBITS_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000020ull) /**< The control point must enable this mask to receive predicted orbits request event indications. */ -#define QMI_LOC_EVENT_MASK_INJECT_POSITION_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000040) /**< The control point must enable this mask to receive position injection request +#define QMI_LOC_EVENT_MASK_INJECT_POSITION_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000040ull) /**< The control point must enable this mask to receive position injection request event indications. */ -#define QMI_LOC_EVENT_MASK_ENGINE_STATE_V02 ((qmiLocEventRegMaskT_v02)0x00000080) /**< The control point must enable this mask to receive engine state report +#define QMI_LOC_EVENT_MASK_ENGINE_STATE_V02 ((qmiLocEventRegMaskT_v02)0x00000080ull) /**< The control point must enable this mask to receive engine state report event indications. */ -#define QMI_LOC_EVENT_MASK_FIX_SESSION_STATE_V02 ((qmiLocEventRegMaskT_v02)0x00000100) /**< The control point must enable this mask to receive fix session status report +#define QMI_LOC_EVENT_MASK_FIX_SESSION_STATE_V02 ((qmiLocEventRegMaskT_v02)0x00000100ull) /**< The control point must enable this mask to receive fix session status report event indications. */ -#define QMI_LOC_EVENT_MASK_WIFI_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000200) /**< The control point must enable this mask to receive WiFi position request +#define QMI_LOC_EVENT_MASK_WIFI_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000200ull) /**< The control point must enable this mask to receive WiFi position request event indications. */ -#define QMI_LOC_EVENT_MASK_SENSOR_STREAMING_READY_STATUS_V02 ((qmiLocEventRegMaskT_v02)0x00000400) /**< The control point must enable this mask to receive notifications from the +#define QMI_LOC_EVENT_MASK_SENSOR_STREAMING_READY_STATUS_V02 ((qmiLocEventRegMaskT_v02)0x00000400ull) /**< The control point must enable this mask to receive notifications from the GPS engine indicating its readiness to accept data from the - sensors (accelerometer, gyrometer, etc.). */ -#define QMI_LOC_EVENT_MASK_TIME_SYNC_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000800) /**< The control point must enable this mask to receive time-sync requests from - the GPS engine. Time sync enables the GPS engine to synchronize + sensors (accelerometer, gyroscope, etc.). */ +#define QMI_LOC_EVENT_MASK_TIME_SYNC_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00000800ull) /**< The control point must enable this mask to receive time-sync requests + from the GPS engine. Time sync enables the GPS engine to synchronize its clock with the sensor processor's clock. */ -#define QMI_LOC_EVENT_MASK_SET_SPI_STREAMING_REPORT_V02 ((qmiLocEventRegMaskT_v02)0x00001000) /**< The control point must enable this mask to receive Stationary Position - Indicator (SPI) streaming report indications. */ -#define QMI_LOC_EVENT_MASK_LOCATION_SERVER_CONNECTION_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00002000) /**< The control point must enable this mask to receive location server requests. - These requests are generated when the service wishes to establish a - connection with a location server. */ +#define QMI_LOC_EVENT_MASK_SET_SPI_STREAMING_REPORT_V02 ((qmiLocEventRegMaskT_v02)0x00001000ull) /**< The control point must enable this mask to receive Stationary Position + Indicator (SPI) streaming report indications. */ +#define QMI_LOC_EVENT_MASK_LOCATION_SERVER_CONNECTION_REQ_V02 ((qmiLocEventRegMaskT_v02)0x00002000ull) /**< The control point must enable this mask to receive location server + requests. These requests are generated when the service wishes to + establish a connection with a location server. */ +#define QMI_LOC_EVENT_MASK_NI_GEOFENCE_NOTIFICATION_V02 ((qmiLocEventRegMaskT_v02)0x00004000ull) /**< The control point must enable this mask to receive notifications + related to network-initiated Geofences. These events notify the client + when a network-initiated Geofence is added, deleted, or edited. */ +#define QMI_LOC_EVENT_MASK_GEOFENCE_GEN_ALERT_V02 ((qmiLocEventRegMaskT_v02)0x00008000ull) /**< The control point must enable this mask to receive Geofence alerts. + These alerts are generated to inform the client of the changes that may + affect Geofence, e.g., if GPS is turned off or if the network is + unavailable. */ +#define QMI_LOC_EVENT_MASK_GEOFENCE_BREACH_NOTIFICATION_V02 ((qmiLocEventRegMaskT_v02)0x00010000ull) /**< The control point must enable this mask to receive notifications when + a Geofence is breached. These events are generated when the UE enters + or leaves the perimeter of a Geofence. */ /** @addtogroup loc_qmi_messages @{ */ @@ -238,23 +269,26 @@ typedef struct { /* Event Registration Mask */ qmiLocEventRegMaskT_v02 eventRegMask; /**< Specifies the events that the control point is interested in receiving. - Refer to the definition of the following bitmasks: \n - - - 0x00000001 -- POSITION_REPORT \n - - 0x00000002 -- GNSS_SV_INFO \n - - 0x00000004 -- NMEA \n - - 0x00000008 -- NI_NOTIFY_VERIFY_REQ \n - - 0x00000010 -- INJECT_TIME_REQ \n - - 0x00000020 -- INJECT_PREDICTED_ORBITS_REQ \n - - 0x00000040 -- INJECT_POSITION_REQ \n - - 0x00000080 -- ENGINE_STATE \n - - 0x00000100 -- FIX_SESSION_STATE \n - - 0x00000200 -- WIFI_REQ \n - - 0x00000400 -- SENSOR_STREAMING_READY_STATUS \n - - 0x00000800 -- TIME_SYNC_REQ \n - - 0x00001000 -- SET_SPI_STREAMING_REPORT \n - - 0x00002000 -- LOCATION_SERVER_CONNECTION_REQ - + Refer to the definition of the following bitmasks: + \vspace{0.05in} \begin{itemize1} + \item 0x00000001 -- POSITION_REPORT + \item 0x00000002 -- GNSS_SV_INFO + \item 0x00000004 -- NMEA + \item 0x00000008 -- NI_NOTIFY_VERIFY_REQ + \item 0x00000010 -- INJECT_TIME_REQ + \item 0x00000020 -- INJECT_PREDICTED_ORBITS_REQ + \item 0x00000040 -- INJECT_POSITION_REQ + \item 0x00000080 -- ENGINE_STATE + \item 0x00000100 -- FIX_SESSION_STATE + \item 0x00000200 -- WIFI_REQ + \item 0x00000400 -- SENSOR_STREAMING_READY_STATUS + \item 0x00000800 -- TIME_SYNC_REQ + \item 0x00001000 -- SET_SPI_STREAMING_REPORT + \item 0x00002000 -- LOCATION_SERVER_CONNECTION_REQ + \item 0x00004000 -- NI_GEOFENCE_NOTIFICATION + \item 0x00008000 -- GEOFENCE_GEN_ALERT + \item 0x00010000 -- GEOFENCE_BREACH_NOTIFICATION + \end{itemize1} \vspace{0.05in} Multiple events can be registered by ORing the individual masks and sending them in this TLV. All unused bits in this mask must be set to 0. */ @@ -306,6 +340,31 @@ typedef enum { @} */ +/** @addtogroup loc_qmi_aggregates + @{ + */ +typedef struct { + + char applicationProvider[QMI_LOC_MAX_APP_ID_PROVIDER_LENGTH_V02 + 1]; + /**< Application provider. */ + + char applicationName[QMI_LOC_MAX_APP_ID_NAME_LENGTH_V02 + 1]; + /**< Application name. */ + + uint8_t applicationVersion_valid; + /**< Specifies whether the application version string contains a valid value: + \begin{itemize1} + \item 0x00 (FALSE) -- Application version string is invalid + \item 0x01 (TRUE) -- Application version string is valid + \vspace{-0.18in} \end{itemize1} */ + + char applicationVersion[QMI_LOC_MAX_APP_ID_VERSION_LENGTH_V02 + 1]; + /**< Application version. */ +}qmiLocApplicationIdStructT_v02; /* Type */ +/** + @} + */ + /** @addtogroup loc_qmi_messages @{ */ @@ -319,7 +378,6 @@ typedef struct { /**< ID of the session as identified by the control point. The session ID is reported back in the position reports. The control point must specify the same session ID in the QMI_LOC_STOP_REQ message. \n - - Type: Unsigned integer \n - Range: 0 to 255 */ @@ -342,10 +400,13 @@ typedef struct { /**< Specifies the horizontal accuracy level required by the control point. If not specified, accuracy defaults to LOW. - Valid values: \n - - 0x00000001 -- LOW: Client requires low horizontal accuracy.\n - - 0x00000002 -- MED: Client requires medium horizontal accuracy.\n - - 0x00000003 -- HIGH: Client requires high horizontal accuracy. + Valid values: + \begin{itemize1} + \item 0x00000001 -- LOW: Client requires low horizontal accuracy + \item 0x00000002 -- MED: Client requires medium horizontal accuracy + \item 0x00000003 -- HIGH: Client requires high horizontal accuracy + \vspace{-0.18in} + \end{itemize1} */ /* Optional */ @@ -361,9 +422,14 @@ typedef struct { report is set to IN_PROGRESS in order for the control point to identify intermediate reports. - Valid values: \n - - 0x00000001 -- ON: Client is interested in receiving intermediate reports \n - - 0x00000002 -- OFF: Client is not interested in receiving intermediate reports + Valid values: + \begin{itemize1} + \item 0x00000001 -- ON: Client is interested in receiving intermediate + reports + \item 0x00000002 -- OFF: Client is not interested in receiving + intermediate reports + \vspace{-0.18in} + \end{itemize1} */ /* Optional */ @@ -372,10 +438,15 @@ typedef struct { uint32_t minInterval; /**< Minimum time interval, specified by the control point, that must elapse between position reports. \n - - Type: Unsigned integer \n - Units: Milliseconds \n - Default: 1000 ms */ + + /* Optional */ + /* ID of the Application that Sent this Request */ + uint8_t applicationId_valid; /**< Must be set to true if applicationId is being passed */ + qmiLocApplicationIdStructT_v02 applicationId; + /**< \n Application provider, name, and version. */ }qmiLocStartReqMsgT_v02; /* Message */ /** @} @@ -393,7 +464,6 @@ typedef struct { uint8_t sessionId; /**< ID of the session that was specified in the Start request (QMI_LOC_START_REQ).\n - - Type: Unsigned integer \n - Range: 0 to 255 */ }qmiLocStopReqMsgT_v02; /* Message */ /** @@ -404,6 +474,8 @@ typedef uint32_t qmiLocPosTechMaskT_v02; #define QMI_LOC_POS_TECH_MASK_SATELLITE_V02 ((qmiLocPosTechMaskT_v02)0x00000001) /**< Satellites were used to generate the fix. */ #define QMI_LOC_POS_TECH_MASK_CELLID_V02 ((qmiLocPosTechMaskT_v02)0x00000002) /**< Cell towers were used to generate the fix. */ #define QMI_LOC_POS_TECH_MASK_WIFI_V02 ((qmiLocPosTechMaskT_v02)0x00000004) /**< WiFi access points were used to generate the fix. */ +#define QMI_LOC_POS_TECH_MASK_SENSORS_V02 ((qmiLocPosTechMaskT_v02)0x00000008) /**< Sensors were used to generate the fix. */ +#define QMI_LOC_POS_TECH_MASK_REFERENCE_LOCATION_V02 ((qmiLocPosTechMaskT_v02)0x00000010) /**< Reference Location was used to generate the fix. */ /** @addtogroup loc_qmi_enums @{ */ @@ -433,12 +505,10 @@ typedef struct { uint16_t gpsWeek; /**< Current GPS week as calculated from midnight, Jan. 6, 1980. \n - - Type: Unsigned integer \n - Units: Weeks */ uint32_t gpsTimeOfWeekMs; /**< Amount of time into the current GPS week. \n - - Type: Unsigned integer \n - Units: Milliseconds */ }qmiLocGPSTimeStructT_v02; /* Type */ /** @@ -451,20 +521,23 @@ typedef struct { typedef struct { float PDOP; - /**< Position dilution of precision.\n - - Type: Floating point \n - - Range: 1 (highest accuracy) to 50 (lowest accuracy)\n - - PDOP = square root of (HDOP^2 + VDOP^2) */ + /**< Position dilution of precision. + \begin{itemize1} + \item Range: 1 (highest accuracy) to 50 (lowest accuracy) + \item PDOP = square root of (HDOP^2 + VDOP^2) + \vspace{-0.18in} \end{itemize1} */ float HDOP; - /**< Horizontal dilution of precision.\n - - Type: Floating point \n - - Range: 1 (highest accuracy) to 50 (lowest accuracy) */ + /**< Horizontal dilution of precision. + \begin{itemize1} + \item Range: 1 (highest accuracy) to 50 (lowest accuracy) + \vspace{-0.18in} \end{itemize1} */ float VDOP; - /**< Vertical dilution of precision.\n - - Type: Floating point. \n - - Range: 1 (highest accuracy) to 50 (lowest accuracy) */ + /**< Vertical dilution of precision. + \begin{itemize1} + \item Range: 1 (highest accuracy) to 50 (lowest accuracy) + \vspace{-0.18in} \end{itemize1} */ }qmiLocDOPStructT_v02; /* Type */ /** @} @@ -472,7 +545,7 @@ typedef struct { typedef uint32_t qmiLocSensorUsageMaskT_v02; #define QMI_LOC_SENSOR_MASK_USED_ACCEL_V02 ((qmiLocSensorUsageMaskT_v02)0x00000001) /**< Bitmask to specify whether an accelerometer was used. */ -#define QMI_LOC_SENSOR_MASK_USED_GYRO_V02 ((qmiLocSensorUsageMaskT_v02)0x00000002) /**< Bitmask to specify whether a gyrometer was used. */ +#define QMI_LOC_SENSOR_MASK_USED_GYRO_V02 ((qmiLocSensorUsageMaskT_v02)0x00000002) /**< Bitmask to specify whether a gyroscope was used. */ typedef uint32_t qmiLocSensorAidedMaskT_v02; #define QMI_LOC_SENSOR_AIDED_MASK_HEADING_V02 ((qmiLocSensorAidedMaskT_v02)0x00000001) /**< Bitmask to specify whether a sensor was used to calculate heading. */ #define QMI_LOC_SENSOR_AIDED_MASK_SPEED_V02 ((qmiLocSensorAidedMaskT_v02)0x00000002) /**< Bitmask to specify whether a sensor was used to calculate speed. */ @@ -484,16 +557,19 @@ typedef uint32_t qmiLocSensorAidedMaskT_v02; typedef struct { qmiLocSensorUsageMaskT_v02 usageMask; - /**< Specifies which sensors are used. + /**< Specifies which sensors were used in calculating the position in the + position report. - Valid bitmasks are specified by the following constants: \n - - 0x00000001 -- SENSOR_USED_ACCEL \n - - 0x00000002 -- SENSOR_USED_GYRO */ + Valid bitmasks: + \begin{itemize1} + \item 0x00000001 -- SENSOR_USED_ACCEL + \item 0x00000002 -- SENSOR_USED_GYRO + \vspace{-0.18in} \end{itemize1} */ qmiLocSensorAidedMaskT_v02 aidingIndicatorMask; - /**< Specifies which results are aided by sensors. + /**< Specifies which results were aided by sensors. - Valid bitmasks are specified by the following constants: \n + Valid bitmasks: \n - 0x00000001 -- AIDED_HEADING \n - 0x00000002 -- AIDED_SPEED \n - 0x00000004 -- AIDED_POSITION \n @@ -562,15 +638,17 @@ typedef struct { qmiLocSessionStatusEnumT_v02 sessionStatus; /**< Session status. - Valid values: \n - - 0x00000000 -- SESS_STATUS_SUCCESS \n - - 0x00000001 -- SESS_STATUS_IN_PROGRESS \n - - 0x00000002 -- SESS_STATUS_GENERAL_FAILURE \n - - 0x00000003 -- SESS_STATUS_TIMEOUT \n - - 0x00000004 -- SESS_STATUS_USER_END \n - - 0x00000005 -- SESS_STATUS_BAD_PARAMETER \n - - 0x00000006 -- SESS_STATUS_PHONE_OFFLINE \n - - 0x00000007 -- SESS_STATUS_ENGINE_LOCKED + Valid values: + \begin{itemize1} + \item 0x00000000 -- SESS_STATUS_SUCCESS + \item 0x00000001 -- SESS_STATUS_IN_PROGRESS + \item 0x00000002 -- SESS_STATUS_GENERAL_FAILURE + \item 0x00000003 -- SESS_STATUS_TIMEOUT + \item 0x00000004 -- SESS_STATUS_USER_END + \item 0x00000005 -- SESS_STATUS_BAD_PARAMETER + \item 0x00000006 -- SESS_STATUS_PHONE_OFFLINE + \item 0x00000007 -- SESS_STATUS_ENGINE_LOCKED + \vspace{-0.18in} \end{itemize1} */ /* Mandatory */ @@ -578,37 +656,39 @@ typedef struct { uint8_t sessionId; /**< ID of the session that was specified in the Start request QMI_LOC_START_REQ. \n - - Type: Unsigned integer \n - Range: 0 to 255 */ /* Optional */ /* Latitude */ uint8_t latitude_valid; /**< Must be set to true if latitude is being passed */ double latitude; - /**< Latitude (specified in WGS84 datum). \n - - Type: Floating point \n - - Units: Degrees \n - - Range: -90.0 to 90.0 \n - - Positive values indicate northern latitude \n - - Negative values indicate southern latitude */ + /**< Latitude (specified in WGS84 datum). + \begin{itemize1} + \item Type: Floating point + \item Units: Degrees + \item Range: -90.0 to 90.0 \begin{itemize1} + \item Positive values indicate northern latitude + \item Negative values indicate southern latitude + \vspace{-0.18in} \end{itemize1} \end{itemize1} */ /* Optional */ /* Longitude */ uint8_t longitude_valid; /**< Must be set to true if longitude is being passed */ double longitude; - /**< Longitude (specified in WGS84 datum).\n - - Type: Floating point \n - - Units: Degrees \n - - Range: -180.0 to 180.0 \n - - Positive values indicate eastern longitude \n - - Negative values indicate western longitude */ + /**< Longitude (specified in WGS84 datum). + \begin{itemize1} + \item Type: Floating point + \item Units: Degrees + \item Range: -180.0 to 180.0 \begin{itemize1} + \item Positive values indicate eastern longitude + \item Negative values indicate western longitude + \vspace{-0.18in} \end{itemize1} \end{itemize1} */ /* Optional */ /* Circular Horizontal Position Uncertainty */ uint8_t horUncCircular_valid; /**< Must be set to true if horUncCircular is being passed */ float horUncCircular; /**< Horizontal position uncertainty (circular).\n - - Type: Floating point \n - Units: Meters */ /* Optional */ @@ -616,7 +696,6 @@ typedef struct { uint8_t horUncEllipseSemiMinor_valid; /**< Must be set to true if horUncEllipseSemiMinor is being passed */ float horUncEllipseSemiMinor; /**< Semi-minor axis of horizontal elliptical uncertainty.\n - - Type: Floating point \n - Units: Meters */ /* Optional */ @@ -624,7 +703,6 @@ typedef struct { uint8_t horUncEllipseSemiMajor_valid; /**< Must be set to true if horUncEllipseSemiMajor is being passed */ float horUncEllipseSemiMajor; /**< Semi-major axis of horizontal elliptical uncertainty.\n - - Type: Floating point \n - Units: Meters */ /* Optional */ @@ -632,7 +710,6 @@ typedef struct { uint8_t horUncEllipseOrientAzimuth_valid; /**< Must be set to true if horUncEllipseOrientAzimuth is being passed */ float horUncEllipseOrientAzimuth; /**< Elliptical horizontal uncertainty azimuth of orientation.\n - - Type: Floating point \n - Units: Decimal degrees \n - Range: 0 to 180 */ @@ -641,7 +718,6 @@ typedef struct { uint8_t horConfidence_valid; /**< Must be set to true if horConfidence is being passed */ uint8_t horConfidence; /**< Horizontal uncertainty confidence.\n - - Type: Unsigned integer \n - Units: Percent \n - Range: 0 to 99 */ @@ -649,14 +725,15 @@ typedef struct { /* Horizontal Reliability */ uint8_t horReliability_valid; /**< Must be set to true if horReliability is being passed */ qmiLocReliabilityEnumT_v02 horReliability; - /**< Specifies the reliability of the horizontal position. - - Valid values: \n - - 0x00000000 -- RELIABILITY_NOT_SET \n - - 0x00000001 -- RELIABILITY_VERY_LOW \n - - 0x00000002 -- RELIABILITY_LOW \n - - 0x00000003 -- RELIABILITY_MEDIUM \n - - 0x00000004 -- RELIABILITY_HIGH + /**< Specifies the reliability of the horizontal position. \n + Valid values: + \begin{itemize1} + \item 0x00000000 -- RELIABILITY_NOT_SET + \item 0x00000001 -- RELIABILITY_VERY_LOW + \item 0x00000002 -- RELIABILITY_LOW + \item 0x00000003 -- RELIABILITY_MEDIUM + \item 0x00000004 -- RELIABILITY_HIGH + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -664,15 +741,13 @@ typedef struct { uint8_t speedHorizontal_valid; /**< Must be set to true if speedHorizontal is being passed */ float speedHorizontal; /**< Horizontal speed.\n - - Type: Floating point \n - Units: Meters/second */ /* Optional */ /* Speed Uncertainty */ uint8_t speedUnc_valid; /**< Must be set to true if speedUnc is being passed */ float speedUnc; - /**< Speed uncertainty.\n - - Type: Floating point \n + /**< 3-D Speed uncertainty.\n - Units: Meters/second */ /* Optional */ @@ -680,7 +755,6 @@ typedef struct { uint8_t altitudeWrtEllipsoid_valid; /**< Must be set to true if altitudeWrtEllipsoid is being passed */ float altitudeWrtEllipsoid; /**< Altitude with respect to the WGS84 ellipsoid.\n - - Type: Floating point \n - Units: Meters \n - Range: -500 to 15883 */ @@ -689,7 +763,6 @@ typedef struct { uint8_t altitudeWrtMeanSeaLevel_valid; /**< Must be set to true if altitudeWrtMeanSeaLevel is being passed */ float altitudeWrtMeanSeaLevel; /**< Altitude with respect to mean sea level.\n - - Type: Floating point \n - Units: Meters */ /* Optional */ @@ -697,7 +770,6 @@ typedef struct { uint8_t vertUnc_valid; /**< Must be set to true if vertUnc is being passed */ float vertUnc; /**< Vertical uncertainty.\n - - Type: Floating point \n - Units: Meters */ /* Optional */ @@ -705,7 +777,6 @@ typedef struct { uint8_t vertConfidence_valid; /**< Must be set to true if vertConfidence is being passed */ uint8_t vertConfidence; /**< Vertical uncertainty confidence.\n - - Type: Unsigned integer \n - Units: Percent \n - Range: 0 to 99 */ @@ -713,21 +784,21 @@ typedef struct { /* Vertical Reliability */ uint8_t vertReliability_valid; /**< Must be set to true if vertReliability is being passed */ qmiLocReliabilityEnumT_v02 vertReliability; - /**< Specifies the reliability of the vertical position. - - Valid values: \n - - 0x00000000 -- RELIABILITY_NOT_SET \n - - 0x00000001 -- RELIABILITY_VERY_LOW \n - - 0x00000002 -- RELIABILITY_LOW \n - - 0x00000003 -- RELIABILITY_MEDIUM \n - - 0x00000004 -- RELIABILITY_HIGH */ + /**< Specifies the reliability of the vertical position. \n + Valid values: + \begin{itemize1} + \item 0x00000000 -- RELIABILITY_NOT_SET + \item 0x00000001 -- RELIABILITY_VERY_LOW + \item 0x00000002 -- RELIABILITY_LOW + \item 0x00000003 -- RELIABILITY_MEDIUM + \item 0x00000004 -- RELIABILITY_HIGH + \vspace{-0.18in} \end{itemize1} */ /* Optional */ /* Vertical Speed */ uint8_t speedVertical_valid; /**< Must be set to true if speedVertical is being passed */ float speedVertical; /**< Vertical speed.\n - - Type: Floating point \n - Units: Meters/second */ /* Optional */ @@ -735,7 +806,6 @@ typedef struct { uint8_t heading_valid; /**< Must be set to true if heading is being passed */ float heading; /**< Heading.\n - - Type: Floating point \n - Units: Degrees \n - Range: 0 to 359.999 */ @@ -744,7 +814,6 @@ typedef struct { uint8_t headingUnc_valid; /**< Must be set to true if headingUnc is being passed */ float headingUnc; /**< Heading uncertainty.\n - - Type: Floating point \n - Units: Degrees \n - Range: 0 to 359.999 */ @@ -754,8 +823,7 @@ typedef struct { float magneticDeviation; /**< Difference between the bearing to true north and the bearing shown on a magnetic compass. The deviation is positive when the magnetic - north is east of true north. \n - - Type: Floating point */ + north is east of true north. */ /* Optional */ /* Technology Used */ @@ -765,8 +833,10 @@ typedef struct { Valid bitmasks: \n - 0x00000001 -- SATELLITE \n - - 0x00000002 -- CELLID \n - - 0x00000004 -- WIFI */ + - 0x00000002 -- CELLID \n + - 0x00000004 -- WIFI \n + - 0x00000008 -- SENSORS \n + - 0x00000010 -- REFERENCE_LOCATION */ /* Optional */ /* Dilution of Precision */ @@ -779,7 +849,6 @@ typedef struct { uint8_t timestampUtc_valid; /**< Must be set to true if timestampUtc is being passed */ uint64_t timestampUtc; /**< UTC timestamp. \n - - Type: Unsigned integer \n - Units: Milliseconds since Jan. 1, 1970 */ /* Optional */ @@ -789,11 +858,10 @@ typedef struct { /**< Leap second information. If leapSeconds is not available, timestampUtc is calculated based on a hard-coded value for leap seconds. \n - - Type: Unsigned integer \n - Units: Seconds */ /* Optional */ - /* GPS Time \n */ + /* GPS Time */ uint8_t gpsTime_valid; /**< Must be set to true if gpsTime is being passed */ qmiLocGPSTimeStructT_v02 gpsTime; /**< \n The number of weeks since Jan. 5, 1980, and @@ -804,7 +872,6 @@ typedef struct { uint8_t timeUnc_valid; /**< Must be set to true if timeUnc is being passed */ float timeUnc; /**< Time uncertainty. \n - - Type: Floating point \n - Units: Milliseconds */ /* Optional */ @@ -813,16 +880,18 @@ typedef struct { qmiLocTimeSourceEnumT_v02 timeSrc; /**< Time source. - Valid values: \n - - 0x00000000 -- TIME_SRC_INVALID \n - - 0x00000001 -- TIME_SRC_NETWORK_TIME_TRANSFER \n - - 0x00000002 -- TIME_SRC_NETWORK_TIME_TAGGING \n - - 0x00000003 -- TIME_SRC_EXTERNAL_ INPUT \n - - 0x00000004 -- TIME_SRC_TOW_DECODE \n - - 0x00000005 -- TIME_SRC_TOW_CONFIRMED \n - - 0x00000006 -- TIME_SRC_TOW_AND_WEEK_CONFIRMED \n - - 0x00000007 -- TIME_SRC_NAV_SOLUTION \n - - 0x00000008 -- TIME_SRC_SOLVE_FOR_TIME */ + Valid values: + \begin{itemize1} + \item 0x00000000 -- TIME_SRC_INVALID + \item 0x00000001 -- TIME_SRC_NETWORK_TIME_TRANSFER + \item 0x00000002 -- TIME_SRC_NETWORK_TIME_TAGGING + \item 0x00000003 -- TIME_SRC_EXTERNAL_ INPUT + \item 0x00000004 -- TIME_SRC_TOW_DECODE + \item 0x00000005 -- TIME_SRC_TOW_CONFIRMED + \item 0x00000006 -- TIME_SRC_TOW_AND_WEEK_CONFIRMED + \item 0x00000007 -- TIME_SRC_NAV_SOLUTION + \item 0x00000008 -- TIME_SRC_SOLVE_FOR_TIME + \vspace{-0.18in} \end{itemize1} */ /* Optional */ /* Sensor Data Usage */ @@ -837,6 +906,21 @@ typedef struct { uint32_t fixId; /**< Fix count for the session. Starts with 0 and increments by one for each successive position report for a particular session. */ + + /* Optional */ + /* SVs Used to Calculate the Fix */ + uint8_t gnssSvUsedList_valid; /**< Must be set to true if gnssSvUsedList is being passed */ + uint32_t gnssSvUsedList_len; /**< Must be set to # of elements in gnssSvUsedList */ + uint16_t gnssSvUsedList[QMI_LOC_MAX_SV_USED_LIST_LENGTH_V02]; + /**< Each entry in the list contains the SV ID of a satellite + used for calculating this position report. The following + information is associated with each SV ID: \begin{itemize1} + \item Range: \begin{itemize1} + \item For GPS: 1 to 32 + \item For SBAS: 33 to 64 + \item For GLONASS: 65 to 96 + \item For QZSS: 193 to 197 + \vspace{-0.18in} \end{itemize1} \end{itemize1} */ }qmiLocEventPositionReportIndMsgT_v02; /* Message */ /** @} @@ -894,42 +978,46 @@ typedef struct { qmiLocSvInfoValidMaskT_v02 validMask; /**< Bitmask indicating which of the fields in this TLV are valid. - Valid bitmasks: \n - - 0x00000001 -- VALID_SYSTEM \n - - 0x00000002 -- VALID_GNSS_SVID \n - - 0x00000004 -- VALID_HEALTH_STATUS \n - - 0x00000008 -- VALID_PROCESS_STATUS \n - - 0x00000010 -- VALID_SVINFO_MASK \n - - 0x00000020 -- VALID_ELEVATION \n - - 0x00000040 -- VALID_AZIMUTH \n - - 0x00000080 -- VALID_SNR - - */ + Valid bitmasks: + \begin{itemize1} + \item 0x00000001 -- VALID_SYSTEM + \item 0x00000002 -- VALID_GNSS_SVID + \item 0x00000004 -- VALID_HEALTH_STATUS + \item 0x00000008 -- VALID_PROCESS_STATUS + \item 0x00000010 -- VALID_SVINFO_MASK + \item 0x00000020 -- VALID_ELEVATION + \item 0x00000040 -- VALID_AZIMUTH + \item 0x00000080 -- VALID_SNR + \vspace{-0.18in} \end{itemize1} */ qmiLocSvSystemEnumT_v02 system; /**< Indicates to which constellation this SV belongs. - Valid values: \n - - 0x00000001 -- eQMI_LOC_SV_SYSTEM_GPS \n - - 0x00000002 -- eQMI_LOC_SV_SYSTEM_GALILEO \n - - 0x00000003 -- eQMI_LOC_SV_SYSTEM_SBAS \n - - 0x00000004 -- eQMI_LOC_SV_SYSTEM_COMPASS \n - - 0x00000005 -- eQMI_LOC_SV_SYSTEM_GLONASS - */ + Valid values: + \begin{itemize1} + \item 0x00000001 -- eQMI_LOC_SV_SYSTEM_GPS + \item 0x00000002 -- eQMI_LOC_SV_SYSTEM_GALILEO + \item 0x00000003 -- eQMI_LOC_SV_SYSTEM_SBAS + \item 0x00000004 -- eQMI_LOC_SV_SYSTEM_COMPASS + \item 0x00000005 -- eQMI_LOC_SV_SYSTEM_GLONASS + \vspace{-0.18in} \end{itemize1} */ uint16_t gnssSvId; - /**< GNSS SV ID. \n + /**< GNSS SV ID. + \begin{itemize1} + \item Range: \begin{itemize1} + \item For GPS: 1 to 32 + \item For GLONASS: 1 to 32 + \item For SBAS: 120 to 151 + \end{itemize1} \end{itemize1} - - Type: Unsigned integer \n - - Range: \n - -- For GPS: 1 to 32 \n - -- For SBAS: 33 to 64 \n - -- For GLONASS: 65 to 96 */ + The GPS and GLONASS SVs can be disambiguated using the system field. */ uint8_t healthStatus; - /**< Health status. \n - - Type: Unsigned integer \n - - Range: 0 = unhealthy; 1 = healthy */ + /**< Health status. + \begin{itemize1} + \item Range: 0 to 1; 0 = unhealthy, \newline 1 = healthy + \vspace{-0.18in} \end{itemize1} */ qmiLocSvStatusEnumT_v02 svStatus; /**< SV processing status. \n @@ -948,19 +1036,16 @@ typedef struct { float elevation; /**< SV elevation angle.\n - - Type: Floating point \n - Units: Degrees \n - Range: 0 to 90 */ float azimuth; /**< SV azimuth angle.\n - - Type: Floating point \n - Units: Degrees \n - Range: 0 to 360 */ float snr; /**< SV signal-to-noise ratio. \n - - Type: Floating point \n - Units: dB-Hz */ }qmiLocSvInfoStructT_v02; /* Type */ /** @@ -976,10 +1061,12 @@ typedef struct { /* Mandatory */ /* Altitude Source */ uint8_t altitudeAssumed; - /**< Altitude assumed or calculated:\n - - 0x00 (FALSE) -- Valid altitude is calculated \n - - 0x01 (TRUE) -- Valid altitude is assumed; there may not be enough - satellites to determine precise altitude */ + /**< Whether altitude is assumed or calculated: + \begin{itemize1} + \item 0x00 (FALSE) -- Valid altitude is calculated + \item 0x01 (TRUE) -- Valid altitude is assumed; there may not be + enough satellites to determine precise altitude + \vspace{-0.18in} \end{itemize1} */ /* Optional */ /* Satellite Info */ @@ -1001,9 +1088,11 @@ typedef struct { /* Mandatory */ /* NMEA String */ char nmea[QMI_LOC_NMEA_STRING_MAX_LENGTH_V02 + 1]; - /**< NMEA string. \n - - Type: NULL-terminated string \n - - Maximum string length (including NULL terminator): 201 */ + /**< NMEA string. + \begin{itemize1} + \item Type: NULL-terminated string + \item Maximum string length (including NULL terminator): 201 + \vspace{-0.18in} \end{itemize1} */ }qmiLocEventNmeaIndMsgT_v02; /* Message */ /** @} @@ -1076,43 +1165,44 @@ typedef struct { uint8_t posQos; /**< Position QoS timeout. \n - - Type: Unsigned integer \n - Units: Seconds \n - Range: 0 to 255 */ uint32_t numFixes; - /**< Number of fixes allowed. \n - - Type: Unsigned integer */ + /**< Number of fixes allowed. */ uint32_t timeBetweenFixes; /**< Time between fixes.\n - - Type: Unsigned integer \n - Units: Seconds */ qmiLocNiVxPosModeEnumT_v02 posMode; /**< Position mode. - Valid values: \n - - 0x00000001 -- NI_VX_MS_ASSISTED_ONLY \n - - 0x00000002 -- NI_VX_MS_BASED_ONLY \n - - 0x00000003 -- NI_VX_MS_ASSISTED_PREFERRED_MS_BASED_ALLOWED \n - - 0x00000004 -- NI_VX_MS_BASED_PREFERRED_MS_ASSISTED_ALLOWED + Valid values: + \begin{itemize1} + \item 0x00000001 -- NI_VX_MS_ASSISTED_ONLY + \item 0x00000002 -- NI_VX_MS_BASED_ONLY + \item 0x00000003 -- NI_VX_MS_ASSISTED_PREFERRED_MS_BASED_ALLOWED + \item 0x00000004 -- NI_VX_MS_BASED_PREFERRED_MS_ASSISTED_ALLOWED + \vspace{-0.18in} \end{itemize1} */ qmiLocNiVxRequestorIdEncodingSchemeEnumT_v02 encodingScheme; /**< VX encoding scheme. - Valid values: \n - - 0x00000000 -- NI_VX_OCTET \n - - 0x00000001 -- NI_VX_EXN_PROTOCOL_MSG \n - - 0x00000002 -- NI_VX_ASCII \n - - 0x00000003 -- NI_VX_IA5 \n - - 0x00000004 -- NI_VX_UNICODE \n - - 0x00000005 -- NI_VX_SHIFT_JIS \n - - 0x00000006 -- NI_VX_KOREAN \n - - 0x00000007 -- NI_VX_LATIN_HEBREW \n - - 0x00000008 -- NI_VX_LATIN \n - - 0x00000009 -- NI_VX_GSM + Valid values: + \begin{itemize1} + \item 0x00000000 -- NI_VX_OCTET + \item 0x00000001 -- NI_VX_EXN_PROTOCOL_MSG + \item 0x00000002 -- NI_VX_ASCII + \item 0x00000003 -- NI_VX_IA5 + \item 0x00000004 -- NI_VX_UNICODE + \item 0x00000005 -- NI_VX_SHIFT_JIS + \item 0x00000006 -- NI_VX_KOREAN + \item 0x00000007 -- NI_VX_LATIN_HEBREW + \item 0x00000008 -- NI_VX_LATIN + \item 0x00000009 -- NI_VX_GSM + \vspace{-0.18in} \end{itemize1} */ uint32_t requestorId_len; /**< Must be set to # of elements in requestorId */ @@ -1124,7 +1214,6 @@ typedef struct { uint16_t userRespTimerInSeconds; /**< Time to wait for the user to respond. \n - - Type: Unsigned integer \n - Units: Seconds */ }qmiLocNiVxNotifyVerifyStructT_v02; /* Type */ /** @@ -1213,16 +1302,18 @@ typedef struct { qmiLocNiSuplFormatEnumType_v02 formatType; /**< Format of the formatted string. - Valid values: \n - - 0x00000000 -- FORMAT_LOGICAL_NAME \n - - 0x00000001 -- FORMAT_EMAIL_ADDRESS \n - - 0x00000002 -- FORMAT_MSISDN \n - - 0x00000003 -- FORMAT_URL \n - - 0x00000004 -- FORMAT_SIP_URL \n - - 0x00000005 -- FORMAT_MIN \n - - 0x00000006 -- FORMAT_MDN \n - - 0x00000007 -- FORMAT_IMSPUBLIC_IDENTITY \n - - 0x7FFFFFFF -- FORMAT_OSS_UNKNOWN + Valid values: + \begin{itemize1} + \item 0x00000000 -- FORMAT_LOGICAL_NAME + \item 0x00000001 -- FORMAT_EMAIL_ADDRESS + \item 0x00000002 -- FORMAT_MSISDN + \item 0x00000003 -- FORMAT_URL + \item 0x00000004 -- FORMAT_SIP_URL + \item 0x00000005 -- FORMAT_MIN + \item 0x00000006 -- FORMAT_MDN + \item 0x00000007 -- FORMAT_IMSPUBLIC_IDENTITY + \item 0x7FFFFFFF -- FORMAT_OSS_UNKNOWN + \vspace{-0.18in} \end{itemize1} */ uint32_t formattedString_len; /**< Must be set to # of elements in formattedString */ @@ -1257,23 +1348,19 @@ typedef struct { uint8_t horizontalAccuracy; /**< Horizontal accuracy. \n - - Type: Unsigned integer \n - Units: Meters */ uint8_t verticalAccuracy; /**< Vertical accuracy. \n - - Type: Unsigned integer \n - Units: Meters */ uint16_t maxLocAge; /**< Maximum age of the location if the engine sends a previously computed position. \n - - Type: Unsigned integer \n - Units: Seconds */ uint8_t delay; /**< Delay the server is willing to tolerate for the fix. \n - - Type: Unsigned integer \n - Units: Seconds */ }qmiLocNiSuplQopStructT_v02; /* Type */ /** @@ -1290,12 +1377,10 @@ typedef uint8_t qmiLocServerAddrTypeMaskT_v02; typedef struct { uint32_t addr; - /**< IPV4 address. \n - - Type: Unsigned integer */ + /**< IPV4 address. */ uint16_t port; - /**< IPV4 port. \n - - Type: Unsigned integer */ + /**< IPV4 port. */ }qmiLocIpV4AddrStructType_v02; /* Type */ /** @} @@ -1312,8 +1397,7 @@ typedef struct { - Maximum length of the array: 8 */ uint32_t port; - /**< IPV6 port. \n - - Type: Unsigned integer */ + /**< IPV6 port. */ }qmiLocIpV6AddrStructType_v02; /* Type */ /** @} @@ -1340,9 +1424,11 @@ typedef struct { /**< IPV6 address and port. */ char urlAddr[QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02 + 1]; - /**< URL. \n - - Type: NULL-terminated string \n - - Maximum string length (including NULL terminator): 256 + /**< URL. + \begin{itemize1} + \item Type: NULL-terminated string + \item Maximum string length (including NULL terminator): 256 + \vspace{-0.18in} \end{itemize1} */ }qmiLocNiSuplServerInfoStructT_v02; /* Type */ /** @@ -1393,16 +1479,18 @@ typedef struct { qmiLocNiSuplNotifyVerifyValidMaskT_v02 valid_flags; /**< Indicates which of the following fields are present in this value. - Valid bitmasks: \n - - 0x00000001 -- SUPL_SERVER_INFO \n - - 0x00000002 -- SUPL_SESSION_ID \n - - 0x00000004 -- SUPL_HASH \n - - 0x00000008 -- SUPL_POS_METHOD \n - - 0x00000010 -- SUPL_DATA_CODING_SCHEME \n - - 0x00000020 -- SUPL_REQUESTOR_ID \n - - 0x00000040 -- SUPL_CLIENT_NAME \n - - 0x00000080 -- SUPL_QOP \n - - 0x00000100 -- SUPL_USER_RESP_TIMER + Valid bitmasks: + \begin{itemize1} + \item 0x00000001 -- SUPL_SERVER_INFO + \item 0x00000002 -- SUPL_SESSION_ID + \item 0x00000004 -- SUPL_HASH + \item 0x00000008 -- SUPL_POS_METHOD + \item 0x00000010 -- SUPL_DATA_CODING_SCHEME + \item 0x00000020 -- SUPL_REQUESTOR_ID + \item 0x00000040 -- SUPL_CLIENT_NAME + \item 0x00000080 -- SUPL_QOP + \item 0x00000100 -- SUPL_USER_RESP_TIMER + \vspace{-0.18in} \end{itemize1} */ qmiLocNiSuplServerInfoStructT_v02 suplServerInfo; @@ -1422,43 +1510,47 @@ typedef struct { qmiLocNiSuplPosMethodEnumT_v02 posMethod; /**< GPS mode to be used for the fix. - Valid values: \n - - 0x00000001 -- AGPS_SETASSISTED \n - - 0x00000002 -- AGPS_SETBASED \n - - 0x00000003 -- AGPS_SETASSISTED_PREF \n - - 0x00000004 -- AGPS_SETBASED_PREF \n - - 0x00000005 -- AUTONOMOUS_GPS \n - - 0x00000006 -- AFLT \n - - 0x00000007 -- ECID \n - - 0x00000008 -- EOTD \n - - 0x00000009 -- OTDOA \n - - 0x0000000A -- NO_POSITION + Valid values: + \begin{itemize1} + \item 0x00000001 -- AGPS_SETASSISTED + \item 0x00000002 -- AGPS_SETBASED + \item 0x00000003 -- AGPS_SETASSISTED_PREF + \item 0x00000004 -- AGPS_SETBASED_PREF + \item 0x00000005 -- AUTONOMOUS_GPS + \item 0x00000006 -- AFLT + \item 0x00000007 -- ECID + \item 0x00000008 -- EOTD + \item 0x00000009 -- OTDOA + \item 0x0000000A -- NO_POSITION + \vspace{-0.18in} \end{itemize1} */ qmiLocNiDataCodingSchemeEnumT_v02 dataCodingScheme; /**< Data coding scheme applies to both the requestor ID and the client name. - Valid values: \n - - 0x0000000C -- NI_SS_GERMAN \n - - 0x0000000D -- NI_SS_ENGLISH \n - - 0x0000000E -- NI_SS_ITALIAN \n - - 0x0000000F -- NI_SS_FRENCH \n - - 0x00000010 -- NI_SS_SPANISH \n - - 0x00000011 -- NI_SS_DUTCH \n - - 0x00000012 -- NI_SS_SWEDISH \n - - 0x00000013 -- NI_SS_DANISH \n - - 0x00000014 -- NI_SS_PORTUGUESE \n - - 0x00000015 -- NI_SS_FINNISH \n - - 0x00000016 -- NI_SS_NORWEGIAN \n - - 0x00000017 -- NI_SS_GREEK \n - - 0x00000018 -- NI_SS_TURKISH \n - - 0x00000019 -- NI_SS_HUNGARIAN \n - - 0x0000001A -- NI_SS_POLISH \n - - 0x0000001B -- NI_SS_LANGUAGE_UNSPEC \n - - 0x0000001C -- NI_SUPL_UTF8 \n - - 0x0000001D -- NI_SUPL_UCS2 \n - - 0x0000001E -- NI_SUPL_GSM_DEFAULT + Valid values: + \begin{itemize1} + \item 0x0000000C -- NI_SS_GERMAN + \item 0x0000000D -- NI_SS_ENGLISH + \item 0x0000000E -- NI_SS_ITALIAN + \item 0x0000000F -- NI_SS_FRENCH + \item 0x00000010 -- NI_SS_SPANISH + \item 0x00000011 -- NI_SS_DUTCH + \item 0x00000012 -- NI_SS_SWEDISH + \item 0x00000013 -- NI_SS_DANISH + \item 0x00000014 -- NI_SS_PORTUGUESE + \item 0x00000015 -- NI_SS_FINNISH + \item 0x00000016 -- NI_SS_NORWEGIAN + \item 0x00000017 -- NI_SS_GREEK + \item 0x00000018 -- NI_SS_TURKISH + \item 0x00000019 -- NI_SS_HUNGARIAN + \item 0x0000001A -- NI_SS_POLISH + \item 0x0000001B -- NI_SS_LANGUAGE_UNSPEC + \item 0x0000001C -- NI_SUPL_UTF8 + \item 0x0000001D -- NI_SUPL_UCS2 + \item 0x0000001E -- NI_SUPL_GSM_DEFAULT + \vspace{-0.18in} \end{itemize1} */ qmiLocNiSuplFormattedStringStructT_v02 requestorId; @@ -1474,7 +1566,6 @@ typedef struct { uint16_t userResponseTimer; /**< Time to wait for the user to respond. \n - - Type: Unsigned integer \n - Units: Seconds */ }qmiLocNiSuplNotifyVerifyStructT_v02; /* Type */ /** @@ -1504,26 +1595,28 @@ typedef struct { qmiLocNiDataCodingSchemeEnumT_v02 dataCodingScheme; /**< Identifies the coding scheme of the coded string. - Valid values: \n - - 0x0000000C -- NI_SS_GERMAN \n - - 0x0000000D -- NI_SS_ENGLISH \n - - 0x0000000E -- NI_SS_ITALIAN \n - - 0x0000000F -- NI_SS_FRENCH \n - - 0x00000010 -- NI_SS_SPANISH \n - - 0x00000011 -- NI_SS_DUTCH \n - - 0x00000012 -- NI_SS_SWEDISH \n - - 0x00000013 -- NI_SS_DANISH \n - - 0x00000014 -- NI_SS_PORTUGUESE \n - - 0x00000015 -- NI_SS_FINNISH \n - - 0x00000016 -- NI_SS_NORWEGIAN \n - - 0x00000017 -- NI_SS_GREEK \n - - 0x00000018 -- NI_SS_TURKISH \n - - 0x00000019 -- NI_SS_HUNGARIAN \n - - 0x0000001A -- NI_SS_POLISH \n - - 0x0000001B -- NI_SS_LANGUAGE_UNSPEC \n - - 0x0000001C -- NI_SUPL_UTF8 \n - - 0x0000001D -- NI_SUPL_UCS2 \n - - 0x0000001E -- NI_SUPL_GSM_DEFAULT + Valid values: + \begin{itemize1} + \item 0x0000000C -- NI_SS_GERMAN + \item 0x0000000D -- NI_SS_ENGLISH + \item 0x0000000E -- NI_SS_ITALIAN + \item 0x0000000F -- NI_SS_FRENCH + \item 0x00000010 -- NI_SS_SPANISH + \item 0x00000011 -- NI_SS_DUTCH + \item 0x00000012 -- NI_SS_SWEDISH + \item 0x00000013 -- NI_SS_DANISH + \item 0x00000014 -- NI_SS_PORTUGUESE + \item 0x00000015 -- NI_SS_FINNISH + \item 0x00000016 -- NI_SS_NORWEGIAN + \item 0x00000017 -- NI_SS_GREEK + \item 0x00000018 -- NI_SS_TURKISH + \item 0x00000019 -- NI_SS_HUNGARIAN + \item 0x0000001A -- NI_SS_POLISH + \item 0x0000001B -- NI_SS_LANGUAGE_UNSPEC + \item 0x0000001C -- NI_SUPL_UTF8 + \item 0x0000001D -- NI_SUPL_UCS2 + \item 0x0000001E -- NI_SUPL_GSM_DEFAULT + \vspace{-0.18in} \end{itemize1} */ @@ -1582,46 +1675,49 @@ typedef struct { qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02 valid_flags; /**< Fields that are valid in this value. - Valid bitmasks: \n - - 0x0001 -- INVOKE_ID_MASK \n - - 0x0002 -- DATA_CODING_SCHEME_MASK \n - - 0x0004 -- NOTIFICATION_TEXT_MASK \n - - 0x0008 -- CLIENT_ADDRESS_MASK \n - - 0x0010 -- LOCATION_TYPE_MASK \n - - 0x0020 -- REQUESTOR_ID_MASK \n - - 0x0040 -- CODEWORD_STRING_MASK \n - - 0x0080 -- SERVICE_TYPE_MASK \n - - 0x0100 -- USER_RESP_TIMER_MASK + Valid bitmasks: + \begin{itemize1} + \item 0x0001 -- INVOKE_ID_MASK + \item 0x0002 -- DATA_CODING_SCHEME_MASK + \item 0x0004 -- NOTIFICATION_TEXT_MASK + \item 0x0008 -- CLIENT_ADDRESS_MASK + \item 0x0010 -- LOCATION_TYPE_MASK + \item 0x0020 -- REQUESTOR_ID_MASK + \item 0x0040 -- CODEWORD_STRING_MASK + \item 0x0080 -- SERVICE_TYPE_MASK + \item 0x0100 -- USER_RESP_TIMER_MASK + \vspace{-0.18in} \end{itemize1} */ uint8_t invokeId; - /**< Supplementary Services invoke ID. \n - - Type: Unsigned integer */ + /**< Supplementary Services invoke ID. */ qmiLocNiDataCodingSchemeEnumT_v02 dataCodingScheme; /**< Type of data encoding scheme for the text. Applies to both the notification text and the client address. - Valid values: \n - - 0x0000000C -- NI_SS_GERMAN \n - - 0x0000000D -- NI_SS_ENGLISH \n - - 0x0000000E -- NI_SS_ITALIAN \n - - 0x0000000F -- NI_SS_FRENCH \n - - 0x00000010 -- NI_SS_SPANISH \n - - 0x00000011 -- NI_SS_DUTCH \n - - 0x00000012 -- NI_SS_SWEDISH \n - - 0x00000013 -- NI_SS_DANISH \n - - 0x00000014 -- NI_SS_PORTUGUESE \n - - 0x00000015 -- NI_SS_FINNISH \n - - 0x00000016 -- NI_SS_NORWEGIAN \n - - 0x00000017 -- NI_SS_GREEK \n - - 0x00000018 -- NI_SS_TURKISH \n - - 0x00000019 -- NI_SS_HUNGARIAN \n - - 0x0000001A -- NI_SS_POLISH \n - - 0x0000001B -- NI_SS_LANGUAGE_UNSPEC \n - - 0x0000001C -- NI_SUPL_UTF8 \n - - 0x0000001D -- NI_SUPL_UCS2 \n - - 0x0000001E -- NI_SUPL_GSM_DEFAULT + Valid values: + \begin{itemize1} + \item 0x0000000C -- NI_SS_GERMAN + \item 0x0000000D -- NI_SS_ENGLISH + \item 0x0000000E -- NI_SS_ITALIAN + \item 0x0000000F -- NI_SS_FRENCH + \item 0x00000010 -- NI_SS_SPANISH + \item 0x00000011 -- NI_SS_DUTCH + \item 0x00000012 -- NI_SS_SWEDISH + \item 0x00000013 -- NI_SS_DANISH + \item 0x00000014 -- NI_SS_PORTUGUESE + \item 0x00000015 -- NI_SS_FINNISH + \item 0x00000016 -- NI_SS_NORWEGIAN + \item 0x00000017 -- NI_SS_GREEK + \item 0x00000018 -- NI_SS_TURKISH + \item 0x00000019 -- NI_SS_HUNGARIAN + \item 0x0000001A -- NI_SS_POLISH + \item 0x0000001B -- NI_SS_LANGUAGE_UNSPEC + \item 0x0000001C -- NI_SUPL_UTF8 + \item 0x0000001D -- NI_SUPL_UCS2 + \item 0x0000001E -- NI_SUPL_GSM_DEFAULT + \vspace{-0.18in} \end{itemize1} */ uint32_t notificationText_len; /**< Must be set to # of elements in notificationText */ @@ -1640,10 +1736,12 @@ typedef struct { qmiLocNiLocationTypeEnumT_v02 locationType; /**< Location type. - Valid values: \n - - 0x00000001 -- CURRENT_LOCATION \n - - 0x00000002 -- CURRENT_OR_LAST_KNOWN_LOCATION \n - - 0x00000004 -- INITIAL_LOCATION + Valid values: + \begin{itemize1} + \item 0x00000001 -- CURRENT_LOCATION + \item 0x00000002 -- CURRENT_OR_LAST_KNOWN_LOCATION + \item 0x00000004 -- INITIAL_LOCATION + \vspace{-0.18in} \end{itemize1} */ qmiLocNiUmtsCpCodedStringStructT_v02 requestorId; @@ -1655,12 +1753,10 @@ typedef struct { qmiLocNiUmtsCpCodedStringStructT.dataCodingScheme field. */ uint8_t lcsServiceTypeId; - /**< Service type ID. \n - - Type: Unsigned integer */ + /**< Service type ID. */ uint16_t userResponseTimer; /**< Time to wait for the user to respond. \n - - Type: Unsigned integer \n - Units: Seconds */ }qmiLocNiUmtsCpNotifyVerifyStructT_v02; /* Type */ /** @@ -1690,14 +1786,115 @@ typedef struct { qmiLocNiServiceInteractionEnumT_v02 serviceInteractionType; /**< Service interaction type specified in qmiLocNiServiceInteractionEnumT. - Valid values: \n - - 0x00000001 -- ONGOING_NI_INCOMING_MO + Valid values: + \begin{itemize1} + \item 0x00000001 -- ONGOING_NI_INCOMING_MO + \vspace{-0.18in} \end{itemize1} */ }qmiLocNiVxServiceInteractionStructT_v02; /* Type */ /** @} */ +typedef uint16_t qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02; +#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_WLAN_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0001) /**< Denotes that WLAN measurements are allowed as part of location ID + and multiple location IDs in the SUPL_POS_INIT message. */ +#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_GSM_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0002) /**< Denotes that GSM measurements are allowed as part of location ID + and multiple location ID in the SUPL_POS_INIT message. */ +#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_WCDMA_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0004) /**< Denotes that WCDMA measurements are allowed as part of location ID + and multiple location ID in the SUPL_POS_INIT message. */ +#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_CDMA_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0008) /**< Denotes that CDMA measurements are allowed as part of location ID + and multiple location ID in the SUPL_POS_INIT message. */ +#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_HRDP_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0010) /**< Denotes that HRDP measurements are allowed as part of location ID + and multiple location ID in the SUPL_POS_INIT message. */ +#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_UMB_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0020) /**< Denotes that UMB measurements are allowed as part of location ID + and multiple location ID in the SUPL_POS_INIT message. */ +#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_LTE_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0040) /**< Denotes that LTE measurements are allowed as part of location ID + and multiple location ID in the SUPL_POS_INIT message. */ +#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_WIMAX_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0080) /**< Denotes that WIMAX measurements are allowed as part of location ID + and multiple location ID in the SUPL_POS_INIT message. */ +#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_HISTORIC_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0100) /**< Denotes that historical information is allowed as part of + multiple location ID in the SUPL_POS_INIT message. */ +#define QMI_LOC_SUPL_VER_2_EXT_MASK_SUPPORTED_NETWORK_NONSVRV_V02 ((qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02)0x0200) /**< Denotes that information about nonserving cells is allowed + as part of multiple location ID in the SUPL_POS_INIT message. */ +/** @addtogroup loc_qmi_enums + @{ + */ +typedef enum { + QMILOCNISUPLVER2EXTTRIGGERTYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ + eQMI_LOC_SUPL_VER_2_EXT_TRIGGER_TYPE_SINGLE_SHOT_V02 = -1, /**< The SUPL INIT message indicates a request for a single shot + triggered session. */ + eQMI_LOC_SUPL_VER_2_EXT_TRIGGER_TYPE_PERIODIC_V02 = 0, /**< The SUPL INIT message indicates a request for a periodic + triggered session. + The SUPL INIT message indicates a request for an area event + triggered session. */ + eQMI_LOC_SUPL_VER_2_EXT_TRIGGER_TYPE_AREA_EVENT_V02 = 1, + QMILOCNISUPLVER2EXTTRIGGERTYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ +}qmiLocNiSuplVer2ExtTriggerTypeEnumT_v02; +/** + @} + */ + +typedef uint16_t qmiLocNiSuplVer2ExtGnssTypeMaskT_v02; +#define QMI_LOC_SUPL_VER_2_EXT_MASK_GNSS_GPS_V02 ((qmiLocNiSuplVer2ExtGnssTypeMaskT_v02)0x0001) /**< GPS is allowed to be used as the positioning technology. */ +#define QMI_LOC_SUPL_VER_2_EXT_MASK_GNSS_GLONASS_V02 ((qmiLocNiSuplVer2ExtGnssTypeMaskT_v02)0x0002) /**< GLONASS is allowed to be used as the positioning technology. */ +#define QMI_LOC_SUPL_VER_2_EXT_MASK_GNSS_GALILEO_V02 ((qmiLocNiSuplVer2ExtGnssTypeMaskT_v02)0x0004) /**< Galileo is allowed to be used as the positioning technology. */ +#define QMI_LOC_SUPL_VER_2_EXT_MASK_GNSS_SBAS_V02 ((qmiLocNiSuplVer2ExtGnssTypeMaskT_v02)0x0008) /**< SBAS is allowed to be used as the positioning technology. */ +#define QMI_LOC_SUPL_VER_2_EXT_MASK_GNSS_QZSS_V02 ((qmiLocNiSuplVer2ExtGnssTypeMaskT_v02)0x0010) /**< QZSS is allowed to be used as the positioning technology. */ +#define QMI_LOC_SUPL_VER_2_EXT_MASK_GNSS_MODERN_GPS_V02 ((qmiLocNiSuplVer2ExtGnssTypeMaskT_v02)0x0020) /**< Modern GPS is allowed to be used as the positioning technology. */ +/** @addtogroup loc_qmi_aggregates + @{ + */ +typedef struct { + + qmiLocNiSuplVer2ExtSupportedNetworksMaskT_v02 supportedNetworksMask; + /**< Specifies which type of network measurements are allowed to be sent as + part of the Location ID or Multiple Location IDs parameter in the + SUPL_POS_INIT message (see \hyperref[S4]{[S4]}). + + Valid bitmasks: + \begin{itemize1} + \item 0x0001 -- SUPPORTED_NETWORK_WLAN + \item 0x0002 -- SUPPORTED_NETWORK_GSM + \item 0x0004 -- SUPPORTED_NETWORK_WCDMA + \item 0x0008 -- SUPPORTED_NETWORK_CDMA + \item 0x0010 -- SUPPORTED_NETWORK_HRDP + \item 0x0020 -- SUPPORTED_NETWORK_UMB + \item 0x0040 -- SUPPORTED_NETWORK_LTE + \item 0x0080 -- SUPPORTED_NETWORK_WIMAX + \item 0x0100 -- SUPPORTED_NETWORK_HISTORIC + \item 0x0200 -- SUPPORTED_NETWORK_NONSVRV + \vspace{-0.18in} \end{itemize1} + */ + + qmiLocNiSuplVer2ExtTriggerTypeEnumT_v02 triggerType; + /**< Specifies the type of session trigger requested in the + SUPL_POS_INIT message (see \hyperref[S4]{[S4]}). + + Valid values: + \begin{itemize1} + \item 0xFFFFFFFF -- TRIGGER_TYPE_SINGLE_SHOT + \item 0x00000000 -- TRIGGER_TYPE_PERIODIC + \item 0x00000001 -- TRIGGER_TYPE_AREA_EVENT + \vspace{-0.18in} \end{itemize1} */ + + qmiLocNiSuplVer2ExtGnssTypeMaskT_v02 gnssType; + /**< Specifies which GNSS technologies are allowed as positioning + technologies. + + Valid bitmasks: \n + - 0x0001 -- GNSS_GPS \n + - 0x0002 -- GNSS_GLONASS \n + - 0x0004 -- GNSS_GALILEO \n + - 0x0008 -- GNSS_SBAS \n + - 0x0010 -- GNSS_QZSS \n + - 0x0020 -- GNSS_MODERN_GPS + */ +}qmiLocNiSuplVer2ExtStructT_v02; /* Type */ +/** + @} + */ + /** @addtogroup loc_qmi_messages @{ */ @@ -1709,12 +1906,14 @@ typedef struct { qmiLocNiNotifyVerifyEnumT_v02 notificationType; /**< Type of notification/verification performed. - Valid values: \n - - 0x00000001 -- NO_NOTIFY_NO_VERIFY \n - - 0x00000002 -- NOTIFY_ONLY \n - - 0x00000003 -- ALLOW_NO_RESP \n - - 0x00000004 -- NOT_ALLOW_NO_RESP \n - - 0x00000005 -- PRIVACY_OVERRIDE + Valid values: + \begin{itemize1} + \item 0x00000001 -- NO_NOTIFY_NO_VERIFY + \item 0x00000002 -- NOTIFY_ONLY + \item 0x00000003 -- ALLOW_NO_RESP + \item 0x00000004 -- NOT_ALLOW_NO_RESP + \item 0x00000005 -- PRIVACY_OVERRIDE + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -1740,6 +1939,14 @@ typedef struct { uint8_t NiVxServiceInteractionInd_valid; /**< Must be set to true if NiVxServiceInteractionInd is being passed */ qmiLocNiVxServiceInteractionStructT_v02 NiVxServiceInteractionInd; /**< \n Optional NI service interaction payload. */ + + /* Optional */ + /* Network Initiated SUPL Version 2 Extension */ + uint8_t NiSuplVer2ExtInd_valid; /**< Must be set to true if NiSuplVer2ExtInd is being passed */ + qmiLocNiSuplVer2ExtStructT_v02 NiSuplVer2ExtInd; + /**< \n Optional NI SUPL Version 2 Extension payload. When present, + this payload is to be used in conjunction with the SUPL + indication payload. */ }qmiLocEventNiNotifyVerifyReqIndMsgT_v02; /* Message */ /** @} @@ -1751,9 +1958,11 @@ typedef struct { typedef struct { char serverUrl[QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02 + 1]; - /**< Assistance server URL. \n - - Type: NULL-terminated string \n - - Maximum string length (including NULL terminator): 256 */ + /**< Assistance server URL. + \begin{itemize1} + \item Type: NULL-terminated string + \item Maximum string length (including NULL terminator): 256 + \vspace{-0.18in} \end{itemize1} */ }qmiLocAssistanceServerUrlStructT_v02; /* Type */ /** @} @@ -1767,7 +1976,6 @@ typedef struct { uint32_t delayThreshold; /**< The time server is to be skipped if a one-way delay to the server exceeds this threshold. \n - - Type: Unsigned integer \n - Units: Milliseconds */ uint32_t timeServerList_len; /**< Must be set to # of elements in timeServerList */ @@ -1805,12 +2013,10 @@ typedef struct { typedef struct { uint32_t maxFileSizeInBytes; - /**< Maximum allowable predicted orbits file size (in bytes). \n - - Type: Unsigned integer */ + /**< Maximum allowable predicted orbits file size (in bytes). */ uint32_t maxPartSize; - /**< Maximum allowable predicted orbits file chunk size (in bytes). \n - - Type: Unsigned integer */ + /**< Maximum allowable predicted orbits file chunk size (in bytes). */ }qmiLocPredictedOrbitsAllowedSizesStructT_v02; /* Type */ /** @} @@ -1864,36 +2070,40 @@ typedef struct { /* Mandatory */ /* Latitude */ double latitude; - /**< Latitude (specified in WGS84 datum).\n - - Type: Floating point \n - - Units: Degrees \n - - Range: -90.0 to 90.0 \n - - Positive values indicate northern latitude \n - - Negative values indicate southern latitude */ + /**< Latitude (specified in WGS84 datum). + \begin{itemize1} + \item Type: Floating point + \item Units: Degrees + \item Range: -90.0 to 90.0 \begin{itemize1} + \item Positive values indicate northern latitude + \item Negative values indicate southern latitude + \vspace{-0.18in} \end{itemize1} \end{itemize1} */ /* Mandatory */ /* Longitude */ double longitude; - /**< Longitude (specified in WGS84 datum).\n - - Type: Floating point \n - - Units: Degrees \n - - Range: -180.0 to 180.0 \n - - Positive values indicate eastern longitude \n - - Negative values indicate western longitude */ + /**< Longitude (specified in WGS84 datum). + \begin{itemize1} + \item Type: Floating point + \item Units: Degrees + \item Range: -180.0 to 180.0 \begin{itemize1} + \item Positive values indicate eastern longitude + \item Negative values indicate western longitude + \vspace{-0.18in} \end{itemize1} \end{itemize1} */ /* Mandatory */ /* Circular Horizontal Uncertainty */ float horUncCircular; /**< Horizontal position uncertainty (circular).\n - - Type: Floating point \n - Units: Meters */ /* Mandatory */ /* UTC Timestamp */ uint64_t timestampUtc; - /**< UTC timestamp.\n - - Type: Unsigned integer \n - - Units: Milliseconds since Jan. 1, 1970 */ + /**< UTC timestamp. + \begin{itemize1} + \item Units: Milliseconds since Jan. 1, 1970 + \vspace{-0.18in} \end{itemize1} */ }qmiLocEventInjectPositionReqIndMsgT_v02; /* Message */ /** @} @@ -1970,7 +2180,6 @@ typedef struct { /**< ID of the session that was specified in the Start request. This may not be specified for a fix session corresponding to a network-initiated request. \n - - Type: Unsigned integer \n - Range: 0 to 255 */ }qmiLocEventFixSessionStateIndMsgT_v02; /* Message */ /** @@ -2003,10 +2212,12 @@ typedef struct { qmiLocWifiRequestEnumT_v02 requestType; /**< Request type as specified in qmiWifiRequestEnumT. - Valid values: \n - - 0x00000000 -- START_PERIODIC_HI_FREQ_FIXES \n - - 0x00000001 -- START_PERIODIC_KEEP_WARM \n - - 0x00000002 -- STOP_PERIODIC_FIXES + Valid values: + \begin{itemize1} + \item 0x00000000 -- START_PERIODIC_HI_FREQ_FIXES + \item 0x00000001 -- START_PERIODIC_KEEP_WARM + \item 0x00000002 -- STOP_PERIODIC_FIXES + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -2014,7 +2225,6 @@ typedef struct { uint8_t tbfInMs_valid; /**< Must be set to true if tbfInMs is being passed */ uint16_t tbfInMs; /**< Time between fixes for a periodic request.\n - - Type: Unsigned integer \n - Units: Milliseconds */ }qmiLocEventWifiReqIndMsgT_v02; /* Message */ /** @@ -2056,10 +2266,13 @@ typedef struct { /**< Whether the GNSS location engine is ready to accept data from this sensor. - Valid values: \n - - 0x01 (TRUE) -- GNSS location engine is ready to accept sensor data \n - - 0x00 (FALSE) -- GNSS location engine is not ready to accept sensor - data + Valid values: + \begin{itemize1} + \item 0x01 (TRUE) -- GNSS location engine is ready to accept sensor + data + \item 0x00 (FALSE) -- GNSS location engine is not ready to accept + sensor data + \vspace{-0.18in} \end{itemize1} */ qmiLocSensorControlConfigSamplingSpecStructT_v02 dataFrequency; @@ -2088,10 +2301,10 @@ typedef struct { */ /* Optional */ - /* Gyrometer Accept Ready */ + /* Gyroscope Accept Ready */ uint8_t gyroReady_valid; /**< Must be set to true if gyroReady is being passed */ qmiLocSensorReadyStatusStructT_v02 gyroReady; - /**< \n Whether the GNSS location engine is ready to accept gyrometer sensor + /**< \n Whether the GNSS location engine is ready to accept gyroscope sensor data. */ }qmiLocEventSensorStreamingReadyStatusIndMsgT_v02; /* Message */ @@ -2112,8 +2325,7 @@ typedef struct { /**< This TLV is sent to registered control points. It is sent by the location engine when it needs to synchronize location engine and control point (sensor processor) times. - This TLV must be echoed back in the Time Sync Inject request. \n - - Type: Unsigned integer */ + This TLV must be echoed back in the Time Sync Inject request. */ }qmiLocEventTimeSyncReqIndMsgT_v02; /* Message */ /** @} @@ -2129,9 +2341,11 @@ typedef struct { /* Mandatory */ /* Enable/Disable SPI Requests */ uint8_t enable; - /**< Whether the client is to start or stop sending an SPI status stream.\n - - 0x01 (TRUE) -- Client is to start sending an SPI status stream\n - - 0x00 (FALSE) -- Client is to stop sending an SPI status stream */ + /**< Whether the client is to start or stop sending an SPI status stream. + \begin{itemize1} + \item 0x01 (TRUE) -- Client is to start sending an SPI status stream + \item 0x00 (FALSE) -- Client is to stop sending an SPI status stream + \vspace{-0.18in} \end{itemize1} */ }qmiLocEventSetSpiStreamingReportIndMsgT_v02; /* Message */ /** @} @@ -2175,8 +2389,7 @@ typedef struct { /* Mandatory */ /* Connection Handle */ uint32_t connHandle; - /**< Identifies a connection across Open and Close request events. \n - - Type: Unsigned integer */ + /**< Identifies a connection across Open and Close request events. */ /* Mandatory */ /* Request Type */ @@ -2192,15 +2405,290 @@ typedef struct { /* WWAN Type */ qmiLocWWANTypeEnumT_v02 wwanType; /**< Identifies the WWAN type for this request. \n - Valid values: \n - - 0x00000000 -- WWAN_TYPE_INTERNET \n - - 0x00000001 -- WWAN_TYPE_AGNSS + Valid values: + \begin{itemize1} + \item 0x00000000 -- WWAN_TYPE_INTERNET + \item 0x00000001 -- WWAN_TYPE_AGNSS + \vspace{-0.18in} \end{itemize1} */ }qmiLocEventLocationServerConnectionReqIndMsgT_v02; /* Message */ /** @} */ +/** @addtogroup loc_qmi_enums + @{ + */ +typedef enum { + QMILOCNIGEOFENCEOPERATIONENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ + eQMI_LOC_NI_GEOFENCE_ADDED_V02 = 1, /**< An NI Geofence was added. */ + eQMI_LOC_NI_GEOFENCE_DELETED_V02 = 2, /**< An NI Geofence was deleted. + An NI Geofence was edited. The control point can query the + Geofence to find the its current state. */ + eQMI_LOC_NI_GEOFENCE_EDITED_V02 = 3, + QMILOCNIGEOFENCEOPERATIONENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ +}qmiLocNiGeofenceOperationEnumT_v02; +/** + @} + */ + +/** @addtogroup loc_qmi_messages + @{ + */ +/** Indication Message; Informs the control point about + network-initiated Geofences. */ +typedef struct { + + /* Mandatory */ + /* Geofence ID */ + uint32_t geofenceId; + /**< ID of the Geofence for which this + notification was generated. */ + + /* Mandatory */ + /* Operation Type */ + qmiLocNiGeofenceOperationEnumT_v02 operationType; + /**< Operation for which this notification was generated. \n + Valid values: + \begin{itemize1} + \item 0x00000001 -- NI_GEOFENCE_ADDED + \item 0x00000002 -- NI_GEOFENCE_DELETED + \item 0x00000003 -- NI_GEOFENCE_EDITED + \vspace{-0.18in} \end{itemize1} + */ +}qmiLocEventNiGeofenceNotificationIndMsgT_v02; /* Message */ +/** + @} + */ + +/** @addtogroup loc_qmi_enums + @{ + */ +typedef enum { + QMILOCGEOFENCEGENALERTENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ + eQMI_LOC_GEOFENCE_GEN_ALERT_GNSS_UNAVAILABLE_V02 = 1, /**< GNSS is unavailable and GNSS position fixes + cannot be used to monitor Geofences. */ + eQMI_LOC_GEOFENCE_GEN_ALERT_GNSS_AVAILABLE_V02 = 2, /**< GNSS is now available and GNSS postion fixes can + be used to monitor Geofences. */ + eQMI_LOC_GEOFENCE_GEN_ALERT_OOS_V02 = 3, /**< The engine is out of service and no cell ID coverage + information is available. + The engine has an invalid time. */ + eQMI_LOC_GEOFENCE_GEN_ALERT_TIME_INVALID_V02 = 4, + QMILOCGEOFENCEGENALERTENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ +}qmiLocGeofenceGenAlertEnumT_v02; +/** + @} + */ + +/** @addtogroup loc_qmi_messages + @{ + */ +/** Indication Message; Notifies the control point of the + Geofence status. */ +typedef struct { + + /* Mandatory */ + /* Geofence General Alert */ + qmiLocGeofenceGenAlertEnumT_v02 geofenceAlert; + /**< Specifies the Geofence general alert type. \n + Valid values: + \begin{itemize1} + \item 0x00000001 -- GEOFENCE_GEN_ALERT_GNSS_UNAVAILABLE + \item 0x00000002 -- GEOFENCE_GEN_ALERT_GNSS_AVAILABLE + \item 0x00000003 -- GEOFENCE_GEN_ALERT_OOS + \item 0x00000004 -- GEOFENCE_GEN_ALERT_TIME_INVALID + \vspace{-0.18in} \end{itemize1} + */ +}qmiLocEventGeofenceGenAlertIndMsgT_v02; /* Message */ +/** + @} + */ + +/** @addtogroup loc_qmi_enums + @{ + */ +typedef enum { + QMILOCGEOFENCEBREACHTYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ + eQMI_LOC_GEOFENCE_BREACH_TYPE_ENTERING_V02 = 1, /**< Denotes that a client entered the Geofence. + Denotes that a client left the Geofence. */ + eQMI_LOC_GEOFENCE_BREACH_TYPE_LEAVING_V02 = 2, + QMILOCGEOFENCEBREACHTYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ +}qmiLocGeofenceBreachTypeEnumT_v02; +/** + @} + */ + +/** @addtogroup loc_qmi_aggregates + @{ + */ +typedef struct { + + /* UTC Timestamp */ + uint64_t timestampUtc; + /**< UTC timestamp. + \begin{itemize1} + \item Units: Milliseconds since Jan. 1, 1970 + \vspace{-0.18in} \end{itemize1} */ + + /* Latitude */ + double latitude; + /**< Latitude (specified in WGS84 datum). + \begin{itemize1} + \item Type: Floating point + \item Units: Degrees + \item Range: -90.0 to 90.0 \begin{itemize1} + \item Positive values indicate northern latitude + \item Negative values indicate southern latitude + \vspace{-0.18in} \end{itemize1} \end{itemize1} */ + + /* Longitude */ + double longitude; + /**< Longitude (specified in WGS84 datum). + \begin{itemize1} + \item Type: Floating point + \item Units: Degrees + \item Range: -180.0 to 180.0 \begin{itemize1} + \item Positive values indicate eastern longitude + \item Negative values indicate western longitude + \vspace{-0.18in} \end{itemize1} \end{itemize1} */ + + /* Horizontal Elliptical Uncertainty (Semi-Minor Axis) */ + float horUncEllipseSemiMinor; + /**< Semi-minor axis of horizontal elliptical uncertainty.\n + - Units: Meters */ + + /* Horizontal Elliptical Uncertainty (Semi-Major Axis) */ + float horUncEllipseSemiMajor; + /**< Semi-major axis of horizontal elliptical uncertainty.\n + - Units: Meters */ + + /* Elliptical Horizontal Uncertainty Azimuth */ + float horUncEllipseOrientAzimuth; + /**< Elliptical horizontal uncertainty azimuth of orientation.\n + - Units: Decimal degrees \n + - Range: 0 to 180 */ + + /* Horizontal Speed validity bit */ + uint8_t speedHorizontal_valid; + /**< Indicates whether the Horizontal speed field contains valid + information. + \begin{itemize1} + \item 0x01 (TRUE) -- Horizontal speed is valid + \item 0x00 (FALSE) -- Horizontal speed is invalid + and is to be ignored + \vspace{-0.18in} \end{itemize1} */ + + /* Horizontal Speed */ + float speedHorizontal; + /**< Horizontal speed.\n + - Units: Meters/second */ + + /* Altitude validity bit */ + uint8_t altitudeWrtEllipsoid_valid; + /**< Indicates whether the altitude field contains valid + information. + \begin{itemize1} + \item 0x01 (TRUE) -- Altitude field is valid + \item 0x00 (FALSE) -- Altitude field is invalid + and is to be ignored + \vspace{-0.18in} \end{itemize1} + */ + + /* Altitude With Respect to Ellipsoid */ + float altitudeWrtEllipsoid; + /**< Altitude with respect to the WGS84 ellipsoid.\n + - Units: Meters \n + - Range: -500 to 15883 */ + + /* Vertical Uncertainty validity bit */ + uint8_t vertUnc_valid; + /**< Indicates whether the Vertical Uncertainty field contains valid + information. + \begin{itemize1} + \item 0x01 (TRUE) -- Vertical Uncertainty field is valid + \item 0x00 (FALSE) -- Vertical Uncertainty field is invalid + and is to be ignored + \vspace{-0.18in} \end{itemize1} */ + + /* Vertical Uncertainty */ + float vertUnc; + /**< Vertical uncertainty.\n + - Units: Meters */ + + /* Vertical Speed validity bit */ + uint8_t speedVertical_valid; + /**< Indicates whether the Vertical Speed field contains valid + information. + \begin{itemize1} + \item 0x01 (TRUE) -- Vertical Speed field is valid + \item 0x00 (FALSE) -- Vertical Speed field is invalid + and is to be ignored + \vspace{-0.18in} \end{itemize1} */ + + /* Vertical Speed */ + float speedVertical; + /**< Vertical speed.\n + - Units: Meters/second */ + + /* heading validity bit */ + uint8_t heading_valid; + /**< Indicates whether the Heading field contains valid + information. + \begin{itemize1} + \item 0x01 (TRUE) -- Heading field is valid + \item 0x00 (FALSE) -- Heading field is invalid + and is to be ignored + \vspace{-0.18in} \end{itemize1} */ + + /* Heading */ + float heading; + /**< Heading.\n + - Units: Degrees \n + - Range: 0 to 359.999 */ +}qmiLocGeofencePositionStructT_v02; /* Type */ +/** + @} + */ + +/** @addtogroup loc_qmi_messages + @{ + */ +/** Indication Message; Notifies the control point of + a Geofence breach event. */ +typedef struct { + + /* Mandatory */ + /* Geofence ID */ + uint32_t geofenceId; + /**< ID of the Geofence for which this + notification was generated. */ + + /* Mandatory */ + /* Geofence Breach Type */ + qmiLocGeofenceBreachTypeEnumT_v02 breachType; + /**< The type of breach that generated this event. + + Valid values: + \begin{itemize1} + \item 0x00000001 -- GEOFENCE_BREACH_TYPE_ENTERING + \item 0x00000001 -- GEOFENCE_BREACH_TYPE_LEAVING + \vspace{-0.18in} \end{itemize1} + */ + + /* Optional */ + /* Geofence Position */ + uint8_t geofencePosition_valid; /**< Must be set to true if geofencePosition is being passed */ + qmiLocGeofencePositionStructT_v02 geofencePosition; + /**< \n Position of the client when it breached the Geofence. + This TLV is included if the client configures the + Geofence to report position. The position is reported + at the same confidence level that was specified in the + Add Circular Geofence request. */ +}qmiLocEventGeofenceBreachIndMsgT_v02; /* Message */ +/** + @} + */ + /** @addtogroup loc_qmi_enums @{ */ @@ -2208,12 +2696,15 @@ typedef enum { QMILOCSTATUSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ eQMI_LOC_SUCCESS_V02 = 0, /**< Request was completed successfully. */ eQMI_LOC_GENERAL_FAILURE_V02 = 1, /**< Request failed because of a general failure. */ - eQMI_LOC_UNSUPPORTED_V02 = 2, /**< Request failed because it is unsupported. */ + eQMI_LOC_UNSUPPORTED_V02 = 2, /**< Request failed because it is not supported. */ eQMI_LOC_INVALID_PARAMETER_V02 = 3, /**< Request failed because it contained invalid parameters. */ eQMI_LOC_ENGINE_BUSY_V02 = 4, /**< Request failed because the engine is busy. */ - eQMI_LOC_PHONE_OFFLINE_V02 = 5, /**< Request failed because the phone is offline. - Request failed because it timed out. */ - eQMI_LOC_TIMEOUT_V02 = 6, + eQMI_LOC_PHONE_OFFLINE_V02 = 5, /**< Request failed because the phone is offline. */ + eQMI_LOC_TIMEOUT_V02 = 6, /**< Request failed because it timed out. */ + eQMI_LOC_CONFIG_NOT_SUPPORTED_V02 = 7, /**< Request failed because an undefined configuration was requested + Request failed because the engine could not allocate sufficent + memory for the request. */ + eQMI_LOC_INSUFFICIENT_MEMORY_V02 = 8, QMILOCSTATUSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ }qmiLocStatusEnumT_v02; /** @@ -2237,14 +2728,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Get Revision request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Mandatory */ @@ -2252,8 +2745,46 @@ typedef struct { uint32_t revision; /**< Revision of the service. This is the minor revision of the interface that the service implements. Minor revision updates of the service are always - backward compatible. \n - - Type: Unsigned integer */ + backward compatible. */ + + /* Optional */ + /* GNSS Measurement Engine Firmware Version String */ + uint8_t gnssMeFWVerString_valid; /**< Must be set to true if gnssMeFWVerString is being passed */ + char gnssMeFWVerString[QMI_LOC_GNSS_ME_VERSION_STRING_MAX_LENGTH_V02 + 1]; + /**< Version of the GNSS measurement engine software running under the LOC API. + \begin{itemize1} + \item Type: NULL-terminated string + \item Maximum string length (including NULL terminator): 128 + \vspace{0.1in} \end{itemize1} + + \textbf{Note:} This string is only provided on platforms that have + a measurement engine that supports this version string. On all other + platforms, this optional TLV is not provided. */ + + /* Optional */ + /* GNSS Hosted Software Version String */ + uint8_t gnssHostSWVerString_valid; /**< Must be set to true if gnssHostSWVerString is being passed */ + char gnssHostSWVerString[QMI_LOC_GNSS_HOSTED_SW_VERSION_STRING_MAX_LENGTH_V02 + 1]; + /**< Version of the GNSS hosted software running under the LOC API. + \begin{itemize1} + \item Type: NULL-terminated string + \item Maximum string length (including NULL terminator): 128 + \vspace{0.1in}\end{itemize1} + + \textbf{Note:} This string is only provided on hosted architectures + (measurement and position engine running on different processors) that + support this version string. On all other platforms, this optional TLV + is not provided. */ + + /* Optional */ + /* GNSS Software Version String */ + uint8_t gnssSWVerString_valid; /**< Must be set to true if gnssSWVerString is being passed */ + char gnssSWVerString[QMI_LOC_GNSS_SW_VERSION_STRING_MAX_LENGTH_V02 + 1]; + /**< Aggregate version of the GNSS software. + \begin{itemize1} + \item Type: NULL-terminated string + \item Maximum string length (including NULL terminator): 256 + \vspace{-0.18in} \end{itemize1} */ }qmiLocGetServiceRevisionIndMsgT_v02; /* Message */ /** @} @@ -2276,14 +2807,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Get Fix Criteria request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -2292,10 +2825,12 @@ typedef struct { qmiLocAccuracyLevelEnumT_v02 horizontalAccuracyLevel; /**< Horizontal accuracy level. - Valid values: \n - - 0x00000001 -- LOW: Client requires low horizontal accuracy. \n - - 0x00000002 -- MED: Client requires medium horizontal accuracy. \n - - 0x00000003 -- HIGH: Client requires high horizontal accuracy. + Valid values: + \begin{itemize1} + \item 0x00000001 -- LOW: Client requires low horizontal accuracy + \item 0x00000002 -- MED: Client requires medium horizontal accuracy + \item 0x00000003 -- HIGH: Client requires high horizontal accuracy + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -2309,18 +2844,27 @@ typedef struct { are turned ON, the client receives position reports even if the accuracy criteria is not met. The status in the position report is set to IN_PROGRESS for intermediate reports. \n - Valid values: \n - - 0x00000001 -- ON: Client is interested in receiving intermediate reports \n - - 0x00000002 -- OFF: Client is not interested in receiving intermediate reports + Valid values: + \begin{itemize1} + \item 0x00000001 -- ON: Client is interested in receiving intermediate + reports + \item 0x00000002 -- OFF: Client is not interested in receiving + intermediate reports + \vspace{-0.18in} \end{itemize1} */ /* Optional */ - /* Mimimum Interval Between Fixes */ + /* Minimum Interval Between Fixes */ uint8_t minInterval_valid; /**< Must be set to true if minInterval is being passed */ uint32_t minInterval; /**< Time that must elapse before alerting the client. \n - - Type: Unsigned integer \n - Units: Milliseconds */ + + /* Optional */ + /* ID of the Application that Sent the Position Request */ + uint8_t applicationId_valid; /**< Must be set to true if applicationId is being passed */ + qmiLocApplicationIdStructT_v02 applicationId; + /**< \n Application provider, name, and version. */ }qmiLocGetFixCriteriaIndMsgT_v02; /* Message */ /** @} @@ -2345,7 +2889,7 @@ typedef enum { @{ */ /** Request Message; Sends the NI user response back to the engine; success or - failure is reported in a separate indication. */ + failure is reported in a separate indication. */ typedef struct { /* Mandatory */ @@ -2353,10 +2897,12 @@ typedef struct { qmiLocNiUserRespEnumT_v02 userResp; /**< User accepted or denied. - Valid values: \n - - 0x00000001 -- NOTIFY_VERIFY_ACCEPT \n - - 0x00000002 -- NOTIFY_VERIFY_DENY \n - - 0x00000003 -- NOTIFY_VERIFY_NORESP + Valid values: + \begin{itemize1} + \item 0x00000001 -- NOTIFY_VERIFY_ACCEPT + \item 0x00000002 -- NOTIFY_VERIFY_DENY + \item 0x00000003 -- NOTIFY_VERIFY_NORESP + \vspace{-0.18in} \end{itemize1} */ /* Mandatory */ @@ -2364,12 +2910,14 @@ typedef struct { qmiLocNiNotifyVerifyEnumT_v02 notificationType; /**< Type of notification/verification performed. - Valid values: \n - - 0x00000001 -- NO_NOTIFY_NO_VERIFY \n - - 0x00000002 -- NOTIFY_ONLY \n - - 0x00000003 -- ALLOW_NO_RESP \n - - 0x00000004 -- NOT_ALLOW_NO_RESP \n - - 0x00000005 -- PRIVACY_OVERRIDE + Valid values: + \begin{itemize1} + \item 0x00000001 -- NO_NOTIFY_NO_VERIF + \item 0x00000002 -- NOTIFY_ONLY + \item 0x00000003 -- ALLOW_NO_RESP + \item 0x00000004 -- NOT_ALLOW_NO_RESP + \item 0x00000005 -- PRIVACY_OVERRIDE + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -2394,7 +2942,13 @@ typedef struct { /* Network Initiated Service Interaction Request */ uint8_t NiVxServiceInteractionPayload_valid; /**< Must be set to true if NiVxServiceInteractionPayload is being passed */ qmiLocNiVxServiceInteractionStructT_v02 NiVxServiceInteractionPayload; - /**< \n Optional NI service interaction payload. */ + /**< \n Optional NI service interaction payload. */ + + /* Optional */ + /* Network Initiated SUPL Version 2 Extension */ + uint8_t NiSuplVer2ExtPayload_valid; /**< Must be set to true if NiSuplVer2ExtPayload is being passed */ + qmiLocNiSuplVer2ExtStructT_v02 NiSuplVer2ExtPayload; + /**< \n Optional SUPL Version 2 Extension payload. */ }qmiLocNiUserRespReqMsgT_v02; /* Message */ /** @} @@ -2404,7 +2958,7 @@ typedef struct { @{ */ /** Indication Message; Sends the NI user response back to the engine; success or - failure is reported in a separate indication. */ + failure is reported in a separate indication. */ typedef struct { /* Mandatory */ @@ -2412,14 +2966,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the NI User Response request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocNiUserRespIndMsgT_v02; /* Message */ /** @@ -2448,21 +3004,18 @@ typedef struct { /* Total Size */ uint32_t totalSize; /**< Total size of the predicted orbits data to be injected. \n - - Type: Unsigned integer \n - Units: Bytes */ /* Mandatory */ /* Total Parts */ uint16_t totalParts; /**< Total number of parts into which the predicted orbits data is - divided. \n - - Type: Unsigned integer */ + divided. */ /* Mandatory */ /* Part Number */ uint16_t partNum; - /**< Number of the current predicted orbits data part; starts at 1. \n - - Type: Unsigned integer */ + /**< Number of the current predicted orbits data part; starts at 1. */ /* Mandatory */ /* Data */ @@ -2479,8 +3032,10 @@ typedef struct { qmiLocPredictedOrbitsDataFormatEnumT_v02 formatType; /**< Predicted orbits data format. - Valid values: \n - - 0x00000000 -- PREDICTED_ORBITS_XTRA + Valid values: + \begin{itemize1} + \item 0x00000000 -- PREDICTED_ORBITS_XTRA + \vspace{-0.18in} \end{itemize1} */ }qmiLocInjectPredictedOrbitsDataReqMsgT_v02; /* Message */ /** @@ -2498,14 +3053,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Data Injection request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -2513,8 +3070,7 @@ typedef struct { uint8_t partNum_valid; /**< Must be set to true if partNum is being passed */ uint16_t partNum; /**< Number of the predicted orbits data part for which this indication - is sent; starts at 1. \n - - Type: Unsigned integer */ + is sent; starts at 1. */ }qmiLocInjectPredictedOrbitsDataIndMsgT_v02; /* Message */ /** @} @@ -2533,18 +3089,20 @@ typedef struct { typedef struct { /* Mandatory */ - /* Predicted Oribits Data Source Status */ + /* Predicted Orbits Data Source Status */ qmiLocStatusEnumT_v02 status; /**< Status of the query request for a predicted orbits data source. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -2577,13 +3135,11 @@ typedef struct { uint64_t startTimeInUTC; /**< Predicted orbits data is valid starting from this time. \n - - Type: Unsigned integer \n - Units: Seconds (since Jan. 1, 1970) */ uint16_t durationHours; /**< Duration from the start time for which the data is valid.\n - - Type: Unsigned integer \n - Units: Hours */ }qmiLocPredictedOrbitsDataValidityStructT_v02; /* Type */ @@ -2602,14 +3158,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the query request for predicted orbits data validity. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -2631,17 +3189,13 @@ typedef struct { /* UTC Time */ uint64_t timeUtc; /**< UTC time since Jan. 1, 1970.\n - - Type: Unsigned integer \n - - Units: Milliseconds - */ + - Units: Milliseconds */ /* Mandatory */ /* Time Uncertainty */ uint32_t timeUnc; /**< Time uncertainty.\n - - Type: Unsigned integer \n - - Units: Milliseconds - */ + - Units: Milliseconds */ }qmiLocInjectUtcTimeReqMsgT_v02; /* Message */ /** @} @@ -2658,14 +3212,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the UTC Time Injection request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocInjectUtcTimeIndMsgT_v02; /* Message */ /** @@ -2736,40 +3292,48 @@ typedef struct { qmiLocAltSrcEnumT_v02 source; /**< Specifies the source of the altitude. - Valid values: \n - - 0x00000000 -- ALT_SRC_UNKNOWN \n - - 0x00000001 -- ALT_SRC_GPS \n - - 0x00000002 -- ALT_SRC_CELL_ID \n - - 0x00000003 -- ALT_SRC_ENHANCED_CELL_ID \n - - 0x00000004 -- ALT_SRC_WIFI \n - - 0x00000005 -- ALT_SRC_TERRESTRIAL \n - - 0x00000006 -- ALT_SRC_TERRESTRIAL_HYBRID \n - - 0x00000007 -- ALT_SRC_ALTITUDE_DATABASE \n - - 0x00000008 -- ALT_SRC_BAROMETRIC_ALTIMETER \n - - 0x00000009 -- ALT_SRC_OTHER + Valid values: + \begin{itemize1} + \item 0x00000000 -- ALT_SRC_UNKNOWN + \item 0x00000001 -- ALT_SRC_GPS + \item 0x00000002 -- ALT_SRC_CELL_ID + \item 0x00000003 -- ALT_SRC_ENHANCED_CELL_ID + \item 0x00000004 -- ALT_SRC_WIFI + \item 0x00000005 -- ALT_SRC_TERRESTRIAL + \item 0x00000006 -- ALT_SRC_TERRESTRIAL_HYBRID + \item 0x00000007 -- ALT_SRC_ALTITUDE_DATABASE + \item 0x00000008 -- ALT_SRC_BAROMETRIC_ALTIMETER + \item 0x00000009 -- ALT_SRC_OTHER + \vspace{-0.18in} \end{itemize1} */ qmiLocAltSrcLinkageEnumT_v02 linkage; /**< Specifies the dependency between the horizontal and altitude position components. - Valid values: \n - - 0x00000000 -- SRC_LINKAGE_NOT_SPECIFIED \n - - 0x00000001 -- SRC_LINKAGE_FULLY_INTERDEPENDENT \n - - 0x00000002 -- SRC_LINKAGE_DEPENDS_ON_LAT_LONG \n - - 0x00000003 -- SRC_LINKAGE_FULLY_INDEPENDENT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SRC_LINKAGE_NOT_SPECIFIED + \item 0x00000001 -- SRC_LINKAGE_FULLY_INTERDEPENDENT + \item 0x00000002 -- SRC_LINKAGE_DEPENDS_ON_LAT_LONG + \item 0x00000003 -- SRC_LINKAGE_FULLY_INDEPENDENT + \vspace{-0.18in} \end{itemize1} */ qmiLocAltSrcUncertaintyCoverageEnumT_v02 coverage; /**< Specifies the region of uncertainty. - Valid values: \n - - 0x00000000 -- UNCERTAINTY_NOT_SPECIFIED \n - - 0x00000001 -- UNCERTAINTY_POINT: Altitude uncertainty is valid at the - injected horizontal position coordinates only. \n - - 0x00000002 -- UNCERTAINTY_FULL: Altitude uncertainty applies to the - position of the device regardless of horizontal position - (within the horizontal uncertainty region, if provided). + Valid values: + \begin{itemize1} + \item 0x00000000 -- UNCERTAINTY_NOT_SPECIFIED + \item 0x00000001 -- UNCERTAINTY_POINT: Altitude uncertainty is valid + at the injected horizontal position coordinates + only. + \item 0x00000002 -- UNCERTAINTY_FULL: Altitude uncertainty applies to + the position of the device regardless of + horizontal position (within the horizontal + uncertainty region, if provided). + \vspace{-0.18in} \end{itemize1} */ }qmiLocAltitudeSrcInfoStructT_v02; /* Type */ /** @@ -2781,12 +3345,12 @@ typedef struct { */ typedef enum { QMILOCPOSITIONSRCENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_POSITION_SRC_GNSS_V02 = 0, /**< Position Source is GNSS. */ - eQMI_LOC_POSITION_SRC_CELLID_V02 = 1, /**< Position Source is Cell ID. */ - eQMI_LOC_POSITION_SRC_ENH_CELLID_V02 = 2, /**< Position Source is Enhanced Cell ID. */ - eQMI_LOC_POSITION_SRC_WIFI_V02 = 3, /**< Position Source is WiFi. */ - eQMI_LOC_POSITION_SRC_TERRESTRIAL_V02 = 4, /**< Position Source is Terrestrial. */ - eQMI_LOC_POSITION_SRC_GNSS_TERRESTRIAL_HYBRID_V02 = 5, /**< Position Source is GNSS Terrestrial Hybrid. + eQMI_LOC_POSITION_SRC_GNSS_V02 = 0, /**< Position source is GNSS. */ + eQMI_LOC_POSITION_SRC_CELLID_V02 = 1, /**< Position source is Cell ID. */ + eQMI_LOC_POSITION_SRC_ENH_CELLID_V02 = 2, /**< Position source is Enhanced Cell ID. */ + eQMI_LOC_POSITION_SRC_WIFI_V02 = 3, /**< Position source is WiFi. */ + eQMI_LOC_POSITION_SRC_TERRESTRIAL_V02 = 4, /**< Position source is Terrestrial. */ + eQMI_LOC_POSITION_SRC_GNSS_TERRESTRIAL_HYBRID_V02 = 5, /**< Position source is GNSS Terrestrial Hybrid. Other sources. */ eQMI_LOC_POSITION_SRC_OTHER_V02 = 6, QMILOCPOSITIONSRCENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ @@ -2805,24 +3369,28 @@ typedef struct { /* Latitude */ uint8_t latitude_valid; /**< Must be set to true if latitude is being passed */ double latitude; - /**< Latitude (specified in WGS84 datum).\n - - Type: Floating point \n - - Units: Degrees \n - - Range: -90.0 to 90.0 \n - - Positive values indicate northern latitude \n - - Negative values indicate southern latitude + /**< Latitude (specified in WGS84 datum). + \begin{itemize1} + \item Type: Floating point + \item Units: Degrees + \item Range: -90.0 to 90.0 \begin{itemize1} + \item Positive values indicate northern latitude + \item Negative values indicate southern latitude + \vspace{-0.18in} \end{itemize1} \end{itemize1} */ /* Optional */ /* Longitude */ uint8_t longitude_valid; /**< Must be set to true if longitude is being passed */ double longitude; - /**< Longitude (specified in WGS84 datum).\n - - Type: Floating point \n - - Units: Degrees \n - - Range: -180.0 to 180.0 \n - - Positive values indicate eastern longitude \n - - Negative values indicate western longitude + /**< Longitude (specified in WGS84 datum). + \begin{itemize1} + \item Type: Floating point + \item Units: Degrees + \item Range: -180.0 to 180.0 \begin{itemize1} + \item Positive values indicate eastern longitude + \item Negative values indicate western longitude + \vspace{-0.18in} \end{itemize1} \end{itemize1} */ /* Optional */ @@ -2830,19 +3398,19 @@ typedef struct { uint8_t horUncCircular_valid; /**< Must be set to true if horUncCircular is being passed */ float horUncCircular; /**< Horizontal position uncertainty (circular).\n - - Type: Floating point \n - Units: Meters */ /* Optional */ /* Horizontal Confidence */ uint8_t horConfidence_valid; /**< Must be set to true if horConfidence is being passed */ uint8_t horConfidence; - /**< Horizontal confidence, as defined by ETSI TS 101 109.\n - - Type: Unsigned integer \n - - Units: Percent (0 to 99) \n - - 0 -- invalid value \n - - 100 to 256 -- not used \n - - If 100 is received, reinterpret to 99 \n + /**< Horizontal confidence, as defined by ETSI TS 101 109 (\hyperref[S4]{[S4]}). + \begin{itemize1} + \item Units: Percent (0 to 99) + \item 0 -- invalid value + \item 100 to 256 -- not used + \item If 100 is received, reinterpret to 99 + \end{itemize1} This field must be specified together with horizontal uncertainty. If not specified, the default value will be 50. */ @@ -2852,28 +3420,32 @@ typedef struct { qmiLocReliabilityEnumT_v02 horReliability; /**< Specifies the reliability of the horizontal position. - Valid values: \n - - 0x00000000 -- eQMI_LOC_RELIABILITY_NOT_SET \n - - 0x00000001 -- eQMI_LOC_RELIABILITY_VERY_LOW \n - - 0x00000002 -- eQMI_LOC_RELIABILITY_LOW \n - - 0x00000003 -- eQMI_LOC_RELIABILITY_MEDIUM \n - - 0x00000004 -- eQMI_LOC_RELIABILITY_HIGH + Valid values: + \begin{itemize1} + \item 0x00000000 -- eQMI_LOC_RELIABILITY_NOT_SET + \item 0x00000001 -- eQMI_LOC_RELIABILITY_VERY_LOW + \item 0x00000002 -- eQMI_LOC_RELIABILITY_LOW + \item 0x00000003 -- eQMI_LOC_RELIABILITY_MEDIUM + \item 0x00000004 -- eQMI_LOC_RELIABILITY_HIGH + \vspace{-0.18in} \end{itemize1} */ /* Optional */ /* Altitude With Respect to Ellipsoid */ uint8_t altitudeWrtEllipsoid_valid; /**< Must be set to true if altitudeWrtEllipsoid is being passed */ float altitudeWrtEllipsoid; - /**< Altitude with respect to the WGS84 ellipsoid.\n - - Type: Floating point \n - - Units: Meters; positive = height, negative = depth */ + /**< Altitude with respect to the WGS84 ellipsoid. + \begin{itemize1} + \item Units: Meters \begin{itemize1} + \item Positive = height + \item Negative = depth + \vspace{-0.18in} \end{itemize1} \end{itemize1} */ /* Optional */ /* Altitude With Respect to Sea Level */ uint8_t altitudeWrtMeanSeaLevel_valid; /**< Must be set to true if altitudeWrtMeanSeaLevel is being passed */ float altitudeWrtMeanSeaLevel; /**< Altitude with respect to mean sea level.\n - - Type: Floating point \n - Units: Meters */ /* Optional */ @@ -2882,19 +3454,19 @@ typedef struct { float vertUnc; /**< Vertical uncertainty. This is mandatory if either altitudeWrtEllipsoid or altitudeWrtMeanSeaLevel is specified.\n - - Type: Floating point \n - Units: Meters */ /* Optional */ /* Vertical Confidence */ uint8_t vertConfidence_valid; /**< Must be set to true if vertConfidence is being passed */ uint8_t vertConfidence; - /**< Vertical confidence, as defined by ETSI TS 101 109.\n - - Type: Unsigned integer \n - - Units: Percent (0-99) \n - - 0 -- invalid value\n - - 100 to 256 -- not used \n - - If 100 is received, reinterpret to 99\n + /**< Vertical confidence, as defined by ETSI TS 101 109 (\hyperref[S4]{[S4]}). + \begin{itemize1} + \item Units: Percent (0-99) + \item 0 -- invalid value + \item 100 to 256 -- not used + \item If 100 is received, reinterpret to 99 + \end{itemize1} This field must be specified together with the vertical uncertainty. If not specified, the default value will be 50. */ @@ -2904,12 +3476,14 @@ typedef struct { qmiLocReliabilityEnumT_v02 vertReliability; /**< Specifies the reliability of the vertical position. - Valid values: \n - - 0x00000000 -- eQMI_LOC_RELIABILITY_NOT_SET \n - - 0x00000001 -- eQMI_LOC_RELIABILITY_VERY_LOW \n - - 0x00000002 -- eQMI_LOC_RELIABILITY_LOW \n - - 0x00000003 -- eQMI_LOC_RELIABILITY_MEDIUM \n - - 0x00000004 -- eQMI_LOC_RELIABILITY_HIGH + Valid values: + \begin{itemize1} + \item 0x00000000 -- eQMI_LOC_RELIABILITY_NOT_SET + \item 0x00000001 -- eQMI_LOC_RELIABILITY_VERY_LOW + \item 0x00000002 -- eQMI_LOC_RELIABILITY_LOW + \item 0x00000003 -- eQMI_LOC_RELIABILITY_MEDIUM + \item 0x00000004 -- eQMI_LOC_RELIABILITY_HIGH + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -2923,7 +3497,6 @@ typedef struct { uint8_t timestampUtc_valid; /**< Must be set to true if timestampUtc is being passed */ uint64_t timestampUtc; /**< UTC timestamp. \n - - Type: Unsigned integer \n - Units: Milliseconds (since Jan. 1, 1970) */ /* Optional */ @@ -2931,28 +3504,28 @@ typedef struct { uint8_t timestampAge_valid; /**< Must be set to true if timestampAge is being passed */ int32_t timestampAge; /**< Position age, which is an estimate of how long ago this fix was made. \n - - Type: Signed integer \n - Units: Milliseconds */ /* Optional */ /* Position Source */ uint8_t positionSrc_valid; /**< Must be set to true if positionSrc is being passed */ qmiLocPositionSrcEnumT_v02 positionSrc; - /**< Source from where this position was obtained. - Valid values: \n - - 0x00000000 -- eQMI_LOC_POSITION_SRC_GNSS \n - - 0x00000001 -- eQMI_LOC_POSITION_SRC_CELLID \n - - 0x00000002 -- eQMI_LOC_POSITION_SRC_ENH_CELLID \n - - 0x00000003 -- eQMI_LOC_POSITION_SRC_WIFI \n - - 0x00000004 -- eQMI_LOC_POSITION_SRC_TERRESTRIAL \n - - 0x00000005 -- eQMI_LOC_POSITION_SRC_GNSS_TERRESTRIAL_HYBRID \n - - 0x00000006 -- eQMI_LOC_POSITION_SRC_OTHER \n - - If altitude is specified and altitude source is not specified, the engine - assumes that altitude was obtained using the specified Position source. - If altitude and altitude source both are specified then the engine assumes - that only latitude, longitude were obtained using the specified Position - Source. + /**< Source from which this position was obtained. \n + Valid values: + \begin{itemize1} + \item 0x00000000 -- eQMI_LOC_POSITION_SRC_GNSS + \item 0x00000001 -- eQMI_LOC_POSITION_SRC_CELLID + \item 0x00000002 -- eQMI_LOC_POSITION_SRC_ENH_CELLID + \item 0x00000003 -- eQMI_LOC_POSITION_SRC_WIFI + \item 0x00000004 -- eQMI_LOC_POSITION_SRC_TERRESTRIAL + \item 0x00000005 -- eQMI_LOC_POSITION_SRC_GNSS_TERRESTRIAL_HYBRID + \item 0x00000006 -- eQMI_LOC_POSITION_SRC_OTHER + \end{itemize1} \vspace{0.05in} + If altitude is specified and the altitude source is not specified, the engine + assumes that the altitude was obtained using the specified position source. \n + If both altitude and altitude source are specified, the engine assumes + that only latitude and longitude were obtained using the specified position + source. */ }qmiLocInjectPositionReqMsgT_v02; /* Message */ /** @@ -2970,14 +3543,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the UTC Position Injection request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocInjectPositionIndMsgT_v02; /* Message */ /** @@ -3034,14 +3609,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Set Engine Lock request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetEngineLockIndMsgT_v02; /* Message */ /** @@ -3065,14 +3642,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Get Engine Lock request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -3101,9 +3680,11 @@ typedef struct { /* Mandatory */ /* SBAS Config */ uint8_t sbasConfig; - /**< Whether SBAS configuration is enabled. \n - - 0x01 (TRUE) -- SBAS configuration is enabled \n - - 0x00 (FALSE) -- SBAS configuration is disabled */ + /**< Whether SBAS configuration is enabled. + \begin{itemize1} + \item 0x01 (TRUE) -- SBAS configuration is enabled + \item 0x00 (FALSE) -- SBAS configuration is disabled + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetSbasConfigReqMsgT_v02; /* Message */ /** @} @@ -3120,14 +3701,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Set SBAS Configuration request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetSbasConfigIndMsgT_v02; /* Message */ /** @@ -3151,23 +3734,27 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Get SBAS Configuration request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ /* SBAS Config */ uint8_t sbasConfig_valid; /**< Must be set to true if sbasConfig is being passed */ uint8_t sbasConfig; - /**< Whether SBAS configuration is enabled. \n - - 0x01 (TRUE) -- SBAS configuration is enabled \n - - 0x00 (FALSE) -- SBAS configuration is disabled */ + /**< Whether SBAS configuration is enabled. + \begin{itemize1} + \item 0x01 (TRUE) -- SBAS configuration is enabled + \item 0x00 (FALSE) -- SBAS configuration is disabled + \vspace{-0.18in} \end{itemize1} */ }qmiLocGetSbasConfigIndMsgT_v02; /* Message */ /** @} @@ -3179,6 +3766,8 @@ typedef uint32_t qmiLocNmeaSentenceMaskT_v02; #define QMI_LOC_NMEA_MASK_GSV_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000004) /**< Enable GSV type. */ #define QMI_LOC_NMEA_MASK_GSA_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000008) /**< Enable GSA type. */ #define QMI_LOC_NMEA_MASK_VTG_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000010) /**< Enable VTG type. */ +#define QMI_LOC_NMEA_MASK_PQXFI_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000020) /**< Enable PQXFI type. */ +#define QMI_LOC_NMEA_MASK_PSTIS_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000040) /**< Enable PSTIS type. */ /** @addtogroup loc_qmi_messages @{ */ @@ -3195,7 +3784,9 @@ typedef struct { - 0x00000002 -- NMEA_MASK_RMC \n - 0x00000004 -- NMEA_MASK_GSV \n - 0x00000008 -- NMEA_MASK_GSA \n - - 0x00000010 -- NMEA_MASK_VTG + - 0x00000010 -- NMEA_MASK_VTG \n + - 0x00000020 -- NMEA_MASK_PQXFI \n + - 0x00000040 -- NMEA_MASK_PSTIS */ }qmiLocSetNmeaTypesReqMsgT_v02; /* Message */ /** @@ -3213,14 +3804,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of Set NMEA Types request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetNmeaTypesIndMsgT_v02; /* Message */ /** @@ -3244,14 +3837,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Get NMEA Types request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -3266,7 +3861,9 @@ typedef struct { - 0x00000002 -- NMEA_MASK_RMC \n - 0x00000004 -- NMEA_MASK_GSV \n - 0x00000008 -- NMEA_MASK_GSA \n - - 0x00000010 -- NMEA_MASK_VTG + - 0x00000010 -- NMEA_MASK_VTG \n + - 0x00000020 -- NMEA_MASK_PQXFI \n + - 0x00000040 -- NMEA_MASK_PSTIS */ }qmiLocGetNmeaTypesIndMsgT_v02; /* Message */ /** @@ -3301,14 +3898,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Set Low Power Mode request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetLowPowerModeIndMsgT_v02; /* Message */ /** @@ -3332,14 +3931,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Get LPM request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -3404,9 +4005,11 @@ typedef struct { /* Uniform Resource Locator */ uint8_t urlAddr_valid; /**< Must be set to true if urlAddr is being passed */ char urlAddr[QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02 + 1]; - /**< URL address. \n - - Type: NULL-terminated string \n - - Maximum string length (including NULL terminator): 256 + /**< URL address. + \begin{itemize1} + \item Type: NULL-terminated string + \item Maximum string length (including NULL terminator): 256 + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetServerReqMsgT_v02; /* Message */ /** @@ -3424,14 +4027,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Set Server request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetServerIndMsgT_v02; /* Message */ /** @@ -3485,14 +4090,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Get Server request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Mandatory */ @@ -3523,9 +4130,11 @@ typedef struct { /* Uniform Resource Locator */ uint8_t urlAddr_valid; /**< Must be set to true if urlAddr is being passed */ char urlAddr[QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02 + 1]; - /**< URL. \n - - Type: NULL-terminated string \n - - Maximum string length (including NULL terminator): 256 + /**< URL. + \begin{itemize1} + \item Type: NULL-terminated string + \item Maximum string length (including NULL terminator): 256 + \vspace{-0.18in} \end{itemize1} */ }qmiLocGetServerIndMsgT_v02; /* Message */ /** @@ -3533,25 +4142,25 @@ typedef struct { */ typedef uint64_t qmiLocDeleteGnssDataMaskT_v02; -#define QMI_LOC_MASK_DELETE_GPS_SVDIR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000001) /**< Mask to delete GPS SVDIR. */ -#define QMI_LOC_MASK_DELETE_GPS_SVSTEER_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000002) /**< Mask to delete GPS SVSTEER. */ -#define QMI_LOC_MASK_DELETE_GPS_TIME_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000004) /**< Mask to delete GPS time. */ -#define QMI_LOC_MASK_DELETE_GPS_ALM_CORR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000008) /**< Mask to delete almanac correlation. */ -#define QMI_LOC_MASK_DELETE_GLO_SVDIR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000010) /**< Mask to delete GLONASS SVDIR. */ -#define QMI_LOC_MASK_DELETE_GLO_SVSTEER_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000020) /**< Mask to delete GLONASS SVSTEER. */ -#define QMI_LOC_MASK_DELETE_GLO_TIME_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000040) /**< Mask to delete GLONASS time. */ -#define QMI_LOC_MASK_DELETE_GLO_ALM_CORR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000080) /**< Mask to delete GLONASS almanac correlation */ -#define QMI_LOC_MASK_DELETE_SBAS_SVDIR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000100) /**< Mask to delete SBAS SVDIR */ -#define QMI_LOC_MASK_DELETE_SBAS_SVSTEER_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000200) /**< Mask to delete SBAS SVSTEER */ -#define QMI_LOC_MASK_DELETE_POSITION_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000400) /**< Mask to delete position estimate */ -#define QMI_LOC_MASK_DELETE_TIME_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000800) /**< Mask to delete time estimate */ -#define QMI_LOC_MASK_DELETE_IONO_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00001000) /**< Mask to delete IONO */ -#define QMI_LOC_MASK_DELETE_UTC_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00002000) /**< Mask to delete UTC estimate */ -#define QMI_LOC_MASK_DELETE_HEALTH_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00004000) /**< Mask to delete SV health record */ -#define QMI_LOC_MASK_DELETE_SADATA_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00008000) /**< Mask to delete SADATA */ -#define QMI_LOC_MASK_DELETE_RTI_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00010000) /**< Mask to delete RTI */ -#define QMI_LOC_MASK_DELETE_SV_NO_EXIST_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00020000) /**< Mask to delete SV_NO_EXIST */ -#define QMI_LOC_MASK_DELETE_FREQ_BIAS_EST_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00040000) /**< Mask to delete frequency bias estimate */ +#define QMI_LOC_MASK_DELETE_GPS_SVDIR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000001ull) /**< Mask to delete GPS SVDIR. */ +#define QMI_LOC_MASK_DELETE_GPS_SVSTEER_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000002ull) /**< Mask to delete GPS SVSTEER. */ +#define QMI_LOC_MASK_DELETE_GPS_TIME_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000004ull) /**< Mask to delete GPS time. */ +#define QMI_LOC_MASK_DELETE_GPS_ALM_CORR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000008ull) /**< Mask to delete almanac correlation. */ +#define QMI_LOC_MASK_DELETE_GLO_SVDIR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000010ull) /**< Mask to delete GLONASS SVDIR. */ +#define QMI_LOC_MASK_DELETE_GLO_SVSTEER_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000020ull) /**< Mask to delete GLONASS SVSTEER. */ +#define QMI_LOC_MASK_DELETE_GLO_TIME_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000040ull) /**< Mask to delete GLONASS time. */ +#define QMI_LOC_MASK_DELETE_GLO_ALM_CORR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000080ull) /**< Mask to delete GLONASS almanac correlation */ +#define QMI_LOC_MASK_DELETE_SBAS_SVDIR_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000100ull) /**< Mask to delete SBAS SVDIR */ +#define QMI_LOC_MASK_DELETE_SBAS_SVSTEER_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000200ull) /**< Mask to delete SBAS SVSTEER */ +#define QMI_LOC_MASK_DELETE_POSITION_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000400ull) /**< Mask to delete position estimate */ +#define QMI_LOC_MASK_DELETE_TIME_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00000800ull) /**< Mask to delete time estimate */ +#define QMI_LOC_MASK_DELETE_IONO_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00001000ull) /**< Mask to delete IONO */ +#define QMI_LOC_MASK_DELETE_UTC_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00002000ull) /**< Mask to delete UTC estimate */ +#define QMI_LOC_MASK_DELETE_HEALTH_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00004000ull) /**< Mask to delete SV health record */ +#define QMI_LOC_MASK_DELETE_SADATA_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00008000ull) /**< Mask to delete SADATA */ +#define QMI_LOC_MASK_DELETE_RTI_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00010000ull) /**< Mask to delete RTI */ +#define QMI_LOC_MASK_DELETE_SV_NO_EXIST_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00020000ull) /**< Mask to delete SV_NO_EXIST */ +#define QMI_LOC_MASK_DELETE_FREQ_BIAS_EST_V02 ((qmiLocDeleteGnssDataMaskT_v02)0x00040000ull) /**< Mask to delete frequency bias estimate */ typedef uint32_t qmiLocDeleteCelldbDataMaskT_v02; #define QMI_LOC_MASK_DELETE_CELLDB_POS_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000001) /**< Mask to delete cell database position */ #define QMI_LOC_MASK_DELETE_CELLDB_LATEST_GPS_POS_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000002) /**< Mask to delete cell database latest GPS position */ @@ -3584,21 +4193,25 @@ typedef uint8_t qmiLocDeleteSvInfoMaskT_v02; typedef struct { uint16_t gnssSvId; - /**< SV ID of the satellite whose data is to be deleted. \n - - Type: Unsigned integer \n - - Range: \n - - For GPS: 1 to 32 \n - - For SBAS: 33 to 64 \n - - For GLONASS: 65 to 96 */ + /**< SV ID of the satellite whose data is to be deleted. + \begin{itemize1} + \item Range: \begin{itemize1} + \item For GPS: 1 to 32 + \item For SBAS: 33 to 64 + \item For GLONASS: 65 to 96 + \vspace{-0.18in} \end{itemize1} \end{itemize1} */ qmiLocSvSystemEnumT_v02 system; /**< Indicates to which constellation this SV belongs. - Valid values: \n - - 0x00000001 -- eQMI_LOC_SV_SYSTEM_GPS \n - - 0x00000002 -- eQMI_LOC_SV_SYSTEM_GALILEO \n - - 0x00000003 -- eQMI_LOC_SV_SYSTEM_SBAS \n - - 0x00000004 -- eQMI_LOC_SV_SYSTEM_COMPASS \n - - 0x00000005 -- eQMI_LOC_SV_SYSTEM_GLONASS + + Valid values: + \begin{itemize1} + \item 0x00000001 -- eQMI_LOC_SV_SYSTEM_GPS + \item 0x00000002 -- eQMI_LOC_SV_SYSTEM_GALILEO + \item 0x00000003 -- eQMI_LOC_SV_SYSTEM_SBAS + \item 0x00000004 -- eQMI_LOC_SV_SYSTEM_COMPASS + \item 0x00000005 -- eQMI_LOC_SV_SYSTEM_GLONASS + \vspace{-0.18in} \end{itemize1} */ qmiLocDeleteSvInfoMaskT_v02 deleteSvInfoMask; @@ -3624,20 +4237,23 @@ typedef struct { /* Delete All */ uint8_t deleteAllFlag; /**< Whether all assistance data is to be deleted. - Valid values: \n - - 0x01 (TRUE) -- All assistance data is to be deleted; - if this flag is set, all the other information + + Valid values: + \begin{itemize1} + \item 0x01 (TRUE) -- All assistance data is to be deleted; if + this flag is set, all the other information contained in the optional fields for this - message are ignored \n - - 0x00 (FALSE) -- The optional fields in the message are to be used - to determine which data is to be deleted */ + message are ignored + \item 0x00 (FALSE) -- The optional fields in the message are to be + used to determine which data is to be deleted + \vspace{-0.18in} \end{itemize1} */ /* Optional */ /* Delete SV Info */ uint8_t deleteSvInfoList_valid; /**< Must be set to true if deleteSvInfoList is being passed */ uint32_t deleteSvInfoList_len; /**< Must be set to # of elements in deleteSvInfoList */ qmiLocDeleteSvInfoStructT_v02 deleteSvInfoList[QMI_LOC_DELETE_MAX_SV_INFO_LENGTH_V02]; - /**< \n List of satellites for which the assitance data is to be deleted. + /**< \n List of satellites for which the assistance data is to be deleted. */ /* Optional */ @@ -3645,63 +4261,72 @@ typedef struct { uint8_t deleteGnssDataMask_valid; /**< Must be set to true if deleteGnssDataMask is being passed */ qmiLocDeleteGnssDataMaskT_v02 deleteGnssDataMask; /**< Mask for the GNSS data that is to be deleted. - Valid values: \n - - 0x00000001 -- DELETE_GPS_SVDIR \n - - 0x00000002 -- DELETE_GPS_SVSTEER \n - - 0x00000004 -- DELETE_GPS_TIME\n - - 0x00000008 -- DELETE_GPS_ALM_CORR \n - - 0x00000010 -- DELETE_GLO_SVDIR \n - - 0x00000020 -- DELETE_GLO_SVSTEER \n - - 0x00000040 -- DELETE_GLO_TIME \n - - 0x00000080 -- DELETE_GLO_ALM_CORR \n - - 0x00000100 -- DELETE_SBAS_SVDIR \n - - 0x00000200 -- DELETE_SBAS_SVSTEER \n - - 0x00000400 -- DELETE_POSITION \n - - 0x00000800 -- DELETE_TIME \n - - 0x00001000 -- DELETE_IONO \n - - 0x00002000 -- DELETE_UTC \n - - 0x00004000 -- DELETE_HEALTH \n - - 0x00008000 -- DELETE_SADATA \n - - 0x00010000 -- DELETE_RTI \n - - 0x00020000 -- DELETE_SV_NO_EXIST \n - - 0x00040000 -- DELETE_FREQ_BIAS_EST + + Valid values: + \begin{itemize1} + \item 0x00000001 -- DELETE_GPS_SVDIR + \item 0x00000002 -- DELETE_GPS_SVSTEER + \item 0x00000004 -- DELETE_GPS_TIME + \item 0x00000008 -- DELETE_GPS_ALM_CORR + \item 0x00000010 -- DELETE_GLO_SVDIR + \item 0x00000020 -- DELETE_GLO_SVSTEER + \item 0x00000040 -- DELETE_GLO_TIME + \item 0x00000080 -- DELETE_GLO_ALM_CORR + \item 0x00000100 -- DELETE_SBAS_SVDIR + \item 0x00000200 -- DELETE_SBAS_SVSTEER + \item 0x00000400 -- DELETE_POSITION + \item 0x00000800 -- DELETE_TIME + \item 0x00001000 -- DELETE_IONO + \item 0x00002000 -- DELETE_UTC + \item 0x00004000 -- DELETE_HEALTH + \item 0x00008000 -- DELETE_SADATA + \item 0x00010000 -- DELETE_RTI + \item 0x00020000 -- DELETE_SV_NO_EXIST + \item 0x00040000 -- DELETE_FREQ_BIAS_EST + \vspace{-0.18in} \end{itemize1} */ /* Optional */ /* Delete Cell Database */ uint8_t deleteCellDbDataMask_valid; /**< Must be set to true if deleteCellDbDataMask is being passed */ qmiLocDeleteCelldbDataMaskT_v02 deleteCellDbDataMask; - /**< Mask for the cell database assistance data that is to be deleted. \n - Valid values: \n - - 0x00000001 -- DELETE_CELLDB_POS \n - - 0x00000002 -- DELETE_CELLDB_LATEST_GPS_POS \n - - 0x00000004 -- DELETE_CELLDB_OTA_POS \n - - 0x00000008 -- DELETE_CELLDB_EXT_REF_POS \n - - 0x00000010 -- DELETE_CELLDB_TIMETAG \n - - 0x00000020 -- DELETE_CELLDB_CELLID \n - - 0x00000040 -- DELETE_CELLDB_CACHED_CELLID \n - - 0x00000080 -- DELETE_CELLDB_LAST_SRV_CELL \n - - 0x00000100 -- DELETE_CELLDB_CUR_SRV_CELL \n - - 0x00000200 -- DELETE_CELLDB_NEIGHBOR_INFO + /**< Mask for the cell database assistance data that is to be deleted. + + Valid values: + \begin{itemize1} + \item 0x00000001 -- DELETE_CELLDB_POS + \item 0x00000002 -- DELETE_CELLDB_LATEST_GPS_POS + \item 0x00000004 -- DELETE_CELLDB_OTA_POS + \item 0x00000008 -- DELETE_CELLDB_EXT_REF_POS + \item 0x00000010 -- DELETE_CELLDB_TIMETAG + \item 0x00000020 -- DELETE_CELLDB_CELLID + \item 0x00000040 -- DELETE_CELLDB_CACHED_CELLID + \item 0x00000080 -- DELETE_CELLDB_LAST_SRV_CELL + \item 0x00000100 -- DELETE_CELLDB_CUR_SRV_CELL + \item 0x00000200 -- DELETE_CELLDB_NEIGHBOR_INFO + \vspace{-0.18in} \end{itemize1} */ /* Optional */ /* Delete Clock Info */ uint8_t deleteClockInfoMask_valid; /**< Must be set to true if deleteClockInfoMask is being passed */ qmiLocDeleteClockInfoMaskT_v02 deleteClockInfoMask; - /**< Mask for the clock information assistance data that is to be deleted. \n - Valid values: \n - - 0x00000001 -- DELETE_CLOCK_INFO_TIME_EST \n - - 0x00000002 -- DELETE_CLOCK_INFO_FREQ_EST \n - - 0x00000004 -- DELETE_CLOCK_INFO_WEEK_NUMBER \n - - 0x00000008 -- DELETE_CLOCK_INFO_RTC_TIME \n - - 0x00000010 -- DELETE_CLOCK_INFO_TIME_TRANSFER \n - - 0x00000020 -- DELETE_CLOCK_INFO_GPSTIME_EST \n - - 0x00000040 -- DELETE_CLOCK_INFO_GLOTIME_EST \n - - 0x00000080 -- DELETE_CLOCK_INFO_GLODAY_NUMBER \n - - 0x00000100 -- DELETE_CLOCK_INFO_GLO4YEAR_NUMBER \n - - 0x00000200 -- DELETE_CLOCK_INFO_GLO_RF_GRP_DELAY \n - - 0x00000400 -- DELETE_CLOCK_INFO_DISABLE_TT + /**< Mask for the clock information assistance data that is to be deleted. + + Valid values: + \begin{itemize1} + \item 0x00000001 -- DELETE_CLOCK_INFO_TIME_EST + \item 0x00000002 -- DELETE_CLOCK_INFO_FREQ_EST + \item 0x00000004 -- DELETE_CLOCK_INFO_WEEK_NUMBER + \item 0x00000008 -- DELETE_CLOCK_INFO_RTC_TIME + \item 0x00000010 -- DELETE_CLOCK_INFO_TIME_TRANSFER + \item 0x00000020 -- DELETE_CLOCK_INFO_GPSTIME_EST + \item 0x00000040 -- DELETE_CLOCK_INFO_GLOTIME_EST + \item 0x00000080 -- DELETE_CLOCK_INFO_GLODAY_NUMBER + \item 0x00000100 -- DELETE_CLOCK_INFO_GLO4YEAR_NUMBER + \item 0x00000200 -- DELETE_CLOCK_INFO_GLO_RF_GRP_DELAY + \item 0x00000400 -- DELETE_CLOCK_INFO_DISABLE_TT + \vspace{-0.18in} \end{itemize1} */ }qmiLocDeleteAssistDataReqMsgT_v02; /* Message */ /** @@ -3720,14 +4345,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Delete Assist Data request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocDeleteAssistDataIndMsgT_v02; /* Message */ /** @@ -3762,14 +4389,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Set XTRA-T Session Control request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetXtraTSessionControlIndMsgT_v02; /* Message */ /** @@ -3794,14 +4423,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Get XTRA-T Session Control request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -3824,8 +4455,7 @@ typedef struct { uint32_t wifiPositionTime; /**< Common counter (typically, the number of milliseconds since bootup). This field is only to be provided if the modem and host processors are - synchronized. \n - - Type: Unsigned integer */ + synchronized. */ }qmiLocWifiFixTimeStructT_v02; /* Type */ /** @} @@ -3869,12 +4499,10 @@ typedef struct { uint16_t hepe; /**< WiFi position HEPE.\n - - Type: Unsigned integer \n - Units: Meters */ uint8_t numApsUsed; - /**< Number of Access Points (AP) used to generate a fix. \n - - Type: Unsigned integer */ + /**< Number of Access Points (AP) used to generate a fix. */ qmiLocWifiFixErrorCodeEnumT_v02 fixErrorCode; /**< WiFi position error code; set to 0 if the fix succeeds. This position @@ -3882,14 +4510,16 @@ typedef struct { the error code provided by the WiFi positioning system can be provided here. - Valid values: \n - - 0x00000000 -- ERROR_SUCCESS \n - - 0x00000001 -- ERROR_WIFI_NOT_AVAILABLE \n - - 0x00000002 -- ERROR_NO_AP_FOUND \n - - 0x00000003 -- ERROR_UNAUTHORIZED \n - - 0x00000004 -- ERROR_SERVER_UNAVAILABLE \n - - 0x00000005 -- ERROR_LOCATION_CANNOT_BE_DETERMINED \n - - 0x00000006 -- ERROR_UNKNOWN + Valid values: + \begin{itemize1} + \item 0x00000000 -- ERROR_SUCCESS + \item 0x00000001 -- ERROR_WIFI_NOT_AVAILABLE + \item 0x00000002 -- ERROR_NO_AP_FOUND + \item 0x00000003 -- ERROR_UNAUTHORIZED + \item 0x00000004 -- ERROR_SERVER_UNAVAILABLE + \item 0x00000005 -- ERROR_LOCATION_CANNOT_BE_DETERMINED + \item 0x00000006 -- ERROR_UNKNOWN + \vspace{-0.18in} \end{itemize1} */ }qmiLocWifiFixPosStructT_v02; /* Type */ /** @@ -3914,16 +4544,15 @@ typedef struct { int32_t rssi; /**< Receive signal strength indicator.\n - - Type: Signed integer \n - Units: dBm (offset with +100 dB) */ uint16_t channel; - /**< WiFi channel on which a beacon was received. \n - - Type: Unsigned integer */ + /**< WiFi channel on which a beacon was received. */ qmiLocWifiApQualifierMaskT_v02 apQualifier; /**< A bitmask of Boolean qualifiers for APs. - All unused bits in this mask must be set to 0. \n + All unused bits in this mask must be set to 0. + Valid values: \n - 0x01 -- BEING_USED \n - 0x02 -- HIDDEN_SSID \n @@ -3966,12 +4595,14 @@ typedef struct { qmiLocReliabilityEnumT_v02 horizontalReliability; /**< Specifies the reliability of the horizontal position. - Valid values: \n - - 0x00000000 -- eQMI_LOC_RELIABILITY_NOT_SET \n - - 0x00000001 -- eQMI_LOC_RELIABILITY_VERY_LOW \n - - 0x00000002 -- eQMI_LOC_RELIABILITY_LOW \n - - 0x00000003 -- eQMI_LOC_RELIABILITY_MEDIUM \n - - 0x00000004 -- eQMI_LOC_RELIABILITY_HIGH + Valid values: + \begin{itemize1} + \item 0x00000000 -- eQMI_LOC_RELIABILITY_NOT_SET + \item 0x00000001 -- eQMI_LOC_RELIABILITY_VERY_LOW + \item 0x00000002 -- eQMI_LOC_RELIABILITY_LOW + \item 0x00000003 -- eQMI_LOC_RELIABILITY_MEDIUM + \item 0x00000004 -- eQMI_LOC_RELIABILITY_HIGH + \vspace{-0.18in} \end{itemize1} */ }qmiLocInjectWifiPositionReqMsgT_v02; /* Message */ /** @@ -3989,14 +4620,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Inject WiFi Position request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocInjectWifiPositionIndMsgT_v02; /* Message */ /** @@ -4028,9 +4661,11 @@ typedef struct { qmiLocWifiStatusEnumT_v02 wifiStatus; /**< WiFi status information. - Valid values: \n - - 0x00000001 -- WIFI_STATUS_AVAILABLE \n - - 0x00000002 -- WIFI_STATUS_UNAVAILABLE + Valid values: + \begin{itemize1} + \item 0x00000001 -- WIFI_STATUS_AVAILABLE + \item 0x00000002 -- WIFI_STATUS_UNAVAILABLE + \vspace{-0.18in} \end{itemize1} */ }qmiLocNotifyWifiStatusReqMsgT_v02; /* Message */ /** @@ -4048,14 +4683,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Notify WiFi Status request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocNotifyWifiStatusIndMsgT_v02; /* Message */ /** @@ -4080,14 +4717,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Get Registered Events request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -4096,21 +4735,23 @@ typedef struct { qmiLocEventRegMaskT_v02 eventRegMask; /**< Event registration mask. - Valid bitmasks: \n - - 0x00000001 -- POSITION_REPORT \n - - 0x00000002 -- GNSS_SV_INFO \n - - 0x00000004 -- NMEA \n - - 0x00000008 -- NI_NOTIFY_VERIFY_REQ \n - - 0x00000010 -- INJECT_TIME_REQ \n - - 0x00000020 -- INJECT_PREDICTED_ORBITS_REQ \n - - 0x00000040 -- INJECT_POSITION_REQ \n - - 0x00000080 -- ENGINE_STATE \n - - 0x00000100 -- FIX_SESSION_STATE \n - - 0x00000200 -- WIFI_REQ \n - - 0x00000400 -- SENSOR_STREAMING_READY_STATUS \n - - 0x00000800 -- TIME_SYNC_REQ \n - - 0x00001000 -- SET_SPI_STREAMING_REPORT \n - - 0x00002000 -- LOCATION_SERVER__CONNECTION_REQ + Valid bitmasks: + \begin{itemize1} + \item 0x00000001 -- POSITION_REPORT + \item 0x00000002 -- GNSS_SV_INFO + \item 0x00000004 -- NMEA + \item 0x00000008 -- NI_NOTIFY_VERIFY_REQ + \item 0x00000010 -- INJECT_TIME_REQ + \item 0x00000020 -- INJECT_PREDICTED_ORBITS_REQ + \item 0x00000040 -- INJECT_POSITION_REQ + \item 0x00000080 -- ENGINE_STATE + \item 0x00000100 -- FIX_SESSION_STATE + \item 0x00000200 -- WIFI_REQ + \item 0x00000400 -- SENSOR_STREAMING_READY_STATUS + \item 0x00000800 -- TIME_SYNC_REQ + \item 0x00001000 -- SET_SPI_STREAMING_REPORT + \item 0x00002000 -- LOCATION_SERVER_CONNECTION_REQ + \vspace{-0.18in} \end{itemize1} */ }qmiLocGetRegisteredEventsIndMsgT_v02; /* Message */ /** @@ -4148,12 +4789,14 @@ typedef struct { qmiLocOperationModeEnumT_v02 operationMode; /**< Preferred operation mode. - Valid values: \n - - 0x00000001 -- OPER_MODE_DEFAULT \n - - 0x00000002 -- OPER_MODE_MSB \n - - 0x00000003 -- OPER_MODE_MSA \n - - 0x00000004 -- OPER_MODE_STANDALONE \n - - 0x00000005 -- OPER_MODE_CELL_ID + Valid values: + \begin{itemize1} + \item 0x00000001 -- OPER_MODE_DEFAULT + \item 0x00000002 -- OPER_MODE_MSB + \item 0x00000003 -- OPER_MODE_MSA + \item 0x00000004 -- OPER_MODE_STANDALONE + \item 0x00000005 -- OPER_MODE_CELL_ID + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetOperationModeReqMsgT_v02; /* Message */ /** @@ -4173,14 +4816,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Set Operation Mode request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetOperationModeIndMsgT_v02; /* Message */ /** @@ -4204,14 +4849,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Get Operation Mode request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -4220,12 +4867,14 @@ typedef struct { qmiLocOperationModeEnumT_v02 operationMode; /**< Current operation mode. - Valid values: \n - - 0x00000001 -- OPER_MODE_DEFAULT \n - - 0x00000002 -- OPER_MODE_MSB \n - - 0x00000003 -- OPER_MODE_MSA \n - - 0x00000004 -- OPER_MODE_STANDALONE \n - - 0x00000005 -- OPER_MODE_CELL_ID + Valid values: + \begin{itemize1} + \item 0x00000001 -- OPER_MODE_DEFAULT + \item 0x00000002 -- OPER_MODE_MSB + \item 0x00000003 -- OPER_MODE_MSA + \item 0x00000004 -- OPER_MODE_STANDALONE + \item 0x00000005 -- OPER_MODE_CELL_ID + \vspace{-0.18in} \end{itemize1} */ }qmiLocGetOperationModeIndMsgT_v02; /* Message */ /** @@ -4242,16 +4891,17 @@ typedef struct { /* Mandatory */ /* Stationary Status */ uint8_t stationary; - /**< Whether the device is stationary:\n - - 0x00 (FALSE) -- Device is not stationary \n - - 0x01 (TRUE) -- Device is stationary */ + /**< Whether the device is stationary: + \begin{itemize1} + \item 0x00 (FALSE) -- Device is not stationary + \item 0x01 (TRUE) -- Device is stationary + \vspace{-0.18in} \end{itemize1} */ /* Optional */ /* Confidence */ uint8_t confidenceStationary_valid; /**< Must be set to true if confidenceStationary is being passed */ uint8_t confidenceStationary; /**< Confidence in the Stationary state expressed as a percentage.\n - - Type: Unsigned integer \n - Range: 0 to 100 */ }qmiLocSetSpiStatusReqMsgT_v02; /* Message */ /** @@ -4268,15 +4918,18 @@ typedef struct { /* Mandatory */ /* Status of SPI Status Request */ qmiLocStatusEnumT_v02 status; - /**< Status of the SPI Status request. \n - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + /**< Status of the SPI Status request. + + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetSpiStatusIndMsgT_v02; /* Message */ /** @@ -4286,6 +4939,8 @@ typedef struct { typedef uint8_t qmiLocSensorDataFlagMaskT_v02; #define QMI_LOC_SENSOR_DATA_FLAG_SIGN_REVERSAL_V02 ((qmiLocSensorDataFlagMaskT_v02)0x01) /**< Bitmask to specify that a sign reversal is required while interpreting the sensor data. */ +#define QMI_LOC_SENSOR_DATA_FLAG_SENSOR_TIME_IS_MODEM_TIME_V02 ((qmiLocSensorDataFlagMaskT_v02)0x02) /**< Bitmask to specify that the sensor time stamp is the same as the modem + time stamp. */ /** @addtogroup loc_qmi_aggregates @{ */ @@ -4294,26 +4949,22 @@ typedef struct { uint16_t timeOffset; /**< Sample time offset. This time offset must be relative to the sensor time of the first sample.\n - - Type: Unsigned integer \n - Units: Milliseconds */ float xAxis; /**< Sensor x-axis sample. \n - - Type: Floating point \n - Units Accelerometer: ( (meters)/(seconds^2) ) \n - - Units Gyrometer: ( (rads)/(seconds^2) ) */ + - Units Gyroscope: ( (rads)/(seconds^2) ) */ float yAxis; /**< Sensor y-axis sample. \n - - Type: Floating point \n - Units Accelerometer: ( (meters)/(seconds^2) ) \n - - Units Gyrometer: ( (rads)/(seconds^2) ) */ + - Units Gyroscope: ( (rads)/(seconds^2) ) */ float zAxis; /**< Sensor z-axis sample. \n - - Type: Floating point \n - Units Accelerometer: ( (meters)/(seconds^2) ) \n - - Units Gyrometer: ( (rads)/(seconds^2) ) */ + - Units Gyroscope: ( (rads)/(seconds^2) ) */ }qmiLoc3AxisSensorSampleStructT_v02; /* Type */ /** @} @@ -4327,16 +4978,16 @@ typedef struct { uint32_t timeOfFirstSample; /**< Denotes a full 32-bit time tag of the first (oldest) sample in this message. \n - - Type: Unsigned integer \n - Units: Milliseconds */ qmiLocSensorDataFlagMaskT_v02 flags; /**< Flags to indicate any deviation from the default measurement assumptions. All unused bits in this field must be set to 0. - Valid bitmasks: \n - - 0x01 -- SIGN REVERSAL - */ + Valid bitmasks: \begin{itemize1} + \item 0x01 -- SIGN_REVERSAL + \item 0X02 -- SENSOR_TIME_IS_MODEM_TIME + \vspace{-0.18in} \end{itemize1} */ uint32_t sensorData_len; /**< Must be set to # of elements in sensorData */ qmiLoc3AxisSensorSampleStructT_v02 sensorData[QMI_LOC_SENSOR_DATA_MAX_SAMPLES_V02]; @@ -4360,8 +5011,7 @@ typedef struct { uint32_t opaqueIdentifier; /**< An opaque identifier that is sent in by the client that will be echoed in the indication so the client can relate the indication to the - request. \n - - Type: Unsigned integer */ + request. */ /* Optional */ /* 3-Axis Accelerometer Data */ @@ -4370,10 +5020,10 @@ typedef struct { /**< \n Accelerometer sensor samples. */ /* Optional */ - /* 3-Axis Gyrometer Data */ + /* 3-Axis Gyroscope Data */ uint8_t threeAxisGyroData_valid; /**< Must be set to true if threeAxisGyroData is being passed */ qmiLoc3AxisSensorSampleListStructT_v02 threeAxisGyroData; - /**< \n Gyrometer sensor samples. */ + /**< \n Gyroscope sensor samples. */ }qmiLocInjectSensorDataReqMsgT_v02; /* Message */ /** @} @@ -4391,36 +5041,37 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Inject Sensor Data request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ /* Opaque Identifier */ uint8_t opaqueIdentifier_valid; /**< Must be set to true if opaqueIdentifier is being passed */ uint32_t opaqueIdentifier; - /**< An opaque identifier that was sent in by the client echoed - so the client can relate the indication to the request. \n - - Type: Unsigned integer */ + /**< Opaque identifier that was sent in by the client echoed + so the client can relate the indication to the request. */ /* Optional */ /* Accelerometer Samples Accepted */ uint8_t threeAxisAccelSamplesAccepted_valid; /**< Must be set to true if threeAxisAccelSamplesAccepted is being passed */ uint8_t threeAxisAccelSamplesAccepted; - /**< This field lets the client know how many 3-axis accelerometer samples + /**< Lets the client know how many 3-axis accelerometer samples were accepted. */ /* Optional */ - /* Gyrometer Samples Accepted */ + /* Gyroscope Samples Accepted */ uint8_t threeAxisGyroSamplesAccepted_valid; /**< Must be set to true if threeAxisGyroSamplesAccepted is being passed */ uint8_t threeAxisGyroSamplesAccepted; - /**< This field lets the client know how many 3-axis gyrometer samples were + /**< Lets the client know how many 3-axis gyroscope samples were accepted. */ }qmiLocInjectSensorDataIndMsgT_v02; /* Message */ /** @@ -4437,29 +5088,26 @@ typedef struct { /* Reference Time Sync Counter */ uint32_t refCounter; /**< Must be set to the value that was sent to the control point when the - GNSS location engine requested time sync injection. \n - - Type: Unsigned integer */ + GNSS location engine requested time sync injection. */ /* Mandatory */ /* Sensor Receive Time */ uint32_t sensorProcRxTime; - /**< The value of the sensor time when the control point received the + /**< Value of the sensor time when the control point received the Time Sync Inject request from the GNSS location engine. Must be monotonically increasing, jitter @latexonly $\leq$ @endlatexonly 1 millisecond, never stopping until the process is rebooted.\n - - Type: Unsigned integer \n - Units: Milliseconds */ /* Mandatory */ /* Sensor Transmit Time */ uint32_t sensorProcTxTime; - /**< The value of the sensor time when the control point injects this message + /**< Value of the sensor time when the control point injects this message for use by the GNSS location engine. Must be monotonically increasing, jitter @latexonly $\leq$ @endlatexonly 1 millisecond, never stopping until the process is rebooted.\n - - Type: Unsigned integer \n - Units: Milliseconds */ }qmiLocInjectTimeSyncDataReqMsgT_v02; /* Message */ /** @@ -4477,14 +5125,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Inject Time Sync Data request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocInjectTimeSyncDataIndMsgT_v02; /* Message */ /** @@ -4524,14 +5174,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Get Cradle Mount Configuration request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -4540,10 +5192,12 @@ typedef struct { qmiLocCradleMountStateEnumT_v02 cradleMountState; /**< Cradle Mount state set by the control point. - Valid values: \n - - 0x00000000 -- CRADLE_STATE_NOT_MOUNTED \n - - 0x00000001 -- CRADLE_STATE_MOUNTED \n - - 0x00000002 -- CRADLE_STATE_UNKNOWN + Valid values: + \begin{itemize1} + \item 0x00000000 -- CRADLE_STATE_NOT_MOUNTED + \item 0x00000001 -- CRADLE_STATE_MOUNTED + \item 0x00000002 -- CRADLE_STATE_UNKNOWN + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -4551,7 +5205,6 @@ typedef struct { uint8_t confidenceCradleMountState_valid; /**< Must be set to true if confidenceCradleMountState is being passed */ uint8_t confidenceCradleMountState; /**< Confidence of the Cradle Mount state expressed as a percentage.\n - - Type: Unsigned integer \n - Range: 0 to 100 */ }qmiLocGetCradleMountConfigIndMsgT_v02; /* Message */ /** @@ -4570,17 +5223,18 @@ typedef struct { qmiLocCradleMountStateEnumT_v02 cradleMountState; /**< Cradle Mount state set by the control point. - Valid values: \n - - 0x00000000 -- CRADLE_STATE_NOT_MOUNTED \n - - 0x00000001 -- CRADLE_STATE_MOUNTED \n - - 0x00000002 -- CRADLE_STATE_UNKNOWN */ + Valid values: + \begin{itemize1} + \item 0x00000000 -- CRADLE_STATE_NOT_MOUNTED + \item 0x00000001 -- CRADLE_STATE_MOUNTED + \item 0x00000002 -- CRADLE_STATE_UNKNOWN + \vspace{-0.18in} \end{itemize1} */ /* Optional */ /* Cradle Mount Confidence */ uint8_t confidenceCradleMountState_valid; /**< Must be set to true if confidenceCradleMountState is being passed */ uint8_t confidenceCradleMountState; /**< Confidence in the Cradle Mount state expressed as a percentage.\n - - Type: Unsigned integer \n - Range: 0 to 100 */ }qmiLocSetCradleMountConfigReqMsgT_v02; /* Message */ /** @@ -4599,14 +5253,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Set Cradle Mount Configuration request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetCradleMountConfigIndMsgT_v02; /* Message */ /** @@ -4646,14 +5302,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Get External Power Configuration request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -4662,10 +5320,12 @@ typedef struct { qmiLocExternalPowerConfigEnumT_v02 externalPowerState; /**< Power state; injected by the control point. - Valid values: \n - - 0x00000000 -- EXTERNAL_POWER_NOT_CONNECTED \n - - 0x00000001 -- EXTERNAL_POWER_CONNECTED \n - - 0x00000002 -- EXTERNAL_POWER_UNKNOWN + Valid values: + \begin{itemize1} + \item 0x00000000 -- EXTERNAL_POWER_NOT_CONNECTED + \item 0x00000001 -- EXTERNAL_POWER_CONNECTED + \item 0x00000002 -- EXTERNAL_POWER_UNKNOWN + \vspace{-0.18in} \end{itemize1} */ }qmiLocGetExternalPowerConfigIndMsgT_v02; /* Message */ /** @@ -4684,10 +5344,12 @@ typedef struct { qmiLocExternalPowerConfigEnumT_v02 externalPowerState; /**< Power state; injected by the control point. - Valid values: \n - - 0x00000000 -- EXTERNAL_POWER_NOT_CONNECTED \n - - 0x00000001 -- EXTERNAL_POWER_CONNECTED \n - - 0x00000002 -- EXTERNAL_POWER_UNKNOWN + Valid values: + \begin{itemize1} + \item 0x00000000 -- EXTERNAL_POWER_NOT_CONNECTED + \item 0x00000001 -- EXTERNAL_POWER_CONNECTED + \item 0x00000002 -- EXTERNAL_POWER_UNKNOWN + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetExternalPowerConfigReqMsgT_v02; /* Message */ /** @@ -4706,14 +5368,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Set External Power Configuration request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetExternalPowerConfigIndMsgT_v02; /* Message */ /** @@ -4752,9 +5416,11 @@ typedef struct { */ char apnName[QMI_LOC_MAX_APN_NAME_LENGTH_V02 + 1]; - /**< APN name. \n - - Type: NULL-terminated string \n - - Maximum string length (including NULL terminator): 101 + /**< APN name. + \begin{itemize1} + \item Type: NULL-terminated string + \item Maximum string length (including NULL terminator): 101 + \vspace{-0.18in} \end{itemize1} */ }qmiLocApnProfilesStructT_v02; /* Type */ /** @@ -4788,8 +5454,7 @@ typedef struct { /* Connection Handle */ uint32_t connHandle; /**< Connection handle that the service specified in the - Location Server Connection request event. \n - - Type: Unsigned integer */ + Location Server Connection request event. */ /* Mandatory */ /* Request Type */ @@ -4838,14 +5503,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Inform Location Server Connection Status request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocInformLocationServerConnStatusIndMsgT_v02; /* Message */ /** @@ -4880,6 +5547,9 @@ typedef enum { @} */ +typedef uint32_t qmiLocLppConfigMaskT_v02; +#define QMI_LOC_LPP_CONFIG_ENABLE_USER_PLANE_V02 ((qmiLocLppConfigMaskT_v02)0x00000001) /**< Enable user plane configuration for LTE Positioning Profile (LPP). */ +#define QMI_LOC_LPP_CONFIG_ENABLE_CONTROL_PLANE_V02 ((qmiLocLppConfigMaskT_v02)0x00000002) /**< Enable control plane configuration for LPP. */ /** @addtogroup loc_qmi_messages @{ */ @@ -4891,9 +5561,11 @@ typedef struct { /* SUPL Security */ uint8_t suplSecurity_valid; /**< Must be set to true if suplSecurity is being passed */ uint8_t suplSecurity; - /**< Indicates whether SUPL security is enabled. \n - - 0x01 (TRUE) -- SUPL security is enabled \n - - 0x00 (FALSE) -- SUPL security is disabled */ + /**< Indicates whether SUPL security is enabled. + \begin{itemize1} + \item 0x01 (TRUE) -- SUPL security is enabled + \item 0x00 (FALSE) -- SUPL security is disabled + \vspace{-0.18in} \end{itemize1} */ /* Optional */ /* VX Version */ @@ -4901,9 +5573,11 @@ typedef struct { qmiLocVxVersionEnumT_v02 vxVersion; /**< VX version. - Valid values: \n - - 0x00000001 -- VX_VERSION_V1_ONLY \n - - 0x00000002 -- VX_VERSION_V2_ONLY + Valid values: + \begin{itemize1} + \item 0x00000001 -- VX_VERSION_V1_ONLY + \item 0x00000002 -- VX_VERSION_V2_ONLY + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -4916,15 +5590,29 @@ typedef struct { - 0x00000001 -- SUPL_VERSION_1_0 \n - 0x00000002 -- SUPL_VERSION_2_0 */ + + /* Optional */ + /* LPP Configuration */ + uint8_t lppConfig_valid; /**< Must be set to true if lppConfig is being passed */ + qmiLocLppConfigMaskT_v02 lppConfig; + /**< LTE Positioning Profile (LPP) configuration. + + Valid bitmasks: + \begin{itemize1} + \item 0x00000001 -- LPP_CONFIG_ENABLE_USER_PLANE + \item 0x00000002 -- LPP_CONFIG_ENABLE_CONTROL_PLANE + \vspace{-0.18in} \end{itemize1} + */ }qmiLocSetProtocolConfigParametersReqMsgT_v02; /* Message */ /** @} */ typedef uint64_t qmiLocProtocolConfigParamMaskT_v02; -#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_SECURITY_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x00000001) /**< Mask for the SUPL security configuration parameter. */ -#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_VX_VERSION_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x00000002) /**< Mask for the VX version configuration parameter. */ -#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_VERSION_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x00000004) /**< Mask for the SUPL version configuration parameter. */ +#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_SECURITY_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000001ull) /**< Mask for the SUPL security configuration parameter. */ +#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_VX_VERSION_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000002ull) /**< Mask for the VX version configuration parameter. */ +#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_VERSION_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000004ull) /**< Mask for the SUPL version configuration parameter. */ +#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_LPP_CONFIG_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000008ull) /**< Mask for the LPP configuration parameter. */ /** @addtogroup loc_qmi_messages @{ */ @@ -4937,14 +5625,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Set Configuration Parameters request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -4955,10 +5645,13 @@ typedef struct { not successful, this field will identify the parameters that were not set successfully. - Valid bitmasks: \n - - 0x0000000000000001 -- CONFIG_PARAM_MASK_SUPL_SECURITY \n - - 0x0000000000000002 -- CONFIG_PARAM_MASK_VX_VERSION \n - - 0x0000000000000004 -- CONFIG_PARAM_MASK_SUPL_VERSION + Valid bitmasks: + \begin{itemize1} + \item 0x0000000000000001 -- CONFIG_PARAM_MASK_SUPL_SECURITY + \item 0x0000000000000002 -- CONFIG_PARAM_MASK_VX_VERSION + \item 0x0000000000000004 -- CONFIG_PARAM_MASK_SUPL_VERSION + \item 0x0000000000000008 -- CONFIG_PARAM_MASK_LPP_CONFIG + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetProtocolConfigParametersIndMsgT_v02; /* Message */ /** @@ -4977,10 +5670,13 @@ typedef struct { qmiLocProtocolConfigParamMaskT_v02 getProtocolConfigParamMask; /**< Mask denoting the configuration parameters to be retrieved. - Valid bitmasks: \n - - 0x0000000000000001 -- CONFIG_PARAM_MASK_SUPL_SECURITY \n - - 0x0000000000000002 -- CONFIG_PARAM_MASK_VX_VERSION \n - - 0x0000000000000004 -- CONFIG_PARAM_MASK_SUPL_VERSION + Valid bitmasks: + \begin{itemize1} + \item 0x0000000000000001 -- CONFIG_PARAM_MASK_SUPL_SECURITY + \item 0x0000000000000002 -- CONFIG_PARAM_MASK_VX_VERSION + \item 0x0000000000000004 -- CONFIG_PARAM_MASK_SUPL_VERSION + \item 0x0000000000000008 -- CONFIG_PARAM_MASK_LPP_CONFIG + \vspace{-0.18in} \end{itemize1} */ }qmiLocGetProtocolConfigParametersReqMsgT_v02; /* Message */ /** @@ -4999,23 +5695,27 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Get Configuration Parameters request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ /* SUPL Security */ uint8_t suplSecurity_valid; /**< Must be set to true if suplSecurity is being passed */ uint8_t suplSecurity; - /**< Indicates whether SUPL security is enabled. \n - - 0x01 (TRUE) -- SUPL security is enabled \n - - 0x00 (FALSE) -- SUPL security is disabled */ + /**< Indicates whether SUPL security is enabled. + \begin{itemize1} + \item 0x01 (TRUE) -- SUPL security is enabled + \item 0x00 (FALSE) -- SUPL security is disabled + \vspace{-0.18in} \end{itemize1} */ /* Optional */ /* VX Version */ @@ -5023,9 +5723,11 @@ typedef struct { qmiLocVxVersionEnumT_v02 vxVersion; /**< VX version. - Valid values: \n - - 0x00000001 -- VX_VERSION_V1_ONLY \n - - 0x00000002 -- VX_VERSION_V2_ONLY + Valid values: + \begin{itemize1} + \item 0x00000001 -- VX_VERSION_V1_ONLY + \item 0x00000002 -- VX_VERSION_V2_ONLY + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -5038,6 +5740,19 @@ typedef struct { - 0x00000001 -- SUPL_VERSION_1_0 \n - 0x00000002 -- SUPL_VERSION_2_0 */ + + /* Optional */ + /* LPP Configuration */ + uint8_t lppConfig_valid; /**< Must be set to true if lppConfig is being passed */ + qmiLocLppConfigMaskT_v02 lppConfig; + /**< LTE Positioning Profile (LPP) configuration. + + Valid bitmasks: + \begin{itemize1} + \item 0x00000001 -- LPP_CONFIG_ENABLE_USER_PLANE + \item 0x00000002 -- LPP_CONFIG_ENABLE_CONTROL_PLANE + \vspace{-0.18in} \end{itemize1} + */ }qmiLocGetProtocolConfigParametersIndMsgT_v02; /* Message */ /** @} @@ -5075,15 +5790,17 @@ typedef struct { /**< Controls how sensors are used to aid heading and positioning performance. - Valid values:\n - - 0x00000000 -- SENSORS USE ENABLED: \n - Sensors data is to be requested whenever a position request is - received. If sensors data is injected, the GNSS location engine - attempts to improve the heading and positioning performance using - sensors. This is the default. \n - - 0x00000001 -- SENSORS USE DISABLED: \n - Inertial sensors are not to be used to aid in heading and - position improvement. + Valid values: + \begin{itemize1} + \item 0x00000000 -- SENSORS USE ENABLED: \n + Sensors data is to be requested whenever a position request is + received. If sensors data is injected, the GNSS location engine + attempts to improve the heading and positioning performance using + sensors. This is the default. + \item 0x00000001 -- SENSORS USE DISABLED: \n + Inertial sensors are not to be used to aid in heading and + position improvement. + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetSensorControlConfigReqMsgT_v02; /* Message */ /** @@ -5101,14 +5818,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Set Sensor Control Configuration request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetSensorControlConfigIndMsgT_v02; /* Message */ /** @@ -5132,14 +5851,16 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Get Sensors Control Configuration request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -5149,21 +5870,29 @@ typedef struct { /**< Controls how sensors are used to aid the heading and positioning performance. - Valid values:\n - - 0x00000000 -- SENSORS USE ENABLED: \n - Sensors data is to be requested whenever a position request is - received. If sensors data is injected, the GNSS location engine - attempts to improve the heading and positioning performance using - sensors. This is the default. \n - - 0x00000001 -- SENSORS USE DISABLED: \n - Inertial sensors are not to be used to aid in the heading and - position improvement. + Valid values: + \begin{itemize1} + \item 0x00000000 -- SENSORS USE ENABLED: \n + Sensors data is to be requested whenever a position request is + received. If sensors data is injected, the GNSS location engine + attempts to improve the heading and positioning performance using + sensors. This is the default. + \item 0x00000001 -- SENSORS USE DISABLED: \n + Inertial sensors are not to be used to aid in the heading and + position improvement. + \vspace{-0.18in} \end{itemize1} */ }qmiLocGetSensorControlConfigIndMsgT_v02; /* Message */ /** @} */ +typedef uint32_t qmiLocSensorPropertiesMaskT_v02; +#define QMI_LOC_SENSOR_PROPERTIES_MASK_GYRO_BIAS_VARIANCE_RANDOM_WALK_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000001) /**< Denotes the gyro bias variance random walk parameter. */ +#define QMI_LOC_SENSOR_PROPERTIES_MASK_VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000002) /**< Denotes the velocity random walk spectral density parameter. */ +#define QMI_LOC_SENSOR_PROPERTIES_MASK_ACCELERATION_RANDOM_WALK_SPECTRAL_DENSITY_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000004) /**< Denotes the acceleration random walk spectral density parameter. */ +#define QMI_LOC_SENSOR_PROPERTIES_MASK_ANGLE_RANDOM_WALK_SPECTRAL_DENSITY_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000008) /**< Denotes the angle random walk spectral density parameter. */ +#define QMI_LOC_SENSOR_PROPERTIES_MASK_RATE_RANDOM_WALK_SPECTRAL_DENSITY_V02 ((qmiLocSensorPropertiesMaskT_v02)0x00000010) /**< Denotes the rate random walk spectral density parameter. */ /** @addtogroup loc_qmi_messages @{ */ @@ -5174,14 +5903,62 @@ typedef struct { typedef struct { /* Optional */ - /* Gyro Bias Variance */ + /* Gyro Bias Random Walk Variance */ uint8_t gyroBiasVarianceRandomWalk_valid; /**< Must be set to true if gyroBiasVarianceRandomWalk is being passed */ float gyroBiasVarianceRandomWalk; - /**< Specifies the gyro bias random walk parameter as a positive - floating-point value. This value does not have any internal defaults. + /**< Specifies the gyro bias random walk variance parameter as a positive + floating-point value. This value has internal default value 1.0e-5 radian^2/second^4. The gyro bias variance random walk parameter is derived from either the sensors data sheet or a sensors conformance test. \n - - Units: radians^2/second^4 + - Units: Radians^2/seconds^4 + + */ + + /* Optional */ + /* Velocity Random Walk Spectral Density */ + uint8_t velocityRandomWalkSpectralDensity_valid; /**< Must be set to true if velocityRandomWalkSpectralDensity is being passed */ + float velocityRandomWalkSpectralDensity; + /**< Specifies the velocity random walk spectral density parameter as a positive + floating-point value. This value does not have any internal defaults. + The velocity random walk spectral density parameter is derived from either the + sensors data sheet or a sensors conformance test. \n + - Units: Meters/seconds^2/Hertz^0.5 + + */ + + /* Optional */ + /* Acceleration Random Walk Spectral Density */ + uint8_t accelerationRandomWalkSpectralDensity_valid; /**< Must be set to true if accelerationRandomWalkSpectralDensity is being passed */ + float accelerationRandomWalkSpectralDensity; + /**< Specifies the acceleration random walk spectral density parameter as a positive + floating-point value. This value does not have any internal defaults. + The acceleration random walk spectral density parameter is derived from either the + sensors data sheet or a sensors conformance test. \n + - Units: Meters/seconds^3/Hertz^0.5 + + */ + + /* Optional */ + /* Angle Random Walk Spectral Density */ + uint8_t angleRandomWalkSpectralDensity_valid; /**< Must be set to true if angleRandomWalkSpectralDensity is being passed */ + float angleRandomWalkSpectralDensity; + /**< Specifies the angle random walk spectral density parameter as a positive + floating-point value. This value does not have any internal defaults. + The angle random walk spectral density parameter is derived from either the + sensors data sheet or a sensors conformance test. \n + - Units: Radians/seconds/Hertz^0.5 + + */ + + /* Optional */ + /* Rate Random Walk Spectral Density */ + uint8_t rateRandomWalkSpectralDensity_valid; /**< Must be set to true if rateRandomWalkSpectralDensity is being passed */ + float rateRandomWalkSpectralDensity; + /**< Specifies the rate random walk spectral density parameter as a positive + floating-point value. This value does not have any internal defaults. + The rate random walk spectral density parameter is derived from either the + sensors data sheet or a sensors conformance test. \n + - Units: Radians/seconds^2/Hertz^0.5 */ }qmiLocSetSensorPropertiesReqMsgT_v02; /* Message */ @@ -5203,25 +5980,64 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Set Sensor Properties request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \item 0x00000007 -- CONFIG_NOT_SUPPORTED + \vspace{-0.18in} \end{itemize1} + */ + + /* Optional */ + /* Failed Set Sensor Properties */ + uint8_t failedSensorPropertiesMask_valid; /**< Must be set to true if failedSensorPropertiesMask is being passed */ + qmiLocSensorPropertiesMaskT_v02 failedSensorPropertiesMask; + /**< This field will be sent only if the status is not a success. + Identifies the parameters that were not set successfully. + + Valid bitmasks: + \begin{itemize1} + \item 0x00000001 -- GYRO_BIAS_VARIANCE_RANDOM_WALK + \item 0x00000002 -- VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY + \item 0x00000004 -- ACCELERATION_RANDOM_WALK_SPECTRAL_DENSITY + \item 0x00000008 -- ANGLE_RANDOM_WALK_SPECTRAL_DENSITY + \item 0x00000010 -- RATE_RANDOM_WALK_SPECTRAL_DENSITY + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetSensorPropertiesIndMsgT_v02; /* Message */ /** @} */ -/* - * qmiLocGetSensorPropertiesReqMsgT is empty - * typedef struct { - * }qmiLocGetSensorPropertiesReqMsgT_v02; - */ +/** @addtogroup loc_qmi_messages + @{ + */ +/** Request Message; Retrieves the current sensor properties. */ +typedef struct { + + /* Mandatory */ + /* Sensor Properties Config Parameters */ + qmiLocSensorPropertiesMaskT_v02 getSensorPropertiesMask; + /**< Mask denoting the sensor properties parameters to be retrieved. + + Valid bitmasks: + \begin{itemize1} + \item 0x00000001 -- GYRO_BIAS_VARIANCE_RANDOM_WALK + \item 0x00000002 -- VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY + \item 0x00000004 -- ACCELERATION_RANDOM_WALK_SPECTRAL_DENSITY + \item 0x00000008 -- ANGLE_RANDOM_WALK_SPECTRAL_DENSITY + \item 0x00000010 -- RATE_RANDOM_WALK_SPECTRAL_DENSITY + \vspace{-0.18in} \end{itemize1} + */ +}qmiLocGetSensorPropertiesReqMsgT_v02; /* Message */ +/** + @} + */ /** @addtogroup loc_qmi_messages @{ @@ -5234,25 +6050,76 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Get Sensors Properties request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \item 0x00000007 -- CONFIG_NOT_SUPPORTED + \vspace{-0.18in} \end{itemize1} */ /* Optional */ - /* Gyro Bias Variance */ + /* Gyro Bias Random Walk Variance */ uint8_t gyroBiasVarianceRandomWalk_valid; /**< Must be set to true if gyroBiasVarianceRandomWalk is being passed */ float gyroBiasVarianceRandomWalk; - /**< Specifies the gyro bias random walk parameter as a positive - floating-point value. This value does not have any internal defaults. + /**< Specifies the gyro bias random walk variance parameter as a positive + floating-point value. This value has internal default value 1.0e-5 radian^2/second^4. The gyro bias variance random walk parameter is derived from either the sensors data sheet or a sensors conformance test. \n - - Units: radians^2/seconds^4 + - Units: Radians^2/seconds^4 + + */ + + /* Optional */ + /* Velocity Random Walk Spectral Density */ + uint8_t velocityRandomWalkSpectralDensity_valid; /**< Must be set to true if velocityRandomWalkSpectralDensity is being passed */ + float velocityRandomWalkSpectralDensity; + /**< Specifies the velocity random walk spectral density parameter as a positive + floating-point value. This value does not have any internal defaults. + The velocity random walk spectral density parameter is derived from either the + sensors data sheet or a sensors conformance test. \n + - Units: Meters/seconds^2/Hertz^0.5 + + */ + + /* Optional */ + /* Acceleration Random Walk Spectral Density */ + uint8_t accelerationRandomWalkSpectralDensity_valid; /**< Must be set to true if accelerationRandomWalkSpectralDensity is being passed */ + float accelerationRandomWalkSpectralDensity; + /**< Specifies the acceleration random walk spectral density parameter as a positive + floating-point value. This value does not have any internal defaults. + The acceleration random walk spectral density parameter is derived from either the + sensors data sheet or a sensors conformance test. \n + - Units: Meters/seconds^3/Hertz^0.5 + + */ + + /* Optional */ + /* Angle Random Walk Spectral Density */ + uint8_t angleRandomWalkSpectralDensity_valid; /**< Must be set to true if angleRandomWalkSpectralDensity is being passed */ + float angleRandomWalkSpectralDensity; + /**< Specifies the angle random walk spectral density parameter as a positive + floating-point value. This value does not have any internal defaults. + The angle random walk spectral density parameter is derived from either the + sensors data sheet or a sensors conformance test. \n + - Units: Radians/seconds/Hertz^0.5 + + */ + + /* Optional */ + /* Rate Random Walk Spectral Density */ + uint8_t rateRandomWalkSpectralDensity_valid; /**< Must be set to true if rateRandomWalkSpectralDensity is being passed */ + float rateRandomWalkSpectralDensity; + /**< Specifies the rate random walk spectral density parameter as a positive + floating-point value. This value does not have any internal defaults. + The rate random walk spectral density parameter is derived from either the + sensors data sheet or a sensors conformance test. \n + - Units: Radians/seconds^2/Hertz^0.5 */ }qmiLocGetSensorPropertiesIndMsgT_v02; /* Message */ @@ -5280,6 +6147,9 @@ typedef enum { @} */ +typedef uint32_t qmiLocSensorAlgorithmMaskT_v02; +#define QMI_LOC_SENSOR_ALGORITHM_MASK_DISABLE_INS_POSITIONING_FILTER_V02 ((qmiLocSensorAlgorithmMaskT_v02)0x00000001) /**< Inertial sensors are not to be used in Accelerometer-integrated fashion with + GNSS. They can still be used for aiding in heading improvements. */ /** @addtogroup loc_qmi_messages @{ */ @@ -5295,13 +6165,15 @@ typedef struct { This field is relevant only when sensors have been enabled using the sensors control configuration. - Valid values: \n - - 0x00000000 -- AUTO: \n - The GNSS location engine can decide when to request sensor data injection - based on internal criteria. This is the default. \n - - 0x00000001 -- FORCED: \n - The GNSS location engine must request use of sensors every time the GNSS - location engine turns on. + Valid values: + \begin{itemize1} + \item 0x00000000 -- AUTO: \n + The GNSS location engine can decide when to request sensor data + injection based on internal criteria. This is the default. + \item 0x00000001 -- FORCED: \n + The GNSS location engine must request use of sensors every time + the GNSS location engine turns on. + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -5316,7 +6188,7 @@ typedef struct { */ /* Optional */ - /* Gyrometer Sampling Specification */ + /* Gyroscope Sampling Specification */ uint8_t gyroSamplingSpec_valid; /**< Must be set to true if gyroSamplingSpec is being passed */ qmiLocSensorControlConfigSamplingSpecStructT_v02 gyroSamplingSpec; /**< \n Sets the nominal rate at which the GNSS location engine is to request @@ -5325,6 +6197,18 @@ typedef struct { However, the final control of the actual requested rate resides with the Sensors Manager Module/GNSS location engine. */ + + /* Optional */ + /* Algorithm Configuration */ + uint8_t algorithmConfig_valid; /**< Must be set to true if algorithmConfig is being passed */ + qmiLocSensorAlgorithmMaskT_v02 algorithmConfig; + /**< Sets which sensor algorithms are to be used when processing sensor data. + + Valid bitmasks: + \begin{itemize1} + \item 0x00000001 -- DISABLE_INS_POSITIONING_FILTER + \vspace{-0.18in} \end{itemize1} + */ }qmiLocSetSensorPerformanceControlConfigReqMsgT_v02; /* Message */ /** @} @@ -5334,6 +6218,7 @@ typedef uint32_t qmiLocSensorPerformanceControlConfigFailureMaskT_v02; #define QMI_LOC_SENSOR_PERFORMANCE_CONTROL_CONFIG_PARAM_MASK_PERFORMANCE_MODE_V02 ((qmiLocSensorPerformanceControlConfigFailureMaskT_v02)0x00000001) /**< Failed to set the performance mode. */ #define QMI_LOC_SENSOR_PERFORMANCE_CONTROL_CONFIG_PARAM_MASK_ACCEL_SAMPLING_SPEC_V02 ((qmiLocSensorPerformanceControlConfigFailureMaskT_v02)0x00000002) /**< Failed to set the accelerometer sampling specification. */ #define QMI_LOC_SENSOR_PERFORMANCE_CONTROL_CONFIG_PARAM_MASK_GYRO_SAMPLING_SPEC_V02 ((qmiLocSensorPerformanceControlConfigFailureMaskT_v02)0x00000004) /**< Failed to set the gyroscope sampling specification. */ +#define QMI_LOC_SENSOR_PERFORMANCE_CONTROL_CONFIG_PARAM_MASK_ALGORITHM_CONFIG_V02 ((qmiLocSensorPerformanceControlConfigFailureMaskT_v02)0x00000008) /**< Failed to set the algorithm configuration */ /** @addtogroup loc_qmi_messages @{ */ @@ -5344,15 +6229,18 @@ typedef struct { /* Mandatory */ /* Set Sensor Perf Control Config Status */ qmiLocStatusEnumT_v02 status; - /**< Status of the Set Sensor Performance Control Configuration request. \n - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + /**< Status of the Set Sensor Performance Control Configuration request. + + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -5360,11 +6248,15 @@ typedef struct { uint8_t failedConfiguration_valid; /**< Must be set to true if failedConfiguration is being passed */ qmiLocSensorPerformanceControlConfigFailureMaskT_v02 failedConfiguration; /**< This field is sent only if the status is not a success. - When sent, this field identifies which configuration failed. \n - Valid bitmasks: \n - - 0x0000000000000001 -- PERFORMANCE_MODE \n - - 0x0000000000000002 -- ACCEL_SAMPLING_SPEC \n - - 0x0000000000000004 -- GYRO_SAMPLING_SPEC + When sent, this field identifies which configuration failed. + + Valid bitmasks: + \begin{itemize1} + \item 0x00000001 -- PERFORMANCE_MODE + \item 0x00000002 -- ACCEL_SAMPLING_SPEC + \item 0x00000004 -- GYRO_SAMPLING_SPEC + \item 0x00000008 -- ALGORITHM_CONFIG + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetSensorPerformanceControlConfigIndMsgT_v02; /* Message */ /** @@ -5387,15 +6279,18 @@ typedef struct { /* Mandatory */ /* Get Sensor Perf Control Config Status */ qmiLocStatusEnumT_v02 status; - /**< Status of the Get Sensor Performance Control Configuration request. \n - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + /**< Status of the Get Sensor Performance Control Configuration request. + + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -5406,13 +6301,15 @@ typedef struct { This field is relevant only when sensors have been enabled using the sensor control configuration. - Valid values: \n - - 0x00000000 -- AUTO: \n - The GNSS location engine can decide when to request sensor data injection - based on internal criteria. This is the default. \n - - 0x0000001 -- FORCED: \n - The GNSS location engine must request use of the sensors every time the GNSS - location engine turns on. + Valid values: + \begin{itemize1} + \item 0x00000000 -- AUTO: \n + The GNSS location engine can decide when to request sensor data + injection based on internal criteria. This is the default. + \item 0x0000001 -- FORCED: \n + The GNSS location engine must request use of the sensors every time + the GNSS location engine turns on. + \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -5427,7 +6324,7 @@ typedef struct { */ /* Optional */ - /* Gyrometer Sampling Specification */ + /* Gyroscope Sampling Specification */ uint8_t gyroSamplingSpec_valid; /**< Must be set to true if gyroSamplingSpec is being passed */ qmiLocSensorControlConfigSamplingSpecStructT_v02 gyroSamplingSpec; /**< \n Sets the nominal rate at which the GNSS location engine is to request @@ -5436,6 +6333,18 @@ typedef struct { However, the final control of the actual requested rate resides with the Sensors Manager Module/GNSS location engine. */ + + /* Optional */ + /* Algorithm Configuration */ + uint8_t algorithmConfig_valid; /**< Must be set to true if algorithmConfig is being passed */ + qmiLocSensorAlgorithmMaskT_v02 algorithmConfig; + /**< Informs which sensor algorithms are currently set. + + Valid bitmasks: + \begin{itemize1} + \item 0x00000001 -- DISABLE_INS_POSITIONING_FILTER + \vspace{-0.18in} \end{itemize1} + */ }qmiLocGetSensorPerformanceControlConfigIndMsgT_v02; /* Message */ /** @} @@ -5444,24 +6353,23 @@ typedef struct { /** @addtogroup loc_qmi_messages @{ */ -/** Request Message; Inject a SUPL certificate to be used in AGNSS sessions. */ +/** Request Message; Injects a SUPL certificate to be used in AGNSS sessions. */ typedef struct { /* Mandatory */ - /* SUPL Certificate Id */ + /* SUPL Certificate ID */ uint8_t suplCertId; - /**< Certificate Id of the Supl Certificate - Type: Unsigned Integer - Units: Bytes - Range: 0-9 */ + /**< Certificate ID of the SUPL certificate. \n + - Units: Bytes \n + - Range: 0 to 9 */ /* Mandatory */ - /* SUPL certificate Data */ + /* SUPL Certificate Data */ uint32_t suplCertData_len; /**< Must be set to # of elements in suplCertData */ uint8_t suplCertData[QMI_LOC_MAX_SUPL_CERT_LENGTH_V02]; - /**< The supl Certificate contents - Type: Array of bytes. - - Maximum certificate size : 2000 bytes */ + /**< SUPL certificate contents. \n + - Type: Array of bytes. \n + - Maximum certificate size: 2000 bytes */ }qmiLocInjectSuplCertificateReqMsgT_v02; /* Message */ /** @} @@ -5470,22 +6378,24 @@ typedef struct { /** @addtogroup loc_qmi_messages @{ */ -/** Indication Message; Inject a SUPL certificate to be used in AGNSS sessions. */ +/** Indication Message; Injects a SUPL certificate to be used in AGNSS sessions. */ typedef struct { /* Mandatory */ - /* Supl Certificate Injection Status */ + /* SUPL Certificate Injection Status */ qmiLocStatusEnumT_v02 status; - /**< Status of the inject SUPL certificate request. \n + /**< Status of the Inject SUPL Certificate request. - Valid Values: - - 0x00000000 -- SUCCESS\n - - 0x00000001 -- GENERAL_FAILURE\n - - 0x00000002 -- UNSUPPORTED\n - - 0x00000003 -- INVALID_PARAMETER\n - - 0x00000004 -- ENGINE_BUSY\n - - 0x00000005 -- PHONE_OFFLINE\n - - 0x00000006 -- LOC_TIMEOUT\n + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocInjectSuplCertificateIndMsgT_v02; /* Message */ /** @@ -5495,19 +6405,18 @@ typedef struct { /** @addtogroup loc_qmi_messages @{ */ -/** Request Message; Delete a SUPL certificate. */ +/** Request Message; Deletes a SUPL certificate. */ typedef struct { /* Optional */ - /* SUPL Certificate Id */ + /* SUPL Certificate ID */ uint8_t suplCertId_valid; /**< Must be set to true if suplCertId is being passed */ uint8_t suplCertId; - /**< Certificate Id of the Supl Certificate to be deleted - Type: Unsigned Integer \n - Units: Bytes \n - Range: 0-9 \n - If suplCertId is not specified then - "all" supl certificates will be deleted. */ + /**< Certificate ID of the SUPL certificate to be deleted. \n + - Units: Bytes \n + - Range: 0 to 9 \n + If suplCertId is not specified, + all SUPL certificates are deleted. */ }qmiLocDeleteSuplCertificateReqMsgT_v02; /* Message */ /** @} @@ -5516,22 +6425,24 @@ typedef struct { /** @addtogroup loc_qmi_messages @{ */ -/** Indication Message; Delete a SUPL certificate. */ +/** Indication Message; Deletes a SUPL certificate. */ typedef struct { /* Mandatory */ - /* SUPL certifcate Deletion Status */ + /* SUPL Certificate Deletion Status */ qmiLocStatusEnumT_v02 status; - /**< Status of the delete SUPL certificate request. \n + /**< Status of the Delete SUPL Certificate request. - Valid Values: - - 0x00000000 -- SUCCESS\n - - 0x00000001 -- GENERAL_FAILURE\n - - 0x00000002 -- UNSUPPORTED\n - - 0x00000003 -- INVALID_PARAMETER\n - - 0x00000004 -- ENGINE_BUSY\n - - 0x00000005 -- PHONE_OFFLINE\n - - 0x00000006 -- LOC_TIMEOUT\n + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ }qmiLocDeleteSuplCertificateIndMsgT_v02; /* Message */ /** @@ -5539,12 +6450,12 @@ typedef struct { */ typedef uint32_t qmiLocPositionEngineConfigParamMaskT_v02; -#define QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_INJECTED_POSITION_CONTROL_V02 ((qmiLocPositionEngineConfigParamMaskT_v02)0x00000001) /**< This field denotes if the position engine uses the - injected position in direct position calculation. */ -#define QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_FILTER_SV_USAGE_V02 ((qmiLocPositionEngineConfigParamMaskT_v02)0x00000002) /**< This field denotes if the position engine filters the +#define QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_INJECTED_POSITION_CONTROL_V02 ((qmiLocPositionEngineConfigParamMaskT_v02)0x00000001) /**< Denotes whether the position engine uses the + injected position in a direct position calculation. */ +#define QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_FILTER_SV_USAGE_V02 ((qmiLocPositionEngineConfigParamMaskT_v02)0x00000002) /**< Denotes whether the position engine filters the SV usage in the fix. */ -#define QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_STORE_ASSIST_DATA_V02 ((qmiLocPositionEngineConfigParamMaskT_v02)0x00000004) /**< This field denotes if the position engine stores assistance data - in the persistent memory. */ +#define QMI_LOC_POSITION_ENGINE_CONFIG_PARAM_MASK_STORE_ASSIST_DATA_V02 ((qmiLocPositionEngineConfigParamMaskT_v02)0x00000004) /**< Denotes whether the position engine stores assistance data + in persistent memory. */ /** @addtogroup loc_qmi_messages @{ */ @@ -5556,39 +6467,45 @@ typedef struct { /* Injected Position Control */ uint8_t injectedPositionControl_valid; /**< Must be set to true if injectedPositionControl is being passed */ uint8_t injectedPositionControl; - /**< Controls how the injected position will be used in position engine.\n - Valid values: \n - - 0x01 (TRUE) -- Use the injected position in direct position - calculation. \n - - 0x00 (FALSE) -- Do not use the injected position in direct position - calculation. \n - The default value is TRUE, the injected position is used in direct - position calculation by default. + /**< Controls how the injected position is used in the position engine. + + Valid values: + \begin{itemize1} + \item 0x01 (TRUE) -- Use the injected position in a direct position + calculation + \item 0x00 (FALSE) -- Do not use the injected position in a direct + position calculation + \end{itemize1} + The default value is TRUE. */ /* Optional */ /* Filter SV Usage */ uint8_t filterSvUsage_valid; /**< Must be set to true if filterSvUsage is being passed */ uint8_t filterSvUsage; - /**< Controls if SV usage will be filtered in a position fix. - Valid values:\n - - 0x01 (TRUE) -- Filter the usage of SV's in the fix. \n - - 0x00 (FALSE) -- Do not filter the usage of SV's in the fix. \n - The default value is FALSE, the SV usage is not filtered in the - fix by default. + /**< Controls whether SV usage is filtered in a position fix. + + Valid values: + \begin{itemize1} + \item 0x01 (TRUE) -- Filter the usage of SVs in the fix + \item 0x00 (FALSE) -- Do not filter the usage of SVs in the fix + \end{itemize1} + The default value is FALSE. */ /* Optional */ /* Store Assist Data */ uint8_t storeAssistData_valid; /**< Must be set to true if storeAssistData is being passed */ uint8_t storeAssistData; - /**< Controls whether assistance data should be stored in - the persistent memory. \n - Valid values:\n - - 0x01 (TRUE) -- Store assistance data in persistent memory. \n - - 0x00 (FALSE) -- Do not store assistance data in persistent memory. \n - The default value is TRUE, the assistance data is stored in - persistent memory by default. + /**< Controls whether assistance data is to be stored in + persistent memory. + + Valid values: + \begin{itemize1} + \item 0x01 (TRUE) -- Store assistance data in persistent memory + \item 0x00 (FALSE) -- Do not store assistance data in persistent memory + \end{itemize1} + The default value is TRUE. */ }qmiLocSetPositionEngineConfigParametersReqMsgT_v02; /* Message */ /** @@ -5607,27 +6524,31 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Set Configuration Parameters request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ /* Failed Parameters */ uint8_t failedPositionEngineConfigParamMask_valid; /**< Must be set to true if failedPositionEngineConfigParamMask is being passed */ qmiLocPositionEngineConfigParamMaskT_v02 failedPositionEngineConfigParamMask; - /**< This field will be sent only if the status is not a success. - Identifies the parameters that were not set successfully. + /**< Identifies the parameters that were not set successfully. + This field is sent only if the status is other than SUCCESS. - Valid bitmasks: \n - - 0x00000001 -- INJECTED_POSITION_CONTROL \n - - 0x00000002 -- FILTER_SV_USAGE \n - - 0x00000004 -- STORE_ASSIST_DATA + Valid bitmasks: + \begin{itemize1} + \item 0x00000001 -- INJECTED_POSITION_CONTROL + \item 0x00000002 -- FILTER_SV_USAGE + \item 0x00000004 -- STORE_ASSIST_DATA + \vspace{-0.18in} \end{itemize1} */ }qmiLocSetPositionEngineConfigParametersIndMsgT_v02; /* Message */ /** @@ -5645,10 +6566,13 @@ typedef struct { /* Config Parameters */ qmiLocPositionEngineConfigParamMaskT_v02 getPositionEngineConfigParamMask; /**< Mask denoting the configuration parameters to be retrieved. - Valid bitmasks: \n - - 0x00000001 -- INJECTED_POSITION_CONTROL \n - - 0x00000002 -- FILTER_SV_USAGE \n - - 0x00000004 -- STORE_ASSIST_DATA + + Valid bitmasks: + \begin{itemize1} + \item 0x00000001 -- INJECTED_POSITION_CONTROL + \item 0x00000002 -- FILTER_SV_USAGE + \item 0x00000004 -- STORE_ASSIST_DATA + \vspace{-0.18in} \end{itemize1} */ }qmiLocGetPositionEngineConfigParametersReqMsgT_v02; /* Message */ /** @@ -5667,59 +6591,880 @@ typedef struct { qmiLocStatusEnumT_v02 status; /**< Status of the Get Configuration Parameters request. - Valid values: \n - - 0x00000000 -- SUCCESS \n - - 0x00000001 -- GENERAL_FAILURE \n - - 0x00000002 -- UNSUPPORTED \n - - 0x00000003 -- INVALID_PARAMETER \n - - 0x00000004 -- ENGINE_BUSY \n - - 0x00000005 -- PHONE_OFFLINE \n - - 0x00000006 -- LOC_TIMEOUT + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ /* Optional */ /* Injected Position Control */ uint8_t injectedPositionControl_valid; /**< Must be set to true if injectedPositionControl is being passed */ uint8_t injectedPositionControl; - /**< Specifies if the injected position is used for direct calculation - in the position engine.\n - Valid values: \n - - 0x01 (TRUE) -- The injected position is used in direct position - calculation. \n - - 0x00 (FALSE) -- The injected position is not used direct position - calculation. \n - The default value is TRUE, the injected position is used in direct - position calculation by default. + /**< Specifies whether the injected position is used for a direct calculation + in the position engine. + + Valid values: + \begin{itemize1} + \item 0x01 (TRUE) -- The injected position is used in a direct + position calculation + \item 0x00 (FALSE) -- The injected position is not used in a direct + position calculation + \end{itemize1} + The default value is TRUE. */ /* Optional */ /* Filter SV Usage */ uint8_t filterSvUsage_valid; /**< Must be set to true if filterSvUsage is being passed */ uint8_t filterSvUsage; - /**< Specifies if SV usage is filtered in a position fix. - Valid values: \n - - 0x01 (TRUE) -- SV usage is filtered in the fix. \n - - 0x00 (FALSE) -- SV usage is not filtered in the fix. \n - The default value is FALSE, the SV usage is not filtered in the - fix by default. + /**< Specifies whether SV usage is filtered in a position fix. + + Valid values: + \begin{itemize1} + \item 0x01 (TRUE) -- SV usage is filtered in the fix + \item 0x00 (FALSE) -- SV usage is not filtered in the fix + \end{itemize1} + The default value is FALSE. */ /* Optional */ /* Store Assist Data */ uint8_t storeAssistData_valid; /**< Must be set to true if storeAssistData is being passed */ uint8_t storeAssistData; - /**< Specifies if assistance data is stored in the persistent memory. \n - Valid values: \n - 0x01 (TRUE) -- Assistance data is stored in persistent memory. \n - 0x00 (FALSE) -- Assistance data is not stored in persistent memory. \n - The default value is TRUE, the assistance data is stored in - persistent memory by default. + /**< Specifies whether assistance data is stored in persistent memory. + + Valid values: + \begin{itemize1} + \item 0x01 (TRUE) -- Assistance data is stored in persistent memory + \item 0x00 (FALSE) -- Assistance data is not stored in persistent + memory + \end{itemize1} + The default value is TRUE. */ }qmiLocGetPositionEngineConfigParametersIndMsgT_v02; /* Message */ /** @} */ +typedef uint8_t qmiLocGeofenceBreachMaskT_v02; +#define QMI_LOC_GEOFENCE_BREACH_ENTERING_MASK_V02 ((qmiLocGeofenceBreachMaskT_v02)0x01) /**< If this mask is set, a breach event is reported + when the Geofence is entered. */ +#define QMI_LOC_GEOFENCE_BREACH_LEAVING_MASK_V02 ((qmiLocGeofenceBreachMaskT_v02)0x02) /**< If this mask is set, a breach event is reported + when the Geofence is exited. */ +/** @addtogroup loc_qmi_enums + @{ + */ +typedef enum { + QMILOCGEOFENCERESPONSIVENESSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ + eQMI_LOC_GEOFENCE_RESPONSIVENESS_LOW_V02 = 0x01, /**< The Geofence is monitored for a breach at a + lower rate. The gap between actual breach and + the time it is reported is higher. This + setting results in lower power usage. */ + eQMI_LOC_GEOFENCE_RESPONSIVENESS_MED_V02 = 0x02, /**< The Geofence is monitored for a breach at a + medium rate. This is the default setting. + The Geofence is monitored for a breach at a + high rate. The gap between actual breach and + the time it is reported is low. This results + in higher power usage. */ + eQMI_LOC_GEOFENCE_RESPONSIVENESS_HIGH_V02 = 0x03, + QMILOCGEOFENCERESPONSIVENESSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ +}qmiLocGeofenceResponsivenessEnumT_v02; +/** + @} + */ + +/** @addtogroup loc_qmi_enums + @{ + */ +typedef enum { + QMILOCGEOFENCECONFIDENCEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ + eQMI_LOC_GEOFENCE_CONFIDENCE_LOW_V02 = 0x01, /**< The Geofence engine indicates a breach with + low confidence. This setting results in lower + power usage. This setting can impact the "yield" because + incorrect breach events may be sent. */ + eQMI_LOC_GEOFENCE_CONFIDENCE_MED_V02 = 0x02, /**< The Geofence engine indicates a breach with + medium confidence. This is the default setting. + The Geofence engine indicates a breach with + high confidence. This setting results in higher + power usage. */ + eQMI_LOC_GEOFENCE_CONFIDENCE_HIGH_V02 = 0x03, + QMILOCGEOFENCECONFIDENCEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ +}qmiLocGeofenceConfidenceEnumT_v02; +/** + @} + */ + +/** @addtogroup loc_qmi_aggregates + @{ + */ +typedef struct { + + double latitude; + /**< Latitude of the center of the Geofence. */ + + double longitude; + /**< Longitude of the center of the Geofence. */ + + uint32_t radius; + /**< Radius of the circular Geofence in meters. */ +}qmiLocCircularGeofenceArgsStructT_v02; /* Type */ +/** + @} + */ + +/** @addtogroup loc_qmi_enums + @{ + */ +typedef enum { + QMILOCGEOFENCEPOSITIONENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ + eQMI_LOC_GEOFENCE_POSITION_INSIDE_V02 = 0x01, /**< Position inside a Geofence. + Position outside a Geofence. */ + eQMI_LOC_GEOFENCE_POSITION_OUTSIDE_V02 = 0x02, + QMILOCGEOFENCEPOSITIONENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ +}qmiLocGeofencePositionEnumT_v02; +/** + @} + */ + +/** @addtogroup loc_qmi_messages + @{ + */ +/** Request Message; Used by the control point to add a circular Geofence. */ +typedef struct { + + /* Mandatory */ + /* Transaction ID */ + uint32_t transactionId; + /**< Identifies the transaction. The transaction ID + is returned in the Add Circular Geofence + indication. */ + + /* Mandatory */ + /* Circular Geofence Arguments */ + qmiLocCircularGeofenceArgsStructT_v02 circularGeofenceArgs; + + /* Mandatory */ + /* Breach Event Mask */ + qmiLocGeofenceBreachMaskT_v02 breachMask; + /**< Specifies the breach events in which the client is interested. + + Valid values: + \begin{itemize1} + \item 0x01 -- GEOFENCE_BREACH_ENTERING_MASK + \item 0x02 -- GEOFENCE_BREACH_LEAVING_MASK + \vspace{-0.18in} \end{itemize1} */ + + /* Mandatory */ + /* Include Position in Breach Event */ + uint8_t includePosition; + /**< Specifies whether the Geofence engine is to include the position + in a breach event. + + Valid values: + \begin{itemize1} + \item 0x01 (TRUE) -- Position will be reported with the breach event + \item 0x00 (FALSE) -- Position will not be reported with the breach + event + \vspace{-0.18in} \end{itemize1} */ + + /* Optional */ + /* Responsiveness */ + uint8_t responsiveness_valid; /**< Must be set to true if responsiveness is being passed */ + qmiLocGeofenceResponsivenessEnumT_v02 responsiveness; + /**< Specifies the rate of detection for a Geofence breach. + This may impact the time lag between the actual breach event and + when it is reported. This parameter has power implications + and is to be fine-tuned to optimize power savings. + + Valid values: + \begin{itemize1} + \item 0x00000001 -- GEOFENCE_RESPONSIVENESS_LOW + \item 0x00000002 -- GEOFENCE_RESPONSIVENESS_MED + \item 0x00000003 -- GEOFENCE_RESPONSIVENESS_HIGH + \vspace{-0.18in} \end{itemize1} */ + + /* Optional */ + /* Confidence */ + uint8_t confidence_valid; /**< Must be set to true if confidence is being passed */ + qmiLocGeofenceConfidenceEnumT_v02 confidence; + /**< Given a breach event, the confidence determines the probability + that the breach happened at the Geofence boundary. + This parameter has power implications and + is to be fine-tuned to optimize power savings. + + Valid values: + \begin{itemize1} + \item 0x00000001 -- GEOFENCE_CONFIDENCE_LOW + \item 0x00000002 -- GEOFENCE_CONFIDENCE_MED + \item 0x00000003 -- GEOFENCE_CONFIDENCE_HIGH + \vspace{-0.18in} \end{itemize1} */ +}qmiLocAddCircularGeofenceReqMsgT_v02; /* Message */ +/** + @} + */ + +/** @addtogroup loc_qmi_messages + @{ + */ +/** Indication Message; Used by the control point to add a circular Geofence. */ +typedef struct { + + /* Mandatory */ + /* Add Circular Geofence Status */ + qmiLocStatusEnumT_v02 status; + /**< Status of the Add Circular Geofence request. + + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \item 0x00000008 -- INSUFFICIENT_MEMORY + \vspace{-0.18in} \end{itemize1} + */ + + /* Optional */ + /* Transaction ID */ + uint8_t transactionId_valid; /**< Must be set to true if transactionId is being passed */ + uint32_t transactionId; + /**< Transaction ID that was specified in the Add Circular + Geofence request. This parameter will always be present + if the status field is set to SUCCESS. */ + + /* Optional */ + /* Geofence ID */ + uint8_t geofenceId_valid; /**< Must be set to true if geofenceId is being passed */ + uint32_t geofenceId; + /**< Geofence identifier allocated by the engine. + The client must include this identifier in all transactions + pertaining to this Geofence. */ +}qmiLocAddCircularGeofenceIndMsgT_v02; /* Message */ +/** + @} + */ + +/** @addtogroup loc_qmi_messages + @{ + */ +/** Request Message; Used by the control point to delete a Geofence. */ +typedef struct { + + /* Mandatory */ + /* Geofence ID */ + uint32_t geofenceId; + /**< Identifier for the Geofence that is to be deleted. */ + + /* Mandatory */ + /* Transaction ID */ + uint32_t transactionId; + /**< Identifies the transaction. The transaction ID + is returned in the Delete Geofence + indication. */ +}qmiLocDeleteGeofenceReqMsgT_v02; /* Message */ +/** + @} + */ + +/** @addtogroup loc_qmi_messages + @{ + */ +/** Indication Message; Used by the control point to delete a Geofence. */ +typedef struct { + + /* Mandatory */ + /* Delete Geofence Status */ + qmiLocStatusEnumT_v02 status; + /**< Status of the Delete Geofence request. + + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ + + /* Optional */ + /* Geofence ID */ + uint8_t geofenceId_valid; /**< Must be set to true if geofenceId is being passed */ + uint32_t geofenceId; + /**< Identifier for the Geofence that was deleted. */ + + /* Optional */ + /* Transaction ID */ + uint8_t transactionId_valid; /**< Must be set to true if transactionId is being passed */ + uint32_t transactionId; + /**< Transaction ID that was specified in the Delete + Geofence request. This parameter will always be present + if the status field is set to SUCCESS. */ +}qmiLocDeleteGeofenceIndMsgT_v02; /* Message */ +/** + @} + */ + +/** @addtogroup loc_qmi_enums + @{ + */ +typedef enum { + QMILOCGEOFENCEORIGINENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ + eQMI_LOC_GEOFENCE_ORIGIN_NETWORK_V02 = 1, /**< The Geofence was initiated by a network-initiated client. + The Geofence was initiated by the device. */ + eQMI_LOC_GEOFENCE_ORIGIN_DEVICE_V02 = 2, + QMILOCGEOFENCEORIGINENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ +}qmiLocGeofenceOriginEnumT_v02; +/** + @} + */ + +/** @addtogroup loc_qmi_enums + @{ + */ +typedef enum { + QMILOCGEOFENCESTATEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ + eQMI_LOC_GEOFENCE_STATE_ACTIVE_V02 = 1, /**< The Geofence is being actively monitored. + The Geofence monitoring is suspended. */ + eQMI_LOC_GEOFENCE_STATE_SUSPEND_V02 = 2, + QMILOCGEOFENCESTATEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ +}qmiLocGeofenceStateEnumT_v02; +/** + @} + */ + +/** @addtogroup loc_qmi_messages + @{ + */ +/** Request Message; Used by the control point to query a Geofence. */ +typedef struct { + + /* Mandatory */ + /* Geofence ID */ + uint32_t geofenceId; + /**< Identifier for the Geofence that is to be queried. */ + + /* Mandatory */ + /* Transaction ID */ + uint32_t transactionId; + /**< Identifies the transaction. The transaction ID + is returned with the Query Geofence + indication. */ +}qmiLocQueryGeofenceReqMsgT_v02; /* Message */ +/** + @} + */ + +/** @addtogroup loc_qmi_messages + @{ + */ +/** Indication Message; Used by the control point to query a Geofence. */ +typedef struct { + + /* Mandatory */ + /* Query Geofence Status */ + qmiLocStatusEnumT_v02 status; + /**< Status of the Query Geofence request. + + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ + + /* Optional */ + /* Geofence ID */ + uint8_t geofenceId_valid; /**< Must be set to true if geofenceId is being passed */ + uint32_t geofenceId; + /**< Identifier for the Geofence that was queried. */ + + /* Optional */ + /* Transaction ID */ + uint8_t transactionId_valid; /**< Must be set to true if transactionId is being passed */ + uint32_t transactionId; + /**< Transaction ID that was specified in the Query + Geofence request. This parameter will always be present + if the status field is set to SUCCESS. */ + + /* Optional */ + /* Geofence Origin */ + uint8_t geofenceOrigin_valid; /**< Must be set to true if geofenceOrigin is being passed */ + qmiLocGeofenceOriginEnumT_v02 geofenceOrigin; + /**< Originator of the Geofence. + + Valid values: + \begin{itemize1} + \item 0x00000001 -- GEOFENCE_ORIGIN_NETWORK + \item 0x00000002 -- GEOFENCE_ORIGIN_DEVICE + \vspace{-0.18in} \end{itemize1} + */ + + /* Optional */ + /* Position with Respect to Geofence */ + uint8_t posWrtGeofence_valid; /**< Must be set to true if posWrtGeofence is being passed */ + qmiLocGeofencePositionEnumT_v02 posWrtGeofence; + /**< Indicates if the client is currently inside or outside + the Geofence. + + Valid values: + \begin{itemize1} + \item 0x00000001 -- GEOFENCE_POSITION_INSIDE + \item 0x00000002 -- GEOFENCE_POSITION_OUTSIDE + \vspace{-0.18in} \end{itemize1} */ + + /* Optional */ + /* Circular Geofence Parameters */ + uint8_t circularGeofenceArgs_valid; /**< Must be set to true if circularGeofenceArgs is being passed */ + qmiLocCircularGeofenceArgsStructT_v02 circularGeofenceArgs; + + /* Optional */ + /* Geofence State */ + uint8_t geofenceState_valid; /**< Must be set to true if geofenceState is being passed */ + qmiLocGeofenceStateEnumT_v02 geofenceState; + /**< Specifies whether the Geofence is to be actively monitored. + + Valid values: + \begin{itemize1} + \item 0x00000001 -- GEOFENCE_STATE_ACTIVE + \item 0x00000002 -- GEOFENCE_STATE_SUSPEND + \vspace{-0.18in} \end{itemize1} */ +}qmiLocQueryGeofenceIndMsgT_v02; /* Message */ +/** + @} + */ + +/** @addtogroup loc_qmi_messages + @{ + */ +/** Request Message; Used by the control point to edit a Geofence. */ +typedef struct { + + /* Mandatory */ + /* Geofence ID */ + uint32_t geofenceId; + /**< Identifier for the Geofence to be edited. */ + + /* Mandatory */ + /* Transaction ID */ + uint32_t transactionId; + /**< Transaction ID that was specified in the Edit Geofence + request. This parameter will always be present if the + status field is set to SUCCESS. + */ + + /* Optional */ + /* Geofence State */ + uint8_t geofenceState_valid; /**< Must be set to true if geofenceState is being passed */ + qmiLocGeofenceStateEnumT_v02 geofenceState; + /**< Specifies whether the Geofence is to be actively monitored. + + Valid values: + \begin{itemize1} + \item 0x00000001 -- GEOFENCE_STATE_ACTIVE + \item 0x00000002 -- GEOFENCE_STATE_SUSPEND + \vspace{-0.18in} \end{itemize1} */ + + /* Optional */ + /* Breach Event Mask */ + uint8_t breachMask_valid; /**< Must be set to true if breachMask is being passed */ + qmiLocGeofenceBreachMaskT_v02 breachMask; + /**< Specifies the breach events in which the client is interested. + + Valid values: + \begin{itemize1} + \item 0x01 -- GEOFENCE_BREACH_ENTERING_MASK + \item 0x02 -- GEOFENCE_BREACH_LEAVING_MASK + \vspace{-0.18in} \end{itemize1} */ +}qmiLocEditGeofenceReqMsgT_v02; /* Message */ +/** + @} + */ + +typedef uint32_t qmiLocGeofenceConfigParamMaskT_v02; +#define QMI_LOC_GEOFENCE_PARAM_MASK_GEOFENCE_STATE_V02 ((qmiLocGeofenceConfigParamMaskT_v02)0x00000001) /**< Mask for the Geofence state parameter. */ +#define QMI_LOC_GEOFENCE_PARAM_MASK_BREACH_MASK_V02 ((qmiLocGeofenceConfigParamMaskT_v02)0x00000002) /**< Mask for Geofence breach mask parameter. */ +/** @addtogroup loc_qmi_messages + @{ + */ +/** Indication Message; Used by the control point to edit a Geofence. */ +typedef struct { + + /* Mandatory */ + /* Edit Geofence Status */ + qmiLocStatusEnumT_v02 status; + /**< Status of the Edit Geofence request. + + Valid values: + \begin{itemize1} + \item 0x00000000 -- SUCCESS + \item 0x00000001 -- GENERAL_FAILURE + \item 0x00000002 -- UNSUPPORTED + \item 0x00000003 -- INVALID_PARAMETER + \item 0x00000004 -- ENGINE_BUSY + \item 0x00000005 -- PHONE_OFFLINE + \item 0x00000006 -- TIMEOUT + \vspace{-0.18in} \end{itemize1} */ + + /* Optional */ + /* Geofence ID */ + uint8_t geofenceId_valid; /**< Must be set to true if geofenceId is being passed */ + uint32_t geofenceId; + /**< Identifier for the Geofence that was edited. */ + + /* Optional */ + /* Transaction ID */ + uint8_t transactionId_valid; /**< Must be set to true if transactionId is being passed */ + uint32_t transactionId; + /**< Identifies the transaction. The transaction ID + is specified in the Edit Geofence request. */ + + /* Optional */ + /* Failed Parameters */ + uint8_t failedParams_valid; /**< Must be set to true if failedParams is being passed */ + qmiLocGeofenceConfigParamMaskT_v02 failedParams; + /**< Specified only when the status is not set to SUCCESS. If + the mask corresponding to a field is set, it indicates that + the Geofence parameter could not be edited. + + Valid values: + \begin{itemize1} + \item 0x00000001 -- GEOFENCE_PARAM_MASK_GEOFENCE_STATE + \item 0x00000002 -- GEOFENCE_PARAM_MASK_BREACH_MASK + \vspace{-0.18in} \end{itemize1} */ +}qmiLocEditGeofenceIndMsgT_v02; /* Message */ +/** + @} + */ + +/** @addtogroup loc_qmi_messages + @{ + */ +/** Request Message; Used by the control point to get the best available + position estimate from the location engine. */ +typedef struct { + + /* Mandatory */ + /* Transaction ID */ + uint32_t transactionId; + /**< Identifies the transaction. The transaction ID + is returned in the Get Best Available Position indication. */ +}qmiLocGetBestAvailablePositionReqMsgT_v02; /* Message */ +/** + @} + */ + +/** @addtogroup loc_qmi_messages + @{ + */ +/** Indication Message; Used by the control point to get the best available + position estimate from the location engine. */ +typedef struct { + + /* Mandatory */ + /* Get Best Available Position Status */ + qmiLocStatusEnumT_v02 status; + /**< Status of the Get Best Available Position request. + + Valid values: \n + - 0x00000000 -- SUCCESS \n + - 0x00000001 -- GENERAL_FAILURE \n + - 0x00000002 -- UNSUPPORTED \n + - 0x00000004 -- ENGINE_BUSY \n + - 0x00000006 -- TIMEOUT */ + + /* Optional */ + /* Transaction ID */ + uint8_t transactionId_valid; /**< Must be set to true if transactionId is being passed */ + uint32_t transactionId; + /**< Transaction ID that was specified in the Get Best + Available Position request. This parameter will + always be present if the status field is set to + SUCCESS. */ + + /* Optional */ + /* Latitude */ + uint8_t latitude_valid; /**< Must be set to true if latitude is being passed */ + double latitude; + /**< Latitude (specified in WGS84 datum). + \begin{itemize1} + \item Type: Floating point + \item Units: Degrees + \item Range: -90.0 to 90.0 \begin{itemize1} + \item Positive values indicate northern latitude + \item Negative values indicate southern latitude + \vspace{-0.18in} \end{itemize1} \end{itemize1} */ + + /* Optional */ + /* Longitude */ + uint8_t longitude_valid; /**< Must be set to true if longitude is being passed */ + double longitude; + /**< Longitude (specified in WGS84 datum). + \begin{itemize1} + \item Type: Floating point + \item Units: Degrees + \item Range: -180.0 to 180.0 \begin{itemize1} + \item Positive values indicate eastern longitude + \item Negative values indicate western longitude + \vspace{-0.18in} \end{itemize1} \end{itemize1} */ + + /* Optional */ + /* Circular Horizontal Position Uncertainty */ + uint8_t horUncCircular_valid; /**< Must be set to true if horUncCircular is being passed */ + float horUncCircular; + /**< Horizontal position uncertainty (circular).\n + - Units: Meters */ + + /* Optional */ + /* Altitude With Respect to Ellipsoid */ + uint8_t altitudeWrtEllipsoid_valid; /**< Must be set to true if altitudeWrtEllipsoid is being passed */ + float altitudeWrtEllipsoid; + /**< Altitude with respect to the WGS84 ellipsoid.\n + - Units: Meters \n + - Range: -500 to 15883 */ + + /* Optional */ + /* Vertical Uncertainty */ + uint8_t vertUnc_valid; /**< Must be set to true if vertUnc is being passed */ + float vertUnc; + /**< Vertical uncertainty.\n + - Units: Meters */ + + /* Optional */ + /* UTC Timestamp */ + uint8_t timestampUtc_valid; /**< Must be set to true if timestampUtc is being passed */ + uint64_t timestampUtc; + /**< UTC timestamp. + \begin{itemize1} + \item Units: Milliseconds since Jan. 1, 1970 + \vspace{-0.18in} \end{itemize1} */ + + /* Optional */ + /* Time Uncertainty */ + uint8_t timeUnc_valid; /**< Must be set to true if timeUnc is being passed */ + float timeUnc; + /**< Time uncertainty. \n + - Units: Milliseconds */ + + /* Optional */ + /* Horizontal Elliptical Uncertainty Semi-Minor Axis */ + uint8_t horUncEllipseSemiMinor_valid; /**< Must be set to true if horUncEllipseSemiMinor is being passed */ + float horUncEllipseSemiMinor; + /**< Semi-minor axis of horizontal elliptical uncertainty. \n + - Units: Meters */ + + /* Optional */ + /* Horizontal Elliptical Uncertainty Semi-Major Axis */ + uint8_t horUncEllipseSemiMajor_valid; /**< Must be set to true if horUncEllipseSemiMajor is being passed */ + float horUncEllipseSemiMajor; + /**< Semi-major axis of horizontal elliptical uncertainty. \n + - Units: Meters */ + + /* Optional */ + /* Horizontal Elliptical Uncertainty Azimuth */ + uint8_t horUncEllipseOrientAzimuth_valid; /**< Must be set to true if horUncEllipseOrientAzimuth is being passed */ + float horUncEllipseOrientAzimuth; + /**< Elliptical horizontal uncertainty azimuth of orientation. \n + - Units: Decimal degrees \n + - Range: 0 to 180 */ + + /* Optional */ + /* Horizontal Circular Confidence */ + uint8_t horCircularConfidence_valid; /**< Must be set to true if horCircularConfidence is being passed */ + uint8_t horCircularConfidence; + /**< Horizontal circular uncertainty confidence. \n + - Units: Percent \n + - Range: 0 to 99 */ + + /* Optional */ + /* Horizontal Elliptical Confidence */ + uint8_t horEllipticalConfidence_valid; /**< Must be set to true if horEllipticalConfidence is being passed */ + uint8_t horEllipticalConfidence; + /**< Horizontal elliptical uncertainty confidence. \n + - Units: Percent \n + - Range: 0 to 99 */ + + /* Optional */ + /* Horizontal Reliability */ + uint8_t horReliability_valid; /**< Must be set to true if horReliability is being passed */ + qmiLocReliabilityEnumT_v02 horReliability; + /**< Specifies the reliability of the horizontal position. + + Valid values: + \begin{itemize1} + \item 0x00000000 -- RELIABILITY_NOT_SET + \item 0x00000001 -- RELIABILITY_VERY_LOW + \item 0x00000002 -- RELIABILITY_LOW + \item 0x00000003 -- RELIABILITY_MEDIUM + \item 0x00000004 -- RELIABILITY_HIGH + \vspace{-0.18in} \end{itemize1} */ + + /* Optional */ + /* Horizontal Speed */ + uint8_t horSpeed_valid; /**< Must be set to true if horSpeed is being passed */ + float horSpeed; + /**< Horizontal speed. \n + - Units: Meters/second */ + + /* Optional */ + /* Horizontal Speed Uncertainty */ + uint8_t horSpeedUnc_valid; /**< Must be set to true if horSpeedUnc is being passed */ + float horSpeedUnc; + /**< Horizontal speed uncertainty. \n + - Units: Meters/second */ + + /* Optional */ + /* Altitude With Respect to Sea Level */ + uint8_t altitudeWrtMeanSeaLevel_valid; /**< Must be set to true if altitudeWrtMeanSeaLevel is being passed */ + float altitudeWrtMeanSeaLevel; + /**< Altitude with respect to mean sea level. \n + - Units: Meters */ + + /* Optional */ + /* Vertical Confidence */ + uint8_t vertConfidence_valid; /**< Must be set to true if vertConfidence is being passed */ + uint8_t vertConfidence; + /**< Vertical uncertainty confidence. \n + - Units: Percent \n + - Range: 0 to 99 */ + + /* Optional */ + /* Vertical Reliability */ + uint8_t vertReliability_valid; /**< Must be set to true if vertReliability is being passed */ + qmiLocReliabilityEnumT_v02 vertReliability; + /**< Specifies the reliability of the vertical position. + + Valid values: + \begin{itemize1} + \item 0x00000000 -- RELIABILITY_NOT_SET + \item 0x00000001 -- RELIABILITY_VERY_LOW + \item 0x00000002 -- RELIABILITY_LOW + \item 0x00000003 -- RELIABILITY_MEDIUM + \item 0x00000004 -- RELIABILITY_HIGH + \vspace{-0.18in} \end{itemize1} */ + + /* Optional */ + /* Vertical Speed */ + uint8_t vertSpeed_valid; /**< Must be set to true if vertSpeed is being passed */ + float vertSpeed; + /**< Vertical speed. \n + - Units: Meters/second */ + + /* Optional */ + /* Vertical Speed Uncertainty */ + uint8_t vertSpeedUnc_valid; /**< Must be set to true if vertSpeedUnc is being passed */ + float vertSpeedUnc; + /**< Vertical speed uncertainty. \n + - Units: Meters/second */ + + /* Optional */ + /* Heading */ + uint8_t heading_valid; /**< Must be set to true if heading is being passed */ + float heading; + /**< Heading. \n + - Units: Degrees \n + - Range: 0 to 359.999 */ + + /* Optional */ + /* Heading Uncertainty */ + uint8_t headingUnc_valid; /**< Must be set to true if headingUnc is being passed */ + float headingUnc; + /**< Heading uncertainty. \n + - Type: Floating point \n + - Range: 0 to 359.999 */ + + /* Optional */ + /* Magnetic Deviation */ + uint8_t magneticDeviation_valid; /**< Must be set to true if magneticDeviation is being passed */ + float magneticDeviation; + /**< Difference between the bearing to true north and the bearing shown + on a magnetic compass. The deviation is positive when the magnetic + north is east of true north. */ + + /* Optional */ + /* Technology Used Mask */ + uint8_t technologyMask_valid; /**< Must be set to true if technologyMask is being passed */ + qmiLocPosTechMaskT_v02 technologyMask; + /**< Technology used in computing this fix. + + Valid bitmasks: + \begin{itemize1} + \item 0x00000001 -- SATELLITE + \item 0x00000002 -- CELLID + \item 0x00000004 -- WIFI + \item 0x00000008 -- SENSORS + \item 0x00000010 -- REFERENCE_LOCATION + \vspace{-0.18in} \end{itemize1} */ + + /* Optional */ + /* Dilution of Precision */ + uint8_t DOP_valid; /**< Must be set to true if DOP is being passed */ + qmiLocDOPStructT_v02 DOP; + + /* Optional */ + /* GPS Time */ + uint8_t gpsTime_valid; /**< Must be set to true if gpsTime is being passed */ + qmiLocGPSTimeStructT_v02 gpsTime; + + /* Optional */ + /* Time Source */ + uint8_t timeSrc_valid; /**< Must be set to true if timeSrc is being passed */ + qmiLocTimeSourceEnumT_v02 timeSrc; + /**< Time source. + + Valid values: + \begin{itemize1} + \item 0x00000000 -- TIME_SRC_INVALID + \item 0x00000001 -- TIME_SRC_NETWORK_TIME_TRANSFER + \item 0x00000002 -- TIME_SRC_NETWORK_TIME_TAGGING + \item 0x00000003 -- TIME_SRC_EXTERNAL_INPUT + \item 0x00000004 -- TIME_SRC_TOW_DECODE + \item 0x00000005 -- TIME_SRC_TOW_CONFIRMED + \item 0x00000006 -- TIME_SRC_TOW_AND_WEEK_CONFIRMED + \item 0x00000007 -- TIME_SRC_NAV_SOLUTION + \item 0x00000008 -- TIME_SRC_SOLVE_FOR_TIME + \vspace{-0.18in} \end{itemize1} */ + + /* Optional */ + /* Sensor Data Usage */ + uint8_t sensorDataUsage_valid; /**< Must be set to true if sensorDataUsage is being passed */ + qmiLocSensorUsageIndicatorStructT_v02 sensorDataUsage; + + /* Optional */ + /* SVs Used to Calculate the Fix */ + uint8_t gnssSvUsedList_valid; /**< Must be set to true if gnssSvUsedList is being passed */ + uint32_t gnssSvUsedList_len; /**< Must be set to # of elements in gnssSvUsedList */ + uint16_t gnssSvUsedList[QMI_LOC_MAX_SV_USED_LIST_LENGTH_V02]; + /**< Each entry in the list contains the SV ID of a satellite + used for calculating this position report. The following + information is associated with each SV ID: + \begin{itemize1} + \item Range: \begin{itemize1} + \item For GPS: 1 to 32 + \item For SBAS: 33 to 64 + \item For GLONASS: 65 to 96 + \item For QZSS: 193 to 197 + \vspace{-0.18in} \end{itemize1} \end{itemize1} */ +}qmiLocGetBestAvailablePositionIndMsgT_v02; /* Message */ +/** + @} + */ + /*Service Message Definition*/ /** @addtogroup loc_qmi_msg_ids @{ @@ -5884,6 +7629,24 @@ typedef struct { #define QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02 0x005F #define QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_RESP_V02 0x005F #define QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02 0x005F +#define QMI_LOC_EVENT_NI_GEOFENCE_NOTIFICATION_IND_V02 0x0060 +#define QMI_LOC_EVENT_GEOFENCE_GEN_ALERT_IND_V02 0x0061 +#define QMI_LOC_EVENT_GEOFENCE_BREACH_NOTIFICATION_IND_V02 0x0062 +#define QMI_LOC_ADD_CIRCULAR_GEOFENCE_REQ_V02 0x0063 +#define QMI_LOC_ADD_CIRCULAR_GEOFENCE_RESP_V02 0x0063 +#define QMI_LOC_ADD_CIRCULAR_GEOFENCE_IND_V02 0x0063 +#define QMI_LOC_DELETE_GEOFENCE_REQ_V02 0x0064 +#define QMI_LOC_DELETE_GEOFENCE_RESP_V02 0x0064 +#define QMI_LOC_DELETE_GEOFENCE_IND_V02 0x0064 +#define QMI_LOC_QUERY_GEOFENCE_REQ_V02 0x0065 +#define QMI_LOC_QUERY_GEOFENCE_RESP_V02 0x0065 +#define QMI_LOC_QUERY_GEOFENCE_IND_V02 0x0065 +#define QMI_LOC_EDIT_GEOFENCE_REQ_V02 0x0066 +#define QMI_LOC_EDIT_GEOFENCE_RESP_V02 0x0066 +#define QMI_LOC_EDIT_GEOFENCE_IND_V02 0x0066 +#define QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02 0x0067 +#define QMI_LOC_GET_BEST_AVAILABLE_POSITION_RESP_V02 0x0067 +#define QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02 0x0067 /** @} */ diff --git a/loc_api/ulp/inc/ulp.h b/loc_api/ulp/inc/ulp.h old mode 100755 new mode 100644 index 6321bb9c..50d6c91b --- a/loc_api/ulp/inc/ulp.h +++ b/loc_api/ulp/inc/ulp.h @@ -36,14 +36,7 @@ extern "C" #endif #include - -typedef int (ulp_report_position_cb) -( - void* owner, - const GpsLocation* location_report_ptr, - unsigned int ext_data_length, - unsigned char* ext_data -); +#include "loc_eng.h" /** Represents the standard ulp module interface. */ typedef struct { @@ -51,24 +44,14 @@ typedef struct { size_t size; /** - * Starts the ulp module. 0: success + * Starts the libulp module. 0: success */ - int (*init)( void* owner, ulp_report_position_cb* cb); + int (*init)(loc_eng_data_s_type &loc_eng_data); - /** Starts the ulp engine. 0: success */ - int (*start_fix)( void ); - - /** Stops the ulp engine. 0: success */ - int (*stop_fix)( void ); - - /** Closes the interface */ - int (*destroy)( void ); - -} ulpInterface; +}ulpInterface; typedef const ulpInterface* (get_ulp_interface) (void); - #ifdef __cplusplus } #endif diff --git a/utils/Android.mk b/utils/Android.mk old mode 100755 new mode 100644 index 7ce454f8..4bf04014 --- a/utils/Android.mk +++ b/utils/Android.mk @@ -21,6 +21,8 @@ LOCAL_CFLAGS += \ -fno-short-enums \ -D_ANDROID_ +LOCAL_LDFLAGS += -Wl,--export-dynamic + ## Includes LOCAL_C_INCLUDES:= diff --git a/utils/linked_list.c b/utils/linked_list.c old mode 100755 new mode 100644 diff --git a/utils/linked_list.h b/utils/linked_list.h old mode 100755 new mode 100644 diff --git a/utils/loc_cfg.cpp b/utils/loc_cfg.cpp old mode 100755 new mode 100644 index de960788..574c9581 --- a/utils/loc_cfg.cpp +++ b/utils/loc_cfg.cpp @@ -47,28 +47,14 @@ *============================================================================*/ /* Parameter data */ -loc_gps_cfg_s_type gps_conf; +static uint8_t DEBUG_LEVEL = 3; +static uint8_t TIMESTAMP = 0; /* Parameter spec table */ - -loc_param_s_type loc_parameter_table[] = +static loc_param_s_type loc_parameter_table[] = { - {"INTERMEDIATE_POS", &gps_conf.INTERMEDIATE_POS, 'n'}, - {"ACCURACY_THRES", &gps_conf.ACCURACY_THRES, 'n'}, - {"ENABLE_WIPER", &gps_conf.ENABLE_WIPER, 'n'}, - /* DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info - 4 - Debug, 5 - Verbose */ - {"DEBUG_LEVEL", &gps_conf.DEBUG_LEVEL, 'n'}, - {"SUPL_VER", &gps_conf.SUPL_VER, 'n'}, - {"CAPABILITIES", &gps_conf.CAPABILITIES, 'n'}, - {"TIMESTAMP", &gps_conf.TIMESTAMP, 'n'}, - {"GYRO_BIAS_RANDOM_WALK", &gps_conf.GYRO_BIAS_RANDOM_WALK, 'f'}, - {"SENSOR_ACCEL_BATCHES_PER_SEC", &gps_conf.SENSOR_ACCEL_BATCHES_PER_SEC, 'n'}, - {"SENSOR_ACCEL_SAMPLES_PER_BATCH", &gps_conf.SENSOR_ACCEL_SAMPLES_PER_BATCH, 'n'}, - {"SENSOR_GYRO_BATCHES_PER_SEC", &gps_conf.SENSOR_GYRO_BATCHES_PER_SEC, 'n'}, - {"SENSOR_GYRO_SAMPLES_PER_BATCH", &gps_conf.SENSOR_GYRO_SAMPLES_PER_BATCH, 'n'}, - {"SENSOR_CONTROL_MODE", &gps_conf.SENSOR_CONTROL_MODE, 'n'}, - {"SENSOR_USAGE", &gps_conf.SENSOR_USAGE, 'n'}, + {"DEBUG_LEVEL", &DEBUG_LEVEL, NULL, 'n'}, + {"TIMESTAMP", &TIMESTAMP, NULL, 'n'}, }; int loc_param_num = sizeof(loc_parameter_table) / sizeof(loc_param_s_type); @@ -92,29 +78,11 @@ SIDE EFFECTS static void loc_default_parameters() { /* defaults */ - gps_conf.INTERMEDIATE_POS = 0; - gps_conf.ACCURACY_THRES = 0; - gps_conf.ENABLE_WIPER = 0; - gps_conf.DEBUG_LEVEL = 3; /* debug level */ - gps_conf.SUPL_VER = 0x10000; - gps_conf.CAPABILITIES = 0x7; - gps_conf.TIMESTAMP = 0; - - gps_conf.GYRO_BIAS_RANDOM_WALK = 0; - - gps_conf.SENSOR_ACCEL_BATCHES_PER_SEC = 2; - gps_conf.SENSOR_ACCEL_SAMPLES_PER_BATCH = 5; - gps_conf.SENSOR_GYRO_BATCHES_PER_SEC = 2; - gps_conf.SENSOR_GYRO_SAMPLES_PER_BATCH = 5; - gps_conf.SENSOR_CONTROL_MODE = 0; /* AUTO */ - gps_conf.SENSOR_USAGE = 0; /* Enabled */ - - /* Value MUST be set by OEMs in configuration for sensor-assisted - navigation to work. There is NO default value */ - gps_conf.GYRO_BIAS_RANDOM_WALK_VALID = 0; + DEBUG_LEVEL = 3; /* debug level */ + TIMESTAMP = 0; /* reset logging mechanism */ - loc_logger_init(gps_conf.DEBUG_LEVEL, 0); + loc_logger_init(DEBUG_LEVEL, TIMESTAMP); } /*=========================================================================== @@ -161,11 +129,26 @@ void trim_space(char *org_string) if (last_nonspace) { *last_nonspace = '\0'; } } +typedef struct loc_param_v_type +{ + char* param_name; + + char* param_str_value; + int param_int_value; + double param_double_value; +}loc_param_v_type; + /*=========================================================================== -FUNCTION loc_read_gps_conf +FUNCTION loc_set_config_entry DESCRIPTION - Reads the gps.conf file and sets global parameter data + Potentially sets a given configuration table entry based on the passed in + configuration value. This is done by using a string comparison of the + parameter names and those found in the configuration file. + +PARAMETERS: + config_entry: configuration entry in the table to possibly set + config_value: value to store in the entry if the parameter names match DEPENDENCIES N/A @@ -176,97 +159,152 @@ RETURN VALUE SIDE EFFECTS N/A ===========================================================================*/ -void loc_read_gps_conf(void) +void loc_set_config_entry(loc_param_s_type* config_entry, loc_param_v_type* config_value) +{ + if(NULL == config_entry || NULL == config_value) + { + LOC_LOGE("%s: INVALID config entry or parameter", __FUNCTION__); + return; + } + + if (strcmp(config_entry->param_name, config_value->param_name) == 0 && + config_entry->param_ptr) + { + switch (config_entry->param_type) + { + case 's': + if (strcmp(config_value->param_str_value, "NULL") == 0) + { + *((char*)config_entry->param_ptr) = '\0'; + } + else { + strlcpy((char*) config_entry->param_ptr, + config_value->param_str_value, + LOC_MAX_PARAM_STRING + 1); + } + /* Log INI values */ + LOC_LOGD("%s: PARAM %s = %s", __FUNCTION__, config_entry->param_name, (char*)config_entry->param_ptr); + + if(NULL != config_entry->param_set) + { + *(config_entry->param_set) = 1; + } + break; + case 'n': + *((int *)config_entry->param_ptr) = config_value->param_int_value; + /* Log INI values */ + LOC_LOGD("%s: PARAM %s = %d", __FUNCTION__, config_entry->param_name, config_value->param_int_value); + + if(NULL != config_entry->param_set) + { + *(config_entry->param_set) = 1; + } + break; + case 'f': + *((double *)config_entry->param_ptr) = config_value->param_double_value; + /* Log INI values */ + LOC_LOGD("%s: PARAM %s = %f", __FUNCTION__, config_entry->param_name, config_value->param_double_value); + + if(NULL != config_entry->param_set) + { + *(config_entry->param_set) = 1; + } + break; + default: + LOC_LOGE("%s: PARAM %s parameter type must be n, f, or s", __FUNCTION__, config_entry->param_name); + } + } +} + +/*=========================================================================== +FUNCTION loc_read_conf + +DESCRIPTION + Reads the specified configuration file and sets defined values based on + the passed in configuration table. This table maps strings to values to + set along with the type of each of these values. + +PARAMETERS: + conf_file_name: configuration file to read + config_table: table definition of strings to places to store information + table_length: length of the configuration table + +DEPENDENCIES + N/A + +RETURN VALUE + None + +SIDE EFFECTS + N/A +===========================================================================*/ +void loc_read_conf(const char* conf_file_name, loc_param_s_type* config_table, uint32_t table_length) { FILE *gps_conf_fp = NULL; char input_buf[LOC_MAX_PARAM_LINE]; /* declare a char array */ char *lasts; - char *param_name, *param_str_value; - int param_int_value = 0; - double param_double_value = 0; - int i; + loc_param_v_type config_value; + uint32_t i; loc_default_parameters(); - if((gps_conf_fp = fopen(GPS_CONF_FILE, "r")) != NULL) + if((gps_conf_fp = fopen(conf_file_name, "r")) != NULL) { LOC_LOGD("%s: using %s", __FUNCTION__, GPS_CONF_FILE); } else { - LOC_LOGW("%s: no %s file, using defaults", __FUNCTION__, GPS_CONF_FILE); + LOC_LOGW("%s: no %s file found", __FUNCTION__, GPS_CONF_FILE); return; /* no parameter file */ } + /* Clear all validity bits */ + for(i = 0; NULL != config_table && i < table_length; i++) + { + if(NULL != config_table[i].param_set) + { + *(config_table[i].param_set) = 0; + } + } + while(fgets(input_buf, LOC_MAX_PARAM_LINE, gps_conf_fp) != NULL) { + memset(&config_value, 0, sizeof(config_value)); + /* Separate variable and value */ - param_name = strtok_r(input_buf, "=", &lasts); - if (param_name == NULL) continue; /* skip lines that do not contain "=" */ - param_str_value = strtok_r(NULL, "=", &lasts); - if (param_str_value == NULL) continue; /* skip lines that do not contain two operands */ + config_value.param_name = strtok_r(input_buf, "=", &lasts); + if (config_value.param_name == NULL) continue; /* skip lines that do not contain "=" */ + config_value.param_str_value = strtok_r(NULL, "=", &lasts); + if (config_value.param_str_value == NULL) continue; /* skip lines that do not contain two operands */ /* Trim leading and trailing spaces */ - trim_space(param_name); - trim_space(param_str_value); - - // printf("*(%s) = (%s)\n", param_name, param_str_value); + trim_space(config_value.param_name); + trim_space(config_value.param_str_value); /* Parse numerical value */ - if (param_str_value[0] == '0' && tolower(param_str_value[1]) == 'x') + if (config_value.param_str_value[0] == '0' && tolower(config_value.param_str_value[1]) == 'x') { /* hex */ - param_int_value = (int) strtol(¶m_str_value[2], (char**) NULL, 16); + config_value.param_int_value = (int) strtol(&config_value.param_str_value[2], (char**) NULL, 16); } else { - param_double_value = (double) atof(param_str_value); /* float */ - param_int_value = atoi(param_str_value); /* dec */ + config_value.param_double_value = (double) atof(config_value.param_str_value); /* float */ + config_value.param_int_value = atoi(config_value.param_str_value); /* dec */ } - if (strcmp("GYRO_BIAS_RANDOM_WALK", param_name) == 0) + for(i = 0; NULL != config_table && i < table_length; i++) { - gps_conf.GYRO_BIAS_RANDOM_WALK_VALID = 1; + loc_set_config_entry(&config_table[i], &config_value); } for(i = 0; i < loc_param_num; i++) { - if (strcmp(loc_parameter_table[i].param_name, param_name) == 0 && - loc_parameter_table[i].param_ptr) - { - switch (loc_parameter_table[i].param_type) - { - case 's': - if (strcmp(param_str_value, "NULL") == 0) - { - *((char*)loc_parameter_table[i].param_ptr) = '\0'; - } - else { - strlcpy((char*) loc_parameter_table[i].param_ptr, - param_str_value, - LOC_MAX_PARAM_STRING + 1); - } - /* Log INI values */ - LOC_LOGD("%s: PARAM %s = %s", __FUNCTION__, param_name, (char*)loc_parameter_table[i].param_ptr); - break; - case 'n': - *((int *)loc_parameter_table[i].param_ptr) = param_int_value; - /* Log INI values */ - LOC_LOGD("%s: PARAM %s = %d", __FUNCTION__, param_name, param_int_value); - break; - case 'f': - *((double *)loc_parameter_table[i].param_ptr) = param_double_value; - /* Log INI values */ - LOC_LOGD("%s: PARAM %s = %f", __FUNCTION__, param_name, param_double_value); - break; - default: - LOC_LOGE("%s: PARAM %s parameter type must be n or n", __FUNCTION__, param_name); - } - } + loc_set_config_entry(&loc_parameter_table[i], &config_value); } } fclose(gps_conf_fp); /* Initialize logging mechanism with parsed data */ - loc_logger_init(gps_conf.DEBUG_LEVEL, gps_conf.TIMESTAMP); + loc_logger_init(DEBUG_LEVEL, TIMESTAMP); } diff --git a/utils/loc_cfg.h b/utils/loc_cfg.h old mode 100755 new mode 100644 index ffeb83c4..bc3b1c3a --- a/utils/loc_cfg.h +++ b/utils/loc_cfg.h @@ -30,7 +30,9 @@ #ifndef LOC_CFG_H #define LOC_CFG_H -#define LOC_MAX_PARAM_NAME 36 +#include + +#define LOC_MAX_PARAM_NAME 48 #define LOC_MAX_PARAM_STRING 80 #define LOC_MAX_PARAM_LINE 80 @@ -39,6 +41,12 @@ #define GPS_CONF_FILE "/etc/gps.conf" //??? platform independent #endif +#define UTIL_READ_CONF_DEFAULT(filename) \ + loc_read_conf((filename), NULL, 0); + +#define UTIL_READ_CONF(filename, config_table) \ + loc_read_conf((filename), (config_table), sizeof(config_table) / sizeof(config_table[0])) + /*============================================================================= * * MODULE TYPE DECLARATION @@ -48,30 +56,12 @@ typedef struct { char param_name[LOC_MAX_PARAM_NAME]; void *param_ptr; - char param_type; /* 'n' for number; 's' for string */ + uint8_t *param_set; /* was this value set by config file? */ + char param_type; /* 'n' for number, + 's' for string, + 'f' for float */ } loc_param_s_type; -/* GPS.conf support */ -typedef struct loc_gps_cfg_s -{ - unsigned long INTERMEDIATE_POS; - unsigned long ACCURACY_THRES; - unsigned long ENABLE_WIPER; - unsigned long DEBUG_LEVEL; - unsigned long SUPL_VER; - unsigned long CAPABILITIES; - unsigned long TIMESTAMP; - unsigned long GYRO_BIAS_RANDOM_WALK_VALID; - double GYRO_BIAS_RANDOM_WALK; - unsigned long SENSOR_ACCEL_BATCHES_PER_SEC; - unsigned long SENSOR_ACCEL_SAMPLES_PER_BATCH; - unsigned long SENSOR_GYRO_BATCHES_PER_SEC; - unsigned long SENSOR_GYRO_SAMPLES_PER_BATCH; - unsigned long SENSOR_CONTROL_MODE; - unsigned long SENSOR_USAGE; - // char string_val[LOC_MAX_PARAM_STRING + 1]; /* An example string value */ -} loc_gps_cfg_s_type; - /*============================================================================= * * MODULE EXTERNAL DATA @@ -82,14 +72,14 @@ typedef struct loc_gps_cfg_s extern "C" { #endif -extern loc_gps_cfg_s_type gps_conf; - /*============================================================================= * * MODULE EXPORTED FUNCTIONS * *============================================================================*/ -extern void loc_read_gps_conf(void); +extern void loc_read_conf(const char* conf_file_name, + loc_param_s_type* config_table, + uint32_t table_length); #ifdef __cplusplus } diff --git a/utils/loc_log.cpp b/utils/loc_log.cpp old mode 100755 new mode 100644 diff --git a/utils/loc_log.h b/utils/loc_log.h old mode 100755 new mode 100644 diff --git a/utils/log_util.h b/utils/log_util.h old mode 100755 new mode 100644 diff --git a/utils/msg_q.c b/utils/msg_q.c old mode 100755 new mode 100644 index 252921ef..cc024e4c --- a/utils/msg_q.c +++ b/utils/msg_q.c @@ -249,7 +249,7 @@ msq_q_err_type msg_q_rcv(void* msg_q_data, void** msg_obj) pthread_mutex_unlock(&p_msg_q->list_mutex); - LOC_LOGD("%s: Received message %p rv = %d\n", __FUNCTION__, *msg_obj, rv); + LOC_LOGD("%s: Received message 0x%08X rv = %d\n", __FUNCTION__, *msg_obj, rv); return rv; } diff --git a/utils/msg_q.h b/utils/msg_q.h old mode 100755 new mode 100644