diff --git a/loc_api/Android.mk b/loc_api/Android.mk index d2f53c58..e9c8d1e6 100755 --- a/loc_api/Android.mk +++ b/loc_api/Android.mk @@ -21,10 +21,6 @@ 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 endif diff --git a/loc_api/loc_api_v02/Android.mk b/loc_api/loc_api_v02/Android.mk deleted file mode 100755 index a8db2765..00000000 --- a/loc_api/loc_api_v02/Android.mk +++ /dev/null @@ -1,44 +0,0 @@ -ifneq ($(BUILD_TINY_ANDROID),true) - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := libloc_api_v02 -LOCAL_MODULE_OWNER := qcom - -LOCAL_MODULE_TAGS := optional - -LOCAL_SHARED_LIBRARIES := \ - libutils \ - libcutils \ - libqmi_cci \ - libqmi_csi \ - libqmi_common_so \ - libloc_adapter \ - libgps.utils - -LOCAL_SRC_FILES += \ - LocApiV02Adapter.cpp \ - loc_api_v02_log.c \ - loc_api_v02_client.c \ - loc_api_sync_req.c \ - location_service_v02.c - -LOCAL_CFLAGS += \ - -fno-short-enums \ - -D_ANDROID_ - -## Includes -LOCAL_C_INCLUDES := \ - $(TOP)/vendor/qcom/proprietary/qmi-framework/inc \ - $(TOP)/vendor/qcom/proprietary/qmi-framework/qcci/inc \ - $(TOP)/vendor/qcom/proprietary/qmi-framework/common/inc \ - $(TARGET_OUT_HEADERS)/libloc_eng \ - $(TARGET_OUT_HEADERS)/gps.utils - -LOCAL_PRELINK_MODULE := false - -include $(BUILD_SHARED_LIBRARY) - -endif # not BUILD_TINY_ANDROID diff --git a/loc_api/loc_api_v02/LocApiV02Adapter.cpp b/loc_api/loc_api_v02/LocApiV02Adapter.cpp deleted file mode 100644 index cfb2265d..00000000 --- a/loc_api/loc_api_v02/LocApiV02Adapter.cpp +++ /dev/null @@ -1,2059 +0,0 @@ -/* 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 - * 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 Code Aurora Forum, 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 "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include "LocApiV02Adapter.h" -#include "loc_api_v02_client.h" -#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" - - -/* Default session id ; TBD needs incrementing for each */ -#define LOC_API_V02_DEF_SESSION_ID (1) - -/* Default minimium interval in ms */ -#define LOC_API_V02_DEF_MIN_INTERVAL (1000) - -/* Default horizontal accuracy in meters*/ -#define LOC_API_V02_DEF_HORZ_ACCURACY (50) - -/* Default timeout in ms; TBD: needs implementing */ -#define LOC_API_V02_DEF_TIMEOUT (120000) - -/* UMTS CP Address key*/ -#define LOC_NI_NOTIF_KEY_ADDRESS "Address" - -/* GPS SV Id offset */ -#define GPS_SV_ID_OFFSET (1) - -/* GLONASS SV Id offset */ -#define GLONASS_SV_ID_OFFSET (65) - -/* SV ID range */ -#define SV_ID_RANGE (32) - - - -/* static event callbacks that call the LocApiV02Adapter callbacks*/ - -/* global event callback, call the eventCb function in loc api adapter v02 - instance */ -static void globalEventCb(locClientHandleType clientHandle, - uint32_t eventId, - const locClientEventIndUnionType eventPayload, - void* pClientCookie) -{ - MODEM_LOG_CALLFLOW(%s, loc_get_v02_event_name(eventId)); - LocApiV02Adapter *locApiV02AdapterInstance = - (LocApiV02Adapter *)pClientCookie; - - LOC_LOGV ("%s:%d] client = %p, event id = %d, client cookie ptr = %p\n", - __func__, __LINE__, clientHandle, eventId, pClientCookie); - - // return if null is passed - if( NULL == locApiV02AdapterInstance) - { - LOC_LOGE ("%s:%d] NULL object passed : client = %p, event id = %d\n", - __func__, __LINE__, clientHandle, eventId); - return; - } - locApiV02AdapterInstance->eventCb(clientHandle, - eventId, - eventPayload); -} - -/* global response callback, it calls the sync request process - indication function to unblock the request that is waiting on this - response indication*/ -static void globalRespCb(locClientHandleType clientHandle, - uint32_t respId, - const locClientRespIndUnionType respPayload, - void* pClientCookie) -{ - MODEM_LOG_CALLFLOW(%s, loc_get_v02_event_name(respId)); - LocApiV02Adapter *locApiV02AdapterInstance = - (LocApiV02Adapter *)pClientCookie; - - - LOC_LOGV ("%s:%d] client = %p, resp id = %d, client cookie ptr = %p\n", - __func__, __LINE__, clientHandle, respId, pClientCookie); - - if( NULL == locApiV02AdapterInstance) - { - LOC_LOGE ("%s:%d] NULL object passed : client = %p, resp id = %d\n", - __func__, __LINE__, clientHandle, respId); - return; - } - // process the sync call - // use pDeleteAssistDataInd as a dummy pointer - loc_sync_process_ind(clientHandle, respId, - (void *)respPayload.pDeleteAssistDataInd); -} - -/* global error callback, it will call the handle service down - function in the loc api adapter instance. */ -static void globalErrorCb (locClientHandleType clientHandle, - locClientErrorEnumType errorId, - void *pClientCookie) -{ - LocApiV02Adapter *locApiV02AdapterInstance = - (LocApiV02Adapter *)pClientCookie; - - LOC_LOGV ("%s:%d] client = %p, error id = %d\n, client cookie ptr = %p\n", - __func__, __LINE__, clientHandle, errorId, pClientCookie); - if( NULL == locApiV02AdapterInstance) - { - LOC_LOGE ("%s:%d] NULL object passed : client = %p, error id = %d\n", - __func__, __LINE__, clientHandle, errorId); - return; - } - locApiV02AdapterInstance->errorCb(clientHandle, - errorId); -} - -/* global structure containing the callbacks */ -locClientCallbacksType globalCallbacks = -{ - sizeof(locClientCallbacksType), - globalEventCb, - globalRespCb, - globalErrorCb -}; - -/* 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 ) -{ - // initialize loc_sync_req interface - loc_sync_req_init(); -} - -/* Destructor for LocApiV02Adapter */ -LocApiV02Adapter :: ~LocApiV02Adapter() -{ - deInitLocClient(); -} - -/* close Loc API V02 client */ -int LocApiV02Adapter :: deInitLocClient() -{ - return ( eLOC_CLIENT_SUCCESS == locClientClose(&clientHandle)) ? 0 : -1 ; -} - -/* Initialize a loc api v02 client */ -enum loc_api_adapter_err LocApiV02Adapter :: reinit() -{ - locClientStatusEnumType status; - /* If the client is already open close it first */ - if(LOC_CLIENT_INVALID_HANDLE_VALUE != clientHandle) - { - status = locClientClose(&clientHandle); - if( eLOC_CLIENT_SUCCESS != status) - { - LOC_LOGE ("%s:%d]: locClientClose failed, status = %d\n", __func__, - __LINE__, status); - return (LOC_API_ADAPTER_ERR_FAILURE); - } - } - - LOC_LOGV ("%s:%d]: reference to this = %p passed in \n", __func__, - __LINE__, this); - /* initialize the loc api v02 interface, note that - the locClientOpen() function will block if the - service is unavailable for a fixed time out */ - - status = locClientOpen( - eventMask, &globalCallbacks, &clientHandle, (void *)this); - - if (eLOC_CLIENT_SUCCESS != status || - clientHandle == LOC_CLIENT_INVALID_HANDLE_VALUE ) - { - LOC_LOGE ("%s:%d]: locClientOpen failed, status = %s\n", __func__, - __LINE__, loc_get_v02_client_status_name(status)); - return (LOC_API_ADAPTER_ERR_FAILURE); - } - - // return SUCCESS - return (LOC_API_ADAPTER_ERR_SUCCESS); -} - -/* start positioning session */ -enum loc_api_adapter_err LocApiV02Adapter :: startFix() -{ - locClientStatusEnumType status; - locClientReqUnionType req_union; - - qmiLocStartReqMsgT_v02 start_msg; - - qmiLocSetOperationModeReqMsgT_v02 set_mode_msg; - qmiLocSetOperationModeIndMsgT_v02 set_mode_ind; - - // clear all fields, validity masks - memset (&start_msg, 0, sizeof(start_msg)); - memset (&set_mode_msg, 0, sizeof(set_mode_msg)); - memset (&set_mode_ind, 0, sizeof(set_mode_ind)); - - LOC_LOGV("%s:%d]: start \n", __func__, __LINE__); - - // fill in the start request - switch(fixCriteria.mode) - { - case LOC_POSITION_MODE_MS_BASED: - set_mode_msg.operationMode = eQMI_LOC_OPER_MODE_MSB_V02; - break; - - case LOC_POSITION_MODE_MS_ASSISTED: - set_mode_msg.operationMode = eQMI_LOC_OPER_MODE_MSA_V02; - break; - - case LOC_POSITION_MODE_RESERVED_4: - set_mode_msg.operationMode = eQMI_LOC_OPER_MODE_CELL_ID_V02; - break; - - default: - set_mode_msg.operationMode = eQMI_LOC_OPER_MODE_STANDALONE_V02; - break; - } - - req_union.pSetOperationModeReq = &set_mode_msg; - - // send the mode first, before the start message. - status = loc_sync_send_req(clientHandle, - QMI_LOC_SET_OPERATION_MODE_REQ_V02, - req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT, - QMI_LOC_SET_OPERATION_MODE_IND_V02, - &set_mode_ind); // NULL? - - if (status != eLOC_CLIENT_SUCCESS || - eQMI_LOC_SUCCESS_V02 != set_mode_ind.status) - { - LOC_LOGE ("%s:%d]: set opertion mode failed status = %s, " - "ind..status = %s\n", __func__, __LINE__, - loc_get_v02_client_status_name(status), - loc_get_v02_qmi_status_name(set_mode_ind.status)); - - 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.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; - } - - start_msg.fixRecurrence_valid = 1; - if(GPS_POSITION_RECURRENCE_SINGLE == fixCriteria.recurrence) - { - start_msg.fixRecurrence = eQMI_LOC_RECURRENCE_SINGLE_V02; - } - else - { - start_msg.fixRecurrence = eQMI_LOC_RECURRENCE_PERIODIC_V02; - } - - //dummy session id - // TBD: store session ID, check for session id in pos reports. - start_msg.sessionId = LOC_API_V02_DEF_SESSION_ID;; - - req_union.pStartReq = &start_msg; - - status = locClientSendReq (clientHandle, QMI_LOC_START_REQ_V02, - req_union ); - - 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; -} - -/* stop a positioning session */ -enum loc_api_adapter_err LocApiV02Adapter :: stopFix() -{ - locClientStatusEnumType status; - locClientReqUnionType req_union; - - qmiLocStopReqMsgT_v02 stop_msg; - - LOC_LOGD(" %s:%d]: stop called \n", __func__, __LINE__); - - memset(&stop_msg, 0, sizeof(stop_msg)); - - // dummy session id - stop_msg.sessionId = LOC_API_V02_DEF_SESSION_ID; - - req_union.pStopReq = &stop_msg; - - status = locClientSendReq(clientHandle, - QMI_LOC_STOP_REQ_V02, - req_union); - - if( eLOC_CLIENT_SUCCESS == status) - { - navigating = false; - return LOC_API_ADAPTER_ERR_SUCCESS; - } - - LOC_LOGE("%s:%d]: error = %s\n",__func__, __LINE__, - loc_get_v02_client_status_name(status)); - return (LOC_API_ADAPTER_ERR_GENERAL_FAILURE); -} - -/* 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) -{ - - LOC_LOGV ("%s:%d]: interval = %d, mode = %d, recurrence = %d, preferred_accuracy = %d\n",__func__, __LINE__, - min_interval, mode, recurrence, preferred_accuracy); - - //store the fix criteria - fixCriteria.mode = mode; - - fixCriteria.recurrence = recurrence; - - if(min_interval == 0) - { - fixCriteria.min_interval = MIN_POSSIBLE_FIX_INTERVAL; - } - else - { - fixCriteria.min_interval = min_interval; - } - - 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; -} - -/* inject time into the position engine */ -enum loc_api_adapter_err LocApiV02Adapter :: - setTime(GpsUtcTime time, int64_t timeReference, int uncertainty) -{ - locClientReqUnionType req_union; - locClientStatusEnumType status; - qmiLocInjectUtcTimeReqMsgT_v02 inject_time_msg; - qmiLocInjectUtcTimeIndMsgT_v02 inject_time_ind; - - memset(&inject_time_msg, 0, sizeof(inject_time_msg)); - - inject_time_ind.status = eQMI_LOC_GENERAL_FAILURE_V02; - - inject_time_msg.timeUtc = time; - - inject_time_msg.timeUtc += (int64_t)(android::elapsedRealtime() - timeReference); - - inject_time_msg.timeUnc = uncertainty; - - req_union.pInjectUtcTimeReq = &inject_time_msg; - - LOC_LOGV ("%s:%d]: uncertainty = %d\n", __func__, __LINE__, - uncertainty); - - status = loc_sync_send_req(clientHandle, - QMI_LOC_INJECT_UTC_TIME_REQ_V02, - req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT, - QMI_LOC_INJECT_UTC_TIME_IND_V02, - &inject_time_ind); - - if (status != eLOC_CLIENT_SUCCESS || - eQMI_LOC_SUCCESS_V02 != inject_time_ind.status) - { - LOC_LOGE ("%s:%d] status = %s, ind..status = %s\n", __func__, __LINE__, - loc_get_v02_client_status_name(status), - loc_get_v02_qmi_status_name(inject_time_ind.status)); - - return LOC_API_ADAPTER_ERR_GENERAL_FAILURE; - } - - return LOC_API_ADAPTER_ERR_SUCCESS; -} - -/* inject position into the position engine */ -enum loc_api_adapter_err LocApiV02Adapter :: - injectPosition(double latitude, double longitude, float accuracy) -{ - locClientReqUnionType req_union; - locClientStatusEnumType status; - qmiLocInjectPositionReqMsgT_v02 inject_pos_msg; - qmiLocInjectPositionIndMsgT_v02 inject_pos_ind; - - memset(&inject_pos_msg, 0, sizeof(inject_pos_msg)); - - inject_pos_msg.latitude_valid = 1; - inject_pos_msg.latitude = latitude; - - inject_pos_msg.longitude_valid = 1; - inject_pos_msg.longitude = longitude; - - inject_pos_msg.horUncCircular_valid = 1; - - inject_pos_msg.horUncCircular = accuracy; //meters assumed - - inject_pos_msg.horConfidence_valid = 1; - - inject_pos_msg.horConfidence = 63; // 63% (1 std dev assumed) - - /* Log */ - LOC_LOGD("%s:%d]: Lat=%lf, Lon=%lf, Acc=%.2lf\n", __func__, __LINE__, - inject_pos_msg.latitude, inject_pos_msg.longitude, - inject_pos_msg.horUncCircular); - - req_union.pInjectPositionReq = &inject_pos_msg; - - status = loc_sync_send_req(clientHandle, - QMI_LOC_INJECT_POSITION_REQ_V02, - req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT, - QMI_LOC_INJECT_POSITION_IND_V02, - &inject_pos_ind); - - if (status != eLOC_CLIENT_SUCCESS || - eQMI_LOC_SUCCESS_V02 != inject_pos_ind.status) - { - LOC_LOGE ("%s:%d]: error! status = %s, inject_pos_ind.status = %s\n", - __func__, __LINE__, - loc_get_v02_client_status_name(status), - loc_get_v02_qmi_status_name(inject_pos_ind.status)); - - return LOC_API_ADAPTER_ERR_GENERAL_FAILURE; - } - - return LOC_API_ADAPTER_ERR_SUCCESS; -} - -/* delete assistance date */ -enum loc_api_adapter_err LocApiV02Adapter :: deleteAidingData(GpsAidingData f) -{ - locClientReqUnionType req_union; - locClientStatusEnumType status; - qmiLocDeleteAssistDataReqMsgT_v02 delete_req; - qmiLocDeleteAssistDataIndMsgT_v02 delete_resp; - - memset(&delete_req, 0, sizeof(delete_req)); - memset(&delete_resp, 0, sizeof(delete_resp)); - - if( f == GPS_DELETE_ALL ) - { - delete_req.deleteAllFlag = true; - } - - else - { - /* to keep track of svInfoList for GPS and GLO*/ - uint32_t curr_sv_len = 0; - uint32_t curr_sv_idx = 0; - uint32_t sv_id = 0; - - if((f & GPS_DELETE_EPHEMERIS ) || ( f & GPS_DELETE_ALMANAC )) - { - /* do delete for all GPS SV's */ - - curr_sv_len += SV_ID_RANGE; - - sv_id = GPS_SV_ID_OFFSET; - - delete_req.deleteSvInfoList_valid = 1; - - delete_req.deleteSvInfoList_len = curr_sv_len; - - LOC_LOGV("%s:%d]: Delete GPS SV info for index %d to %d" - "and sv id %d to %d \n", - __func__, __LINE__, curr_sv_idx, curr_sv_len - 1, - sv_id, sv_id+SV_ID_RANGE); - - for( uint32_t i = curr_sv_idx; i< curr_sv_len ; i++, sv_id++ ) - { - delete_req.deleteSvInfoList[i].gnssSvId = sv_id; - - delete_req.deleteSvInfoList[i].system = eQMI_LOC_SV_SYSTEM_GPS_V02; - - if(f & GPS_DELETE_EPHEMERIS ) - { - // set ephemeris mask for all GPS SV's - delete_req.deleteSvInfoList[i].deleteSvInfoMask |= - QMI_LOC_MASK_DELETE_EPHEMERIS_V02; - } - - if( f & GPS_DELETE_ALMANAC ) - { - delete_req.deleteSvInfoList[i].deleteSvInfoMask |= - QMI_LOC_MASK_DELETE_ALMANAC_V02; - } - } - // increment the current index - curr_sv_idx += SV_ID_RANGE; - - } - -#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; - delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_POSITION_V02; - } - - if(f & GPS_DELETE_TIME ) - { - delete_req.deleteGnssDataMask_valid = 1; - delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_TIME_V02; - } - - if(f & GPS_DELETE_IONO ) - { - delete_req.deleteGnssDataMask_valid = 1; - delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_IONO_V02; - } - - if(f & GPS_DELETE_UTC ) - { - delete_req.deleteGnssDataMask_valid = 1; - delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_UTC_V02; - } - - if(f & GPS_DELETE_HEALTH ) - { - delete_req.deleteGnssDataMask_valid = 1; - delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_HEALTH_V02; - } - - if(f & GPS_DELETE_SVDIR ) - { - delete_req.deleteGnssDataMask_valid = 1; - delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_GPS_SVDIR_V02; - } - if(f & GPS_DELETE_SADATA ) - { - delete_req.deleteGnssDataMask_valid = 1; - delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_SADATA_V02; - } - if(f & GPS_DELETE_RTI ) - { - delete_req.deleteGnssDataMask_valid = 1; - delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_RTI_V02; - } - if(f & GPS_DELETE_CELLDB_INFO ) - { - delete_req.deleteCellDbDataMask_valid = 1; - delete_req.deleteCellDbDataMask = - ( QMI_LOC_MASK_DELETE_CELLDB_POS_V02 | - QMI_LOC_MASK_DELETE_CELLDB_LATEST_GPS_POS_V02 | - QMI_LOC_MASK_DELETE_CELLDB_OTA_POS_V02 | - QMI_LOC_MASK_DELETE_CELLDB_EXT_REF_POS_V02 | - QMI_LOC_MASK_DELETE_CELLDB_TIMETAG_V02 | - QMI_LOC_MASK_DELETE_CELLDB_CELLID_V02 | - QMI_LOC_MASK_DELETE_CELLDB_CACHED_CELLID_V02 | - QMI_LOC_MASK_DELETE_CELLDB_LAST_SRV_CELL_V02 | - QMI_LOC_MASK_DELETE_CELLDB_CUR_SRV_CELL_V02 | - QMI_LOC_MASK_DELETE_CELLDB_NEIGHBOR_INFO_V02) ; - - } -#ifdef QCOM_FEATURE_DELEXT - if(f & GPS_DELETE_ALMANAC_CORR ) - { - delete_req.deleteGnssDataMask_valid = 1; - delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_GPS_ALM_CORR_V02; - } - if(f & GPS_DELETE_FREQ_BIAS_EST ) - { - delete_req.deleteGnssDataMask_valid = 1; - delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_FREQ_BIAS_EST_V02; - } - if ( (f & GPS_DELETE_EPHEMERIS_GLO ) || (f & GPS_DELETE_ALMANAC_GLO )) - { - /* do delete for all GLONASS SV's (65 - 96) - */ - curr_sv_len += SV_ID_RANGE; - - sv_id = GLONASS_SV_ID_OFFSET; - - delete_req.deleteSvInfoList_valid = 1; - - delete_req.deleteSvInfoList_len = curr_sv_len; - - LOC_LOGV("%s:%d]: Delete GLO SV info for index %d to %d" - "and sv id %d to %d \n", - __func__, __LINE__, curr_sv_idx, curr_sv_len - 1, - sv_id, sv_id+SV_ID_RANGE); - - - for( uint32_t i = curr_sv_idx; i< curr_sv_len ; i++, sv_id++ ) - { - delete_req.deleteSvInfoList[i].gnssSvId = sv_id; - - delete_req.deleteSvInfoList[i].system = eQMI_LOC_SV_SYSTEM_GLONASS_V02; - - if(f & GPS_DELETE_EPHEMERIS ) - { - // set ephemeris mask for all GPS SV's - delete_req.deleteSvInfoList[i].deleteSvInfoMask |= - QMI_LOC_MASK_DELETE_EPHEMERIS_V02; - } - - if( f & GPS_DELETE_ALMANAC ) - { - delete_req.deleteSvInfoList[i].deleteSvInfoMask |= - QMI_LOC_MASK_DELETE_ALMANAC_V02; - } - } - curr_sv_idx += SV_ID_RANGE; - } - - if(f & GPS_DELETE_SVDIR_GLO ) - { - delete_req.deleteGnssDataMask_valid = 1; - delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_GLO_SVDIR_V02; - } - - if(f & GPS_DELETE_SVSTEER_GLO ) - { - delete_req.deleteGnssDataMask_valid = 1; - delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_GLO_SVSTEER_V02; - } - - if(f & GPS_DELETE_ALMANAC_CORR_GLO ) - { - delete_req.deleteGnssDataMask_valid = 1; - delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_GLO_ALM_CORR_V02; - } - - if(f & GPS_DELETE_TIME_GLO ) - { - delete_req.deleteGnssDataMask_valid = 1; - delete_req.deleteGnssDataMask |= QMI_LOC_MASK_DELETE_GLO_TIME_V02; - } -#endif - } - - req_union.pDeleteAssistDataReq = &delete_req; - - status = loc_sync_send_req(clientHandle, - QMI_LOC_DELETE_ASSIST_DATA_REQ_V02, - req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT, - QMI_LOC_DELETE_ASSIST_DATA_IND_V02, - &delete_resp); - - if (status != eLOC_CLIENT_SUCCESS || - eQMI_LOC_SUCCESS_V02 != delete_resp.status) - { - LOC_LOGE ("%s:%d]: error! status = %s, delete_resp.status = %s\n", - __func__, __LINE__, - loc_get_v02_client_status_name(status), - loc_get_v02_qmi_status_name(delete_resp.status)); - - return LOC_API_ADAPTER_ERR_GENERAL_FAILURE; - } - - return LOC_API_ADAPTER_ERR_SUCCESS; -} - -/* send NI user repsonse to the engine */ -enum loc_api_adapter_err LocApiV02Adapter :: - informNiResponse(GpsUserResponseType userResponse, - const void* passThroughData) -{ - locClientReqUnionType req_union; - locClientStatusEnumType status; - - qmiLocNiUserRespReqMsgT_v02 ni_resp; - qmiLocNiUserRespIndMsgT_v02 ni_resp_ind; - - qmiLocEventNiNotifyVerifyReqIndMsgT_v02 *request_pass_back = - (qmiLocEventNiNotifyVerifyReqIndMsgT_v02 *)passThroughData; - - memset(&ni_resp,0, sizeof(ni_resp)); - - memset(&ni_resp_ind,0, sizeof(ni_resp_ind)); - - switch (userResponse) - { - case GPS_NI_RESPONSE_ACCEPT: - ni_resp.userResp = eQMI_LOC_NI_LCS_NOTIFY_VERIFY_ACCEPT_V02; - break; - case GPS_NI_RESPONSE_DENY: - ni_resp.userResp = eQMI_LOC_NI_LCS_NOTIFY_VERIFY_DENY_V02; - break; - case GPS_NI_RESPONSE_NORESP: - ni_resp.userResp = eQMI_LOC_NI_LCS_NOTIFY_VERIFY_NORESP_V02; - break; - default: - return LOC_API_ADAPTER_ERR_INVALID_PARAMETER; - } - - LOC_LOGV(" %s:%d]: NI response: %d\n", __func__, __LINE__, - ni_resp.userResp); - - ni_resp.notificationType = request_pass_back->notificationType; - - // copy SUPL payload from request - if(request_pass_back->NiSuplInd_valid == 1) - { - ni_resp.NiSuplPayload_valid = 1; - memcpy(&(ni_resp.NiSuplPayload), &(request_pass_back->NiSuplInd), - sizeof(qmiLocNiSuplNotifyVerifyStructT_v02)); - - } - // should this be an "else if"?? we don't need to decide - - // copy UMTS-CP payload from request - if( request_pass_back->NiUmtsCpInd_valid == 1 ) - { - ni_resp.NiUmtsCpPayload_valid = 1; - memcpy(&(ni_resp.NiUmtsCpPayload), &(request_pass_back->NiUmtsCpInd), - sizeof(qmiLocNiUmtsCpNotifyVerifyStructT_v02)); - } - - //copy Vx payload from the request - if( request_pass_back->NiVxInd_valid == 1) - { - ni_resp.NiVxPayload_valid = 1; - memcpy(&(ni_resp.NiVxPayload), &(request_pass_back->NiVxInd), - sizeof(qmiLocNiVxNotifyVerifyStructT_v02)); - } - - // copy Vx service interaction payload from the request - if(request_pass_back->NiVxServiceInteractionInd_valid == 1) - { - ni_resp.NiVxServiceInteractionPayload_valid = 1; - memcpy(&(ni_resp.NiVxServiceInteractionPayload), - &(request_pass_back->NiVxServiceInteractionInd), - sizeof(qmiLocNiVxServiceInteractionStructT_v02)); - } - - req_union.pNiUserRespReq = &ni_resp; - - status = loc_sync_send_req ( - clientHandle, QMI_LOC_NI_USER_RESPONSE_REQ_V02, - req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT, - QMI_LOC_NI_USER_RESPONSE_IND_V02, &ni_resp_ind); - - if (status != eLOC_CLIENT_SUCCESS || - eQMI_LOC_SUCCESS_V02 != ni_resp_ind.status) - { - LOC_LOGE ("%s:%d]: error! status = %s, ni_resp_ind.status = %s\n", - __func__, __LINE__, - loc_get_v02_client_status_name(status), - loc_get_v02_qmi_status_name(ni_resp_ind.status)); - - return LOC_API_ADAPTER_ERR_GENERAL_FAILURE; - } - - return LOC_API_ADAPTER_ERR_SUCCESS; -} - -/* Set UMTs SLP server URL */ -enum loc_api_adapter_err LocApiV02Adapter :: setServer( - const char* url, int len) -{ - locClientReqUnionType req_union; - locClientStatusEnumType status; - qmiLocSetServerReqMsgT_v02 set_server_req; - qmiLocSetServerIndMsgT_v02 set_server_ind; - - if(len <=0 || len > sizeof(set_server_req.urlAddr)) - { - LOC_LOGE("%s:%d]: len = %d greater than max allowed url length\n", - __func__, __LINE__, len); - - return LOC_API_ADAPTER_ERR_INVALID_PARAMETER; - } - - memset(&set_server_req, 0, sizeof(set_server_req)); - - LOC_LOGD("%s:%d]:, url = %s, len = %d\n", __func__, __LINE__, url, len); - - set_server_req.serverType = eQMI_LOC_SERVER_TYPE_UMTS_SLP_V02; - - set_server_req.urlAddr_valid = 1; - - strlcpy(set_server_req.urlAddr, url, sizeof(set_server_req.urlAddr)); - - req_union.pSetServerReq = &set_server_req; - - status = loc_sync_send_req(clientHandle, - QMI_LOC_SET_SERVER_REQ_V02, - req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT, - QMI_LOC_SET_SERVER_IND_V02, - &set_server_ind); - - if (status != eLOC_CLIENT_SUCCESS || - eQMI_LOC_SUCCESS_V02 != set_server_ind.status) - { - LOC_LOGE ("%s:%d]: error status = %s, set_server_ind.status = %s\n", - __func__,__LINE__, - loc_get_v02_client_status_name(status), - loc_get_v02_qmi_status_name(set_server_ind.status)); - - return LOC_API_ADAPTER_ERR_GENERAL_FAILURE; - } - - return LOC_API_ADAPTER_ERR_SUCCESS; -} - -enum loc_api_adapter_err LocApiV02Adapter :: - setServer(unsigned int ip, int port, LocServerType type) -{ - locClientReqUnionType req_union; - locClientStatusEnumType status; - qmiLocSetServerReqMsgT_v02 set_server_req; - qmiLocSetServerIndMsgT_v02 set_server_ind; - qmiLocServerTypeEnumT_v02 set_server_cmd; - - switch (type) { - case LOC_AGPS_MPC_SERVER: - set_server_cmd = eQMI_LOC_SERVER_TYPE_CDMA_MPC_V02; - break; - case LOC_AGPS_CUSTOM_PDE_SERVER: - set_server_cmd = eQMI_LOC_SERVER_TYPE_CUSTOM_PDE_V02; - break; - default: - set_server_cmd = eQMI_LOC_SERVER_TYPE_CDMA_PDE_V02; - break; - } - - memset(&set_server_req, 0, sizeof(set_server_req)); - - LOC_LOGD("%s:%d]:, ip = %u, port = %d\n", __func__, __LINE__, ip, port); - - set_server_req.serverType = set_server_cmd; - set_server_req.ipv4Addr_valid = 1; - set_server_req.ipv4Addr.addr = ip; - set_server_req.ipv4Addr.port = port; - - req_union.pSetServerReq = &set_server_req; - - status = loc_sync_send_req(clientHandle, - QMI_LOC_SET_SERVER_REQ_V02, - req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT, - QMI_LOC_SET_SERVER_IND_V02, - &set_server_ind); - - if (status != eLOC_CLIENT_SUCCESS || - eQMI_LOC_SUCCESS_V02 != set_server_ind.status) - { - LOC_LOGE ("%s:%d]: error status = %s, set_server_ind.status = %s\n", - __func__,__LINE__, - loc_get_v02_client_status_name(status), - loc_get_v02_qmi_status_name(set_server_ind.status)); - - return LOC_API_ADAPTER_ERR_GENERAL_FAILURE; - } - - return LOC_API_ADAPTER_ERR_SUCCESS; -} - -/* Inject XTRA data, this module breaks down the XTRA - file into "chunks" and injects them one at a time */ -enum loc_api_adapter_err LocApiV02Adapter :: setXtraData( - char* data, int length) -{ - locClientStatusEnumType status = eLOC_CLIENT_SUCCESS; - int total_parts; - uint8_t part; - uint16_t len_injected; - - locClientReqUnionType req_union; - qmiLocInjectPredictedOrbitsDataReqMsgT_v02 inject_xtra; - qmiLocInjectPredictedOrbitsDataIndMsgT_v02 inject_xtra_ind; - - req_union.pInjectPredictedOrbitsDataReq = &inject_xtra; - - LOC_LOGD("%s:%d]: xtra size = %d\n", __func__, __LINE__, length); - - inject_xtra.formatType_valid = 1; - inject_xtra.formatType = eQMI_LOC_PREDICTED_ORBITS_XTRA_V02; - inject_xtra.totalSize = length; - - total_parts = ((length - 1) / QMI_LOC_MAX_PREDICTED_ORBITS_PART_LEN_V02) + 1; - - inject_xtra.totalParts = total_parts; - - len_injected = 0; // O bytes injected - - // XTRA injection starts with part 1 - for (part = 1; part <= total_parts; part++) - { - inject_xtra.partNum = part; - - if (QMI_LOC_MAX_PREDICTED_ORBITS_PART_LEN_V02 > (length - len_injected)) - { - inject_xtra.partData_len = length - len_injected; - } - else - { - inject_xtra.partData_len = QMI_LOC_MAX_PREDICTED_ORBITS_PART_LEN_V02; - } - - // copy data into the message - memcpy(inject_xtra.partData, data+len_injected, inject_xtra.partData_len); - - LOC_LOGD("[%s:%d] part %d/%d, len = %d, total injected = %d\n", - __func__, __LINE__, - inject_xtra.partNum, total_parts, inject_xtra.partData_len, - len_injected); - - status = loc_sync_send_req( clientHandle, - QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02, - req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT, - QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02, - &inject_xtra_ind); - - if (status != eLOC_CLIENT_SUCCESS || - eQMI_LOC_SUCCESS_V02 != inject_xtra_ind.status || - inject_xtra.partNum != inject_xtra_ind.partNum) - { - LOC_LOGE ("%s:%d]: failed status = %s, inject_pos_ind.status = %s," - " part num = %d, ind.partNum = %d\n", __func__, __LINE__, - loc_get_v02_client_status_name(status), - loc_get_v02_qmi_status_name(inject_xtra_ind.status), - inject_xtra.partNum, inject_xtra_ind.partNum); - - return LOC_API_ADAPTER_ERR_GENERAL_FAILURE; - break; - } - - len_injected += inject_xtra.partData_len; - LOC_LOGD("%s:%d]: XTRA injected length: %d\n", __func__, __LINE__, - len_injected); - } - - 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) -{ - 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], bearer = %d \n", __func__, __LINE__, - handle, is_succ, apn, bear); - - 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) ); - - switch(bear) - { - case AGPS_APN_BEARER_IPV4: - conn_status_req.apnProfile.pdnType = - eQMI_LOC_APN_PROFILE_PDN_TYPE_IPV4_V02; - break; - - case AGPS_APN_BEARER_IPV6: - conn_status_req.apnProfile.pdnType = - eQMI_LOC_APN_PROFILE_PDN_TYPE_IPV6_V02; - break; - - case AGPS_APN_BEARER_IPV4V6: - conn_status_req.apnProfile.pdnType = - eQMI_LOC_APN_PROFILE_PDN_TYPE_IPV4V6_V02; - break; - - default: - LOC_LOGE("%s:%d]:invalid bearer type\n",__func__,__LINE__); - return LOC_API_ADAPTER_ERR_INVALID_HANDLE; - } - - 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; - -} -#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) -{ - locClientStatusEnumType result = eLOC_CLIENT_SUCCESS; - locClientReqUnionType req_union; - qmiLocInformLocationServerConnStatusReqMsgT_v02 conn_status_req; - qmiLocInformLocationServerConnStatusIndMsgT_v02 conn_status_ind; - - LOC_LOGD("%s:%d]: ATL close handle = %d, is_succ = %d\n", - __func__, __LINE__, handle, is_succ); - - 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_CLOSE_V02; - - if(is_succ) - { - conn_status_req.statusType = eQMI_LOC_SERVER_REQ_STATUS_SUCCESS_V02; - } - 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; -} - -/* set the SUPL version */ -enum loc_api_adapter_err LocApiV02Adapter :: setSUPLVersion(uint32_t version) -{ - locClientStatusEnumType result = eLOC_CLIENT_SUCCESS; - locClientReqUnionType req_union; - - qmiLocSetProtocolConfigParametersReqMsgT_v02 supl_config_req; - qmiLocSetProtocolConfigParametersIndMsgT_v02 supl_config_ind; - - LOC_LOGD("%s:%d]: supl version = %d\n", __func__, __LINE__, version); - - - memset(&supl_config_req, 0, sizeof(supl_config_req)); - memset(&supl_config_ind, 0, sizeof(supl_config_ind)); - - supl_config_req.suplVersion_valid = 1; - // SUPL version from MSByte to LSByte: - // (reserved)(major version)(minor version)(serviceIndicator) - - supl_config_req.suplVersion = (version == 0x00020000)? - eQMI_LOC_SUPL_VERSION_2_0_V02 : eQMI_LOC_SUPL_VERSION_1_0_V02; - - req_union.pSetProtocolConfigParametersReq = &supl_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, - &supl_config_ind); - - if(result != eLOC_CLIENT_SUCCESS || - eQMI_LOC_SUCCESS_V02 != supl_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(supl_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) -{ - locClientStatusEnumType result = eLOC_CLIENT_SUCCESS; - locClientReqUnionType req_union; - - qmiLocSetSensorControlConfigReqMsgT_v02 sensor_config_req; - qmiLocSetSensorControlConfigIndMsgT_v02 sensor_config_ind; - - LOC_LOGD("%s:%d]: sensors disabled = %d\n", __func__, __LINE__, sensorsDisabled); - - memset(&sensor_config_req, 0, sizeof(sensor_config_req)); - memset(&sensor_config_ind, 0, sizeof(sensor_config_ind)); - - sensor_config_req.sensorsUsage_valid = 1; - sensor_config_req.sensorsUsage = (sensorsDisabled == 1) ? eQMI_LOC_SENSOR_CONFIG_SENSOR_USE_DISABLE_V02 - : eQMI_LOC_SENSOR_CONFIG_SENSOR_USE_ENABLE_V02; - - req_union.pSetSensorControlConfigReq = &sensor_config_req; - - result = loc_sync_send_req(clientHandle, - QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02, - req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT, - QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02, - &sensor_config_ind); - - if(result != eLOC_CLIENT_SUCCESS || - eQMI_LOC_SUCCESS_V02 != sensor_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(sensor_config_ind.status)); - - return LOC_API_ADAPTER_ERR_GENERAL_FAILURE; - } - - return LOC_API_ADAPTER_ERR_SUCCESS; -} - -/* set the Sensor Properties */ -enum loc_api_adapter_err LocApiV02Adapter :: setSensorProperties(float gyroBiasVarianceRandomWalk) -{ - locClientStatusEnumType result = eLOC_CLIENT_SUCCESS; - locClientReqUnionType req_union; - - qmiLocSetSensorPropertiesReqMsgT_v02 sensor_prop_req; - qmiLocSetSensorPropertiesIndMsgT_v02 sensor_prop_ind; - - LOC_LOGI("%s:%d]: sensors prop gyroBiasRandomWalk = %f\n", - __func__, __LINE__, gyroBiasVarianceRandomWalk); - - memset(&sensor_prop_req, 0, sizeof(sensor_prop_req)); - memset(&sensor_prop_ind, 0, sizeof(sensor_prop_ind)); - - sensor_prop_req.gyroBiasVarianceRandomWalk_valid = 1; - sensor_prop_req.gyroBiasVarianceRandomWalk = gyroBiasVarianceRandomWalk; - - req_union.pSetSensorPropertiesReq = &sensor_prop_req; - - result = loc_sync_send_req(clientHandle, - QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02, - req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT, - QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02, - &sensor_prop_ind); - - if(result != eLOC_CLIENT_SUCCESS || - eQMI_LOC_SUCCESS_V02 != sensor_prop_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(sensor_prop_ind.status)); - - return LOC_API_ADAPTER_ERR_GENERAL_FAILURE; - } - - return LOC_API_ADAPTER_ERR_SUCCESS; -} - -/* set the Sensor Performance Config */ -enum loc_api_adapter_err LocApiV02Adapter :: setSensorPerfControlConfig(int controlMode, - int accelSamplesPerBatch, int accelBatchesPerSec, - int gyroSamplesPerBatch, int gyroBatchesPerSec) -{ - locClientStatusEnumType result = eLOC_CLIENT_SUCCESS; - locClientReqUnionType req_union; - - qmiLocSetSensorPerformanceControlConfigReqMsgT_v02 sensor_perf_config_req; - 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", - __FUNCTION__, - __LINE__, - controlMode, - accelSamplesPerBatch, - accelBatchesPerSec, - gyroSamplesPerBatch, - gyroBatchesPerSec - ); - - memset(&sensor_perf_config_req, 0, sizeof(sensor_perf_config_req)); - memset(&sensor_perf_config_ind, 0, sizeof(sensor_perf_config_ind)); - - sensor_perf_config_req.performanceControlMode_valid = 1; - sensor_perf_config_req.performanceControlMode = (qmiLocSensorPerformanceControlModeEnumT_v02)controlMode; - sensor_perf_config_req.accelSamplingSpec_valid = 1; - sensor_perf_config_req.accelSamplingSpec.batchesPerSecond = accelBatchesPerSec; - sensor_perf_config_req.accelSamplingSpec.samplesPerBatch = accelSamplesPerBatch; - sensor_perf_config_req.gyroSamplingSpec_valid = 1; - sensor_perf_config_req.gyroSamplingSpec.batchesPerSecond = gyroBatchesPerSec; - sensor_perf_config_req.gyroSamplingSpec.samplesPerBatch = gyroSamplesPerBatch; - - req_union.pSetSensorPerformanceControlConfigReq = &sensor_perf_config_req; - - result = loc_sync_send_req(clientHandle, - QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02, - req_union, LOC_ENGINE_SYNC_REQUEST_TIMEOUT, - QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02, - &sensor_perf_config_ind); - - if(result != eLOC_CLIENT_SUCCESS || - eQMI_LOC_SUCCESS_V02 != sensor_perf_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(sensor_perf_config_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) -{ - locClientEventMaskType eventMask = 0; - LOC_LOGD("%s:%d]: adapter mask = %u\n", __func__, __LINE__, mask); - - if(mask & LOC_API_ADAPTER_BIT_PARSED_POSITION_REPORT) - eventMask |= QMI_LOC_EVENT_MASK_POSITION_REPORT_V02; - - if(mask & LOC_API_ADAPTER_BIT_SATELLITE_REPORT) - eventMask |= QMI_LOC_EVENT_MASK_GNSS_SV_INFO_V02; - - /* treat NMEA_1Hz and NMEA_POSITION_REPORT the same*/ - if( (mask & LOC_API_ADAPTER_BIT_NMEA_POSITION_REPORT) || - (mask & LOC_API_ADAPTER_BIT_NMEA_1HZ_REPORT) ) - eventMask |= QMI_LOC_EVENT_MASK_NMEA_V02; - - if(mask & LOC_API_ADAPTER_BIT_NI_NOTIFY_VERIFY_REQUEST) - eventMask |= QMI_LOC_EVENT_MASK_NI_NOTIFY_VERIFY_REQ_V02; - - if(mask & LOC_API_ADAPTER_BIT_ASSISTANCE_DATA_REQUEST) - { - // TBD: This needs to be decoupled in the HAL - eventMask |= QMI_LOC_EVENT_MASK_INJECT_PREDICTED_ORBITS_REQ_V02; - eventMask |= QMI_LOC_EVENT_MASK_INJECT_TIME_REQ_V02; - eventMask |= QMI_LOC_EVENT_MASK_INJECT_POSITION_REQ_V02; - } - - if(mask & LOC_API_ADAPTER_BIT_STATUS_REPORT) - { - eventMask |= (QMI_LOC_EVENT_MASK_ENGINE_STATE_V02); - } - - if(mask & LOC_API_ADAPTER_BIT_LOCATION_SERVER_REQUEST) - eventMask |= QMI_LOC_EVENT_MASK_LOCATION_SERVER_CONNECTION_REQ_V02; - - return eventMask; -} - -/* Convert error from loc_api_v02 to loc eng format*/ -enum loc_api_adapter_err LocApiV02Adapter :: convertErr( - locClientStatusEnumType status) -{ - switch( status) - { - case LOC_API_ADAPTER_ERR_SUCCESS: - return LOC_API_ADAPTER_ERR_SUCCESS; - - case eLOC_CLIENT_FAILURE_GENERAL: - return LOC_API_ADAPTER_ERR_GENERAL_FAILURE; - - case eLOC_CLIENT_FAILURE_UNSUPPORTED: - return LOC_API_ADAPTER_ERR_UNSUPPORTED; - - case eLOC_CLIENT_FAILURE_INVALID_PARAMETER: - return LOC_API_ADAPTER_ERR_INVALID_PARAMETER; - - case eLOC_CLIENT_FAILURE_ENGINE_BUSY: - return LOC_API_ADAPTER_ERR_ENGINE_BUSY; - - case eLOC_CLIENT_FAILURE_PHONE_OFFLINE: - return LOC_API_ADAPTER_ERR_PHONE_OFFLINE; - - case eLOC_CLIENT_FAILURE_TIMEOUT: - return LOC_API_ADAPTER_ERR_TIMEOUT; - - case eLOC_CLIENT_FAILURE_INVALID_HANDLE: - return LOC_API_ADAPTER_ERR_INVALID_HANDLE; - - case eLOC_CLIENT_FAILURE_SERVICE_NOT_PRESENT: - return LOC_API_ADAPTER_ERR_SERVICE_NOT_PRESENT; - - default: - return LOC_API_ADAPTER_ERR_FAILURE; - } -} - -/* convert position report to loc eng format and send the converted - position to loc eng */ - -void LocApiV02Adapter :: reportPosition ( - const qmiLocEventPositionReportIndMsgT_v02 *location_report_ptr) -{ - GpsLocation location; - - memset(&location, 0, sizeof (GpsLocation)); - location.size = sizeof(location); - // Process the position from final and intermediate reports - - if( (location_report_ptr->sessionStatus == eQMI_LOC_SESS_STATUS_SUCCESS_V02) || - (location_report_ptr->sessionStatus == eQMI_LOC_SESS_STATUS_IN_PROGRESS_V02) - ) - { - // Latitude & Longitude - if( (location_report_ptr->latitude_valid == 1 ) && - (location_report_ptr->longitude_valid == 1) && - (location_report_ptr->latitude != 0 || - location_report_ptr->longitude!= 0)) - { - location.flags |= GPS_LOCATION_HAS_LAT_LONG; - location.latitude = location_report_ptr->latitude; - location.longitude = location_report_ptr->longitude; - - // Time stamp (UTC) - if(location_report_ptr->timestampUtc_valid == 1) - { - location.timestamp = location_report_ptr->timestampUtc; - } - - // Altitude - if(location_report_ptr->altitudeWrtEllipsoid_valid == 1 ) - { - location.flags |= GPS_LOCATION_HAS_ALTITUDE; - location.altitude = location_report_ptr->altitudeWrtEllipsoid; - } - - // Speed - if((location_report_ptr->speedHorizontal_valid == 1) && - (location_report_ptr->speedVertical_valid ==1 ) ) - { - location.flags |= GPS_LOCATION_HAS_SPEED; - location.speed = sqrt( - (location_report_ptr->speedHorizontal * - location_report_ptr->speedHorizontal) + - (location_report_ptr->speedVertical * - location_report_ptr->speedVertical) ); - } - - // Heading - if(location_report_ptr->heading_valid == 1) - { - location.flags |= GPS_LOCATION_HAS_BEARING; - location.bearing = location_report_ptr->heading; - } - - // Uncertainty (circular) - if( (location_report_ptr->horUncCircular_valid ) ) - { - location.flags |= GPS_LOCATION_HAS_ACCURACY; - location.accuracy = location_report_ptr->horUncCircular; - } - - LocApiAdapter::reportPosition( location, - locEngHandle.extPosInfo((void*)location_report_ptr), - (location_report_ptr->sessionStatus - == eQMI_LOC_SESS_STATUS_IN_PROGRESS_V02 ? - LOC_SESS_INTERMEDIATE : LOC_SESS_SUCCESS)); - } - } - else - { - LocApiAdapter::reportPosition(location, - NULL, - LOC_SESS_FAILURE); - - LOC_LOGD("%s:%d]: Ignoring position report with sess status = %d, " - "fix id = %u\n", __func__, __LINE__, - location_report_ptr->sessionStatus, - location_report_ptr->fixId ); - } -} - -/* convert satellite report to loc eng format and send the converted - report to loc eng */ -void LocApiV02Adapter :: reportSv ( - const qmiLocEventGnssSvInfoIndMsgT_v02 *gnss_report_ptr) -{ - GpsSvStatus SvStatus; - int num_svs_max, i; - const qmiLocSvInfoStructT_v02 *sv_info_ptr; - - LOC_LOGV ("%s:%d]: num of sv = %d\n", __func__, __LINE__, - gnss_report_ptr->svList_len); - - num_svs_max = 0; - memset (&SvStatus, 0, sizeof (GpsSvStatus)); - if(gnss_report_ptr->svList_valid == 1) - { - num_svs_max = gnss_report_ptr->svList_len; - if(num_svs_max > GPS_MAX_SVS) - { - num_svs_max = GPS_MAX_SVS; - } - SvStatus.num_svs = 0; - for(i = 0; i < num_svs_max; i++) - { - sv_info_ptr = &(gnss_report_ptr->svList[i]); - if((sv_info_ptr->validMask & QMI_LOC_SV_INFO_MASK_VALID_SYSTEM_V02) && - (sv_info_ptr->validMask & QMI_LOC_SV_INFO_MASK_VALID_GNSS_SVID_V02) - && (sv_info_ptr->gnssSvId != 0 )) - { - if(sv_info_ptr->system == eQMI_LOC_SV_SYSTEM_GPS_V02) - { - SvStatus.sv_list[SvStatus.num_svs].size = sizeof(GpsSvStatus); - SvStatus.sv_list[SvStatus.num_svs].prn = (int)sv_info_ptr->gnssSvId; - - // We only have the data field to report gps eph and alm mask - if(sv_info_ptr->validMask & - QMI_LOC_SV_INFO_MASK_VALID_SVINFO_MASK_V02) - { - if(sv_info_ptr->svInfoMask & - QMI_LOC_SVINFO_MASK_HAS_EPHEMERIS_V02) - { - SvStatus.ephemeris_mask |= (1 << (sv_info_ptr->gnssSvId-1)); - } - if(sv_info_ptr->svInfoMask & - QMI_LOC_SVINFO_MASK_HAS_ALMANAC_V02) - { - SvStatus.almanac_mask |= (1 << (sv_info_ptr->gnssSvId-1)); - } - } - - if((sv_info_ptr->validMask & - QMI_LOC_SV_INFO_MASK_VALID_PROCESS_STATUS_V02) - && - (sv_info_ptr->svStatus == eQMI_LOC_SV_STATUS_TRACK_V02)) - { - SvStatus.used_in_fix_mask |= (1 << (sv_info_ptr->gnssSvId-1)); - } - } - // SBAS: GPS RPN: 120-151, - // In exteneded measurement report, we follow nmea standard, - // which is from 33-64. - else if(sv_info_ptr->system == eQMI_LOC_SV_SYSTEM_SBAS_V02) - { - SvStatus.sv_list[SvStatus.num_svs].prn = - sv_info_ptr->gnssSvId + 33 - 120; - } - // Gloness: Slot id: 1-32 - // In extended measurement report, we follow nmea standard, - // which is 65-96 - else if(sv_info_ptr->system == eQMI_LOC_SV_SYSTEM_GLONASS_V02) - { - SvStatus.sv_list[SvStatus.num_svs].prn = - sv_info_ptr->gnssSvId + (65-1); - } - // Unsupported SV system - else - { - continue; - } - } - - if(sv_info_ptr->validMask & QMI_LOC_SV_INFO_MASK_VALID_SNR_V02 ) - { - SvStatus.sv_list[SvStatus.num_svs].snr = sv_info_ptr->snr; - } - - if(sv_info_ptr->validMask & QMI_LOC_SV_INFO_MASK_VALID_ELEVATION_V02) - { - SvStatus.sv_list[SvStatus.num_svs].elevation = sv_info_ptr->elevation; - } - - if(sv_info_ptr->validMask & QMI_LOC_SV_INFO_MASK_VALID_AZIMUTH_V02) - { - SvStatus.sv_list[SvStatus.num_svs].azimuth = sv_info_ptr->azimuth; - } - - SvStatus.num_svs++; - } - } - - if (SvStatus.num_svs != 0) - { - LOC_LOGV ("%s:%d]: firing SV callback\n", __func__, __LINE__); - LocApiAdapter::reportSv(SvStatus, - locEngHandle.extSvInfo((void*)gnss_report_ptr)); - } -} - -/* convert engine state report to loc eng format and send the converted - report to loc eng */ -void LocApiV02Adapter :: reportEngineState ( - const qmiLocEventEngineStateIndMsgT_v02 *engine_state_ptr) -{ - - LOC_LOGV("%s:%d]: state = %d\n", __func__, __LINE__, - engine_state_ptr->engineState); - - if (engine_state_ptr->engineState == eQMI_LOC_ENGINE_STATE_ON_V02) - { - LocApiAdapter::reportStatus(GPS_STATUS_ENGINE_ON); - LocApiAdapter::reportStatus(GPS_STATUS_SESSION_BEGIN); - } - else if (engine_state_ptr->engineState == eQMI_LOC_ENGINE_STATE_OFF_V02) - { - LocApiAdapter::reportStatus(GPS_STATUS_SESSION_END); - LocApiAdapter::reportStatus(GPS_STATUS_ENGINE_OFF); - } - else - { - LocApiAdapter::reportStatus(GPS_STATUS_NONE); - } - -} - -/* convert fix session state report to loc eng format and send the converted - report to loc eng */ -void LocApiV02Adapter :: reportFixSessionState ( - const qmiLocEventFixSessionStateIndMsgT_v02 *fix_session_state_ptr) -{ - GpsStatusValue status; - LOC_LOGD("%s:%d]: state = %d\n", __func__, __LINE__, - fix_session_state_ptr->sessionState); - - status = GPS_STATUS_NONE; - if (fix_session_state_ptr->sessionState == eQMI_LOC_FIX_SESSION_STARTED_V02) - { - status = GPS_STATUS_SESSION_BEGIN; - } - else if (fix_session_state_ptr->sessionState - == eQMI_LOC_FIX_SESSION_FINISHED_V02) - { - status = GPS_STATUS_SESSION_END; - } - LocApiAdapter::reportStatus(status); -} - -/* convert NMEA report to loc eng format and send the converted - report to loc eng */ -void LocApiV02Adapter :: reportNmea ( - const qmiLocEventNmeaIndMsgT_v02 *nmea_report_ptr) -{ - - LocApiAdapter::reportNmea(nmea_report_ptr->nmea, - strlen(nmea_report_ptr->nmea)); - - LOC_LOGD("%s:%d]: $%c%c%c\n", __func__, __LINE__, - nmea_report_ptr->nmea[3], nmea_report_ptr->nmea[4], - nmea_report_ptr->nmea[5]); -} - -/* convert and report an ATL request to loc engine */ -void LocApiV02Adapter :: reportAtlRequest( - const qmiLocEventLocationServerConnectionReqIndMsgT_v02 * server_request_ptr) -{ - uint32_t connHandle = server_request_ptr->connHandle; - // 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 - switch(server_request_ptr->wwanType) - { - case eQMI_LOC_WWAN_TYPE_INTERNET_V02: - agpsType = AGPS_TYPE_WWAN_ANY; - break; - - case eQMI_LOC_WWAN_TYPE_AGNSS_V02: - agpsType = AGPS_TYPE_SUPL; - break; - - default: - agpsType = AGPS_TYPE_WWAN_ANY; - break; - } -#else - agpsType = AGPS_TYPE_SUPL; -#endif - LocApiAdapter::requestATL(connHandle, agpsType); - } - - // service the ATL close request - else if (server_request_ptr->requestType == eQMI_LOC_SERVER_REQUEST_CLOSE_V02) - { - LocApiAdapter::releaseATL(connHandle); - } -} - -/* conver the NI report to loc eng format and send t loc engine */ -void LocApiV02Adapter :: reportNiRequest( - const qmiLocEventNiNotifyVerifyReqIndMsgT_v02 *ni_req_ptr) -{ - GpsNiNotification notif; - - /* initialize the notification*/ - memset(notif.extras, 0, sizeof notif.extras); - memset(notif.text, 0, sizeof notif.text); - memset(notif.requestor_id, 0, sizeof notif.requestor_id); - - /* NI timeout gets overwritten in LocApiAdapter, - initializing to 0 here */ - notif.timeout = 0; - - notif.text_encoding = GPS_ENC_NONE ; - - notif.requestor_id_encoding = GPS_ENC_UNKNOWN; - - notif.notify_flags = 0; - - notif.default_response = GPS_NI_RESPONSE_NORESP; - - /*Handle Vx request */ - if(ni_req_ptr->NiVxInd_valid == 1) - { - const qmiLocNiVxNotifyVerifyStructT_v02 *vx_req = &(ni_req_ptr->NiVxInd); - - notif.ni_type = GPS_NI_TYPE_VOICE; - - // Requestor ID, the requestor id recieved is NULL terminated - hexcode(notif.requestor_id, sizeof notif.requestor_id, - (char *)vx_req->requestorId, vx_req->requestorId_len ); - } - - /* Handle UMTS CP request*/ - else if(ni_req_ptr->NiUmtsCpInd_valid == 1) - { - const qmiLocNiUmtsCpNotifyVerifyStructT_v02 *umts_cp_req = - &ni_req_ptr->NiUmtsCpInd; - - notif.ni_type = GPS_NI_TYPE_UMTS_CTRL_PLANE; - - /* notificationText should always be a NULL terminated string */ - hexcode(notif.text, sizeof notif.text, - (char *)umts_cp_req->notificationText, - umts_cp_req->notificationText_len); - - /* Store requestor ID */ - hexcode(notif.requestor_id, sizeof(notif.requestor_id), - (char *)umts_cp_req->requestorId.codedString, - umts_cp_req->requestorId.codedString_len); - - /* convert encodings */ - notif.text_encoding = convertNiEncoding(umts_cp_req->dataCodingScheme); - - notif.requestor_id_encoding = - convertNiEncoding(umts_cp_req->requestorId.dataCodingScheme); - - /* LCS address (using extras field) */ - if ( umts_cp_req->clientAddress_len != 0) - { - char lcs_addr[32]; // Decoded LCS address for UMTS CP NI - - // Copy LCS Address into notif.extras in the format: Address = 012345 - strlcat(notif.extras, LOC_NI_NOTIF_KEY_ADDRESS, sizeof (notif.extras)); - strlcat(notif.extras, " = ", sizeof notif.extras); - int addr_len = 0; - const char *address_source = NULL; - address_source = (char *)umts_cp_req->clientAddress; - // client Address is always NULL terminated - addr_len = decodeAddress(lcs_addr, sizeof(lcs_addr), address_source, - umts_cp_req->clientAddress_len); - - // The address is ASCII string - if (addr_len) - { - strlcat(notif.extras, lcs_addr, sizeof notif.extras); - } - } - - } - else if(ni_req_ptr->NiSuplInd_valid == 1) - { - const qmiLocNiSuplNotifyVerifyStructT_v02 *supl_req = - &ni_req_ptr->NiSuplInd; - - notif.ni_type = GPS_NI_TYPE_UMTS_SUPL; - - // Client name - if (supl_req->valid_flags & QMI_LOC_SUPL_CLIENT_NAME_MASK_V02) - { - hexcode(notif.text, sizeof(notif.text), - (char *)supl_req->clientName.formattedString, - supl_req->clientName.formattedString_len); - LOC_LOGV("%s:%d]: SUPL NI: client_name: %s \n", __func__, __LINE__, - notif.text); - } - else - { - LOC_LOGV("%s:%d]: SUPL NI: client_name not present.", - __func__, __LINE__); - } - - // Requestor ID - if (supl_req->valid_flags & QMI_LOC_SUPL_REQUESTOR_ID_MASK_V02) - { - hexcode(notif.requestor_id, sizeof notif.requestor_id, - (char*)supl_req->requestorId.formattedString, - supl_req->requestorId.formattedString_len ); - - LOC_LOGV("%s:%d]: SUPL NI: requestor_id: %s \n", __func__, __LINE__, - notif.requestor_id); - } - else - { - LOC_LOGV("%s:%d]: SUPL NI: requestor_id not present.", - __func__, __LINE__); - } - - // Encoding type - if (supl_req->valid_flags & QMI_LOC_SUPL_DATA_CODING_SCHEME_MASK_V02) - { - notif.text_encoding = convertNiEncoding(supl_req->dataCodingScheme); - - notif.requestor_id_encoding = convertNiEncoding(supl_req->dataCodingScheme); - } - else - { - notif.text_encoding = notif.requestor_id_encoding = GPS_ENC_UNKNOWN; - } - - } //ni_req_ptr->NiSuplInd_valid == 1 - - else - { - LOC_LOGE("%s:%d]: unknown request event \n",__func__, __LINE__); - return; - } - - // Set default_response & notify_flags - convertNiNotifyVerifyType(¬if, ni_req_ptr->notificationType); - - qmiLocEventNiNotifyVerifyReqIndMsgT_v02 *ni_req_copy_ptr = - (qmiLocEventNiNotifyVerifyReqIndMsgT_v02 *)malloc(sizeof(*ni_req_copy_ptr)); - - if( NULL != ni_req_copy_ptr) - { - memcpy(ni_req_copy_ptr, ni_req_ptr, sizeof(*ni_req_copy_ptr)); - - LocApiAdapter::requestNiNotify(notif, (const void*)ni_req_copy_ptr); - } - else - { - LOC_LOGE("%s:%d]: Error copying NI request\n", __func__, __LINE__); - } - -} - -/* convert Ni Encoding type from QMI_LOC to loc eng format */ -GpsNiEncodingType LocApiV02Adapter ::convertNiEncoding( - qmiLocNiDataCodingSchemeEnumT_v02 loc_encoding) -{ - GpsNiEncodingType enc = GPS_ENC_UNKNOWN; - - switch (loc_encoding) - { - case eQMI_LOC_NI_SUPL_UTF8_V02: - enc = GPS_ENC_SUPL_UTF8; - break; - case eQMI_LOC_NI_SUPL_UCS2_V02: - enc = GPS_ENC_SUPL_UCS2; - break; - case eQMI_LOC_NI_SUPL_GSM_DEFAULT_V02: - enc = GPS_ENC_SUPL_GSM_DEFAULT; - break; - case eQMI_LOC_NI_SS_LANGUAGE_UNSPEC_V02: - enc = GPS_ENC_SUPL_GSM_DEFAULT; // SS_LANGUAGE_UNSPEC = GSM - break; - default: - break; - } - - return enc; -} - -/*convert NI notify verify type from QMI LOC to loc eng format*/ -bool LocApiV02Adapter :: convertNiNotifyVerifyType ( - GpsNiNotification *notif, - qmiLocNiNotifyVerifyEnumT_v02 notif_priv) -{ - switch (notif_priv) - { - case eQMI_LOC_NI_USER_NO_NOTIFY_NO_VERIFY_V02: - notif->notify_flags = 0; - break; - - case eQMI_LOC_NI_USER_NOTIFY_ONLY_V02: - notif->notify_flags = GPS_NI_NEED_NOTIFY; - break; - - case eQMI_LOC_NI_USER_NOTIFY_VERIFY_ALLOW_NO_RESP_V02: - notif->notify_flags = GPS_NI_NEED_NOTIFY | GPS_NI_NEED_VERIFY; - notif->default_response = GPS_NI_RESPONSE_ACCEPT; - break; - - case eQMI_LOC_NI_USER_NOTIFY_VERIFY_NOT_ALLOW_NO_RESP_V02: - notif->notify_flags = GPS_NI_NEED_NOTIFY | GPS_NI_NEED_VERIFY; - notif->default_response = GPS_NI_RESPONSE_DENY; - break; - - case eQMI_LOC_NI_USER_NOTIFY_VERIFY_PRIVACY_OVERRIDE_V02: - notif->notify_flags = GPS_NI_PRIVACY_OVERRIDE; - break; - - default: - return false; - } - - return true; -} - -/* event callback registered with the loc_api v02 interface */ -void LocApiV02Adapter :: eventCb(locClientHandleType clientHandle, - uint32_t eventId, locClientEventIndUnionType eventPayload) -{ - LOC_LOGD("%s:%d]: event id = %d\n", __func__, __LINE__, - eventId); - - switch(eventId) - { - //Position Report - case QMI_LOC_EVENT_POSITION_REPORT_IND_V02: - reportPosition(eventPayload.pPositionReportEvent); - break; - - // Satellite report - case QMI_LOC_EVENT_GNSS_SV_INFO_IND_V02: - reportSv(eventPayload.pGnssSvInfoReportEvent); - break; - - // Status report - case QMI_LOC_EVENT_ENGINE_STATE_IND_V02: - reportEngineState(eventPayload.pEngineState); - break; - - case QMI_LOC_EVENT_FIX_SESSION_STATE_IND_V02: - reportFixSessionState(eventPayload.pFixSessionState); - break; - - // NMEA - case QMI_LOC_EVENT_NMEA_IND_V02: - reportNmea(eventPayload.pNmeaReportEvent); - break; - - // XTRA request - case QMI_LOC_EVENT_INJECT_PREDICTED_ORBITS_REQ_IND_V02: - LOC_LOGD("%s:%d]: XTRA download request\n", __func__, - __LINE__); - requestXtraData(); - break; - - // time request - case QMI_LOC_EVENT_INJECT_TIME_REQ_IND_V02: - LOC_LOGD("%s:%d]: Time request\n", __func__, - __LINE__); - requestTime(); - break; - - //position request - case QMI_LOC_EVENT_INJECT_POSITION_REQ_IND_V02: - LOC_LOGD("%s:%d]: Position request\n", __func__, - __LINE__); - //requestPosition(); - break; - - // NI request - case QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_IND_V02: - reportNiRequest(eventPayload.pNiNotifyVerifyReqEvent); - break; - - // AGPS connection request - case QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02: - reportAtlRequest(eventPayload.pLocationServerConnReqEvent); - break; - } -} - -/* Call the service LocApiAdapter down event*/ -void LocApiV02Adapter :: errorCb(locClientHandleType handle, - locClientErrorEnumType errorId) -{ - if(errorId == eLOC_CLIENT_ERROR_SERVICE_UNAVAILABLE) - { - LOC_LOGE("%s:%d]: Service unavailable error\n", - __func__, __LINE__); - - LocApiAdapter::handleEngineDownEvent(); - - /* immediately send the engine up event so that - the loc engine re-initializes the adapter and the - loc-api_v02 interface */ - - LocApiAdapter::handleEngineUpEvent(); - } -} - -/* return a Loc API adapter */ -extern "C" LocApiAdapter* getLocApiAdapter(LocEng &locEng) -{ - return(new LocApiV02Adapter(locEng)); -} diff --git a/loc_api/loc_api_v02/LocApiV02Adapter.h b/loc_api/loc_api_v02/LocApiV02Adapter.h deleted file mode 100644 index 487e98eb..00000000 --- a/loc_api/loc_api_v02/LocApiV02Adapter.h +++ /dev/null @@ -1,197 +0,0 @@ -/* 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 - * 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 Code Aurora Forum, 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 "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. - */ - -#ifndef LOC_API_V_0_2_ADAPTER_H -#define LOC_API_V_0_2_ADAPTER_H - -#include -#include "loc_api_v02_client.h" -#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. - This class also implements some of the virtual functions that - handle the requests from loc engine. */ -class LocApiV02Adapter : public LocApiAdapter { - - /* loc api v02 handle*/ - locClientHandleType clientHandle; - - /* 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); - - /* Convert error from loc_api_v02 to loc eng format*/ - enum loc_api_adapter_err convertErr(locClientStatusEnumType status); - - /* convert Ni Encoding type from QMI_LOC to loc eng format */ - GpsNiEncodingType convertNiEncoding( - qmiLocNiDataCodingSchemeEnumT_v02 loc_encoding); - - /*convert NI notify verify type from QMI LOC to loc eng format*/ - bool convertNiNotifyVerifyType (GpsNiNotification *notif, - qmiLocNiNotifyVerifyEnumT_v02 notif_priv); - - /* close Loc API V02 client */ - int deInitLocClient(); - - /* convert position report to loc eng format and send the converted - position to loc eng */ - void reportPosition - (const qmiLocEventPositionReportIndMsgT_v02 *location_report_ptr); - - /* convert satellite report to loc eng format and send the converted - report to loc eng */ - void reportSv (const qmiLocEventGnssSvInfoIndMsgT_v02 *gnss_report_ptr); - - /* convert engine state report to loc eng format and send the converted - report to loc eng */ - void reportEngineState ( - const qmiLocEventEngineStateIndMsgT_v02 *engine_state_ptr); - - /* convert fix session report to loc eng format and send the converted - report to loc eng */ - void reportFixSessionState ( - const qmiLocEventFixSessionStateIndMsgT_v02 *fix_session_state_ptr); - - /* convert NMEA report to loc eng format and send the converted - report to loc eng */ - void reportNmea (const qmiLocEventNmeaIndMsgT_v02 *nmea_report_ptr); - - /* convert and report an ATL request to loc engine */ - void reportAtlRequest( - const qmiLocEventLocationServerConnectionReqIndMsgT_v02 - *server_request_ptr); - - /* convert and report NI request to loc eng */ - void reportNiRequest( - const qmiLocEventNiNotifyVerifyReqIndMsgT_v02 *ni_req_ptr); - -public: - LocApiV02Adapter(LocEng &locEng); - ~LocApiV02Adapter(); - - /* event callback registered with the loc_api v02 interface */ - void eventCb(locClientHandleType client_handle, - uint32_t loc_event_id, - locClientEventIndUnionType loc_event_payload); - - /* error callback, this function handles the service unavailable - error */ - void errorCb(locClientHandleType handle, - locClientErrorEnumType errorId); - - virtual enum loc_api_adapter_err reinit(); - - virtual enum loc_api_adapter_err startFix(); - - 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); - - virtual enum loc_api_adapter_err - setTime(GpsUtcTime time, int64_t timeReference, int uncertainty); - - virtual enum loc_api_adapter_err - injectPosition(double latitude, double longitude, float accuracy); - - virtual enum loc_api_adapter_err - deleteAidingData(GpsAidingData f); - - virtual enum loc_api_adapter_err - informNiResponse(GpsUserResponseType userResponse, - const void* passThroughData); - - virtual enum loc_api_adapter_err - setServer(const char* url, int len); - virtual enum loc_api_adapter_err - 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 - setSensorControlConfig(int sensorUsage); - - virtual enum loc_api_adapter_err - setSensorProperties(float gyroBiasVarianceRandomWalk); - - virtual enum loc_api_adapter_err - setSensorPerfControlConfig(int controlMode, - int accelSamplesPerBatch, - int accelBatchesPerSec, - int gyroSamplesPerBatch, - int gyroBatchesPerSec); -}; - -#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 deleted file mode 100644 index b75f1630..00000000 --- a/loc_api/loc_api_v02/loc_api_sync_req.c +++ /dev/null @@ -1,548 +0,0 @@ -/* 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 - * 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 Code Aurora Forum, 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 "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "loc_api_v02_client.h" -#include "loc_api_v02_log.h" -#include "loc_api_sync_req.h" - -/* Logging */ -// Uncomment to log verbose logs -#define LOG_NDEBUG 1 - -// log debug logs -#define LOG_NDDEBUG 1 -#define LOG_TAG "LocSvc_api_v02" -#include "loc_util_log.h" - -#define LOC_SYNC_REQ_BUFFER_SIZE 8 - -pthread_mutex_t loc_sync_call_mutex = PTHREAD_MUTEX_INITIALIZER; - -static bool loc_sync_call_initialized = false; - -typedef struct { - pthread_mutex_t sync_req_lock; - - /* Client ID */ - locClientHandleType client_handle; - - /* waiting conditional variable */ - pthread_cond_t ind_arrived_cond; - - /* Callback waiting data block, protected by loc_cb_data_mutex */ - bool ind_is_selected; /* is cb selected? */ - bool ind_is_waiting; /* is waiting? */ - bool ind_has_arrived; /* callback has arrived */ - uint32_t req_id; /* sync request */ - void *recv_ind_payload_ptr; /* received payload */ - uint32_t recv_ind_id; /* received ind */ - -} loc_sync_req_data_s_type; - -typedef struct { - bool in_use; /* at least one sync call is active */ - bool slot_in_use[LOC_SYNC_REQ_BUFFER_SIZE]; - loc_sync_req_data_s_type slots[LOC_SYNC_REQ_BUFFER_SIZE]; -} loc_sync_req_array_s_type; - -/*************************************************************************** - * DATA FOR ASYNCHRONOUS RPC PROCESSING - **************************************************************************/ -loc_sync_req_array_s_type loc_sync_array; - -/*=========================================================================== - -FUNCTION loc_sync_req_init - -DESCRIPTION - Initialize this module - -DEPENDENCIES - N/A - -RETURN VALUE - none - -SIDE EFFECTS - N/A - -===========================================================================*/ -void loc_sync_req_init() -{ - LOC_LOGV(" %s:%d]:\n", __func__, __LINE__); - pthread_mutex_lock(&loc_sync_call_mutex); - if(true == loc_sync_call_initialized) - { - LOC_LOGD("%s:%d]:already initialized\n", __func__, __LINE__); - pthread_mutex_unlock(&loc_sync_call_mutex); - return; - } - - loc_sync_array.in_use = false; - - memset(loc_sync_array.slot_in_use, 0, sizeof(loc_sync_array.slot_in_use)); - - int i; - for (i = 0; i < LOC_SYNC_REQ_BUFFER_SIZE; i++) - { - loc_sync_req_data_s_type *slot = &loc_sync_array.slots[i]; - - pthread_mutex_init(&slot->sync_req_lock, NULL); - pthread_cond_init(&slot->ind_arrived_cond, NULL); - - slot->client_handle = LOC_CLIENT_INVALID_HANDLE_VALUE; - slot->ind_is_selected = false; /* is ind selected? */ - slot->ind_is_waiting = false; /* is waiting? */ - slot->ind_has_arrived = false; /* callback has arrived */ - slot->recv_ind_id = 0; /* ind to wait for */ - slot->recv_ind_payload_ptr = NULL; - slot->req_id = 0; /* req id */ - } - - loc_sync_call_initialized = true; - pthread_mutex_unlock(&loc_sync_call_mutex); -} - - -/*=========================================================================== - -FUNCTION loc_sync_process_ind - -DESCRIPTION - Wakes up blocked API calls to check if the needed callback has arrived - -DEPENDENCIES - N/A - -RETURN VALUE - none - -SIDE EFFECTS - N/A - -===========================================================================*/ -void loc_sync_process_ind( - locClientHandleType client_handle, /* handle of the client */ - uint32_t ind_id , /* ind id */ - void *ind_payload_ptr /* payload */ -) -{ - - LOC_LOGV("%s:%d]: received indication, handle = %d ind_id = %d \n", - __func__,__LINE__, client_handle, ind_id); - - pthread_mutex_lock(&loc_sync_call_mutex); - - if (!loc_sync_array.in_use) - { - LOC_LOGD("%s:%d]: loc_sync_array not in use \n", - __func__, __LINE__); - pthread_mutex_unlock(&loc_sync_call_mutex); - return; - } - - bool in_use = false, consumed = false; - int i; - - for (i = 0; i < LOC_SYNC_REQ_BUFFER_SIZE && !consumed; i++) - { - loc_sync_req_data_s_type *slot = &loc_sync_array.slots[i]; - - in_use |= loc_sync_array.slot_in_use[i]; - - pthread_mutex_lock(&slot->sync_req_lock); - - if ( (loc_sync_array.slot_in_use[i]) && (slot->client_handle == client_handle) - && (ind_id == slot->recv_ind_id) && (!slot->ind_has_arrived)) - { - // copy the payload to the slot waiting for this ind - size_t payload_size = 0; - - LOC_LOGV("%s:%d]: found slot %d selected for ind %u \n", - __func__, __LINE__, i, ind_id); - - if(true == locClientGetSizeByRespIndId(ind_id, &payload_size) && - NULL != slot->recv_ind_payload_ptr && NULL != ind_payload_ptr) - { - LOC_LOGV("%s:%d]: copying ind payload size = %u \n", - __func__, __LINE__, payload_size); - - memcpy(slot->recv_ind_payload_ptr, ind_payload_ptr, payload_size); - - consumed = true; - - } - /* Received a callback while waiting, wake up thread to check it */ - if (slot->ind_is_waiting) - { - slot->recv_ind_id = ind_id; - - pthread_cond_signal(&slot->ind_arrived_cond); - } - else - { - /* If callback arrives before wait, remember it */ - LOC_LOGV("%s:%d]: ind %u arrived before wait was called \n", - __func__, __LINE__, ind_id); - - slot->ind_has_arrived = true; - } - } - pthread_mutex_unlock(&slot->sync_req_lock); - } - - if (!in_use) { - loc_sync_array.in_use = false; - } - - pthread_mutex_unlock(&loc_sync_call_mutex); -} - -/*=========================================================================== - -FUNCTION loc_alloc_slot - -DESCRIPTION - Allocates a buffer slot for the synchronous API call - -DEPENDENCIES - N/A - -RETURN VALUE - Select ID (>=0) : successful - -1 : buffer full - -SIDE EFFECTS - N/A - -===========================================================================*/ -static int loc_alloc_slot() -{ - int i, select_id = -1; /* no free buffer */ - - pthread_mutex_lock(&loc_sync_call_mutex); - - for (i = 0; i < LOC_SYNC_REQ_BUFFER_SIZE; i++) - { - if (!loc_sync_array.slot_in_use[i]) - { - select_id = i; - loc_sync_array.slot_in_use[i] = 1; - loc_sync_array.in_use = true; - break; - } - } - - pthread_mutex_unlock(&loc_sync_call_mutex); - LOC_LOGV("%s:%d]: returning slot %d\n", - __func__, __LINE__, select_id); - return select_id; -} - -/*=========================================================================== - -FUNCTION loc_free_slot - -DESCRIPTION - Frees a buffer slot after the synchronous API call - -DEPENDENCIES - N/A - -RETURN VALUE - None - -SIDE EFFECTS - N/A - -===========================================================================*/ -static void loc_free_slot(int select_id) -{ - int i; - loc_sync_req_data_s_type *slot; - - pthread_mutex_lock(&loc_sync_call_mutex); - - LOC_LOGD("%s:%d]: freeing slot %d\n", __func__, __LINE__, select_id); - - loc_sync_array.slot_in_use[select_id] = 0; - - slot = &loc_sync_array.slots[select_id]; - - slot->client_handle = LOC_CLIENT_INVALID_HANDLE_VALUE; - slot->ind_is_selected = false; /* is ind selected? */ - slot->ind_is_waiting = false; /* is waiting? */ - slot->ind_has_arrived = false; /* callback has arrived */ - slot->recv_ind_id = 0; /* ind to wait for */ - slot->recv_ind_payload_ptr = NULL; - slot->req_id = 0; - - // check if all slots are now free - for (i = 0; i < LOC_SYNC_REQ_BUFFER_SIZE; i++) - { - if (loc_sync_array.slot_in_use[i]) break; - } - - if (i >= LOC_SYNC_REQ_BUFFER_SIZE) - { - loc_sync_array.in_use = false; - } - - pthread_mutex_unlock(&loc_sync_call_mutex); -} - -/*=========================================================================== - -FUNCTION loc_sync_select_ind - -DESCRIPTION - Selects which indication to wait for. - - -DEPENDENCIES - N/A - -RETURN VALUE - Select ID (>=0) : successful - -ENOMEM : out of buffer - -SIDE EFFECTS - N/A - -===========================================================================*/ -static int loc_sync_select_ind( - locClientHandleType client_handle, /* Client handle */ - uint32_t ind_id, /* ind Id wait for */ - uint32_t req_id, /* req id */ - void * ind_payload_ptr /* ptr where payload should be copied to*/ -) -{ - int select_id = loc_alloc_slot(); - - LOC_LOGV("%s:%d]: client handle %d, ind_id %u, req_id %u \n", - __func__, __LINE__, client_handle, ind_id, req_id); - - if (select_id < 0) - { - LOC_LOGE("%s:%d]: buffer full for this synchronous req %s \n", - __func__, __LINE__, loc_get_v02_event_name(req_id)); - return -ENOMEM; - } - - loc_sync_req_data_s_type *slot = &loc_sync_array.slots[select_id]; - - pthread_mutex_lock(&slot->sync_req_lock); - - slot->client_handle = client_handle; - slot->ind_is_selected = true; - slot->ind_is_waiting = false; - slot->ind_has_arrived = false; - - slot->recv_ind_id = ind_id; - slot->req_id = req_id; - slot->recv_ind_payload_ptr = ind_payload_ptr; //store the payload ptr - - pthread_mutex_unlock(&slot->sync_req_lock); - - return select_id; -} - - -/*=========================================================================== - -FUNCTION loc_sync_wait_for_ind - -DESCRIPTION - Waits for a selected indication. The wait expires in timeout_seconds seconds. - If the function is called before an existing wait has finished, it will - immediately return error. - -DEPENDENCIES - N/A - -RETURN VALUE - 0 on SUCCESS, -ve value on failure - -SIDE EFFECTS - N/A - -===========================================================================*/ -static int loc_sync_wait_for_ind( - int select_id, /* ID from loc_sync_select_ind() */ - int timeout_seconds, /* Timeout in this number of seconds */ - uint32_t ind_id -) -{ - if (select_id < 0 || select_id >= LOC_SYNC_REQ_BUFFER_SIZE || !loc_sync_array.slot_in_use[select_id]) - { - LOC_LOGE("%s:%d]: invalid select_id: %d \n", - __func__, __LINE__, select_id); - - return (-EINVAL); - } - - loc_sync_req_data_s_type *slot = &loc_sync_array.slots[select_id]; - - int ret_val = 0; /* the return value of this function: 0 = no error */ - int rc; /* return code from pthread calls */ - - struct timeval present_time; - struct timespec expire_time; - - pthread_mutex_lock(&slot->sync_req_lock); - - do - { - if (slot->ind_has_arrived) - { - ret_val = 0; /* success */ - break; - } - - if (slot->ind_is_waiting) - { - LOC_LOGW("%s:%d]: already waiting in this slot %d\n", __func__, - __LINE__, select_id); - ret_val = -EBUSY; // busy - break; - } - - /* Calculate absolute expire time */ - gettimeofday(&present_time, NULL); - expire_time.tv_sec = present_time.tv_sec; - expire_time.tv_nsec = present_time.tv_usec * 1000; - expire_time.tv_sec += timeout_seconds; - - /* Take new wait request */ - slot->ind_is_waiting = true; - - /* Waiting */ - rc = pthread_cond_timedwait(&slot->ind_arrived_cond, - &slot->sync_req_lock, &expire_time); - - slot->ind_is_waiting = false; - - if(rc == ETIMEDOUT) - { - LOC_LOGE("%s:%d]: slot %d, timed out for ind_id %s\n", - __func__, __LINE__, select_id, loc_get_v02_event_name(ind_id)); - ret_val = -ETIMEDOUT; //time out - } - - } while (0); - - pthread_mutex_unlock(&slot->sync_req_lock); - loc_free_slot(select_id); - - return ret_val; -} - -/*=========================================================================== - -FUNCTION loc_sync_send_req - -DESCRIPTION - Synchronous req call (thread safe) - -DEPENDENCIES - N/A - -RETURN VALUE - Loc API 2.0 status - -SIDE EFFECTS - N/A - -===========================================================================*/ -locClientStatusEnumType loc_sync_send_req -( - locClientHandleType client_handle, - uint32_t req_id, /* req id */ - locClientReqUnionType req_payload, - uint32_t timeout_msec, - uint32_t ind_id, //ind ID to block for, usually the same as req_id */ - void *ind_payload_ptr /* can be NULL*/ -) -{ - locClientStatusEnumType status = eLOC_CLIENT_SUCCESS ; - int select_id; - int rc = 0; - - // Select the callback we are waiting for - select_id = loc_sync_select_ind(client_handle, ind_id, req_id, - ind_payload_ptr); - - if (select_id >= 0) - { - status = locClientSendReq (client_handle, req_id, req_payload); - LOC_LOGV("%s:%d]: select_id = %d,locClientSendReq returned %d\n", - __func__, __LINE__, select_id, status); - - if (status != eLOC_CLIENT_SUCCESS ) - { - loc_free_slot(select_id); - } - else - { - // Wait for the indication callback - if (( rc = loc_sync_wait_for_ind( select_id, - timeout_msec / 1000, - ind_id) ) < 0) - { - if ( rc == -ETIMEDOUT) - status = eLOC_CLIENT_FAILURE_TIMEOUT; - else - status = eLOC_CLIENT_FAILURE_INTERNAL; - - // Callback waiting failed - LOC_LOGE("%s:%d]: loc_api_wait_for_ind failed, err %d, " - "select id %d, status %s", __func__, __LINE__, rc , - select_id, loc_get_v02_client_status_name(status)); - } - else - { - status = eLOC_CLIENT_SUCCESS; - LOC_LOGV("%s:%d]: success (select id %d)\n", - __func__, __LINE__, select_id); - } - } - } /* select id */ - - return status; -} - - diff --git a/loc_api/loc_api_v02/loc_api_sync_req.h b/loc_api/loc_api_v02/loc_api_sync_req.h deleted file mode 100644 index 8c7f7f19..00000000 --- a/loc_api/loc_api_v02/loc_api_sync_req.h +++ /dev/null @@ -1,68 +0,0 @@ -/* 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 - * 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 Code Aurora Forum, 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 "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. - */ - -#ifndef LOC_SYNC_REQ_H -#define LOC_SYNC_REQ_H - -#ifdef __cplusplus -extern "C" -{ -#endif -#include -#include -#include "loc_api_v02_client.h" - -#define LOC_ENGINE_SYNC_REQUEST_TIMEOUT (1000) // 1 second - -/* Init function */ -extern void loc_sync_req_init(); - - -/* Process Loc API indications to wake up blocked user threads */ -extern void loc_sync_process_ind( - locClientHandleType client_handle, /* handle of the client */ - uint32_t ind_id , /* respInd id */ - void *ind_payload_ptr /* payload */ -); - -/* Thread safe synchronous request, using Loc API status return code */ -extern locClientStatusEnumType loc_sync_send_req -( - locClientHandleType client_handle, - uint32_t req_id, /* req id */ - locClientReqUnionType req_payload, - uint32_t timeout_msec, - uint32_t ind_id, //ind ID to block for, usually the same as req_id */ - void *ind_payload_ptr /* can be NULL*/ -); - -#ifdef __cplusplus -} -#endif - -#endif /* LOC_SYNC_REQ_H */ diff --git a/loc_api/loc_api_v02/loc_api_v02_client.c b/loc_api/loc_api_v02/loc_api_v02_client.c deleted file mode 100644 index bb745112..00000000 --- a/loc_api/loc_api_v02/loc_api_v02_client.c +++ /dev/null @@ -1,1923 +0,0 @@ -/* 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 - * 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 Code Aurora Forum, 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 "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. - */ - -#include "qmi_client.h" -#include "qmi_idl_lib.h" -#include "qmi_cci_target_ext.h" - -#if defined( _ANDROID_) -#include "qmi_cci_target.h" -#include "qmi_cci_common.h" -#elif defined(LOC_UTIL_TARGET_OFF_TARGET) -#include -#include -#include -#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 - -// timeout in ms before send_msg_sync should return -#define LOC_CLIENT_ACK_TIMEOUT (5000) - -// timeout in ms before a sync request should return -#define LOC_CLIENT_SYNC_REQ_TIMEOUT (5000) - -#else - -// timeout in ms before send_msg_sync should return -#define LOC_CLIENT_ACK_TIMEOUT (1000) - -// timeout in ms before a sync request should return -#define LOC_CLIENT_SYNC_REQ_TIMEOUT (1000) - -#endif //LOC_UTIL_TARGET_OFF_TARGET - -//timeout in ms to wait for the service to come up -#define LOC_CLIENT_SERVICE_TIMEOUT_UNIT (4000) -#define LOC_CLIENT_SERVICE_TIMEOUT_TOTAL (60000) - -/* Table to relate eventId, size and mask value used to enable the event*/ -typedef struct -{ - uint32_t eventId; - size_t eventSize; - locClientEventMaskType eventMask; -}locClientEventIndTableStructT; - - -static locClientEventIndTableStructT locClientEventIndTable[]= { - - // position report ind - { QMI_LOC_EVENT_POSITION_REPORT_IND_V02, - sizeof(qmiLocEventPositionReportIndMsgT_v02), - QMI_LOC_EVENT_MASK_POSITION_REPORT_V02 }, - - // satellite report ind - { QMI_LOC_EVENT_GNSS_SV_INFO_IND_V02, - sizeof(qmiLocEventGnssSvInfoIndMsgT_v02), - QMI_LOC_EVENT_MASK_GNSS_SV_INFO_V02 }, - - // NMEA report ind - { QMI_LOC_EVENT_NMEA_IND_V02, - sizeof(qmiLocEventNmeaIndMsgT_v02), - QMI_LOC_EVENT_MASK_NMEA_V02 }, - - //NI event ind - { QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_IND_V02, - sizeof(qmiLocEventNiNotifyVerifyReqIndMsgT_v02), - QMI_LOC_EVENT_MASK_NI_NOTIFY_VERIFY_REQ_V02 }, - - //Time Injection Request Ind - { QMI_LOC_EVENT_INJECT_TIME_REQ_IND_V02, - sizeof(qmiLocEventInjectTimeReqIndMsgT_v02), - QMI_LOC_EVENT_MASK_INJECT_TIME_REQ_V02 }, - - //Predicted Orbits Injection Request - { QMI_LOC_EVENT_INJECT_PREDICTED_ORBITS_REQ_IND_V02, - sizeof(qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02), - QMI_LOC_EVENT_MASK_INJECT_PREDICTED_ORBITS_REQ_V02 }, - - //Position Injection Request Ind - { QMI_LOC_EVENT_INJECT_POSITION_REQ_IND_V02, - sizeof(qmiLocEventInjectPositionReqIndMsgT_v02), - QMI_LOC_EVENT_MASK_INJECT_POSITION_REQ_V02 } , - - //Engine State Report Ind - { QMI_LOC_EVENT_ENGINE_STATE_IND_V02, - sizeof(qmiLocEventEngineStateIndMsgT_v02), - QMI_LOC_EVENT_MASK_ENGINE_STATE_V02 }, - - //Fix Session State Report Ind - { QMI_LOC_EVENT_FIX_SESSION_STATE_IND_V02, - sizeof(qmiLocEventFixSessionStateIndMsgT_v02), - QMI_LOC_EVENT_MASK_FIX_SESSION_STATE_V02 }, - - //Wifi Request Indication - { QMI_LOC_EVENT_WIFI_REQ_IND_V02, - sizeof(qmiLocEventWifiReqIndMsgT_v02), - QMI_LOC_EVENT_MASK_WIFI_REQ_V02 }, - - //Sensor Streaming Ready Status Ind - { QMI_LOC_EVENT_SENSOR_STREAMING_READY_STATUS_IND_V02, - sizeof(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02), - QMI_LOC_EVENT_MASK_SENSOR_STREAMING_READY_STATUS_V02 }, - - // Time Sync Request Indication - { QMI_LOC_EVENT_TIME_SYNC_REQ_IND_V02, - sizeof(qmiLocEventTimeSyncReqIndMsgT_v02), - QMI_LOC_EVENT_MASK_TIME_SYNC_REQ_V02 }, - - //Set Spi Streaming Report Event - { QMI_LOC_EVENT_SET_SPI_STREAMING_REPORT_IND_V02, - sizeof(qmiLocEventSetSpiStreamingReportIndMsgT_v02), - QMI_LOC_EVENT_MASK_SET_SPI_STREAMING_REPORT_V02 }, - - //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 } -}; - -/* table to relate the respInd Id with its size */ -typedef struct -{ - uint32_t respIndId; - size_t respIndSize; -}locClientRespIndTableStructT; - -static locClientRespIndTableStructT locClientRespIndTable[]= { - - // get service revision ind - { QMI_LOC_GET_SERVICE_REVISION_IND_V02, - sizeof(qmiLocGetServiceRevisionIndMsgT_v02)}, - - // Get Fix Criteria Resp Ind - { QMI_LOC_GET_FIX_CRITERIA_IND_V02, - sizeof(qmiLocGetFixCriteriaIndMsgT_v02)}, - - // NI User Resp In - { QMI_LOC_NI_USER_RESPONSE_IND_V02, - sizeof(qmiLocNiUserRespIndMsgT_v02)}, - - //Inject Predicted Orbits Data Resp Ind - { QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02, - sizeof(qmiLocInjectPredictedOrbitsDataIndMsgT_v02)}, - - //Get Predicted Orbits Data Src Resp Ind - { QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_IND_V02, - sizeof(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02)}, - - // Get Predicted Orbits Data Validity Resp Ind - { QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_IND_V02, - sizeof(qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02)}, - - // Inject UTC Time Resp Ind - { QMI_LOC_INJECT_UTC_TIME_IND_V02, - sizeof(qmiLocInjectUtcTimeIndMsgT_v02)}, - - //Inject Position Resp Ind - { QMI_LOC_INJECT_POSITION_IND_V02, - sizeof(qmiLocInjectPositionIndMsgT_v02)}, - - //Set Engine Lock Resp Ind - { QMI_LOC_SET_ENGINE_LOCK_IND_V02, - sizeof(qmiLocSetEngineLockIndMsgT_v02)}, - - //Get Engine Lock Resp Ind - { QMI_LOC_GET_ENGINE_LOCK_IND_V02, - sizeof(qmiLocGetEngineLockIndMsgT_v02)}, - - //Set SBAS Config Resp Ind - { QMI_LOC_SET_SBAS_CONFIG_IND_V02, - sizeof(qmiLocSetSbasConfigIndMsgT_v02)}, - - //Get SBAS Config Resp Ind - { QMI_LOC_GET_SBAS_CONFIG_IND_V02, - sizeof(qmiLocGetSbasConfigIndMsgT_v02)}, - - //Set NMEA Types Resp Ind - { QMI_LOC_SET_NMEA_TYPES_IND_V02, - sizeof(qmiLocSetNmeaTypesIndMsgT_v02)}, - - //Get NMEA Types Resp Ind - { QMI_LOC_GET_NMEA_TYPES_IND_V02, - sizeof(qmiLocGetNmeaTypesIndMsgT_v02)}, - - //Set Low Power Mode Resp Ind - { QMI_LOC_SET_LOW_POWER_MODE_IND_V02, - sizeof(qmiLocSetLowPowerModeIndMsgT_v02)}, - - //Get Low Power Mode Resp Ind - { QMI_LOC_GET_LOW_POWER_MODE_IND_V02, - sizeof(qmiLocGetLowPowerModeIndMsgT_v02)}, - - //Set Server Resp Ind - { QMI_LOC_SET_SERVER_IND_V02, - sizeof(qmiLocSetServerIndMsgT_v02)}, - - //Get Server Resp Ind - { QMI_LOC_GET_SERVER_IND_V02, - sizeof(qmiLocGetServerIndMsgT_v02)}, - - //Delete Assist Data Resp Ind - { QMI_LOC_DELETE_ASSIST_DATA_IND_V02, - sizeof(qmiLocDeleteAssistDataIndMsgT_v02)}, - - //Set XTRA-T Session Control Resp Ind - { QMI_LOC_SET_XTRA_T_SESSION_CONTROL_IND_V02, - sizeof(qmiLocSetXtraTSessionControlIndMsgT_v02)}, - - //Get XTRA-T Session Control Resp Ind - { QMI_LOC_GET_XTRA_T_SESSION_CONTROL_IND_V02, - sizeof(qmiLocGetXtraTSessionControlIndMsgT_v02)}, - - //Inject Wifi Position Resp Ind - { QMI_LOC_INJECT_WIFI_POSITION_IND_V02, - sizeof(qmiLocInjectWifiPositionIndMsgT_v02)}, - - //Notify Wifi Status Resp Ind - { QMI_LOC_NOTIFY_WIFI_STATUS_IND_V02, - sizeof(qmiLocNotifyWifiStatusIndMsgT_v02)}, - - //Get Registered Events Resp Ind - { QMI_LOC_GET_REGISTERED_EVENTS_IND_V02, - sizeof(qmiLocGetRegisteredEventsIndMsgT_v02)}, - - //Set Operation Mode Resp Ind - { QMI_LOC_SET_OPERATION_MODE_IND_V02, - sizeof(qmiLocSetOperationModeIndMsgT_v02)}, - - //Get Operation Mode Resp Ind - { QMI_LOC_GET_OPERATION_MODE_IND_V02, - sizeof(qmiLocGetOperationModeIndMsgT_v02)}, - - //Set SPI Status Resp Ind - { QMI_LOC_SET_SPI_STATUS_IND_V02, - sizeof(qmiLocSetSpiStatusIndMsgT_v02)}, - - //Inject Sensor Data Resp Ind - { QMI_LOC_INJECT_SENSOR_DATA_IND_V02, - sizeof(qmiLocInjectSensorDataIndMsgT_v02)}, - - //Inject Time Sync Data Resp Ind - { QMI_LOC_INJECT_TIME_SYNC_DATA_IND_V02, - sizeof(qmiLocInjectTimeSyncDataIndMsgT_v02)}, - - //Set Cradle Mount config Resp Ind - { QMI_LOC_SET_CRADLE_MOUNT_CONFIG_IND_V02, - sizeof(qmiLocSetCradleMountConfigIndMsgT_v02)}, - - //Get Cradle Mount config Resp Ind - { QMI_LOC_GET_CRADLE_MOUNT_CONFIG_IND_V02, - sizeof(qmiLocGetCradleMountConfigIndMsgT_v02)}, - - //Set External Power config Resp Ind - { QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02, - sizeof(qmiLocSetExternalPowerConfigIndMsgT_v02)}, - - //Get External Power config Resp Ind - { QMI_LOC_GET_EXTERNAL_POWER_CONFIG_IND_V02, - sizeof(qmiLocGetExternalPowerConfigIndMsgT_v02)}, - - //Location server connection status - { QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02, - sizeof(qmiLocInformLocationServerConnStatusIndMsgT_v02)}, - - //Set Protocol Config Parameters - { QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02, - sizeof(qmiLocSetProtocolConfigParametersIndMsgT_v02)}, - - //Get Protocol Config Parameters - { QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02, - sizeof(qmiLocGetProtocolConfigParametersIndMsgT_v02)}, - - //Set Sensor Control Config - { QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02, - sizeof(qmiLocSetSensorControlConfigIndMsgT_v02)}, - - //Get Sensor Control Config - { QMI_LOC_GET_SENSOR_CONTROL_CONFIG_IND_V02, - sizeof(qmiLocGetSensorControlConfigIndMsgT_v02)}, - - //Set Sensor Properties - { QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02, - sizeof(qmiLocSetSensorPropertiesIndMsgT_v02)}, - - //Get Sensor Properties - { QMI_LOC_GET_SENSOR_PROPERTIES_IND_V02, - sizeof(qmiLocGetSensorPropertiesIndMsgT_v02)}, - - //Set Sensor Performance Control Config - { QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02, - sizeof(qmiLocSetSensorPerformanceControlConfigIndMsgT_v02)}, - - //Get Sensor Performance Control Config - { QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02, - sizeof(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02)}, - //Inject SUPL certificate - { QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02, - sizeof(qmiLocInjectSuplCertificateIndMsgT_v02) }, - - //Delete SUPL certificate - { QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02, - sizeof(qmiLocDeleteSuplCertificateIndMsgT_v02) }, - - // Set Position Engine Config - { QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02, - sizeof(qmiLocSetPositionEngineConfigParametersIndMsgT_v02)}, - - // Get Position Engine Config - { QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02, - sizeof(qmiLocGetPositionEngineConfigParametersIndMsgT_v02)} - -}; - - -/** whether indication is an event or a response */ -typedef enum { eventIndType =0, respIndType = 1 } locClientIndEnumT; - - -/** @struct locClientInternalState - */ - -typedef struct -{ - // client cookie - void *pClientCookie; - //QCCI handle for this control point - qmi_client_type userHandle; - - // callbacks registered by the clients - locClientEventIndCbType eventCallback; - locClientRespIndCbType respCallback; - locClientErrorCbType errorCallback; - - // the event mask the client has registered for - locClientEventMaskType eventRegMask; - -}locClientCallbackDataType; - -/*=========================================================================== - * - * FUNCTION DECLARATION - * - *==========================================================================*/ - -/** locClientGetSizeAndTypeByIndId - * @brief this function gets the size and the type (event, - * response)of the indication structure from its ID - * @param [in] indId ID of the indication - * @param [out] type event or response indication - * @param [out] size size of the indications - * - * @return true if the ID was found, false otherwise */ - -static bool locClientGetSizeAndTypeByIndId (uint32_t indId, size_t *pIndSize, - locClientIndEnumT *pIndType) -{ - // look in the event table - if(true == locClientGetSizeByEventIndId(indId, pIndSize)) - { - *pIndType = eventIndType; - - LOC_LOGV("%s:%d]: indId %d is an event size = %d\n", __func__, __LINE__, - indId, (uint32_t)*pIndSize); - return true; - } - - //else look in response table - if(true == locClientGetSizeByRespIndId(indId, pIndSize)) - { - *pIndType = respIndType; - - LOC_LOGV("%s:%d]: indId %d is a resp size = %d\n", __func__, __LINE__, - indId, (uint32_t)*pIndSize); - return true; - } - - // Id not found - LOC_LOGW("%s:%d]: indId %d not found\n", __func__, __LINE__, indId); - return false; -} - -/** isClientRegisteredForEvent -* @brief checks the mask to identify if the client has -* registered for the specified event Id -* @param [in] eventIndId -* @param [in] eventRegMask -* @return true if client regstered for event; else false */ - -static bool isClientRegisteredForEvent( - locClientEventMaskType eventRegMask, - uint32_t eventIndId) -{ - size_t idx = 0, eventIndTableSize = 0; - - // look in the event table - eventIndTableSize = - (sizeof(locClientEventIndTable)/sizeof(locClientEventIndTableStructT)); - - for(idx=0; idxresp.result == QMI_RESULT_SUCCESS ) - { - status = eLOC_CLIENT_SUCCESS; - } - else - { - switch(pResponse->resp.error) - { - case QMI_ERR_MALFORMED_MSG_V01: - status = eLOC_CLIENT_FAILURE_INVALID_PARAMETER; - break; - - case QMI_ERR_DEVICE_IN_USE_V01: - status = eLOC_CLIENT_FAILURE_ENGINE_BUSY; - break; - - default: - status = eLOC_CLIENT_FAILURE_INTERNAL; - break; - } - } - LOC_LOGV("%s:%d]: result = %d, error = %d, status = %d\n", - __func__, __LINE__, pResponse->resp.result, - pResponse->resp.error, status); - return status; -} - -/** convertQmiErrorToLocError - @brief converts a qmi service error type to - locClientErrorEnumType - @param [in] error received QMI service. - @return locClientErrorEnumType corresponding to the error. -*/ - -static locClientErrorEnumType convertQmiErrorToLocError( - qmi_client_error_type error) -{ - locClientErrorEnumType locError ; - switch(error) - { - case QMI_SERVICE_ERR: - locError = eLOC_CLIENT_ERROR_SERVICE_UNAVAILABLE; - break; - - default: - locError = eLOC_CLIENT_ERROR_SERVICE_UNAVAILABLE; - break; - } - LOC_LOGV("%s:%d]: qmi error = %d, loc error = %d\n", - __func__, __LINE__, error, locError); - return locError; -} - -/** locClienHandlePosReportInd - * @brief Validates a position report ind - * @param [in] msg_id - * @param [in] ind_buf - * @param [in] ind_buf_len - * @return true if pos report is valid, false otherwise -*/ -static bool locClientHandlePosReportInd -( - uint32_t msg_id, - const void* ind_buf, - uint32_t ind_buf_len -) -{ - // validate position report - qmiLocEventPositionReportIndMsgT_v02 *posReport = - (qmiLocEventPositionReportIndMsgT_v02 *)ind_buf; - - LOC_LOGV ("%s:%d]: len = %d lat = %f, lon = %f, alt = %f\n", - __func__, __LINE__, ind_buf_len, - posReport->latitude, posReport->longitude, - posReport->altitudeWrtEllipsoid); - - return true; -} -//----------------------------------------------------------------------------- - -/** locClientHandleSatReportInd - * @brief Validates a satellite report indication. Dk - * @param [in] msg_id - * @param [in] ind_buf - * @param [in] ind_buf_len - * @return true if sat report is valid, false otherwise -*/ -static bool locClientHandleSatReportInd -( - uint32_t msg_id, - const void* ind_buf, - uint32_t ind_buf_len -) -{ - // validate sat reports - unsigned int idx = 0; - qmiLocEventGnssSvInfoIndMsgT_v02 *satReport = - (qmiLocEventGnssSvInfoIndMsgT_v02 *)ind_buf; - - LOC_LOGV ("%s:%d]: len = %u , altitude assumed = %u, num SV's = %u" - " validity = %d \n ", __func__, __LINE__, - ind_buf_len, satReport->altitudeAssumed, - satReport->svList_len, satReport->svList_valid); - //Log SV report - for( idx = 0; idx svList_len; idx++ ) - { - LOC_LOGV("%s:%d]: valid_mask = %x, prn = %u, system = %d, " - "status = %d \n", __func__, __LINE__, - satReport->svList[idx].validMask, satReport->svList[idx].gnssSvId, - satReport->svList[idx].system, satReport->svList[idx].svStatus); - } - - return true; -} - - -/** locClientHandleNmeaReportInd - * @brief Validate a NMEA report indication. - * @param [in] msg_id - * @param [in] ind_buf - * @param [in] ind_buf_len - * @return true if nmea report is valid, false otherwise -*/ - - -static bool locClientHandleNmeaReportInd -( - uint32_t msg_id, - const void* ind_buf, - uint32_t ind_buf_len -) -{ - // validate NMEA report - return true; -} - -/** locClientHandleGetServiceRevisionRespInd - * @brief Handles a Get Service Revision Rresponse indication. - * @param [in] msg_id - * @param [in] ind_buf - * @param [in] ind_buf_len - * @return true if service revision is valid, false otherwise -*/ - -static bool locClientHandleGetServiceRevisionRespInd -( - uint32_t msg_id, - const void* ind_buf, - uint32_t ind_buf_len -) -{ - LOC_LOGV("%s:%d] :\n", __func__, __LINE__); - return true; -} - -/** locClientHandleIndication - * @brief looks at each indication and calls the appropriate - * validation handler - * @param [in] indId - * @param [in] indBuffer - * @param [in] indSize - * @return true if indication was validated; else false */ - -static bool locClientHandleIndication( - uint32_t indId, - void* indBuffer, - size_t indSize - ) -{ - bool status = false; - switch(indId) - { - // handle the event indications - //------------------------------------------------------------------------- - - // handle position report - case QMI_LOC_EVENT_POSITION_REPORT_IND_V02: - { - status = locClientHandlePosReportInd(indId, indBuffer, indSize); - break; - } - // handle satellite report - case QMI_LOC_EVENT_GNSS_SV_INFO_IND_V02: - { - status = locClientHandleSatReportInd(indId, indBuffer, indSize); - break; - } - - // handle NMEA report - case QMI_LOC_EVENT_NMEA_IND_V02: - { - status = locClientHandleNmeaReportInd(indId, indBuffer, indSize); - break; - } - - // handle NI Notify Verify Request Ind - case QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_IND_V02: - { - // locClientHandleNiReqInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - // handle Time Inject request Ind - case QMI_LOC_EVENT_INJECT_TIME_REQ_IND_V02: - { - // locClientHandleTimeInjectReqInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - // handle XTRA data Inject request Ind - case QMI_LOC_EVENT_INJECT_PREDICTED_ORBITS_REQ_IND_V02: - { - // locClientHandleXtraInjectReqInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - // handle position inject request Ind - case QMI_LOC_EVENT_INJECT_POSITION_REQ_IND_V02: - { - // locClientHandlePositionInjectReqInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - // handle engine state Ind - case QMI_LOC_EVENT_ENGINE_STATE_IND_V02: - { - // locClientHandleEngineStateInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - // handle fix session state Ind - case QMI_LOC_EVENT_FIX_SESSION_STATE_IND_V02: - { - // locClientHandleFixSessionStateInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - // handle Wifi request Ind - case QMI_LOC_EVENT_WIFI_REQ_IND_V02: - { - // locClientHandleWifiReqInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - // handle sensor streaming ready status Ind - case QMI_LOC_EVENT_SENSOR_STREAMING_READY_STATUS_IND_V02: - { - // locClientHandleSensorStreamingReadyInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - // handle time sync Ind - case QMI_LOC_EVENT_TIME_SYNC_REQ_IND_V02: - { - // locClientHandleTimeSyncReqInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - // handle set streaming report ind - case QMI_LOC_EVENT_SET_SPI_STREAMING_REPORT_IND_V02: - { - // locClientHandleSetSpiStreamingInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - case QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02: - { - //locClientHandleLocServerConnReqInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - //------------------------------------------------------------------------- - - // handle the response indications - //------------------------------------------------------------------------- - - // Get service Revision response indication - case QMI_LOC_GET_SERVICE_REVISION_IND_V02: - { - status = locClientHandleGetServiceRevisionRespInd(indId, - indBuffer, indSize); - break; - } - // predicted orbits data response indication - case QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02: - { - //locClientHandleInjectPredictedOrbitsDataInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - case QMI_LOC_INJECT_SENSOR_DATA_IND_V02 : - { - //locClientHandleInjectSensorDataInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - case QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02: - { - //locClientHandleGetProtocolConfigParametersInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - case QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02: - { - //locClientHandleSetProtocolConfigParametersInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - case QMI_LOC_GET_EXTERNAL_POWER_CONFIG_IND_V02: - { - //locClientHandleGetExtPowerConfigInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - case QMI_LOC_GET_CRADLE_MOUNT_CONFIG_IND_V02: - { - //locClientHandleGetCradleMountConfigInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - case QMI_LOC_GET_SENSOR_CONTROL_CONFIG_IND_V02: - { - //locClientHandleGetSensorControlConfigInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - case QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02: - { - //locClientHandleGetSensorPerformanceControlConfigInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - case QMI_LOC_GET_SENSOR_PROPERTIES_IND_V02: - { - //locClientHandleGetSensorPropertiesInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - case QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02: - { - //locClientHandleSetSensorPerformanceControlConfigInd(user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - case QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02: - { - // locClientHandleSetPositionEngineConfigParam( - // user_handle, msg_id, ind_buf, ind_buf_len); - status = true; - break; - } - - case QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02: - { - // locClientHandleSetPositionEngineConfigParam( - // user_handle, msg_id, ind_buf, ind_buf_len); - 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: - case QMI_LOC_INJECT_POSITION_IND_V02: - case QMI_LOC_SET_ENGINE_LOCK_IND_V02: - case QMI_LOC_SET_SBAS_CONFIG_IND_V02: - case QMI_LOC_SET_NMEA_TYPES_IND_V02: - case QMI_LOC_SET_LOW_POWER_MODE_IND_V02: - case QMI_LOC_SET_SERVER_IND_V02: - case QMI_LOC_DELETE_ASSIST_DATA_IND_V02: - case QMI_LOC_SET_XTRA_T_SESSION_CONTROL_IND_V02: - case QMI_LOC_INJECT_WIFI_POSITION_IND_V02: - case QMI_LOC_NOTIFY_WIFI_STATUS_IND_V02: - case QMI_LOC_SET_OPERATION_MODE_IND_V02: - case QMI_LOC_SET_SPI_STATUS_IND_V02: - case QMI_LOC_INJECT_TIME_SYNC_DATA_IND_V02: - case QMI_LOC_SET_CRADLE_MOUNT_CONFIG_IND_V02: - case QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02: - case QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02: - case QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02: - case QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02: - case QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02: - case QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02: - { - status = true; - break; - } - default: - LOC_LOGW("%s:%d]: unknown ind id %d\n", __func__, __LINE__, - (uint32_t)indId); - status = false; - break; - } - return status; -} - - -/** locClientErrorCb - * @brief handles the QCCI error events, this is called by the - * QCCI infrastructure when the service is no longer - * available. - * @param [in] user handle - * @param [in] error - * @param [in] *err_cb_data - */ - -static void locClientErrorCb -( - qmi_client_type user_handle, - qmi_client_error_type error, - void *err_cb_data -) -{ - locClientCallbackDataType* pCallbackData = - (locClientCallbackDataType *)err_cb_data; - - /* copy the errorCallback function pointer from the callback - * data to local variable. This is to protect against the race - * condition between open/close and error callback. - */ - locClientErrorCbType localErrorCallback = - pCallbackData->errorCallback; - - LOC_LOGD("%s:%d]: Service Error %d received, pCallbackData = %p\n", - __func__, __LINE__, error, err_cb_data); - - /* call the error callback - * To avoid calling the errorCallback after locClientClose - * is called, check pCallbackData->errorCallback again here - */ - - if( (NULL != pCallbackData) && - (NULL != localErrorCallback) && - (NULL != pCallbackData->errorCallback) ) - { - //invoke the error callback for the corresponding client - localErrorCallback( - (locClientHandleType)pCallbackData, - convertQmiErrorToLocError(error), - pCallbackData->pClientCookie); - } -} - - -/** locClientIndCb - * @brief handles the indications sent from the service, if a - * response indication was received then the it is sent - * to the response callback. If a event indication was - * received then it is sent to the event callback - * @param [in] user handle - * @param [in] msg_id - * @param [in] ind_buf - * @param [in] ind_buf_len - * @param [in] ind_cb_data */ - -static void locClientIndCb -( - qmi_client_type user_handle, - unsigned int msg_id, - void *ind_buf, - unsigned int ind_buf_len, - void *ind_cb_data -) -{ - locClientIndEnumT indType; - size_t indSize = 0; - qmi_client_error_type rc ; - locClientCallbackDataType* pCallbackData = - (locClientCallbackDataType *)ind_cb_data; - - LOC_LOGV("%s:%d]: Indication: msg_id=%d buf_len=%d pCallbackData = %p\n", - __func__, __LINE__, (uint32_t)msg_id, ind_buf_len, - pCallbackData); - - // check callback data - if(NULL == pCallbackData) - { - LOC_LOGE("%s:%d]: invalid callback data", __func__, __LINE__); - return; - } - - // 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", - __func__, __LINE__, - user_handle, pCallbackData->userHandle); - return; - } - // Get the indication size and type ( eventInd or respInd) - if( true == locClientGetSizeAndTypeByIndId(msg_id, &indSize, &indType)) - { - void *indBuffer = NULL; - - // if the client did not register for this event then just drop it - if( (eventIndType == indType) && - ( (NULL == pCallbackData->eventCallback) || - (false == isClientRegisteredForEvent(pCallbackData->eventRegMask, msg_id)) ) ) - { - LOC_LOGW("%s:%d]: client is not registered for event %d\n", - __func__, __LINE__, (uint32_t)msg_id); - return; - } - - // decode the indication - indBuffer = malloc(indSize); - - if(NULL == indBuffer) - { - LOC_LOGE("%s:%d]: memory allocation failed\n", __func__, __LINE__); - return; - } - - // decode the indication - rc = qmi_client_message_decode( - user_handle, - QMI_IDL_INDICATION, - msg_id, - ind_buf, - ind_buf_len, - indBuffer, - indSize); - - if( rc == QMI_NO_ERR ) - { - //validate indication - if (true == locClientHandleIndication(msg_id, indBuffer, indSize)) - { - if(eventIndType == indType) - { - locClientEventIndUnionType eventIndUnion; - - /* copy the eventCallback function pointer from the callback - * data to local variable. This is to protect against the race - * condition between open/close and indication callback. - */ - locClientEventIndCbType localEventCallback = - pCallbackData->eventCallback; - - // dummy event - eventIndUnion.pPositionReportEvent = - (qmiLocEventPositionReportIndMsgT_v02 *)indBuffer; - - /* call the event callback - * To avoid calling the eventCallback after locClientClose - * is called, check pCallbackData->eventCallback again here - */ - if((NULL != localEventCallback) && - (NULL != pCallbackData->eventCallback)) - { - localEventCallback( - (locClientHandleType)pCallbackData, - msg_id, - eventIndUnion, - pCallbackData->pClientCookie); - } - } - else if(respIndType == indType) - { - locClientRespIndUnionType respIndUnion; - - /* copy the respCallback function pointer from the callback - * data to local variable. This is to protect against the race - * condition between open/close and indication callback. - */ - locClientRespIndCbType localRespCallback = - pCallbackData->respCallback; - - // dummy to suppress compiler warnings - respIndUnion.pDeleteAssistDataInd = - (qmiLocDeleteAssistDataIndMsgT_v02 *)indBuffer; - - /* call the response callback - * To avoid calling the respCallback after locClientClose - * is called, check pCallbackData->respCallback again here - */ - if((NULL != localRespCallback) && - (NULL != pCallbackData->respCallback)) - { - localRespCallback( - (locClientHandleType)pCallbackData, - msg_id, - respIndUnion, - pCallbackData->pClientCookie); - } - } - } - else // error handling indication - { - LOC_LOGE("%s:%d]: Error handling the indication %d\n", - __func__, __LINE__, (uint32_t)msg_id); - } - } - else - { - LOC_LOGE("%s:%d]: Error decoding indication %d\n", - __func__, __LINE__, rc); - } - if(indBuffer) - { - free (indBuffer); - } - } - else // Id not found - { - LOC_LOGE("%s:%d]: Error indication not found %d\n", - __func__, __LINE__,(uint32_t)msg_id); - } - return; -} - - -/** locClientRegisterEventMask - * @brief registers the event mask with loc service - * @param [in] clientHandle - * @param [in] eventRegMask - * @return true if indication was validated; else false */ - -static bool locClientRegisterEventMask( - locClientHandleType clientHandle, - locClientEventMaskType eventRegMask) -{ - locClientStatusEnumType status = eLOC_CLIENT_SUCCESS; - locClientReqUnionType reqUnion; - qmiLocRegEventsReqMsgT_v02 regEventsReq; - - memset(®EventsReq, 0, sizeof(regEventsReq)); - - regEventsReq.eventRegMask = eventRegMask; - reqUnion.pRegEventsReq = ®EventsReq; - - status = locClientSendReq(clientHandle, - QMI_LOC_REG_EVENTS_REQ_V02, - reqUnion); - - if(eLOC_CLIENT_SUCCESS != status ) - { - LOC_LOGE("%s:%d] status %s\n", __func__, __LINE__, - loc_get_v02_client_status_name(status) ); - return false; - } - - return true; -} - -/** validateRequest - @brief validates the input request - @param [in] reqId request ID - @param [in] reqPayload Union of pointers to message payload - @param [out] ppOutData Pointer to void *data if successful - @param [out] pOutLen Pointer to length of data if succesful. - @return false on failure, true on Success -*/ - -static bool validateRequest( - uint32_t reqId, - const locClientReqUnionType reqPayload, - void **ppOutData, - uint32_t *pOutLen ) - -{ - bool noPayloadFlag = false; - - LOC_LOGV("%s:%d]: reqId = %d\n", __func__, __LINE__, reqId); - switch(reqId) - { - case QMI_LOC_INFORM_CLIENT_REVISION_REQ_V02: - { - *pOutLen = sizeof(qmiLocInformClientRevisionReqMsgT_v02); - break; - } - - case QMI_LOC_REG_EVENTS_REQ_V02: - { - *pOutLen = sizeof(qmiLocRegEventsReqMsgT_v02); - break; - } - - case QMI_LOC_START_REQ_V02: - { - *pOutLen = sizeof(qmiLocStartReqMsgT_v02); - break; - } - - case QMI_LOC_STOP_REQ_V02: - { - *pOutLen = sizeof(qmiLocStopReqMsgT_v02); - break; - } - - case QMI_LOC_NI_USER_RESPONSE_REQ_V02: - { - *pOutLen = sizeof(qmiLocNiUserRespReqMsgT_v02); - break; - } - - case QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02: - { - *pOutLen = sizeof(qmiLocInjectPredictedOrbitsDataReqMsgT_v02); - break; - } - - case QMI_LOC_INJECT_UTC_TIME_REQ_V02: - { - *pOutLen = sizeof(qmiLocInjectUtcTimeReqMsgT_v02); - break; - } - - case QMI_LOC_INJECT_POSITION_REQ_V02: - { - *pOutLen = sizeof(qmiLocInjectPositionReqMsgT_v02); - break; - } - - case QMI_LOC_SET_ENGINE_LOCK_REQ_V02: - { - *pOutLen = sizeof(qmiLocSetEngineLockReqMsgT_v02); - break; - } - - case QMI_LOC_SET_SBAS_CONFIG_REQ_V02: - { - *pOutLen = sizeof(qmiLocSetSbasConfigReqMsgT_v02); - break; - } - - case QMI_LOC_SET_NMEA_TYPES_REQ_V02: - { - *pOutLen = sizeof(qmiLocSetNmeaTypesReqMsgT_v02); - break; - } - - case QMI_LOC_SET_LOW_POWER_MODE_REQ_V02: - { - *pOutLen = sizeof(qmiLocSetLowPowerModeReqMsgT_v02); - break; - } - - case QMI_LOC_SET_SERVER_REQ_V02: - { - *pOutLen = sizeof(qmiLocSetServerReqMsgT_v02); - break; - } - - case QMI_LOC_DELETE_ASSIST_DATA_REQ_V02: - { - *pOutLen = sizeof(qmiLocDeleteAssistDataReqMsgT_v02); - break; - } - - case QMI_LOC_SET_XTRA_T_SESSION_CONTROL_REQ_V02: - { - *pOutLen = sizeof(qmiLocSetXtraTSessionControlReqMsgT_v02); - break; - } - - case QMI_LOC_INJECT_WIFI_POSITION_REQ_V02: - { - *pOutLen = sizeof(qmiLocInjectWifiPositionReqMsgT_v02); - break; - } - - case QMI_LOC_NOTIFY_WIFI_STATUS_REQ_V02: - { - *pOutLen = sizeof(qmiLocNotifyWifiStatusReqMsgT_v02); - break; - } - - case QMI_LOC_SET_OPERATION_MODE_REQ_V02: - { - *pOutLen = sizeof(qmiLocSetOperationModeReqMsgT_v02); - break; - } - - case QMI_LOC_SET_SPI_STATUS_REQ_V02: - { - *pOutLen = sizeof(qmiLocSetSpiStatusReqMsgT_v02); - break; - } - - case QMI_LOC_INJECT_SENSOR_DATA_REQ_V02: - { - *pOutLen = sizeof(qmiLocInjectSensorDataReqMsgT_v02); - break; - } - - case QMI_LOC_INJECT_TIME_SYNC_DATA_REQ_V02: - { - *pOutLen = sizeof(qmiLocInjectTimeSyncDataReqMsgT_v02); - break; - } - - case QMI_LOC_SET_CRADLE_MOUNT_CONFIG_REQ_V02: - { - *pOutLen = sizeof(qmiLocSetCradleMountConfigReqMsgT_v02); - break; - } - - case QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02: - { - *pOutLen = sizeof(qmiLocSetExternalPowerConfigReqMsgT_v02); - break; - } - - case QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02: - { - *pOutLen = sizeof(qmiLocInformLocationServerConnStatusReqMsgT_v02); - break; - } - - case QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02: - { - *pOutLen = sizeof(qmiLocSetProtocolConfigParametersReqMsgT_v02); - break; - } - - case QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02: - { - *pOutLen = sizeof(qmiLocGetProtocolConfigParametersReqMsgT_v02); - break; - } - - case QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02: - { - *pOutLen = sizeof(qmiLocSetSensorControlConfigReqMsgT_v02); - break; - } - - case QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02: - { - *pOutLen = sizeof(qmiLocSetSensorPropertiesReqMsgT_v02); - break; - } - - case QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02: - { - *pOutLen = sizeof(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02); - break; - } - - case QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02: - { - *pOutLen = sizeof(qmiLocInjectSuplCertificateReqMsgT_v02); - break; - } - case QMI_LOC_DELETE_SUPL_CERTIFICATE_REQ_V02: - { - *pOutLen = sizeof(qmiLocDeleteSuplCertificateReqMsgT_v02); - break; - } - case QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02: - { - *pOutLen = sizeof(qmiLocSetPositionEngineConfigParametersReqMsgT_v02); - break; - } - case QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02: - { - *pOutLen = sizeof(qmiLocGetPositionEngineConfigParametersReqMsgT_v02); - break; - } - - // ALL requests with no payload - case QMI_LOC_GET_SERVICE_REVISION_REQ_V02: - case QMI_LOC_GET_FIX_CRITERIA_REQ_V02: - case QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_REQ_V02: - case QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_REQ_V02: - case QMI_LOC_GET_ENGINE_LOCK_REQ_V02: - case QMI_LOC_GET_SBAS_CONFIG_REQ_V02: - case QMI_LOC_GET_NMEA_TYPES_REQ_V02: - case QMI_LOC_GET_LOW_POWER_MODE_REQ_V02: - case QMI_LOC_GET_SERVER_REQ_V02: - case QMI_LOC_GET_XTRA_T_SESSION_CONTROL_REQ_V02: - case QMI_LOC_GET_REGISTERED_EVENTS_REQ_V02: - case QMI_LOC_GET_OPERATION_MODE_REQ_V02: - 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; - break; - } - - default: - LOC_LOGW("%s:%d]: Error unknown reqId=%d\n", __func__, __LINE__, - reqId); - return false; - } - if(true == noPayloadFlag) - { - *ppOutData = NULL; - *pOutLen = 0; - } - else - { - //set dummy pointer for request union - *ppOutData = (void*) reqPayload.pInformClientRevisionReq; - } - LOC_LOGV("%s:%d]: reqId=%d, len = %d\n", __func__, __LINE__, - reqId, *pOutLen); - return true; -} - -/** locClientQmiCtrlPointInit - @brief wait for the service to come up or timeout; when the - service comes up initialize the control point and set - internal handle and indication callback. - @param pQmiClient, -*/ - -static locClientStatusEnumType locClientQmiCtrlPointInit( - locClientCallbackDataType *pLocClientCbData) -{ - qmi_client_type clnt, notifier; - bool notifierInitFlag = false; - locClientStatusEnumType status = eLOC_CLIENT_SUCCESS; - // instances of this service - qmi_service_info *pServiceInfo = NULL; - - do - { - 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(); - - // 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; - } - - // 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() 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 Error %d \n", - __func__, __LINE__, rc); - - status = eLOC_CLIENT_FAILURE_INTERNAL; - break; - } - - LOC_LOGV("%s:%d]: passing the pointer %p to qmi_client_init \n", - __func__, __LINE__, pLocClientCbData); - - // 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); - - if(rc != QMI_NO_ERR) - { - LOC_LOGE("%s:%d]: qmi_client_init error %d\n", - __func__, __LINE__, rc); - - 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) - { - qmi_client_release(notifier); - } - - if(NULL != pServiceInfo) - { - free((void *)pServiceInfo); - } - - return status; -} -//----------------------- END INTERNAL FUNCTIONS ---------------------------------------- - -/** locClientOpen - @brief Connects a location client to the location engine. If the connection - is successful, returns a handle that the location client uses for - future location operations. - - @param [in] eventRegMask Mask of asynchronous events the client is - interested in receiving - @param [in] eventIndCb Function to be invoked to handle an event. - @param [in] respIndCb Function to be invoked to handle a response - indication. - @param [out] locClientHandle Handle to be used by the client - for any subsequent requests. - - @return - One of the following error codes: - - eLOC_CLIENT_SUCCESS -- If the connection is opened. - - non-zero error code(see locClientStatusEnumType)-- On failure. -*/ - -locClientStatusEnumType locClientOpen ( - locClientEventMaskType eventRegMask, - const locClientCallbacksType* pLocClientCallbacks, - locClientHandleType* pLocClientHandle, - const void* pClientCookie) -{ - locClientStatusEnumType status = eLOC_CLIENT_SUCCESS; - locClientCallbackDataType *pCallbackData = NULL; - - LOC_LOGV("%s:%d] \n", __func__, __LINE__); - - do - { - // check input parameters - if( (NULL == pLocClientCallbacks) || (NULL == pLocClientHandle) - || (NULL == pLocClientCallbacks->respIndCb) || - (pLocClientCallbacks->size != sizeof(locClientCallbacksType))) - { - LOC_LOGE("%s:%d]: Invalid parameters in locClientOpen\n", - __func__, __LINE__); - status = eLOC_CLIENT_FAILURE_INVALID_PARAMETER; - break; - } - - // Allocate memory for the callback data - pCallbackData = - ( locClientCallbackDataType*)calloc( - 1, sizeof(locClientCallbackDataType)); - - if(NULL == pCallbackData) - { - LOC_LOGE("%s:%d]: Could not allocate memory for callback data \n", - __func__, __LINE__); - status = eLOC_CLIENT_FAILURE_INTERNAL; - break; - } - - /* Initialize the QMI control point; this function will block - * until a service is up or a timeout occurs. If the connection to - * the service succeeds the callback data will be filled in with - * a qmi_client value. - */ - - - EXIT_LOG_CALLFLOW(%s, "loc client open"); - status = locClientQmiCtrlPointInit(pCallbackData); - - LOC_LOGV ("%s:%d] locClientQmiCtrlPointInit returned %d\n", - __func__, __LINE__, status); - - if(status != eLOC_CLIENT_SUCCESS) - { - free(pCallbackData); - pCallbackData = NULL; - break; - } - - // set the handle to the callback data - *pLocClientHandle = (locClientHandleType)pCallbackData; - - if(true != locClientRegisterEventMask(*pLocClientHandle,eventRegMask)) - { - LOC_LOGE("%s:%d]: Error sending registration mask\n", - __func__, __LINE__); - - // release the client - locClientClose(pLocClientHandle); - - status = eLOC_CLIENT_FAILURE_INTERNAL; - break; - } - - /* Initialize rest of the client structure now that the connection - * to the service has been created successfully. - */ - - //fill in the event callback - pCallbackData->eventCallback = pLocClientCallbacks->eventIndCb; - - //fill in the response callback - pCallbackData->respCallback = pLocClientCallbacks->respIndCb; - - //fill in the error callback - pCallbackData->errorCallback = pLocClientCallbacks->errorCb; - - //set the client event registration mask - pCallbackData->eventRegMask = eventRegMask; - - // set the client cookie - pCallbackData->pClientCookie = (void *)pClientCookie; - - LOC_LOGD("%s:%d]: returning handle = 0x%x, user_handle=0x%x, status = %d\n", - __func__, __LINE__, *pLocClientHandle, - pCallbackData->userHandle, status); - - }while(0); - - if(eLOC_CLIENT_SUCCESS != status) - { - *pLocClientHandle = LOC_CLIENT_INVALID_HANDLE_VALUE; - } - - return(status); -} - -/** locClientClose - @brief Disconnects a client from the location engine. - @param [in] pLocClientHandle Pointer to the handle returned by the - locClientOpen() function. - @return - One of the following error codes: - - 0 (eLOC_CLIENT_SUCCESS) - On success. - - non-zero error code(see locClientStatusEnumType) - On failure. -*/ - -locClientStatusEnumType locClientClose( - locClientHandleType* pLocClientHandle) -{ - qmi_client_error_type rc = QMI_NO_ERR; //No error - - if(NULL == pLocClientHandle) - { - // invalid handle - LOC_LOGE("%s:%d]: invalid pointer to handle \n", - __func__, __LINE__); - - return(eLOC_CLIENT_FAILURE_INVALID_PARAMETER); - } - - // convert handle to callback data - locClientCallbackDataType *pCallbackData = - (locClientCallbackDataType *)(*pLocClientHandle); - - LOC_LOGV("%s:%d]:\n", __func__, __LINE__ ); - - // check the input handle for sanity - if(NULL == pCallbackData || - NULL == pCallbackData->userHandle) - { - // invalid handle - LOC_LOGE("%s:%d]: invalid handle \n", - __func__, __LINE__); - - return(eLOC_CLIENT_FAILURE_INVALID_HANDLE); - } - - LOC_LOGV("locClientClose releasing handle 0x%x, user handle 0x%x\n", - *pLocClientHandle, pCallbackData->userHandle ); - - // NEXT call goes out to modem. We log the callflow before it - // actually happens to ensure the this comes before resp callflow - // 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 ) - { - LOC_LOGW("%s:%d]: qmi_client_release error %d for client %p\n", - __func__, __LINE__, rc, pCallbackData->userHandle); - return(eLOC_CLIENT_FAILURE_INTERNAL); - } - - /* clear the memory allocated to callback data to minimize the chances - * of a race condition occurring between close and the indication - * callback - */ - memset(pCallbackData, 0, sizeof(*pCallbackData)); - - // free the memory assigned in locClientOpen - free(pCallbackData); - pCallbackData= NULL; - - // set the handle to invalid value - *pLocClientHandle = LOC_CLIENT_INVALID_HANDLE_VALUE; - - return eLOC_CLIENT_SUCCESS; -} - -/** locClientSendReq - @brief Sends a message to the location engine. If the locClientSendMsg() - function is successful, the client should expect an indication - (except start, stop, event reg and sensor injection messages), - through the registered callback in the locOpen() function. The - indication will contain the status of the request and if status is a - success, indication also contains the payload - associated with response. - @param [in] handle Handle returned by the locClientOpen() - function. - @param [in] reqId message ID of the request - @param [in] reqPayload Payload of the request, can be NULL - if request has no payload - - @return - One of the following error codes: - - 0 (eLOC_CLIENT_SUCCESS ) - On success. - - non-zero error code (see locClientStatusEnumType) - On failure. -*/ - -locClientStatusEnumType locClientSendReq( - locClientHandleType handle, - uint32_t reqId, - locClientReqUnionType reqPayload ) -{ - locClientStatusEnumType status = eLOC_CLIENT_SUCCESS; - qmi_client_error_type rc = QMI_NO_ERR; //No error - qmiLocGenRespMsgT_v02 resp; - uint32_t reqLen = 0; - void *pReqData = NULL; - locClientCallbackDataType *pCallbackData = - (locClientCallbackDataType *)handle; - - // check the input handle for sanity - if(NULL == pCallbackData || - NULL == pCallbackData->userHandle ) - { - // did not find the handle in the client List - LOC_LOGE("%s:%d]: invalid handle \n", - __func__, __LINE__); - - return(eLOC_CLIENT_FAILURE_INVALID_HANDLE); - } - - // validate that the request is correct - if (validateRequest(reqId, reqPayload, &pReqData, &reqLen) == false) - { - - LOC_LOGE("%s:%d] error invalid request\n", __func__, - __LINE__); - - return(eLOC_CLIENT_FAILURE_INVALID_PARAMETER); - } - - LOC_LOGV("%s:%d] sending reqId= %d, len = %d\n", __func__, - __LINE__, reqId, reqLen); - - // NEXT call goes out to modem. We log the callflow before it - // actually happens to ensure the this comes before resp callflow - // 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, - pReqData, - reqLen, - &resp, - sizeof(resp), - LOC_CLIENT_ACK_TIMEOUT); - - LOC_LOGV("%s:%d] qmi_client_send_msg_sync returned %d\n", __func__, - __LINE__, rc); - - if (rc != QMI_NO_ERR) - { - LOC_LOGE("%s:%d]: send_msg_sync error: %d\n",__func__, __LINE__, rc); - return(eLOC_CLIENT_FAILURE_INTERNAL); - } - - // map the QCCI response to Loc API v02 status - status = convertQmiResponseToLocStatus(&resp); - - return(status); -} - -/** locClientGetSizeByRespIndId - * @brief Get the size of the response indication structure, - * from a specified id - * @param [in] respIndId - * @param [out] pRespIndSize - * @return true if resp ID was found; else false -*/ - -bool locClientGetSizeByRespIndId(uint32_t respIndId, size_t *pRespIndSize) -{ - size_t idx = 0, respIndTableSize = 0; - respIndTableSize = (sizeof(locClientRespIndTable)/sizeof(locClientRespIndTableStructT)); - for(idx=0; idx -#include "location_service_v02.h" //QMI LOC Service data types definitions -#include -#include - -/****************************************************************************** - * Constants and configuration - *****************************************************************************/ - -/** @addtogroup constants_macros -@{ */ - -/** Specific value of #locClientHandleType, indicating an invalid handle. */ -#define LOC_CLIENT_INVALID_HANDLE_VALUE (NULL) - -/** @} */ /* end_addtogroup constants_macros */ - -/** @addtogroup data_types -@{ */ - -/** Location client handle used to represent a specific client. Negative values - are invalid handles. */ -typedef void* locClientHandleType; - -/** Data type for events and event masks. - @newpage */ -typedef uint64_t locClientEventMaskType; - -/** Location client status values. - @vertspace -*/ -typedef enum -{ - eLOC_CLIENT_SUCCESS = 0, - /**< Request was successful. */ - - eLOC_CLIENT_FAILURE_GENERAL = 1, - /**< Failed because of a general failure. */ - - eLOC_CLIENT_FAILURE_UNSUPPORTED = 2, - /**< Failed because the service does not support the command. */ - - eLOC_CLIENT_FAILURE_INVALID_PARAMETER = 3, - /**< Failed because the request contained invalid parameters. */ - - eLOC_CLIENT_FAILURE_ENGINE_BUSY = 4, - /**< Failed because the engine is busy. */ - - eLOC_CLIENT_FAILURE_PHONE_OFFLINE = 5, - /**< Failed because the phone is offline. */ - - eLOC_CLIENT_FAILURE_TIMEOUT = 6, - /**< Failed because of a timeout. */ - - eLOC_CLIENT_FAILURE_SERVICE_NOT_PRESENT = 7, - /**< Failed because the service is not present. */ - - eLOC_CLIENT_FAILURE_SERVICE_VERSION_UNSUPPORTED = 8, - /**< Failed because the service version is unsupported. */ - - eLOC_CLIENT_FAILURE_CLIENT_VERSION_UNSUPPORTED = 9, - /**< Failed because the service does not support client version. */ - - eLOC_CLIENT_FAILURE_INVALID_HANDLE = 10, - /**< Failed because an invalid handle was specified. */ - - eLOC_CLIENT_FAILURE_INTERNAL = 11, - /**< Failed because of an internal error in the service. */ - - eLOC_CLIENT_FAILURE_NOT_INITIALIZED = 12 - /**< Failed because the service has not been initialized. */ - -}locClientStatusEnumType; - -/** Loc Client error values -*/ - -typedef enum -{ - eLOC_CLIENT_ERROR_SERVICE_UNAVAILABLE = 1 - /**< Service is no longer available, the client should - close the existing connection and reopen the connection - upon getting this error. - */ -}locClientErrorEnumType; - - -/** @} */ /* end_addtogroup data_types */ - -/** @addtogroup send_request -@{ */ - -/** @brief Request messages the client can send to the location engine. - - The following requests do not have any data associated, so they do not have a - payload structure defined: - - - GetServiceRevision - - GetFixCriteria - - GetPredictedOrbitsDataSource - - GetPredictedOrbitsDataValidity - - GetEngineLock - - GetSbasConfigReq - - GetRegisteredEvents - - GetNmeaTypes - - GetLowPowerMode - - GetXtraTSessionControl - - GetRegisteredEvents - - GetOperationMode - - GetCradleMountConfig - - GetExternalPowerConfig -*/ -typedef union -{ - const qmiLocInformClientRevisionReqMsgT_v02* pInformClientRevisionReq; - /**< Notifies the service about the revision the client is using. - - The client does not receive any indications corresponding to this - request. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_INFORM_CLIENT_REVISION_REQ_V02. */ - - const qmiLocRegEventsReqMsgT_v02* pRegEventsReq; - /**< Changes the events the client is interested in receiving. - - The client does not receive any indications corresponding to this - request. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_REG_EVENTS_REQ_V02. */ - - const qmiLocStartReqMsgT_v02* pStartReq; - /**< Starts a positioning session. - - The client receives the following indications: position report, - satellite report, fix session report, and NMEA report (if applicable). - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_START_REQ_V02. */ - - const qmiLocStopReqMsgT_v02* pStopReq; - /**< Stops a positioning session. The client receives a fix session report - denoting that the fix session ended after this message was sent. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_STOP_REQ_V02. */ - - const qmiLocNiUserRespReqMsgT_v02* pNiUserRespReq; - /**< Informs the service about the user response for a network-initiated call. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_NI_USER_RESPONSE_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_NI_USER_RESPONSE_REQ_V02. */ - - const qmiLocInjectPredictedOrbitsDataReqMsgT_v02* pInjectPredictedOrbitsDataReq; - /**< Injects the predicted orbits data into the service. - - When all predicted orbits data parts have been injected, the client - receives the following indication containing a response: - QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02. - - The client injects successive data parts without waiting for this - indication as long as locClientSendReq() returns successfully. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02. */ - - const qmiLocInjectUtcTimeReqMsgT_v02* pInjectUtcTimeReq; - /**< Injects UTC time into the service. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_INJECT_UTC_TIME_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_INJECT_UTC_TIME_REQ_V02. */ - - const qmiLocInjectPositionReqMsgT_v02* pInjectPositionReq; - /**< Injects a position into the service. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_INJECT_POSITION_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_INJECT_POSITION_REQ_V02. */ - - const qmiLocSetEngineLockReqMsgT_v02* pSetEngineLockReq; - /**< Sets the location engine lock. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_SET_ENGINE_LOCK_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_SET_ENGINE_LOCK_REQ_V02. */ - - const qmiLocSetSbasConfigReqMsgT_v02* pSetSbasConfigReq; - /**< Sets the SBAS configuration. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_SET_SBAS_CONFIG_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_SET_SBAS_CONFIG_REQ_V02 . */ - - const qmiLocSetNmeaTypesReqMsgT_v02* pSetNmeaTypesReq; - /**< Sets the NMEA types configuration. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_SET_NMEA_TYPES_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_SET_NMEA_TYPES_REQ_V02. */ - - const qmiLocSetLowPowerModeReqMsgT_v02* pSetLowPowerModeReq; - /**< Sets the Low Power mode configuration. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_SET_LOW_POWER_MODE_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_SET_LOW_POWER_MODE_REQ_V02. */ - - const qmiLocSetServerReqMsgT_v02* pSetServerReq; - /**< Sets the A-GPS server type and address. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_SET_SERVER_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_SET_SERVER_REQ_V02. */ - - const qmiLocGetServerReqMsgT_v02* pGetServerReq; - /**< Gets the A-GPS server type and address. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_GET_SERVER_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_GET_SERVER_REQ_V02. */ - - const qmiLocDeleteAssistDataReqMsgT_v02* pDeleteAssistDataReq; - /**< Deletes the aiding data from the engine. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_DELETE_ASSIST_DATA_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_DELETE_ASSIST_DATA_REQ_V02. */ - - const qmiLocSetXtraTSessionControlReqMsgT_v02* pSetXtraTSessionControlReq; - /**< Sets XTRA-T session control in the engine. If the request is accepted by - the service, the client receives the following indication containing a - response: QMI_LOC_SET_XTRA_T_SESSION_CONTROL_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_SET_XTRA_T_SESSION_CONTROL_REQ_V02. */ - - const qmiLocInjectWifiPositionReqMsgT_v02* pInjectWifiPositionReq; - /**< Injects a WiFi position into the engine. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_INJECT_WIFI_POSITION_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_INJECT_WIFI_POSITION_REQ_V02. */ - - const qmiLocNotifyWifiStatusReqMsgT_v02* pNotifyWifiStatusReq; - /**< Notifies the engine about the WiFi status. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_NOTIFY_WIFI_STATUS_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_NOTIFY_WIFI_STATUS_REQ_V02. */ - - const qmiLocSetOperationModeReqMsgT_v02* pSetOperationModeReq; - /**< Sets the engine Operation mode. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_SET_OPERATION_MODE_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_SET_OPERATION_MODE_REQ_V02. */ - - const qmiLocSetSpiStatusReqMsgT_v02* pSetSpiStatusReq; - /**< Sends the stationary position status to the engine. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_SET_SPI_STATUS_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_SET_SPI_STATUS_REQ_V02. */ - - const qmiLocInjectSensorDataReqMsgT_v02* pInjectSensorDataReq; - /**< Injects sensor data into the engine. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_INJECT_SENSOR_DATA_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_INJECT_SENSOR_DATA_REQ_V02. */ - - const qmiLocInjectTimeSyncDataReqMsgT_v02* pInjectTimeSyncReq; - /**< Injects time synchronization information into the engine. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_INJECT_TIME_SYNC_DATA_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_INJECT_TIME_SYNC_DATA_REQ_V02. */ - - const qmiLocSetCradleMountConfigReqMsgT_v02* pSetCradleMountConfigReq; - /**< Sets the cradle mount state information in the engine. - - If the request is accepted by the service, the client receives the - following indication containing a response: - SET_CRADLE_MOUNT_CONFIG_REQ_V02. - - To send this request, set the reqId field in locClientSendReq() to - SET_CRADLE_MOUNT_CONFIG_IND_V02. */ - - const qmiLocSetExternalPowerConfigReqMsgT_v02* pSetExternalPowerConfigReq; - /**< Sets external power configuration state in the engine. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02. */ - - const qmiLocInformLocationServerConnStatusReqMsgT_v02* - pInformLocationServerConnStatusReq; - /**< Informs the engine about the connection status to the location server. - - This can be sent in response to a - QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02 request. The - service sends back a QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02 - response indication for this request. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02.*/ - - const qmiLocSetProtocolConfigParametersReqMsgT_v02* - pSetProtocolConfigParametersReq; - /**< Sets the protocol configuration parameters in the engine. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02. */ - - const qmiLocGetProtocolConfigParametersReqMsgT_v02* - pGetProtocolConfigParametersReq; - /**< Retrieves protocol configuration parameters from the engine. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02. - @newpage */ - - const qmiLocSetSensorControlConfigReqMsgT_v02* - pSetSensorControlConfigReq; - /**< Sets the sensor control configuration parameters in the engine. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02. - @newpage */ - - const qmiLocSetSensorPerformanceControlConfigReqMsgT_v02* - pSetSensorPerformanceControlConfigReq; - /**< Sets the sensor performance configuration parameters in the engine. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02. - @newpage */ - - const qmiLocSetSensorPropertiesReqMsgT_v02* pSetSensorPropertiesReq; - /**< Sets the sensor properties in the engine. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02. - @newpage */ - - const qmiLocInjectSuplCertificateReqMsgT_v02* pInjectSuplCertificateReq; - /**< Injects a SUPL certificate into the engine. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02. - @newpage */ - - const qmiLocDeleteSuplCertificateReqMsgT_v02* pDeleteSuplCertificateReq; - /**< Deletes a SUPL certificate from the engine. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_DELETE_SUPL_CERTIFICATE_REQ_V02. - @newpage */ - - const qmiLocSetPositionEngineConfigParametersReqMsgT_v02* - pSetPositionEngineConfigParametersReq; - /**< Sets Position Engine configuration. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_IND _V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02. - @newpage */ - - const qmiLocGetPositionEngineConfigParametersReqMsgT_v02* - pGetPositionEngineConfigParametersReq; - /**< Gets Position Engine configuration. - - If the request is accepted by the service, the client receives the - following indication containing a response: - QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02. - - To send this request, set the reqId field in locClientSendReq() to - QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02. - @newpage */ - -}locClientReqUnionType; - - -/** @brief Event indications that are sent by the service. -*/ -typedef union -{ - const qmiLocEventPositionReportIndMsgT_v02* pPositionReportEvent; - /**< Contains the position information. - - This event is generated after QMI_LOC_START_REQ_V02 is sent. If - periodic fix criteria is specified, this event is generated multiple - times periodically at the specified rate until QMI_LOC_STOP_REQ_V02 is - sent. - - The eventIndId field in the event indication callback is set to - QMI_LOC_EVENT_POSITION_REPORT_IND_V02. */ - - const qmiLocEventGnssSvInfoIndMsgT_v02* pGnssSvInfoReportEvent; - /**< Contains the GNSS satellite information. - - This event is generated after QMI_LOC_START_REQ_V02 is sent. This event - is generated at 1 Hz if the location engine is tracking satellites to - make a location fix. - - The eventIndId field in the event indication callback is set to - QMI_LOC_EVENT_GNSS_INFO_IND_V02. */ - - const qmiLocEventNmeaIndMsgT_v02* pNmeaReportEvent; - /**< Contains an NMEA report sentence. The entire NMEA report consisting - of multiple sentences is sent at a 1Hz rate. - This event is generated after QMI_LOC_START_REQ_V02 is sent. - - The eventIndId field in the event indication callback is set to - QMI_LOC_EVENT_NMEA_IND_V02. */ - - const qmiLocEventNiNotifyVerifyReqIndMsgT_v02* pNiNotifyVerifyReqEvent; - /**< Notifies a location client when the network triggers a positioning request - to the mobile. - - Upon getting this event, the location client displays the - network-initiated fix request in a dialog and prompts the user to accept - or deny the request. The client responds to this request with the message - QMI_LOC_NI_USER_RESPONSE_REQ_V02. - - The eventIndId field in the event indication callback is set to - QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_IND_V02. */ - - const qmiLocEventInjectTimeReqIndMsgT_v02* pInjectTimeReqEvent; - /**< Asks the client for time assistance. - - The client responds to this request with the message - QMI_LOC_INJECT_UTC_TIME_REQ_V02. - - The eventIndId field in the event indication callback is - set to QMI_LOC_EVENT_INJECT_TIME_REQ_IND_V02. */ - - const qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02* - pInjectPredictedOrbitsReqEvent; - /**< Asks the client for predicted orbits data assistance. - - The client responds to this request with the message - QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02. - - The eventIndId field in the event indication callback is set to - QMI_LOC_EVENT_INJECT_PREDICTED_ORBITS_REQ_IND_V02. */ - - const qmiLocEventInjectPositionReqIndMsgT_v02* pInjectPositionReqEvent; - /**< Asks the client for position assistance. - - The client responds to this request with the message - QMI_LOC_INJECT_POSITION_REQ_V02. - - The eventIndId field in the event indication callback is set to - QMI_LOC_EVENT_INJECT_POSITION_REQ_IND_V02. */ - - const qmiLocEventEngineStateIndMsgT_v02* pEngineState; - /**< Sent by the engine whenever it turns on or off. - - The eventIndId field in the event indication callback is set to - QMI_LOC_EVENT_ENGINE_STATE_IND_V02. */ - - const qmiLocEventFixSessionStateIndMsgT_v02* pFixSessionState; - /**< Sent by the engine when a location session begins or ends. - - The eventIndId field in the event indication callback is set to - QMI_LOC_EVENT_FIX_SESSION_STATE_IND_V02. */ - - const qmiLocEventWifiReqIndMsgT_v02* pWifiReqEvent; - /**< Sent by the engine when it needs WiFi support. - - The eventIndId field in the event indication callback is set to - QMI_LOC_EVENT_WIFI_REQ_IND_V02. */ - - const qmiLocEventSensorStreamingReadyStatusIndMsgT_v02* - pSensorStreamingReadyStatusEvent; - /**< Notifies the client that the engine is ready to accept sensor data. - - The eventIndId field in the event indication callback is set to - QMI_LOC_EVENT_SENSOR_STREAMING_READY_STATUS_IND_V02. */ - - const qmiLocEventTimeSyncReqIndMsgT_v02* pTimeSyncReqEvent; - /**< Sent by the engine when it needs to synchronize its time with the sensor - processor time. - - The eventIndId field in the event indication callback is set to - QMI_LOC_EVENT_TIME_SYNC_REQ_IND_V02. */ - - const qmiLocEventSetSpiStreamingReportIndMsgT_v02* - pSetSpiStreamingReportEvent; - /**< Asks the client to start/stop sending a Stationary Position Indicator - (SPI) stream. - - The eventIndId field in the event indication callback is set to - QMI_LOC_SET_SPI_STREAMING_REPORT_IND_V02. */ - - const qmiLocEventLocationServerConnectionReqIndMsgT_v02* - pLocationServerConnReqEvent; - /**< Sent by the engine to ask the client to open or close a connection to - a location server. - - The client responds to this request by sending the - QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02 message. - - The eventIndId field in the event indication callback is set to - QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02. - @newpage */ - -}locClientEventIndUnionType; - - -/** @brief Response indications that are sent by the service. */ -typedef union -{ - const qmiLocGetServiceRevisionIndMsgT_v02* pGetServiceRevisionInd; - /**< Response to the request, QMI_LOC_GET_SERVICE_REVISION_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_SERVICE_REVISION_IND_V02. */ - - const qmiLocGetFixCriteriaIndMsgT_v02* pGetFixCriteriaInd; - /**< Response to the request, QMI_LOC_GET_FIX_CRITERIA_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_FIX_CRITERIA_IND_V02. */ - - const qmiLocNiUserRespIndMsgT_v02* pNiUserRespInd; - /**< Response to the request, QMI_LOC_NI_USER_RESPONSE_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_NI_USER_RESPONSE_IND_V02. */ - - const qmiLocInjectPredictedOrbitsDataIndMsgT_v02* - pInjectPredictedOrbitsDataInd; - /**< Sent after a predicted orbits data part has been successfully injected. - - The client waits for this indication before injecting the next part. - This indication is sent in response to - QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02. */ - - const qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02* - pGetPredictedOrbitsDataSourceInd; - /**< Response to the request, - QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_IND_V02. */ - - const qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02* - pGetPredictedOrbitsDataValidityInd; - /**< Response to the request, - QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_IND_V02. */ - - const qmiLocInjectUtcTimeIndMsgT_v02* pInjectUtcTimeInd; - /**< Response to the request, QMI_LOC_INJECT_UTC_TIME_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_INJECT_UTC_TIME_IND_V02. */ - - const qmiLocInjectPositionIndMsgT_v02* pInjectPositionInd; - /**< Response to the request, QMI_LOC_INJECT_POSITION_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_INJECT_POSITION_IND_V02. */ - - const qmiLocSetEngineLockIndMsgT_v02* pSetEngineLockInd; - /**< Response to the request, QMI_LOC_SET_ENGINE_LOCK_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_SET_ENGINE_LOCK_IND_V02. */ - - const qmiLocGetEngineLockIndMsgT_v02* pGetEngineLockInd; - /**< Response to the request, QMI_LOC_GET_ENGINE_LOCK_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_ENGINE_LOCK_IND_V02. */ - - const qmiLocSetSbasConfigIndMsgT_v02* pSetSbasConfigInd; - /**< Response to the request, QMI_LOC_SET_SBAS_CONFIG_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_SET_SBAS_CONFIG_IND_V02. */ - - const qmiLocGetSbasConfigIndMsgT_v02* pGetSbasConfigInd; - /**< Response to the request, QMI_LOC_GET_SBAS_CONFIG_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_SBAS_CONFIG_IND_V02. */ - - const qmiLocSetNmeaTypesIndMsgT_v02* pSetNmeaTypesInd; - /**< Response to the request, QMI_LOC_SET_NMEA_TYPES_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_SET_NMEA_TYPES_IND_V02. */ - - const qmiLocGetNmeaTypesIndMsgT_v02* pGetNmeaTypesInd; - /**< Response to the request, QMI_LOC_GET_NMEA_TYPES_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_NMEA_TYPES_IND_V02. */ - - const qmiLocSetLowPowerModeIndMsgT_v02* pSetLowPowerModeInd; - /**< Response to the request, QMI_LOC_SET_LOW_POWER_MODE_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_SET_LOW_POWER_MODE_IND_V02. */ - - const qmiLocGetLowPowerModeIndMsgT_v02* pGetLowPowerModeInd; - /**< Response to the request, QMI_LOC_GET_LOW_POWER_MODE_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_LOW_POWER_MODE_IND_V02. */ - - const qmiLocSetServerIndMsgT_v02* pSetServerInd; - /**< Response to the request, QMI_LOC_SET_SERVER_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_SET_SERVER_IND_V02. */ - - const qmiLocGetServerIndMsgT_v02* pGetServerInd; - /**< Response to the request, QMI_LOC_GET_SERVER_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_SERVER_IND_V02. */ - - const qmiLocDeleteAssistDataIndMsgT_v02* pDeleteAssistDataInd; - /**< Response to the request, QMI_LOC_DELETE_ASSIST_DATA_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_DELETE_ASSIST_DATA_IND_V02. */ - - const qmiLocSetXtraTSessionControlIndMsgT_v02* pSetXtraTSessionControlInd; - /**< Response to the request, QMI_LOC_SET_XTRA_T_SESSION_CONTROL_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_SET_XTRA_T_SESSION_CONTROL_IND_V02. */ - - const qmiLocGetXtraTSessionControlIndMsgT_v02* pGetXtraTSessionControlInd; - /**< Response to the request, QMI_LOC_GET_XTRA_T_SESSION_CONTROL_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_XTRA_T_SESSION_CONTROL_IND_V02. */ - - const qmiLocInjectWifiPositionIndMsgT_v02* pInjectWifiPositionInd; - /**< Response to the request, QMI_LOC_INJECT_WIFI_POSITION_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_INJECT_WIFI_POSITION_IND_V02. */ - - const qmiLocNotifyWifiStatusIndMsgT_v02* pNotifyWifiStatusInd; - /**< Response to the request, QMI_LOC_NOTIFY_WIFI_STATUS_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_NOTIFY_WIFI_STATUS_IND_V02. */ - - const qmiLocGetRegisteredEventsIndMsgT_v02* pGetRegisteredEventsInd; - /**< Response to the request, QMI_LOC_GET_REGISTERED_EVENTS_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_REGISTERED_EVENTS_IND_V02. */ - - const qmiLocSetOperationModeIndMsgT_v02* pSetOperationModeInd; - /**< Response to the request, QMI_LOC_SET_OPERATION_MODE_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_SET_OPERATION_MODE_IND_V02. */ - - const qmiLocGetOperationModeIndMsgT_v02* pGetOperationModeInd; - /**< Response to the request, QMI_LOC_GET_OPERATION_MODE_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_OPERATION_MODE_IND_V02. */ - - const qmiLocSetSpiStatusIndMsgT_v02* pSetSpiStatusInd; - /**< Response to the request, QMI_LOC_SET_SPI_STATUS_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_SET_SPI_STATUS_IND_V02. */ - - const qmiLocInjectSensorDataIndMsgT_v02* pInjectSensorDataInd; - /**< Response to the request, QMI_LOC_INJECT_SENSOR_DATA_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_INJECT_SENSOR_DATA_IND_V02. */ - - const qmiLocInjectTimeSyncDataIndMsgT_v02* pInjectTimeSyncDataInd; - /**< Response to the request, QMI_LOC_INJECT_TIME_SYNC_DATA_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_INJECT_TIME_SYNC_DATA_IND_V02. */ - - const qmiLocSetCradleMountConfigIndMsgT_v02* pSetCradleMountConfigInd; - /**< Response to the request, QMI_LOC_SET_CRADLE_MOUNT_CONFIG_IND_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_SET_CRADLE_MOUNT_CONFIG_REQ_V02. */ - - const qmiLocGetCradleMountConfigIndMsgT_v02* pGetCradleMountConfigInd; - /**< Response to the request, QMI_LOC_GET_CRADLE_MOUNT_CONFIG_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_CRADLE_MOUNT_CONFIG_IND_V02. */ - - const qmiLocSetExternalPowerConfigIndMsgT_v02* pSetExternalPowerConfigInd; - /**< Response to the request, QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02. */ - - const qmiLocGetExternalPowerConfigIndMsgT_v02* pGetExternalPowerConfigInd; - /**< Response to the request, QMI_LOC_GET_EXTERNAL_POWER_CONFIG_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_EXTERNAL_POWER_CONFIG_IND_V02. */ - - const qmiLocInformLocationServerConnStatusIndMsgT_v02* - pInformLocationServerConnStatusInd; - /**< Response to the request, - QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02.*/ - - const qmiLocSetProtocolConfigParametersIndMsgT_v02* - pSetProtocolConfigParametersInd; - /**< Response to the request, - QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02. */ - - const qmiLocGetProtocolConfigParametersIndMsgT_v02* - pGetProtocolConfigParametersInd; - /**< Response to the request, - QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02. - @newpage */ - - const qmiLocSetSensorControlConfigIndMsgT_v02* pSetSensorControlConfigInd; - /**< Response to the request, - QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02. - @newpage */ - - const qmiLocGetSensorControlConfigIndMsgT_v02* pGetSensorControlConfigInd; - /**< Response to the request, - QMI_LOC_GET_SENSOR_CONTROL_CONFIG_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_SENSOR_CONTROL_CONFIG_IND_V02. - @newpage */ - - const qmiLocSetSensorPropertiesIndMsgT_v02* pSetSensorPropertiesInd; - /**< Response to the request, - QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02. - @newpage */ - - const qmiLocGetSensorPropertiesIndMsgT_v02* pGetSensorPropertiesInd; - /**< Response to the request, - QMI_LOC_GET_SENSOR_PROPERTIES_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_SENSOR_PROPERTIES_IND_V02. - @newpage */ - - const qmiLocSetSensorPerformanceControlConfigIndMsgT_v02* - pSetSensorPerformanceControlConfigInd; - /**< Response to the request, - QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02. - @newpage */ - - const qmiLocGetSensorPerformanceControlConfigIndMsgT_v02* - pGetSensorPerformanceControlConfigInd; - /**< Response to the request, - QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02. - - The respIndId field in the response indication callback is set to - QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02. - @newpage */ - - const qmiLocInjectSuplCertificateIndMsgT_v02* pInjectSuplCertificateInd; - /**< Response to the request, - QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02 - The respIndId field in the response indication callback is set to - QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02. - @newpage */ - - const qmiLocDeleteSuplCertificateIndMsgT_v02* pDeleteSuplCertificateInd; - /**< Response to the request, - QMI_LOC_DELETE_SUPL_CERTIFICATE_REQ_V02. - The respIndId field in the response indication callback is set to - QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02. - @newpage */ - - const qmiLocSetPositionEngineConfigParametersIndMsgT_v02* - pSetPositionEngineConfigParametersInd; - /**< Response to the request, - QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02 - The respIndId field in the response indication callback is set to - QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02. - @newpage */ - - const qmiLocGetPositionEngineConfigParametersIndMsgT_v02* - pGetPositionEngineConfigParametersInd; - /**< 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. - @newpage */ - -}locClientRespIndUnionType; - -/** @} */ /* end_addtogroup send_request */ - -/** @addtogroup data_types -@{ */ - -/** Location event indication callback function type. The Location service can - generate two types of indications: - - - Asynchronous events indications, such as time injection request and satellite - reports. The client specifies the asynchronous events it is interested in - receiving through the event mask (see locClientOpen()). - - Response indications that are generated as a response to a request. For - example, the QMI_LOC_GET_FIX_CRITERIA_REQ_V02 request generates the - indication, QMI_LOC_GET_FIX_CRITERIA_IND_V02. - - This callback handles the asynchronous event indications. - - @vertspace - @param handle Location client for this event. Only the client who - registered for the corresponding event receives - this callback. - @param eventIndId ID of the event indication. - @param eventIndPayload Event indication payload. - @param pClientCookie Pointer to the cookie the client specified during - registration. -*/ -typedef void (*locClientEventIndCbType)( - locClientHandleType handle, - uint32_t eventIndId, - const locClientEventIndUnionType eventIndPayload, - void *pClientCookie -); - -/** Location response indication callback function type. The Location service can - generate two types of indications: - - - Asynchronous events indications, such as time injection request and satellite - reports. The client specifies the asynchronous events it is interested in - receiving through the event mask (see locClientOpen()). - - Response indications that are generated as a response to a request. For - example, the QMI_LOC_GET_FIX_CRITERIA_REQ_V02 request generates the - indication, QMI_LOC_GET_FIX_CRITERIA_IND_V02. - - This callback handles the response indications. - - @vertspace - @param handle Location client who sent the request for which this - response indication is generated. - @param respIndId ID of the response. It is the same value as the ID - of request sent to the engine. - @param respIndPayload Payload of the response indication. - @param pClientCookie Pointer to the cookie the client specified during - registration. - - @newpage -*/ -typedef void (*locClientRespIndCbType)( - locClientHandleType handle, - uint32_t respIndId, - const locClientRespIndUnionType respIndPayload, - void *pClientCookie -); - -/** Location error callback function type. This function will be - called to inform the client that the service is no longer - available. When the client receives this callback it must - close the existing connection and reopen the client connection. - - - @vertspace - @param handle Location client who sent the request for which this - error indication is generated. - @param errorId Error ID. - @param errorCbdata Payload associated with the error indication. - - @newpage -*/ -typedef void (*locClientErrorCbType)( - locClientHandleType handle, - locClientErrorEnumType errorId, - void* pClientCookie - ); - - -/** Callback functions to be registered during locClientOpen -*/ - -typedef struct -{ - uint32_t size; - /**< Size of the structure */ - locClientEventIndCbType eventIndCb; - /**< Event Indication callback */ - locClientRespIndCbType respIndCb; - /**< Response Indication callback */ - locClientErrorCbType errorCb; - /**< Error Indication callback */ -}locClientCallbacksType; - -/** @} */ /* end_addtogroup data_types */ - -/*=========================================================================== - * - * FUNCTION DECLARATION - * - *==========================================================================*/ - -/** @addtogroup open_client -@{ */ -/*========================================================================== - locClientOpen */ -/** - @latexonly\label{hdr:locClientOpenFunction}@endlatexonly Connects a location - client to the location engine. If the connection is successful, this function - returns a handle that the location client uses for future location operations. - - @datatype - #locClientStatusEnumType\n - #locClientEventMaskType\n - #locClientCallbacksType *\n - #locClientHandleType *\n - #void * - - @vertspace - @param[in] eventRegMask Mask of asynchronous events the client is - interested in receiving. - @param[in] pLocClientCallbacks Pointer to structure containing the - callbacks. - @param[out] pLocClientHandle Pointer to the handle to be used by the - client for any subsequent requests. - @param[in] pLocClientCookie Pointer to a "cookie" to be returned to the - client along with the callbacks. - - @return - One of the following error codes: - - eLOC_CLIENT_SUCCESS -- If the connection is opened. - - Non-zero error code (see \ref locClientStatusEnumType) -- On failure. - - @dependencies - None. - @newpage -*/ -extern locClientStatusEnumType locClientOpen ( - locClientEventMaskType eventRegMask, - const locClientCallbacksType* pLocClientCallbacks, - locClientHandleType* pLocClientHandle, - const void* pLocClientCookie -); - -/** @} */ /* end_addtogroup open_client */ - -/** @addtogroup close_client -@{ */ -/*========================================================================== - locClientClose */ -/** - @latexonly\label{hdr:locClientCloseFunction}@endlatexonly Disconnects a client - from the location engine and sets the handle to - LOC_CLIENT_INVALID_HANDLE_VALUE. - - @datatype - #locClientStatusEnumType\n - #locClientHandleType - - @vertspace - @param[in] pLocClientHandle Pointer to the handle returned by the - locClientOpen() function. - - @return - One of the following error codes: - - 0 (eLOC_CLIENT_SUCCESS) -- On success. - - Non-zero error code (see \ref locClientStatusEnumType) -- On failure. - - @dependencies - None. - @newpage -*/ -extern locClientStatusEnumType locClientClose ( - locClientHandleType* pLocClientHandle -); - -/** @} */ /* end_addtogroup close_client */ - -/** @addtogroup send_request -@{ */ -/*============================================================================= - locClientSendReq */ -/** - @latexonly\label{hdr:locClientSendReqFunction}@endlatexonly Sends a message to - the location engine. If this function is successful, the client expects an - indication (except start, stop, event registration, and sensor injection - messages) through the registered callback in the locClientOpen() function. - - The indication contains the status of the request. If the status is a success, - the indication also contains the payload associated with response. - - @datatype - #locClientStatusEnumType\n - #locClientHandleType\n - #locClientReqUnionType - - @vertspace - @param[in] handle Handle returned by the locClientOpen() function. - @param[in] reqId QMI_LOC service message ID of the request. - @param[in] pReqPayload Payload of the request. This can be NULL if the request - has no payload. - - @return - One of the following error codes: - - 0 (eLOC_CLIENT_SUCCESS) -- On success. - - Non-zero error code (see \ref locClientStatusEnumType) -- On failure. - - @dependencies - None. - - @structure - locClientReqUnionType - @newpage -*/ -extern locClientStatusEnumType locClientSendReq( - locClientHandleType handle, - uint32_t reqId, - locClientReqUnionType reqPayload -); - -/** @} */ /* end_addtogroup send_request */ - -/** @addtogroup get_size_event -@{ */ -/*============================================================================= - locClientGetSizeByEventIndId */ -/** - Gets the size of the event indication structure from a specified ID. - - @datatype - #locClientGetSizeByEventIndId - - @vertspace - @param[in] eventIndId Event indicator ID. - @param[out] pEventIndSize Pointer to the size of the structure. - - @return - true -- The event ID was found.\n - false -- Otherwise. - - @dependencies - None. - - @structure - locClientEventIndUnionType - @newpage -*/ -extern bool locClientGetSizeByEventIndId( - uint32_t eventIndId, - size_t *pEventIndSize); - -/** @} */ /* end_addtogroup get_size_event */ - -/** @addtogroup get_size_response -@{ */ -/*============================================================================= - locClientGetSizeByRespIndId */ - -/** - Gets the size of the response indication structure from a specified ID. - - @datatype - #locClientGetSizeByRespIndId - - @vertspace - @param[in] respIndId Response indicator ID. - @param[out] pRespIndSize Pointer to the size of the structure. - - @return - true -- The response ID was found.\n - false -- Otherwise. - - @dependencies - None. - - @structure - locClientRespIndUnionType - @newpage -*/ -extern bool locClientGetSizeByRespIndId( - uint32_t respIndId, - size_t *pRespIndSize); - -/*=============================================================================*/ - -/** @} */ /* end_addtogroup get_size_response */ - -#ifdef __cplusplus -} -#endif - -#endif /* LOC_API_V02_CLIENT_H*/ diff --git a/loc_api/loc_api_v02/loc_api_v02_log.c b/loc_api/loc_api_v02/loc_api_v02_log.c deleted file mode 100644 index 78792607..00000000 --- a/loc_api/loc_api_v02/loc_api_v02_log.c +++ /dev/null @@ -1,243 +0,0 @@ -/* 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 - * 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 Code Aurora Forum, 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 "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. - * - */ -#include -#include - -static loc_name_val_s_type loc_v02_event_name[] = -{ - NAME_VAL(QMI_LOC_INFORM_CLIENT_REVISION_REQ_V02), - NAME_VAL(QMI_LOC_INFORM_CLIENT_REVISION_RESP_V02), - NAME_VAL(QMI_LOC_REG_EVENTS_REQ_V02), - NAME_VAL(QMI_LOC_REG_EVENTS_RESP_V02), - NAME_VAL(QMI_LOC_START_REQ_V02), - NAME_VAL(QMI_LOC_START_RESP_V02), - NAME_VAL(QMI_LOC_STOP_REQ_V02), - NAME_VAL(QMI_LOC_STOP_RESP_V02), - NAME_VAL(QMI_LOC_EVENT_POSITION_REPORT_IND_V02), - NAME_VAL(QMI_LOC_EVENT_GNSS_SV_INFO_IND_V02), - NAME_VAL(QMI_LOC_EVENT_NMEA_IND_V02), - NAME_VAL(QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_IND_V02), - NAME_VAL(QMI_LOC_EVENT_INJECT_TIME_REQ_IND_V02), - NAME_VAL(QMI_LOC_EVENT_INJECT_PREDICTED_ORBITS_REQ_IND_V02), - NAME_VAL(QMI_LOC_EVENT_INJECT_POSITION_REQ_IND_V02), - NAME_VAL(QMI_LOC_EVENT_ENGINE_STATE_IND_V02), - NAME_VAL(QMI_LOC_EVENT_FIX_SESSION_STATE_IND_V02), - NAME_VAL(QMI_LOC_EVENT_WIFI_REQ_IND_V02), - NAME_VAL(QMI_LOC_EVENT_SENSOR_STREAMING_READY_STATUS_IND_V02), - NAME_VAL(QMI_LOC_EVENT_TIME_SYNC_REQ_IND_V02), - NAME_VAL(QMI_LOC_EVENT_SET_SPI_STREAMING_REPORT_IND_V02), - NAME_VAL(QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02), - NAME_VAL(QMI_LOC_GET_SERVICE_REVISION_REQ_V02), - NAME_VAL(QMI_LOC_GET_SERVICE_REVISION_RESP_V02), - NAME_VAL(QMI_LOC_GET_SERVICE_REVISION_IND_V02), - NAME_VAL(QMI_LOC_GET_FIX_CRITERIA_REQ_V02), - NAME_VAL(QMI_LOC_GET_FIX_CRITERIA_RESP_V02), - NAME_VAL(QMI_LOC_GET_FIX_CRITERIA_IND_V02), - NAME_VAL(QMI_LOC_NI_USER_RESPONSE_REQ_V02), - NAME_VAL(QMI_LOC_NI_USER_RESPONSE_RESP_V02), - NAME_VAL(QMI_LOC_NI_USER_RESPONSE_IND_V02), - NAME_VAL(QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02), - NAME_VAL(QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_RESP_V02), - NAME_VAL(QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02), - NAME_VAL(QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_REQ_V02), - NAME_VAL(QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_RESP_V02), - NAME_VAL(QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_IND_V02), - NAME_VAL(QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_REQ_V02), - NAME_VAL(QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_RESP_V02), - NAME_VAL(QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_IND_V02), - NAME_VAL(QMI_LOC_INJECT_UTC_TIME_REQ_V02), - NAME_VAL(QMI_LOC_INJECT_UTC_TIME_RESP_V02), - NAME_VAL(QMI_LOC_INJECT_UTC_TIME_IND_V02), - NAME_VAL(QMI_LOC_INJECT_POSITION_REQ_V02), - NAME_VAL(QMI_LOC_INJECT_POSITION_RESP_V02), - NAME_VAL(QMI_LOC_INJECT_POSITION_IND_V02), - NAME_VAL(QMI_LOC_SET_ENGINE_LOCK_REQ_V02), - NAME_VAL(QMI_LOC_SET_ENGINE_LOCK_RESP_V02), - NAME_VAL(QMI_LOC_SET_ENGINE_LOCK_IND_V02), - NAME_VAL(QMI_LOC_GET_ENGINE_LOCK_REQ_V02), - NAME_VAL(QMI_LOC_GET_ENGINE_LOCK_RESP_V02), - NAME_VAL(QMI_LOC_GET_ENGINE_LOCK_IND_V02), - NAME_VAL(QMI_LOC_SET_SBAS_CONFIG_REQ_V02), - NAME_VAL(QMI_LOC_SET_SBAS_CONFIG_RESP_V02), - NAME_VAL(QMI_LOC_SET_SBAS_CONFIG_IND_V02), - NAME_VAL(QMI_LOC_GET_SBAS_CONFIG_REQ_V02), - NAME_VAL(QMI_LOC_GET_SBAS_CONFIG_RESP_V02), - NAME_VAL(QMI_LOC_GET_SBAS_CONFIG_IND_V02), - NAME_VAL(QMI_LOC_SET_NMEA_TYPES_REQ_V02), - NAME_VAL(QMI_LOC_SET_NMEA_TYPES_RESP_V02), - NAME_VAL(QMI_LOC_SET_NMEA_TYPES_IND_V02), - NAME_VAL(QMI_LOC_GET_NMEA_TYPES_REQ_V02), - NAME_VAL(QMI_LOC_GET_NMEA_TYPES_RESP_V02), - NAME_VAL(QMI_LOC_GET_NMEA_TYPES_IND_V02), - NAME_VAL(QMI_LOC_SET_LOW_POWER_MODE_REQ_V02), - NAME_VAL(QMI_LOC_SET_LOW_POWER_MODE_RESP_V02), - NAME_VAL(QMI_LOC_SET_LOW_POWER_MODE_IND_V02), - NAME_VAL(QMI_LOC_GET_LOW_POWER_MODE_REQ_V02), - NAME_VAL(QMI_LOC_GET_LOW_POWER_MODE_RESP_V02), - NAME_VAL(QMI_LOC_GET_LOW_POWER_MODE_IND_V02), - NAME_VAL(QMI_LOC_SET_SERVER_REQ_V02), - NAME_VAL(QMI_LOC_SET_SERVER_RESP_V02), - NAME_VAL(QMI_LOC_SET_SERVER_IND_V02), - NAME_VAL(QMI_LOC_GET_SERVER_REQ_V02), - NAME_VAL(QMI_LOC_GET_SERVER_RESP_V02), - NAME_VAL(QMI_LOC_GET_SERVER_IND_V02), - NAME_VAL(QMI_LOC_DELETE_ASSIST_DATA_REQ_V02), - NAME_VAL(QMI_LOC_DELETE_ASSIST_DATA_RESP_V02), - NAME_VAL(QMI_LOC_DELETE_ASSIST_DATA_IND_V02), - NAME_VAL(QMI_LOC_SET_XTRA_T_SESSION_CONTROL_REQ_V02), - NAME_VAL(QMI_LOC_SET_XTRA_T_SESSION_CONTROL_RESP_V02), - NAME_VAL(QMI_LOC_SET_XTRA_T_SESSION_CONTROL_IND_V02), - NAME_VAL(QMI_LOC_GET_XTRA_T_SESSION_CONTROL_REQ_V02), - NAME_VAL(QMI_LOC_GET_XTRA_T_SESSION_CONTROL_RESP_V02), - NAME_VAL(QMI_LOC_GET_XTRA_T_SESSION_CONTROL_IND_V02), - NAME_VAL(QMI_LOC_INJECT_WIFI_POSITION_REQ_V02), - NAME_VAL(QMI_LOC_INJECT_WIFI_POSITION_RESP_V02), - NAME_VAL(QMI_LOC_INJECT_WIFI_POSITION_IND_V02), - NAME_VAL(QMI_LOC_NOTIFY_WIFI_STATUS_REQ_V02), - NAME_VAL(QMI_LOC_NOTIFY_WIFI_STATUS_RESP_V02), - NAME_VAL(QMI_LOC_NOTIFY_WIFI_STATUS_IND_V02), - NAME_VAL(QMI_LOC_GET_REGISTERED_EVENTS_REQ_V02), - NAME_VAL(QMI_LOC_GET_REGISTERED_EVENTS_RESP_V02), - NAME_VAL(QMI_LOC_GET_REGISTERED_EVENTS_IND_V02), - NAME_VAL(QMI_LOC_SET_OPERATION_MODE_REQ_V02), - NAME_VAL(QMI_LOC_SET_OPERATION_MODE_RESP_V02), - NAME_VAL(QMI_LOC_SET_OPERATION_MODE_IND_V02), - NAME_VAL(QMI_LOC_GET_OPERATION_MODE_REQ_V02), - NAME_VAL(QMI_LOC_GET_OPERATION_MODE_RESP_V02), - NAME_VAL(QMI_LOC_GET_OPERATION_MODE_IND_V02), - NAME_VAL(QMI_LOC_SET_SPI_STATUS_REQ_V02), - NAME_VAL(QMI_LOC_SET_SPI_STATUS_RESP_V02), - NAME_VAL(QMI_LOC_SET_SPI_STATUS_IND_V02), - NAME_VAL(QMI_LOC_INJECT_SENSOR_DATA_REQ_V02), - NAME_VAL(QMI_LOC_INJECT_SENSOR_DATA_RESP_V02), - NAME_VAL(QMI_LOC_INJECT_SENSOR_DATA_IND_V02), - NAME_VAL(QMI_LOC_INJECT_TIME_SYNC_DATA_REQ_V02), - NAME_VAL(QMI_LOC_INJECT_TIME_SYNC_DATA_RESP_V02), - NAME_VAL(QMI_LOC_INJECT_TIME_SYNC_DATA_IND_V02), - NAME_VAL(QMI_LOC_SET_CRADLE_MOUNT_CONFIG_REQ_V02), - NAME_VAL(QMI_LOC_SET_CRADLE_MOUNT_CONFIG_RESP_V02), - NAME_VAL(QMI_LOC_SET_CRADLE_MOUNT_CONFIG_IND_V02), - NAME_VAL(QMI_LOC_GET_CRADLE_MOUNT_CONFIG_REQ_V02), - NAME_VAL(QMI_LOC_GET_CRADLE_MOUNT_CONFIG_RESP_V02), - NAME_VAL(QMI_LOC_GET_CRADLE_MOUNT_CONFIG_IND_V02), - NAME_VAL(QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02), - NAME_VAL(QMI_LOC_SET_EXTERNAL_POWER_CONFIG_RESP_V02), - NAME_VAL(QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02), - NAME_VAL(QMI_LOC_GET_EXTERNAL_POWER_CONFIG_REQ_V02), - NAME_VAL(QMI_LOC_GET_EXTERNAL_POWER_CONFIG_RESP_V02), - NAME_VAL(QMI_LOC_GET_EXTERNAL_POWER_CONFIG_IND_V02), - NAME_VAL(QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02), - NAME_VAL(QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_RESP_V02), - NAME_VAL(QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02), - NAME_VAL(QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02), - NAME_VAL(QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_RESP_V02), - NAME_VAL(QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02), - NAME_VAL(QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02), - NAME_VAL(QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_RESP_V02), - NAME_VAL(QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02), - NAME_VAL(QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02), - NAME_VAL(QMI_LOC_SET_SENSOR_CONTROL_CONFIG_RESP_V02), - NAME_VAL(QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02), - NAME_VAL(QMI_LOC_GET_SENSOR_CONTROL_CONFIG_REQ_V02), - NAME_VAL(QMI_LOC_GET_SENSOR_CONTROL_CONFIG_RESP_V02), - NAME_VAL(QMI_LOC_GET_SENSOR_CONTROL_CONFIG_IND_V02), - NAME_VAL(QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02), - NAME_VAL(QMI_LOC_SET_SENSOR_PROPERTIES_RESP_V02), - NAME_VAL(QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02), - NAME_VAL(QMI_LOC_GET_SENSOR_PROPERTIES_REQ_V02), - NAME_VAL(QMI_LOC_GET_SENSOR_PROPERTIES_RESP_V02), - NAME_VAL(QMI_LOC_GET_SENSOR_PROPERTIES_IND_V02), - NAME_VAL(QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02), - NAME_VAL(QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_RESP_V02), - NAME_VAL(QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02), - NAME_VAL(QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02), - NAME_VAL(QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_RESP_V02), - NAME_VAL(QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02), - NAME_VAL(QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02), - NAME_VAL(QMI_LOC_INJECT_SUPL_CERTIFICATE_RESP_V02), - NAME_VAL(QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02), - NAME_VAL(QMI_LOC_DELETE_SUPL_CERTIFICATE_REQ_V02), - NAME_VAL(QMI_LOC_DELETE_SUPL_CERTIFICATE_RESP_V02), - NAME_VAL(QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02), - NAME_VAL(QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02), - NAME_VAL(QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_RESP_V02), - NAME_VAL(QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02), - 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), -}; -static int loc_v02_event_num = sizeof(loc_v02_event_name) / sizeof(loc_name_val_s_type); - -const char* loc_get_v02_event_name(uint32_t event) -{ - return loc_get_name_from_val(loc_v02_event_name, loc_v02_event_num, (long) event); -} - -static loc_name_val_s_type loc_v02_client_status_name[] = -{ - NAME_VAL(eLOC_CLIENT_SUCCESS), - NAME_VAL(eLOC_CLIENT_FAILURE_GENERAL), - NAME_VAL(eLOC_CLIENT_FAILURE_UNSUPPORTED), - NAME_VAL(eLOC_CLIENT_FAILURE_INVALID_PARAMETER), - NAME_VAL(eLOC_CLIENT_FAILURE_ENGINE_BUSY), - NAME_VAL(eLOC_CLIENT_FAILURE_PHONE_OFFLINE), - NAME_VAL(eLOC_CLIENT_FAILURE_TIMEOUT), - NAME_VAL(eLOC_CLIENT_FAILURE_SERVICE_NOT_PRESENT), - NAME_VAL(eLOC_CLIENT_FAILURE_SERVICE_VERSION_UNSUPPORTED), - NAME_VAL(eLOC_CLIENT_FAILURE_CLIENT_VERSION_UNSUPPORTED), - NAME_VAL(eLOC_CLIENT_FAILURE_INVALID_HANDLE), - NAME_VAL(eLOC_CLIENT_FAILURE_INTERNAL), - NAME_VAL(eLOC_CLIENT_FAILURE_NOT_INITIALIZED), -}; -static int loc_v02_client_status_num = sizeof(loc_v02_client_status_name) / sizeof(loc_name_val_s_type); - -const char* loc_get_v02_client_status_name(locClientStatusEnumType status) -{ - return loc_get_name_from_val(loc_v02_client_status_name, loc_v02_client_status_num, (long) status); -} - - -static loc_name_val_s_type loc_v02_qmi_status_name[] = -{ - QMILOCSTATUSENUMT_MIN_ENUM_VAL_V02, - eQMI_LOC_SUCCESS_V02, - eQMI_LOC_GENERAL_FAILURE_V02, - eQMI_LOC_UNSUPPORTED_V02, - eQMI_LOC_INVALID_PARAMETER_V02, - eQMI_LOC_ENGINE_BUSY_V02, - eQMI_LOC_PHONE_OFFLINE_V02, - eQMI_LOC_TIMEOUT_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); - -const char* loc_get_v02_qmi_status_name(qmiLocStatusEnumT_v02 status) -{ - return loc_get_name_from_val(loc_v02_qmi_status_name, loc_v02_qmi_status_num, (long) status); -} diff --git a/loc_api/loc_api_v02/loc_api_v02_log.h b/loc_api/loc_api_v02/loc_api_v02_log.h deleted file mode 100644 index c63972f9..00000000 --- a/loc_api/loc_api_v02/loc_api_v02_log.h +++ /dev/null @@ -1,50 +0,0 @@ -/* 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 - * 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 Code Aurora Forum, 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 "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. - * - */ - -#ifndef LOC_API_V02_LOG_H -#define LOC_API_V02_LOG_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include - -const char* loc_get_v02_event_name(uint32_t event); -const char* loc_get_v02_client_status_name(locClientStatusEnumType status); -const char* loc_get_v02_qmi_status_name(qmiLocStatusEnumT_v02 status); - - -#ifdef __cplusplus -} -#endif - -#endif /* LOC_API_V02_LOG_H */ diff --git a/loc_api/loc_api_v02/loc_util_log.h b/loc_api/loc_api_v02/loc_util_log.h deleted file mode 100644 index f1b675e3..00000000 --- a/loc_api/loc_api_v02/loc_util_log.h +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) 2009,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 - * 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 Code Aurora Forum, 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 "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. - * - */ - -#ifndef LOC_UTIL_LOG_H -#define LOC_UTIL_LOG_H - -#ifdef FEATURE_LOC_API_V02_QNX_MOD -//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__) - -#define MODEM_LOG_CALLFLOW(SPEC, VAL) -#define EXIT_LOG_CALLFLOW(SPEC, VAL) - -#endif //FEATURE_LOC_API_V02_QNX_MOD - -#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__) - -// get around strl*: not found in glibc -// TBD:look for presence of eglibc other libraries -// with strlcpy supported. -#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 //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 deleted file mode 100644 index 37d93f6f..00000000 --- a/loc_api/loc_api_v02/location_service_v02.c +++ /dev/null @@ -1,2223 +0,0 @@ -/* 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 - * 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 Code Aurora Forum, 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 "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. - */ - -#include "stdint.h" -#include "qmi_idl_lib_internal.h" -#include "location_service_v02.h" -#include "common_v01.h" - - -/*Type Definitions*/ -static const uint8_t qmiLocGPSTimeStructT_data_v02[] = { - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocGPSTimeStructT_v02, gpsWeek), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGPSTimeStructT_v02, gpsTimeOfWeekMs), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocDOPStructT_data_v02[] = { - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocDOPStructT_v02, PDOP), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocDOPStructT_v02, HDOP), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocDOPStructT_v02, VDOP), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocSensorUsageIndicatorStructT_data_v02[] = { - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSensorUsageIndicatorStructT_v02, usageMask), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSensorUsageIndicatorStructT_v02, aidingIndicatorMask), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocSvInfoStructT_data_v02[] = { - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, validMask), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, system), - - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, gnssSvId), - - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, healthStatus), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, svStatus), - - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, svInfoMask), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, elevation), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, azimuth), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSvInfoStructT_v02, snr), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocNiVxNotifyVerifyStructT_data_v02[] = { - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, posQosIncl), - - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, posQos), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, numFixes), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, timeBetweenFixes), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocNiVxNotifyVerifyStructT_v02, posMode), - - 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_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), - - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET16ARRAY(qmiLocNiVxNotifyVerifyStructT_v02, userRespTimerInSeconds), - - QMI_IDL_FLAG_END_VALUE -}; - -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_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), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocNiSuplQopStructT_data_v02[] = { - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocNiSuplQopStructT_v02, validMask), - - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocNiSuplQopStructT_v02, horizontalAccuracy), - - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocNiSuplQopStructT_v02, verticalAccuracy), - - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocNiSuplQopStructT_v02, maxLocAge), - - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocNiSuplQopStructT_v02, delay), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocIpV4AddrStructType_data_v02[] = { - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocIpV4AddrStructType_v02, addr), - - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocIpV4AddrStructType_v02, port), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocIpV6AddrStructType_data_v02[] = { - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocIpV6AddrStructType_v02, addr), - QMI_LOC_IPV6_ADDR_LENGTH_V02, - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocIpV6AddrStructType_v02, port), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocNiSuplServerInfoStructT_data_v02[] = { - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocNiSuplServerInfoStructT_v02, suplServerAddrTypeMask), - - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocNiSuplServerInfoStructT_v02, ipv4Addr), - 7, 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, - QMI_IDL_OFFSET8(qmiLocNiSuplServerInfoStructT_v02, urlAddr), - QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02, - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocNiSuplNotifyVerifyStructT_data_v02[] = { - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocNiSuplNotifyVerifyStructT_v02, valid_flags), - - 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, - 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_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, suplHash), - QMI_LOC_NI_SUPL_HASH_LENGTH_V02, - - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, posMethod), - - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, dataCodingScheme), - - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, requestorId), - 5, 0, - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, clientName), - 5, 0, - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, suplQop), - 6, 0, - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET16ARRAY(qmiLocNiSuplNotifyVerifyStructT_v02, userResponseTimer), - - QMI_IDL_FLAG_END_VALUE -}; - -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_OFFSET8(qmiLocNiUmtsCpCodedStringStructT_v02, codedString), - QMI_LOC_NI_CODEWORD_MAX_LENGTH_V02, - QMI_IDL_OFFSET8(qmiLocNiUmtsCpCodedStringStructT_v02, codedString) - QMI_IDL_OFFSET8(qmiLocNiUmtsCpCodedStringStructT_v02, codedString_len), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocNiUmtsCpNotifyVerifyStructT_data_v02[] = { - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, valid_flags), - - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, invokeId), - - 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_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_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), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, locationType), - - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, requestorId), - 11, 0, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, codewordString), - 11, 0, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, lcsServiceTypeId), - - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocNiUmtsCpNotifyVerifyStructT_v02, userResponseTimer), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocNiVxServiceInteractionStructT_data_v02[] = { - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocNiVxServiceInteractionStructT_v02, niVxReq), - 4, 0, - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET16ARRAY(qmiLocNiVxServiceInteractionStructT_v02, serviceInteractionType), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocAssistanceServerUrlStructT_data_v02[] = { - 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, - - QMI_IDL_FLAG_END_VALUE -}; - -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_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, - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocPredictedOrbitsAllowedSizesStructT_data_v02[] = { - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocPredictedOrbitsAllowedSizesStructT_v02, maxFileSizeInBytes), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocPredictedOrbitsAllowedSizesStructT_v02, maxPartSize), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocPredictedOrbitsServerListStructT_data_v02[] = { - 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, - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocSensorControlConfigSamplingSpecStructT_data_v02[] = { - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocSensorControlConfigSamplingSpecStructT_v02, samplesPerBatch), - - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocSensorControlConfigSamplingSpecStructT_v02, batchesPerSecond), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocSensorReadyStatusStructT_data_v02[] = { - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocSensorReadyStatusStructT_v02, injectEnable), - - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocSensorReadyStatusStructT_v02, dataFrequency), - 18, 0, - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocPredictedOrbitsDataValidityStructT_data_v02[] = { - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocPredictedOrbitsDataValidityStructT_v02, startTimeInUTC), - - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocPredictedOrbitsDataValidityStructT_v02, durationHours), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocAltitudeSrcInfoStructT_data_v02[] = { - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocAltitudeSrcInfoStructT_v02, source), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocAltitudeSrcInfoStructT_v02, linkage), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocAltitudeSrcInfoStructT_v02, coverage), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocDeleteSvInfoStructT_data_v02[] = { - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocDeleteSvInfoStructT_v02, gnssSvId), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocDeleteSvInfoStructT_v02, system), - - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocDeleteSvInfoStructT_v02, deleteSvInfoMask), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocWifiFixTimeStructT_data_v02[] = { - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocWifiFixTimeStructT_v02, wifiPositionTime), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocWifiFixPosStructT_data_v02[] = { - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocWifiFixPosStructT_v02, lat), - - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocWifiFixPosStructT_v02, lon), - - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocWifiFixPosStructT_v02, hepe), - - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocWifiFixPosStructT_v02, numApsUsed), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocWifiFixPosStructT_v02, fixErrorCode), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLocWifiApInfoStructT_data_v02[] = { - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocWifiApInfoStructT_v02, macAddr), - QMI_LOC_WIFI_MAC_ADDR_LENGTH_V02, - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocWifiApInfoStructT_v02, rssi), - - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocWifiApInfoStructT_v02, channel), - - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocWifiApInfoStructT_v02, apQualifier), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLoc3AxisSensorSampleStructT_data_v02[] = { - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleStructT_v02, timeOffset), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleStructT_v02, xAxis), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleStructT_v02, yAxis), - - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleStructT_v02, zAxis), - - QMI_IDL_FLAG_END_VALUE -}; - -static const uint8_t qmiLoc3AxisSensorSampleListStructT_data_v02[] = { - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLoc3AxisSensorSampleListStructT_v02, timeOfFirstSample), - - 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_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, - QMI_IDL_FLAG_END_VALUE -}; - -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_OFFSET8(qmiLocApnProfilesStructT_v02, apnName), - QMI_LOC_MAX_APN_NAME_LENGTH_V02, - - QMI_IDL_FLAG_END_VALUE -}; - -/*Message Definitions*/ -static const uint8_t qmiLocGenRespMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocGenRespMsgT_v02, resp), - 0, 1 -}; - -static const uint8_t qmiLocInformClientRevisionReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInformClientRevisionReqMsgT_v02, revision) -}; - -static const uint8_t qmiLocRegEventsReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocRegEventsReqMsgT_v02, eventRegMask) -}; - -static const uint8_t qmiLocStartReqMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, sessionId), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, fixRecurrence) - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, fixRecurrence_valid)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, fixRecurrence), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, horizontalAccuracyLevel) - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, horizontalAccuracyLevel_valid)), - 0x11, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, horizontalAccuracyLevel), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, intermediateReportState) - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, intermediateReportState_valid)), - 0x12, - 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)), - 0x13, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocStartReqMsgT_v02, minInterval) -}; - -static const uint8_t qmiLocStopReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocStopReqMsgT_v02, sessionId) -}; - -static const uint8_t qmiLocEventPositionReportIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, sessionStatus), - - 0x02, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, sessionId), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, latitude) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, latitude_valid)), - 0x10, - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, latitude), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, longitude) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, longitude_valid)), - 0x11, - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, longitude), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncCircular) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncCircular_valid)), - 0x12, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncCircular), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseSemiMinor) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseSemiMinor_valid)), - 0x13, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseSemiMinor), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseSemiMajor) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseSemiMajor_valid)), - 0x14, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseSemiMajor), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseOrientAzimuth) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseOrientAzimuth_valid)), - 0x15, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horUncEllipseOrientAzimuth), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horConfidence) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horConfidence_valid)), - 0x16, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horConfidence), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horReliability) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horReliability_valid)), - 0x17, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, horReliability), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedHorizontal) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedHorizontal_valid)), - 0x18, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedHorizontal), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedUnc) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedUnc_valid)), - 0x19, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedUnc), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, altitudeWrtEllipsoid) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, altitudeWrtEllipsoid_valid)), - 0x1A, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, altitudeWrtEllipsoid), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, altitudeWrtMeanSeaLevel) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, altitudeWrtMeanSeaLevel_valid)), - 0x1B, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, altitudeWrtMeanSeaLevel), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertUnc) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertUnc_valid)), - 0x1C, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertUnc), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertConfidence) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertConfidence_valid)), - 0x1D, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertConfidence), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertReliability) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertReliability_valid)), - 0x1E, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, vertReliability), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedVertical) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedVertical_valid)), - 0x1F, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, speedVertical), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, heading) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, heading_valid)), - 0x20, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, heading), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, headingUnc) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, headingUnc_valid)), - 0x21, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, headingUnc), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, magneticDeviation) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, magneticDeviation_valid)), - 0x22, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, magneticDeviation), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, technologyMask) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, technologyMask_valid)), - 0x23, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, technologyMask), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, DOP) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, DOP_valid)), - 0x24, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, DOP), - 1, 0, - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, timestampUtc) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, timestampUtc_valid)), - 0x25, - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, timestampUtc), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, leapSeconds) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, leapSeconds_valid)), - 0x26, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, leapSeconds), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, gpsTime) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, gpsTime_valid)), - 0x27, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, gpsTime), - 0, 0, - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, timeUnc) - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, timeUnc_valid)), - 0x28, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventPositionReportIndMsgT_v02, timeUnc), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, timeSrc) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, timeSrc_valid)), - 0x29, - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET16ARRAY(qmiLocEventPositionReportIndMsgT_v02, timeSrc), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, sensorDataUsage) - QMI_IDL_OFFSET16RELATIVE(qmiLocEventPositionReportIndMsgT_v02, sensorDataUsage_valid)), - 0x2A, - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET16ARRAY(qmiLocEventPositionReportIndMsgT_v02, sensorDataUsage), - 2, 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)), - 0x2B, - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET16ARRAY(qmiLocEventPositionReportIndMsgT_v02, fixId) -}; - -static const uint8_t qmiLocEventGnssSvInfoIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocEventGnssSvInfoIndMsgT_v02, altitudeAssumed), - - 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_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 -}; - -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_OFFSET8(qmiLocEventNmeaIndMsgT_v02, nmea), - QMI_LOC_NMEA_STRING_MAX_LENGTH_V02 -}; - -static const uint8_t qmiLocEventNiNotifyVerifyReqIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, notificationType), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiVxInd) - QMI_IDL_OFFSET8(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiVxInd_valid)), - 0x10, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocEventNiNotifyVerifyReqIndMsgT_v02, NiVxInd), - 4, 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, - - 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, - - QMI_IDL_TLV_FLAGS_LAST_TLV | 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 -}; - -static const uint8_t qmiLocEventInjectTimeReqIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventInjectTimeReqIndMsgT_v02, timeServerInfo) - QMI_IDL_OFFSET8(qmiLocEventInjectTimeReqIndMsgT_v02, timeServerInfo_valid)), - 0x10, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocEventInjectTimeReqIndMsgT_v02, timeServerInfo), - 15, 0 -}; - -static const uint8_t qmiLocEventInjectPredictedOrbitsReqIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02, allowedSizes), - 16, 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 -}; - -static const uint8_t qmiLocEventInjectPositionReqIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocEventInjectPositionReqIndMsgT_v02, latitude), - - 0x02, - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocEventInjectPositionReqIndMsgT_v02, longitude), - - 0x03, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventInjectPositionReqIndMsgT_v02, horUncCircular), - - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x04, - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocEventInjectPositionReqIndMsgT_v02, timestampUtc) -}; - -static const uint8_t qmiLocEventEngineStateIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventEngineStateIndMsgT_v02, engineState) -}; - -static const uint8_t qmiLocEventFixSessionStateIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventFixSessionStateIndMsgT_v02, sessionState), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventFixSessionStateIndMsgT_v02, sessionId) - QMI_IDL_OFFSET8(qmiLocEventFixSessionStateIndMsgT_v02, sessionId_valid)), - 0x10, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocEventFixSessionStateIndMsgT_v02, sessionId) -}; - -static const uint8_t qmiLocEventWifiReqIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventWifiReqIndMsgT_v02, requestType), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventWifiReqIndMsgT_v02, tbfInMs) - QMI_IDL_OFFSET8(qmiLocEventWifiReqIndMsgT_v02, tbfInMs_valid)), - 0x10, - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocEventWifiReqIndMsgT_v02, tbfInMs) -}; - -static const uint8_t qmiLocEventSensorStreamingReadyStatusIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, accelReady) - QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, accelReady_valid)), - 0x10, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02, accelReady), - 19, 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 -}; - -static const uint8_t qmiLocEventTimeSyncReqIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventTimeSyncReqIndMsgT_v02, refCounter) -}; - -static const uint8_t qmiLocEventSetSpiStreamingReportIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocEventSetSpiStreamingReportIndMsgT_v02, enable) -}; - -static const uint8_t qmiLocEventLocationServerConnectionReqIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventLocationServerConnectionReqIndMsgT_v02, connHandle), - - 0x02, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventLocationServerConnectionReqIndMsgT_v02, requestType), - - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x03, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocEventLocationServerConnectionReqIndMsgT_v02, wwanType) -}; - -/* - * qmiLocGetServiceRevisionReqMsgT is empty - * static const uint8_t qmiLocGetServiceRevisionReqMsgT_data_v02[] = { - * }; - */ - -static const uint8_t qmiLocGetServiceRevisionIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetServiceRevisionIndMsgT_v02, revision) -}; - -/* - * qmiLocGetFixCriteriaReqMsgT is empty - * static const uint8_t qmiLocGetFixCriteriaReqMsgT_data_v02[] = { - * }; - */ - -static const uint8_t qmiLocGetFixCriteriaIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, horizontalAccuracyLevel) - QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, horizontalAccuracyLevel_valid)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, horizontalAccuracyLevel), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, intermediateReportState) - QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, intermediateReportState_valid)), - 0x11, - 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)), - 0x12, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetFixCriteriaIndMsgT_v02, minInterval) -}; - -static const uint8_t qmiLocNiUserRespReqMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocNiUserRespReqMsgT_v02, userResp), - - 0x02, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocNiUserRespReqMsgT_v02, notificationType), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocNiUserRespReqMsgT_v02, NiVxPayload) - QMI_IDL_OFFSET8(qmiLocNiUserRespReqMsgT_v02, NiVxPayload_valid)), - 0x10, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocNiUserRespReqMsgT_v02, NiVxPayload), - 4, 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, - - 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, - - QMI_IDL_TLV_FLAGS_LAST_TLV | 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 -}; - -static const uint8_t qmiLocNiUserRespIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocNiUserRespIndMsgT_v02, status) -}; - -static const uint8_t qmiLocInjectPredictedOrbitsDataReqMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, totalSize), - - 0x02, - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, totalParts), - - 0x03, - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, partNum), - - 0x04, - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_FLAGS_SZ_IS_16 | QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, partData), - ((QMI_LOC_MAX_PREDICTED_ORBITS_PART_LEN_V02) & 0xFF), ((QMI_LOC_MAX_PREDICTED_ORBITS_PART_LEN_V02) >> 8), - QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, partData) - QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, partData_len), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, formatType) - QMI_IDL_OFFSET16RELATIVE(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, formatType_valid)), - 0x10, - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET16ARRAY(qmiLocInjectPredictedOrbitsDataReqMsgT_v02, formatType) -}; - -static const uint8_t qmiLocInjectPredictedOrbitsDataIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataIndMsgT_v02, partNum) - QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataIndMsgT_v02, partNum_valid)), - 0x10, - QMI_IDL_GENERIC_2_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPredictedOrbitsDataIndMsgT_v02, partNum) -}; - -/* - * qmiLocGetPredictedOrbitsDataSourceReqMsgT is empty - * static const uint8_t qmiLocGetPredictedOrbitsDataSourceReqMsgT_data_v02[] = { - * }; - */ - -static const uint8_t qmiLocGetPredictedOrbitsDataSourceIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02, allowedSizes) - QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02, allowedSizes_valid)), - 0x10, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02, allowedSizes), - 16, 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 -}; - -/* - * qmiLocGetPredictedOrbitsDataValidityReqMsgT is empty - * static const uint8_t qmiLocGetPredictedOrbitsDataValidityReqMsgT_data_v02[] = { - * }; - */ - -static const uint8_t qmiLocGetPredictedOrbitsDataValidityIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02, validityInfo) - QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02, validityInfo_valid)), - 0x10, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02, validityInfo), - 20, 0 -}; - -static const uint8_t qmiLocInjectUtcTimeReqMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectUtcTimeReqMsgT_v02, timeUtc), - - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectUtcTimeReqMsgT_v02, timeUnc) -}; - -static const uint8_t qmiLocInjectUtcTimeIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectUtcTimeIndMsgT_v02, status) -}; - -static const uint8_t qmiLocInjectPositionReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, latitude) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, latitude_valid)), - 0x10, - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, latitude), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, longitude) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, longitude_valid)), - 0x11, - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, longitude), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horUncCircular) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horUncCircular_valid)), - 0x12, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horUncCircular), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horConfidence) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horConfidence_valid)), - 0x13, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horConfidence), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horReliability) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horReliability_valid)), - 0x14, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, horReliability), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altitudeWrtEllipsoid) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altitudeWrtEllipsoid_valid)), - 0x15, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altitudeWrtEllipsoid), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altitudeWrtMeanSeaLevel) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altitudeWrtMeanSeaLevel_valid)), - 0x16, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altitudeWrtMeanSeaLevel), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertUnc) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertUnc_valid)), - 0x17, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertUnc), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertConfidence) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertConfidence_valid)), - 0x18, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertConfidence), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertReliability) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertReliability_valid)), - 0x19, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, vertReliability), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altSourceInfo) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altSourceInfo_valid)), - 0x1A, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, altSourceInfo), - 21, 0, - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, timestampUtc) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, timestampUtc_valid)), - 0x1B, - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, timestampUtc), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, timestampAge) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, timestampAge_valid)), - 0x1C, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, timestampAge), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, positionSrc) - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, positionSrc_valid)), - 0x1D, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPositionReqMsgT_v02, positionSrc) -}; - -static const uint8_t qmiLocInjectPositionIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectPositionIndMsgT_v02, status) -}; - -static const uint8_t qmiLocSetEngineLockReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetEngineLockReqMsgT_v02, lockType) -}; - -static const uint8_t qmiLocSetEngineLockIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetEngineLockIndMsgT_v02, status) -}; - -/* - * qmiLocGetEngineLockReqMsgT is empty - * static const uint8_t qmiLocGetEngineLockReqMsgT_data_v02[] = { - * }; - */ - -static const uint8_t qmiLocGetEngineLockIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetEngineLockIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetEngineLockIndMsgT_v02, lockType) - QMI_IDL_OFFSET8(qmiLocGetEngineLockIndMsgT_v02, lockType_valid)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetEngineLockIndMsgT_v02, lockType) -}; - -static const uint8_t qmiLocSetSbasConfigReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocSetSbasConfigReqMsgT_v02, sbasConfig) -}; - -static const uint8_t qmiLocSetSbasConfigIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetSbasConfigIndMsgT_v02, status) -}; - -/* - * qmiLocGetSbasConfigReqMsgT is empty - * static const uint8_t qmiLocGetSbasConfigReqMsgT_data_v02[] = { - * }; - */ - -static const uint8_t qmiLocGetSbasConfigIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetSbasConfigIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSbasConfigIndMsgT_v02, sbasConfig) - QMI_IDL_OFFSET8(qmiLocGetSbasConfigIndMsgT_v02, sbasConfig_valid)), - 0x10, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocGetSbasConfigIndMsgT_v02, sbasConfig) -}; - -static const uint8_t qmiLocSetNmeaTypesReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetNmeaTypesReqMsgT_v02, nmeaSentenceType) -}; - -static const uint8_t qmiLocSetNmeaTypesIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetNmeaTypesIndMsgT_v02, status) -}; - -/* - * qmiLocGetNmeaTypesReqMsgT is empty - * static const uint8_t qmiLocGetNmeaTypesReqMsgT_data_v02[] = { - * }; - */ - -static const uint8_t qmiLocGetNmeaTypesIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetNmeaTypesIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetNmeaTypesIndMsgT_v02, nmeaSentenceType) - QMI_IDL_OFFSET8(qmiLocGetNmeaTypesIndMsgT_v02, nmeaSentenceType_valid)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetNmeaTypesIndMsgT_v02, nmeaSentenceType) -}; - -static const uint8_t qmiLocSetLowPowerModeReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocSetLowPowerModeReqMsgT_v02, lowPowerMode) -}; - -static const uint8_t qmiLocSetLowPowerModeIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetLowPowerModeIndMsgT_v02, status) -}; - -/* - * qmiLocGetLowPowerModeReqMsgT is empty - * static const uint8_t qmiLocGetLowPowerModeReqMsgT_data_v02[] = { - * }; - */ - -static const uint8_t qmiLocGetLowPowerModeIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetLowPowerModeIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetLowPowerModeIndMsgT_v02, lowPowerMode) - QMI_IDL_OFFSET8(qmiLocGetLowPowerModeIndMsgT_v02, lowPowerMode_valid)), - 0x10, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocGetLowPowerModeIndMsgT_v02, lowPowerMode) -}; - -static const uint8_t qmiLocSetServerReqMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, serverType), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, ipv4Addr) - QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, ipv4Addr_valid)), - 0x10, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocSetServerReqMsgT_v02, ipv4Addr), - 7, 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, - - 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_OFFSET8(qmiLocSetServerReqMsgT_v02, urlAddr), - QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02 -}; - -static const uint8_t qmiLocSetServerIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetServerIndMsgT_v02, status) -}; - -static const uint8_t qmiLocGetServerReqMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetServerReqMsgT_v02, serverType), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetServerReqMsgT_v02, serverAddrTypeMask) - QMI_IDL_OFFSET8(qmiLocGetServerReqMsgT_v02, serverAddrTypeMask_valid)), - 0x10, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocGetServerReqMsgT_v02, serverAddrTypeMask) -}; - -static const uint8_t qmiLocGetServerIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, status), - - 0x02, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, serverType), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, ipv4Addr) - QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, ipv4Addr_valid)), - 0x10, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocGetServerIndMsgT_v02, ipv4Addr), - 7, 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, - - 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_OFFSET8(qmiLocGetServerIndMsgT_v02, urlAddr), - QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02 -}; - -static const uint8_t qmiLocDeleteAssistDataReqMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocDeleteAssistDataReqMsgT_v02, deleteAllFlag), - - 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_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, - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteGnssDataMask) - QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteGnssDataMask_valid)), - 0x11, - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET16ARRAY(qmiLocDeleteAssistDataReqMsgT_v02, deleteGnssDataMask), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteCellDbDataMask) - QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteCellDbDataMask_valid)), - 0x12, - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET16ARRAY(qmiLocDeleteAssistDataReqMsgT_v02, deleteCellDbDataMask), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteClockInfoMask) - QMI_IDL_OFFSET16RELATIVE(qmiLocDeleteAssistDataReqMsgT_v02, deleteClockInfoMask_valid)), - 0x13, - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET16ARRAY(qmiLocDeleteAssistDataReqMsgT_v02, deleteClockInfoMask) -}; - -static const uint8_t qmiLocDeleteAssistDataIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocDeleteAssistDataIndMsgT_v02, status) -}; - -static const uint8_t qmiLocSetXtraTSessionControlReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocSetXtraTSessionControlReqMsgT_v02, xtraTSessionControl) -}; - -static const uint8_t qmiLocSetXtraTSessionControlIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetXtraTSessionControlIndMsgT_v02, status) -}; - -/* - * qmiLocGetXtraTSessionControlReqMsgT is empty - * static const uint8_t qmiLocGetXtraTSessionControlReqMsgT_data_v02[] = { - * }; - */ - -static const uint8_t qmiLocGetXtraTSessionControlIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetXtraTSessionControlIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetXtraTSessionControlIndMsgT_v02, xtraTSessionControl) - QMI_IDL_OFFSET8(qmiLocGetXtraTSessionControlIndMsgT_v02, xtraTSessionControl_valid)), - 0x10, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocGetXtraTSessionControlIndMsgT_v02, xtraTSessionControl) -}; - -static const uint8_t qmiLocInjectWifiPositionReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, wifiFixTime) - QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, wifiFixTime_valid)), - 0x10, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocInjectWifiPositionReqMsgT_v02, wifiFixTime), - 23, 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, - - 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_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, - - 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, - QMI_IDL_FLAGS_OFFSET_IS_16 | QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET16ARRAY(qmiLocInjectWifiPositionReqMsgT_v02, horizontalReliability) -}; - -static const uint8_t qmiLocInjectWifiPositionIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectWifiPositionIndMsgT_v02, status) -}; - -static const uint8_t qmiLocNotifyWifiStatusReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocNotifyWifiStatusReqMsgT_v02, wifiStatus) -}; - -static const uint8_t qmiLocNotifyWifiStatusIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocNotifyWifiStatusIndMsgT_v02, status) -}; - -/* - * qmiLocGetRegisteredEventsReqMsgT is empty - * static const uint8_t qmiLocGetRegisteredEventsReqMsgT_data_v02[] = { - * }; - */ - -static const uint8_t qmiLocGetRegisteredEventsIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetRegisteredEventsIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetRegisteredEventsIndMsgT_v02, eventRegMask) - QMI_IDL_OFFSET8(qmiLocGetRegisteredEventsIndMsgT_v02, eventRegMask_valid)), - 0x10, - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocGetRegisteredEventsIndMsgT_v02, eventRegMask) -}; - -static const uint8_t qmiLocSetOperationModeReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetOperationModeReqMsgT_v02, operationMode) -}; - -static const uint8_t qmiLocSetOperationModeIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetOperationModeIndMsgT_v02, status) -}; - -/* - * qmiLocGetOperationModeReqMsgT is empty - * static const uint8_t qmiLocGetOperationModeReqMsgT_data_v02[] = { - * }; - */ - -static const uint8_t qmiLocGetOperationModeIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetOperationModeIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetOperationModeIndMsgT_v02, operationMode) - QMI_IDL_OFFSET8(qmiLocGetOperationModeIndMsgT_v02, operationMode_valid)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetOperationModeIndMsgT_v02, operationMode) -}; - -static const uint8_t qmiLocSetSpiStatusReqMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocSetSpiStatusReqMsgT_v02, stationary), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSpiStatusReqMsgT_v02, confidenceStationary) - QMI_IDL_OFFSET8(qmiLocSetSpiStatusReqMsgT_v02, confidenceStationary_valid)), - 0x10, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocSetSpiStatusReqMsgT_v02, confidenceStationary) -}; - -static const uint8_t qmiLocSetSpiStatusIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetSpiStatusIndMsgT_v02, status) -}; - -static const uint8_t qmiLocInjectSensorDataReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectSensorDataReqMsgT_v02, opaqueIdentifier) - QMI_IDL_OFFSET8(qmiLocInjectSensorDataReqMsgT_v02, opaqueIdentifier_valid)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectSensorDataReqMsgT_v02, opaqueIdentifier), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectSensorDataReqMsgT_v02, threeAxisAccelData) - QMI_IDL_OFFSET8(qmiLocInjectSensorDataReqMsgT_v02, threeAxisAccelData_valid)), - 0x11, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocInjectSensorDataReqMsgT_v02, threeAxisAccelData), - 27, 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 -}; - -static const uint8_t qmiLocInjectSensorDataIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, opaqueIdentifier) - QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, opaqueIdentifier_valid)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, opaqueIdentifier), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, threeAxisAccelSamplesAccepted) - QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, threeAxisAccelSamplesAccepted_valid)), - 0x11, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, threeAxisAccelSamplesAccepted), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, threeAxisGyroSamplesAccepted) - QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, threeAxisGyroSamplesAccepted_valid)), - 0x12, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectSensorDataIndMsgT_v02, threeAxisGyroSamplesAccepted) -}; - -static const uint8_t qmiLocInjectTimeSyncDataReqMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectTimeSyncDataReqMsgT_v02, refCounter), - - 0x02, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectTimeSyncDataReqMsgT_v02, sensorProcRxTime), - - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x03, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectTimeSyncDataReqMsgT_v02, sensorProcTxTime) -}; - -static const uint8_t qmiLocInjectTimeSyncDataIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectTimeSyncDataIndMsgT_v02, status) -}; - -/* - * qmiLocGetCradleMountConfigReqMsgT is empty - * static const uint8_t qmiLocGetCradleMountConfigReqMsgT_data_v02[] = { - * }; - */ - -static const uint8_t qmiLocGetCradleMountConfigIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetCradleMountConfigIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetCradleMountConfigIndMsgT_v02, cradleMountState) - QMI_IDL_OFFSET8(qmiLocGetCradleMountConfigIndMsgT_v02, cradleMountState_valid)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetCradleMountConfigIndMsgT_v02, cradleMountState), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetCradleMountConfigIndMsgT_v02, confidenceCradleMountState) - QMI_IDL_OFFSET8(qmiLocGetCradleMountConfigIndMsgT_v02, confidenceCradleMountState_valid)), - 0x11, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocGetCradleMountConfigIndMsgT_v02, confidenceCradleMountState) -}; - -static const uint8_t qmiLocSetCradleMountConfigReqMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetCradleMountConfigReqMsgT_v02, cradleMountState), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetCradleMountConfigReqMsgT_v02, confidenceCradleMountState) - QMI_IDL_OFFSET8(qmiLocSetCradleMountConfigReqMsgT_v02, confidenceCradleMountState_valid)), - 0x10, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocSetCradleMountConfigReqMsgT_v02, confidenceCradleMountState) -}; - -static const uint8_t qmiLocSetCradleMountConfigIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetCradleMountConfigIndMsgT_v02, status) -}; - -/* - * qmiLocGetExternalPowerConfigReqMsgT is empty - * static const uint8_t qmiLocGetExternalPowerConfigReqMsgT_data_v02[] = { - * }; - */ - -static const uint8_t qmiLocGetExternalPowerConfigIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetExternalPowerConfigIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetExternalPowerConfigIndMsgT_v02, externalPowerState) - QMI_IDL_OFFSET8(qmiLocGetExternalPowerConfigIndMsgT_v02, externalPowerState_valid)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetExternalPowerConfigIndMsgT_v02, externalPowerState) -}; - -static const uint8_t qmiLocSetExternalPowerConfigReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetExternalPowerConfigReqMsgT_v02, externalPowerState) -}; - -static const uint8_t qmiLocSetExternalPowerConfigIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetExternalPowerConfigIndMsgT_v02, status) -}; - -static const uint8_t qmiLocInformLocationServerConnStatusReqMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInformLocationServerConnStatusReqMsgT_v02, connHandle), - - 0x02, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInformLocationServerConnStatusReqMsgT_v02, requestType), - - 0x03, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInformLocationServerConnStatusReqMsgT_v02, statusType), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocInformLocationServerConnStatusReqMsgT_v02, apnProfile) - QMI_IDL_OFFSET8(qmiLocInformLocationServerConnStatusReqMsgT_v02, apnProfile_valid)), - 0x10, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocInformLocationServerConnStatusReqMsgT_v02, apnProfile), - 28, 0 -}; - -static const uint8_t qmiLocInformLocationServerConnStatusIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInformLocationServerConnStatusIndMsgT_v02, status) -}; - -static const uint8_t qmiLocSetProtocolConfigParametersReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplSecurity) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplSecurity_valid)), - 0x10, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplSecurity), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, vxVersion) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, vxVersion_valid)), - 0x11, - 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)), - 0x12, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplVersion) -}; - -static const uint8_t qmiLocSetProtocolConfigParametersIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersIndMsgT_v02, failedProtocolConfigParamMask) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersIndMsgT_v02, failedProtocolConfigParamMask_valid)), - 0x10, - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersIndMsgT_v02, failedProtocolConfigParamMask) -}; - -static const uint8_t qmiLocGetProtocolConfigParametersReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_8_BYTE, - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersReqMsgT_v02, getProtocolConfigParamMask) -}; - -static const uint8_t qmiLocGetProtocolConfigParametersIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplSecurity) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplSecurity_valid)), - 0x10, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplSecurity), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, vxVersion) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, vxVersion_valid)), - 0x11, - 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)), - 0x12, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplVersion) -}; - -static const uint8_t qmiLocSetSensorControlConfigReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorControlConfigReqMsgT_v02, sensorsUsage) - QMI_IDL_OFFSET8(qmiLocSetSensorControlConfigReqMsgT_v02, sensorsUsage_valid)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetSensorControlConfigReqMsgT_v02, sensorsUsage) -}; - -static const uint8_t qmiLocSetSensorControlConfigIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetSensorControlConfigIndMsgT_v02, status) -}; - -/* - * qmiLocGetSensorControlConfigReqMsgT is empty - * static const uint8_t qmiLocGetSensorControlConfigReqMsgT_data_v02[] = { - * }; - */ - -static const uint8_t qmiLocGetSensorControlConfigIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetSensorControlConfigIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorControlConfigIndMsgT_v02, sensorsUsage) - QMI_IDL_OFFSET8(qmiLocGetSensorControlConfigIndMsgT_v02, sensorsUsage_valid)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetSensorControlConfigIndMsgT_v02, sensorsUsage) -}; - -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)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesReqMsgT_v02, gyroBiasVarianceRandomWalk) -}; - -static const uint8_t qmiLocSetSensorPropertiesIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetSensorPropertiesIndMsgT_v02, status) -}; - -/* - * qmiLocGetSensorPropertiesReqMsgT is empty - * static const uint8_t qmiLocGetSensorPropertiesReqMsgT_data_v02[] = { - * }; - */ - -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)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetSensorPropertiesIndMsgT_v02, gyroBiasVarianceRandomWalk) -}; - -static const uint8_t qmiLocSetSensorPerformanceControlConfigReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, performanceControlMode) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, performanceControlMode_valid)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, performanceControlMode), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, accelSamplingSpec) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, accelSamplingSpec_valid)), - 0x11, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, accelSamplingSpec), - 18, 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)), - 0x12, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, gyroSamplingSpec), - 18, 0 -}; - -static const uint8_t qmiLocSetSensorPerformanceControlConfigIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigIndMsgT_v02, failedConfiguration) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigIndMsgT_v02, failedConfiguration_valid)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigIndMsgT_v02, failedConfiguration) -}; - -/* - * qmiLocGetSensorPerformanceControlConfigReqMsgT is empty - * static const uint8_t qmiLocGetSensorPerformanceControlConfigReqMsgT_data_v02[] = { - * }; - */ - -static const uint8_t qmiLocGetSensorPerformanceControlConfigIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, performanceControlMode) - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, performanceControlMode_valid)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, performanceControlMode), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, accelSamplingSpec) - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, accelSamplingSpec_valid)), - 0x11, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, accelSamplingSpec), - 18, 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)), - 0x12, - QMI_IDL_AGGREGATE, - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, gyroSamplingSpec), - 18, 0 -}; - -static const uint8_t qmiLocInjectSuplCertificateReqMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectSuplCertificateReqMsgT_v02, suplCertId), - - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02, - QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_FLAGS_SZ_IS_16 | QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectSuplCertificateReqMsgT_v02, suplCertData), - ((QMI_LOC_MAX_SUPL_CERT_LENGTH_V02) & 0xFF), ((QMI_LOC_MAX_SUPL_CERT_LENGTH_V02) >> 8), - QMI_IDL_OFFSET8(qmiLocInjectSuplCertificateReqMsgT_v02, suplCertData) - QMI_IDL_OFFSET8(qmiLocInjectSuplCertificateReqMsgT_v02, suplCertData_len) -}; - -static const uint8_t qmiLocInjectSuplCertificateIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocInjectSuplCertificateIndMsgT_v02, status) -}; - -static const uint8_t qmiLocDeleteSuplCertificateReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocDeleteSuplCertificateReqMsgT_v02, suplCertId) - QMI_IDL_OFFSET8(qmiLocDeleteSuplCertificateReqMsgT_v02, suplCertId_valid)), - 0x10, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocDeleteSuplCertificateReqMsgT_v02, suplCertId) -}; - -static const uint8_t qmiLocDeleteSuplCertificateIndMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocDeleteSuplCertificateIndMsgT_v02, status) -}; - -static const uint8_t qmiLocSetPositionEngineConfigParametersReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, injectedPositionControl) - QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, injectedPositionControl_valid)), - 0x10, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, injectedPositionControl), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, filterSvUsage) - QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, filterSvUsage_valid)), - 0x11, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, filterSvUsage), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, storeAssistData) - QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, storeAssistData_valid)), - 0x12, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersReqMsgT_v02, storeAssistData) -}; - -static const uint8_t qmiLocSetPositionEngineConfigParametersIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersIndMsgT_v02, failedPositionEngineConfigParamMask) - QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersIndMsgT_v02, failedPositionEngineConfigParamMask_valid)), - 0x10, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetPositionEngineConfigParametersIndMsgT_v02, failedPositionEngineConfigParamMask) -}; - -static const uint8_t qmiLocGetPositionEngineConfigParametersReqMsgT_data_v02[] = { - QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersReqMsgT_v02, getPositionEngineConfigParamMask) -}; - -static const uint8_t qmiLocGetPositionEngineConfigParametersIndMsgT_data_v02[] = { - 0x01, - QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, status), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, injectedPositionControl) - QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, injectedPositionControl_valid)), - 0x10, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, injectedPositionControl), - - QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, filterSvUsage) - QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, filterSvUsage_valid)), - 0x11, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, filterSvUsage), - - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, storeAssistData) - QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, storeAssistData_valid)), - 0x12, - QMI_IDL_GENERIC_1_BYTE, - QMI_IDL_OFFSET8(qmiLocGetPositionEngineConfigParametersIndMsgT_v02, storeAssistData) -}; - -/* Type Table */ -static const qmi_idl_type_table_entry loc_type_table_v02[] = { - {sizeof(qmiLocGPSTimeStructT_v02), qmiLocGPSTimeStructT_data_v02}, - {sizeof(qmiLocDOPStructT_v02), qmiLocDOPStructT_data_v02}, - {sizeof(qmiLocSensorUsageIndicatorStructT_v02), qmiLocSensorUsageIndicatorStructT_data_v02}, - {sizeof(qmiLocSvInfoStructT_v02), qmiLocSvInfoStructT_data_v02}, - {sizeof(qmiLocNiVxNotifyVerifyStructT_v02), qmiLocNiVxNotifyVerifyStructT_data_v02}, - {sizeof(qmiLocNiSuplFormattedStringStructT_v02), qmiLocNiSuplFormattedStringStructT_data_v02}, - {sizeof(qmiLocNiSuplQopStructT_v02), qmiLocNiSuplQopStructT_data_v02}, - {sizeof(qmiLocIpV4AddrStructType_v02), qmiLocIpV4AddrStructType_data_v02}, - {sizeof(qmiLocIpV6AddrStructType_v02), qmiLocIpV6AddrStructType_data_v02}, - {sizeof(qmiLocNiSuplServerInfoStructT_v02), qmiLocNiSuplServerInfoStructT_data_v02}, - {sizeof(qmiLocNiSuplNotifyVerifyStructT_v02), qmiLocNiSuplNotifyVerifyStructT_data_v02}, - {sizeof(qmiLocNiUmtsCpCodedStringStructT_v02), qmiLocNiUmtsCpCodedStringStructT_data_v02}, - {sizeof(qmiLocNiUmtsCpNotifyVerifyStructT_v02), qmiLocNiUmtsCpNotifyVerifyStructT_data_v02}, - {sizeof(qmiLocNiVxServiceInteractionStructT_v02), qmiLocNiVxServiceInteractionStructT_data_v02}, - {sizeof(qmiLocAssistanceServerUrlStructT_v02), qmiLocAssistanceServerUrlStructT_data_v02}, - {sizeof(qmiLocTimeServerListStructT_v02), qmiLocTimeServerListStructT_data_v02}, - {sizeof(qmiLocPredictedOrbitsAllowedSizesStructT_v02), qmiLocPredictedOrbitsAllowedSizesStructT_data_v02}, - {sizeof(qmiLocPredictedOrbitsServerListStructT_v02), qmiLocPredictedOrbitsServerListStructT_data_v02}, - {sizeof(qmiLocSensorControlConfigSamplingSpecStructT_v02), qmiLocSensorControlConfigSamplingSpecStructT_data_v02}, - {sizeof(qmiLocSensorReadyStatusStructT_v02), qmiLocSensorReadyStatusStructT_data_v02}, - {sizeof(qmiLocPredictedOrbitsDataValidityStructT_v02), qmiLocPredictedOrbitsDataValidityStructT_data_v02}, - {sizeof(qmiLocAltitudeSrcInfoStructT_v02), qmiLocAltitudeSrcInfoStructT_data_v02}, - {sizeof(qmiLocDeleteSvInfoStructT_v02), qmiLocDeleteSvInfoStructT_data_v02}, - {sizeof(qmiLocWifiFixTimeStructT_v02), qmiLocWifiFixTimeStructT_data_v02}, - {sizeof(qmiLocWifiFixPosStructT_v02), qmiLocWifiFixPosStructT_data_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} -}; - -/* Message Table */ -static const qmi_idl_message_table_entry loc_message_table_v02[] = { - {sizeof(qmiLocGenRespMsgT_v02), qmiLocGenRespMsgT_data_v02}, - {sizeof(qmiLocInformClientRevisionReqMsgT_v02), qmiLocInformClientRevisionReqMsgT_data_v02}, - {sizeof(qmiLocRegEventsReqMsgT_v02), qmiLocRegEventsReqMsgT_data_v02}, - {sizeof(qmiLocStartReqMsgT_v02), qmiLocStartReqMsgT_data_v02}, - {sizeof(qmiLocStopReqMsgT_v02), qmiLocStopReqMsgT_data_v02}, - {sizeof(qmiLocEventPositionReportIndMsgT_v02), qmiLocEventPositionReportIndMsgT_data_v02}, - {sizeof(qmiLocEventGnssSvInfoIndMsgT_v02), qmiLocEventGnssSvInfoIndMsgT_data_v02}, - {sizeof(qmiLocEventNmeaIndMsgT_v02), qmiLocEventNmeaIndMsgT_data_v02}, - {sizeof(qmiLocEventNiNotifyVerifyReqIndMsgT_v02), qmiLocEventNiNotifyVerifyReqIndMsgT_data_v02}, - {sizeof(qmiLocEventInjectTimeReqIndMsgT_v02), qmiLocEventInjectTimeReqIndMsgT_data_v02}, - {sizeof(qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02), qmiLocEventInjectPredictedOrbitsReqIndMsgT_data_v02}, - {sizeof(qmiLocEventInjectPositionReqIndMsgT_v02), qmiLocEventInjectPositionReqIndMsgT_data_v02}, - {sizeof(qmiLocEventEngineStateIndMsgT_v02), qmiLocEventEngineStateIndMsgT_data_v02}, - {sizeof(qmiLocEventFixSessionStateIndMsgT_v02), qmiLocEventFixSessionStateIndMsgT_data_v02}, - {sizeof(qmiLocEventWifiReqIndMsgT_v02), qmiLocEventWifiReqIndMsgT_data_v02}, - {sizeof(qmiLocEventSensorStreamingReadyStatusIndMsgT_v02), qmiLocEventSensorStreamingReadyStatusIndMsgT_data_v02}, - {sizeof(qmiLocEventTimeSyncReqIndMsgT_v02), qmiLocEventTimeSyncReqIndMsgT_data_v02}, - {sizeof(qmiLocEventSetSpiStreamingReportIndMsgT_v02), qmiLocEventSetSpiStreamingReportIndMsgT_data_v02}, - {sizeof(qmiLocEventLocationServerConnectionReqIndMsgT_v02), qmiLocEventLocationServerConnectionReqIndMsgT_data_v02}, - {0, 0}, - {sizeof(qmiLocGetServiceRevisionIndMsgT_v02), qmiLocGetServiceRevisionIndMsgT_data_v02}, - {0, 0}, - {sizeof(qmiLocGetFixCriteriaIndMsgT_v02), qmiLocGetFixCriteriaIndMsgT_data_v02}, - {sizeof(qmiLocNiUserRespReqMsgT_v02), qmiLocNiUserRespReqMsgT_data_v02}, - {sizeof(qmiLocNiUserRespIndMsgT_v02), qmiLocNiUserRespIndMsgT_data_v02}, - {sizeof(qmiLocInjectPredictedOrbitsDataReqMsgT_v02), qmiLocInjectPredictedOrbitsDataReqMsgT_data_v02}, - {sizeof(qmiLocInjectPredictedOrbitsDataIndMsgT_v02), qmiLocInjectPredictedOrbitsDataIndMsgT_data_v02}, - {0, 0}, - {sizeof(qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02), qmiLocGetPredictedOrbitsDataSourceIndMsgT_data_v02}, - {0, 0}, - {sizeof(qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02), qmiLocGetPredictedOrbitsDataValidityIndMsgT_data_v02}, - {sizeof(qmiLocInjectUtcTimeReqMsgT_v02), qmiLocInjectUtcTimeReqMsgT_data_v02}, - {sizeof(qmiLocInjectUtcTimeIndMsgT_v02), qmiLocInjectUtcTimeIndMsgT_data_v02}, - {sizeof(qmiLocInjectPositionReqMsgT_v02), qmiLocInjectPositionReqMsgT_data_v02}, - {sizeof(qmiLocInjectPositionIndMsgT_v02), qmiLocInjectPositionIndMsgT_data_v02}, - {sizeof(qmiLocSetEngineLockReqMsgT_v02), qmiLocSetEngineLockReqMsgT_data_v02}, - {sizeof(qmiLocSetEngineLockIndMsgT_v02), qmiLocSetEngineLockIndMsgT_data_v02}, - {0, 0}, - {sizeof(qmiLocGetEngineLockIndMsgT_v02), qmiLocGetEngineLockIndMsgT_data_v02}, - {sizeof(qmiLocSetSbasConfigReqMsgT_v02), qmiLocSetSbasConfigReqMsgT_data_v02}, - {sizeof(qmiLocSetSbasConfigIndMsgT_v02), qmiLocSetSbasConfigIndMsgT_data_v02}, - {0, 0}, - {sizeof(qmiLocGetSbasConfigIndMsgT_v02), qmiLocGetSbasConfigIndMsgT_data_v02}, - {sizeof(qmiLocSetNmeaTypesReqMsgT_v02), qmiLocSetNmeaTypesReqMsgT_data_v02}, - {sizeof(qmiLocSetNmeaTypesIndMsgT_v02), qmiLocSetNmeaTypesIndMsgT_data_v02}, - {0, 0}, - {sizeof(qmiLocGetNmeaTypesIndMsgT_v02), qmiLocGetNmeaTypesIndMsgT_data_v02}, - {sizeof(qmiLocSetLowPowerModeReqMsgT_v02), qmiLocSetLowPowerModeReqMsgT_data_v02}, - {sizeof(qmiLocSetLowPowerModeIndMsgT_v02), qmiLocSetLowPowerModeIndMsgT_data_v02}, - {0, 0}, - {sizeof(qmiLocGetLowPowerModeIndMsgT_v02), qmiLocGetLowPowerModeIndMsgT_data_v02}, - {sizeof(qmiLocSetServerReqMsgT_v02), qmiLocSetServerReqMsgT_data_v02}, - {sizeof(qmiLocSetServerIndMsgT_v02), qmiLocSetServerIndMsgT_data_v02}, - {sizeof(qmiLocGetServerReqMsgT_v02), qmiLocGetServerReqMsgT_data_v02}, - {sizeof(qmiLocGetServerIndMsgT_v02), qmiLocGetServerIndMsgT_data_v02}, - {sizeof(qmiLocDeleteAssistDataReqMsgT_v02), qmiLocDeleteAssistDataReqMsgT_data_v02}, - {sizeof(qmiLocDeleteAssistDataIndMsgT_v02), qmiLocDeleteAssistDataIndMsgT_data_v02}, - {sizeof(qmiLocSetXtraTSessionControlReqMsgT_v02), qmiLocSetXtraTSessionControlReqMsgT_data_v02}, - {sizeof(qmiLocSetXtraTSessionControlIndMsgT_v02), qmiLocSetXtraTSessionControlIndMsgT_data_v02}, - {0, 0}, - {sizeof(qmiLocGetXtraTSessionControlIndMsgT_v02), qmiLocGetXtraTSessionControlIndMsgT_data_v02}, - {sizeof(qmiLocInjectWifiPositionReqMsgT_v02), qmiLocInjectWifiPositionReqMsgT_data_v02}, - {sizeof(qmiLocInjectWifiPositionIndMsgT_v02), qmiLocInjectWifiPositionIndMsgT_data_v02}, - {sizeof(qmiLocNotifyWifiStatusReqMsgT_v02), qmiLocNotifyWifiStatusReqMsgT_data_v02}, - {sizeof(qmiLocNotifyWifiStatusIndMsgT_v02), qmiLocNotifyWifiStatusIndMsgT_data_v02}, - {0, 0}, - {sizeof(qmiLocGetRegisteredEventsIndMsgT_v02), qmiLocGetRegisteredEventsIndMsgT_data_v02}, - {sizeof(qmiLocSetOperationModeReqMsgT_v02), qmiLocSetOperationModeReqMsgT_data_v02}, - {sizeof(qmiLocSetOperationModeIndMsgT_v02), qmiLocSetOperationModeIndMsgT_data_v02}, - {0, 0}, - {sizeof(qmiLocGetOperationModeIndMsgT_v02), qmiLocGetOperationModeIndMsgT_data_v02}, - {sizeof(qmiLocSetSpiStatusReqMsgT_v02), qmiLocSetSpiStatusReqMsgT_data_v02}, - {sizeof(qmiLocSetSpiStatusIndMsgT_v02), qmiLocSetSpiStatusIndMsgT_data_v02}, - {sizeof(qmiLocInjectSensorDataReqMsgT_v02), qmiLocInjectSensorDataReqMsgT_data_v02}, - {sizeof(qmiLocInjectSensorDataIndMsgT_v02), qmiLocInjectSensorDataIndMsgT_data_v02}, - {sizeof(qmiLocInjectTimeSyncDataReqMsgT_v02), qmiLocInjectTimeSyncDataReqMsgT_data_v02}, - {sizeof(qmiLocInjectTimeSyncDataIndMsgT_v02), qmiLocInjectTimeSyncDataIndMsgT_data_v02}, - {0, 0}, - {sizeof(qmiLocGetCradleMountConfigIndMsgT_v02), qmiLocGetCradleMountConfigIndMsgT_data_v02}, - {sizeof(qmiLocSetCradleMountConfigReqMsgT_v02), qmiLocSetCradleMountConfigReqMsgT_data_v02}, - {sizeof(qmiLocSetCradleMountConfigIndMsgT_v02), qmiLocSetCradleMountConfigIndMsgT_data_v02}, - {0, 0}, - {sizeof(qmiLocGetExternalPowerConfigIndMsgT_v02), qmiLocGetExternalPowerConfigIndMsgT_data_v02}, - {sizeof(qmiLocSetExternalPowerConfigReqMsgT_v02), qmiLocSetExternalPowerConfigReqMsgT_data_v02}, - {sizeof(qmiLocSetExternalPowerConfigIndMsgT_v02), qmiLocSetExternalPowerConfigIndMsgT_data_v02}, - {sizeof(qmiLocInformLocationServerConnStatusReqMsgT_v02), qmiLocInformLocationServerConnStatusReqMsgT_data_v02}, - {sizeof(qmiLocInformLocationServerConnStatusIndMsgT_v02), qmiLocInformLocationServerConnStatusIndMsgT_data_v02}, - {sizeof(qmiLocSetProtocolConfigParametersReqMsgT_v02), qmiLocSetProtocolConfigParametersReqMsgT_data_v02}, - {sizeof(qmiLocSetProtocolConfigParametersIndMsgT_v02), qmiLocSetProtocolConfigParametersIndMsgT_data_v02}, - {sizeof(qmiLocGetProtocolConfigParametersReqMsgT_v02), qmiLocGetProtocolConfigParametersReqMsgT_data_v02}, - {sizeof(qmiLocGetProtocolConfigParametersIndMsgT_v02), qmiLocGetProtocolConfigParametersIndMsgT_data_v02}, - {sizeof(qmiLocSetSensorControlConfigReqMsgT_v02), qmiLocSetSensorControlConfigReqMsgT_data_v02}, - {sizeof(qmiLocSetSensorControlConfigIndMsgT_v02), qmiLocSetSensorControlConfigIndMsgT_data_v02}, - {0, 0}, - {sizeof(qmiLocGetSensorControlConfigIndMsgT_v02), qmiLocGetSensorControlConfigIndMsgT_data_v02}, - {sizeof(qmiLocSetSensorPropertiesReqMsgT_v02), qmiLocSetSensorPropertiesReqMsgT_data_v02}, - {sizeof(qmiLocSetSensorPropertiesIndMsgT_v02), qmiLocSetSensorPropertiesIndMsgT_data_v02}, - {0, 0}, - {sizeof(qmiLocGetSensorPropertiesIndMsgT_v02), qmiLocGetSensorPropertiesIndMsgT_data_v02}, - {sizeof(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02), qmiLocSetSensorPerformanceControlConfigReqMsgT_data_v02}, - {sizeof(qmiLocSetSensorPerformanceControlConfigIndMsgT_v02), qmiLocSetSensorPerformanceControlConfigIndMsgT_data_v02}, - {0, 0}, - {sizeof(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02), qmiLocGetSensorPerformanceControlConfigIndMsgT_data_v02}, - {sizeof(qmiLocInjectSuplCertificateReqMsgT_v02), qmiLocInjectSuplCertificateReqMsgT_data_v02}, - {sizeof(qmiLocInjectSuplCertificateIndMsgT_v02), qmiLocInjectSuplCertificateIndMsgT_data_v02}, - {sizeof(qmiLocDeleteSuplCertificateReqMsgT_v02), qmiLocDeleteSuplCertificateReqMsgT_data_v02}, - {sizeof(qmiLocDeleteSuplCertificateIndMsgT_v02), qmiLocDeleteSuplCertificateIndMsgT_data_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} -}; - -/* Predefine the Type Table Object */ -static const qmi_idl_type_table_object loc_qmi_idl_type_table_object_v02; - -/*Referenced Tables Array*/ -static const qmi_idl_type_table_object *loc_qmi_idl_type_table_object_referenced_tables_v02[] = -{&loc_qmi_idl_type_table_object_v02, &common_qmi_idl_type_table_object_v01}; - -/*Type Table Object*/ -static const qmi_idl_type_table_object loc_qmi_idl_type_table_object_v02 = { - sizeof(loc_type_table_v02)/sizeof(qmi_idl_type_table_entry ), - sizeof(loc_message_table_v02)/sizeof(qmi_idl_message_table_entry), - 1, - loc_type_table_v02, - loc_message_table_v02, - loc_qmi_idl_type_table_object_referenced_tables_v02 -}; - -/*Arrays of service_message_table_entries for commands, responses and indications*/ -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_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} -}; - -static const qmi_idl_service_message_table_entry loc_service_response_messages_v02[] = { - {QMI_LOC_INFORM_CLIENT_REVISION_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_REG_EVENTS_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_START_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_STOP_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_SERVICE_REVISION_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_FIX_CRITERIA_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_NI_USER_RESPONSE_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_INJECT_UTC_TIME_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_INJECT_POSITION_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_SET_ENGINE_LOCK_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_ENGINE_LOCK_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_SET_SBAS_CONFIG_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_SBAS_CONFIG_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_SET_NMEA_TYPES_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_NMEA_TYPES_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_SET_LOW_POWER_MODE_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_LOW_POWER_MODE_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_SET_SERVER_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_SERVER_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_DELETE_ASSIST_DATA_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_SET_XTRA_T_SESSION_CONTROL_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_XTRA_T_SESSION_CONTROL_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_INJECT_WIFI_POSITION_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_NOTIFY_WIFI_STATUS_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_REGISTERED_EVENTS_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_SET_OPERATION_MODE_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_OPERATION_MODE_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_SET_SPI_STATUS_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_INJECT_SENSOR_DATA_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_INJECT_TIME_SYNC_DATA_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_SET_CRADLE_MOUNT_CONFIG_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_CRADLE_MOUNT_CONFIG_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_SET_EXTERNAL_POWER_CONFIG_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_EXTERNAL_POWER_CONFIG_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_SET_SENSOR_CONTROL_CONFIG_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_SENSOR_CONTROL_CONFIG_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_SET_SENSOR_PROPERTIES_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_SENSOR_PROPERTIES_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_RESP_V02, TYPE16(0, 0), 7}, - {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} -}; - -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_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_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}, - {QMI_LOC_EVENT_ENGINE_STATE_IND_V02, TYPE16(0, 12), 7}, - {QMI_LOC_EVENT_FIX_SESSION_STATE_IND_V02, TYPE16(0, 13), 11}, - {QMI_LOC_EVENT_WIFI_REQ_IND_V02, TYPE16(0, 14), 12}, - {QMI_LOC_EVENT_SENSOR_STREAMING_READY_STATUS_IND_V02, TYPE16(0, 15), 16}, - {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} -}; - -/*Service Object*/ -const struct qmi_idl_service_object loc_qmi_idl_service_object_v02 = { - 0x02, - 0x02, - 16, - 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 -}; - -/* Service Object Accessor */ -qmi_idl_service_object_type loc_get_service_object_internal_v02 - ( int32_t idl_maj_version, int32_t idl_min_version, int32_t library_version ){ - if ( LOC_V02_IDL_MAJOR_VERS != idl_maj_version || LOC_V02_IDL_MINOR_VERS != idl_min_version - || LOC_V02_IDL_TOOL_VERS != library_version) - { - return NULL; - } - return (qmi_idl_service_object_type)&loc_qmi_idl_service_object_v02; -} - diff --git a/loc_api/loc_api_v02/location_service_v02.h b/loc_api/loc_api_v02/location_service_v02.h deleted file mode 100644 index 2f288145..00000000 --- a/loc_api/loc_api_v02/location_service_v02.h +++ /dev/null @@ -1,5914 +0,0 @@ -/* 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 - * 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 Code Aurora Forum, 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 "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. - */ -#ifndef LOC_SERVICE_H -#define LOC_SERVICE_H -/** - @file location_service_v02.h - - @brief This is the public header file which defines the loc service Data structures. - - This header file defines the types and structures that were defined in - loc. It contains the constant values defined, enums, structures, - messages, and service message IDs (in that order) Structures that were - defined in the IDL as messages contain mandatory elements, optional - elements, a combination of mandatory and optional elements (mandatory - always come before optionals in the structure), or nothing (null message) - - An optional element in a message is preceded by a uint8_t value that must be - set to true if the element is going to be included. When decoding a received - message, the uint8_t values will be set to true or false by the decode - routine, and should be checked before accessing the values that they - correspond to. - - Variable sized arrays are defined as static sized arrays with an unsigned - integer (32 bit) preceding it that must be set to the number of elements - in the array that are valid. For Example: - - uint32_t test_opaque_len; - uint8_t test_opaque[16]; - - If only 4 elements are added to test_opaque[] then test_opaque_len must be - set to 4 before sending the message. When decoding, the _len value is set - by the decode routine and should be checked so that the correct number of - elements in the array will be accessed. - -*/ - -/** @defgroup loc_qmi_consts Constant values defined in the IDL */ -/** @defgroup loc_qmi_msg_ids Constant values for QMI message IDs */ -/** @defgroup loc_qmi_enums Enumerated types used in QMI messages */ -/** @defgroup loc_qmi_messages Structures sent as QMI messages */ -/** @defgroup loc_qmi_aggregates Aggregate types used in QMI messages */ -/** @defgroup loc_qmi_accessor Accessor for QMI service object */ -/** @defgroup loc_qmi_version Constant values for versioning information */ - -#include -#include "qmi_idl_lib.h" -#include "common_v01.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -/** @addtogroup loc_qmi_version - @{ - */ -/** 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 -/** Major Version Number of the qmi_idl_compiler used to generate this file */ -#define LOC_V02_IDL_TOOL_VERS 0x02 -/** Maximum Defined Message ID */ -#define LOC_V02_MAX_MESSAGE_ID 0x005F; -/** - @} - */ - - -/** @addtogroup loc_qmi_consts - @{ - */ - -/** Maximum number of satellites in the satellite report. */ -#define QMI_LOC_SV_INFO_LIST_MAX_SIZE_V02 80 - -/** Maximum NMEA string length. */ -#define QMI_LOC_NMEA_STRING_MAX_LENGTH_V02 200 - -/** Maximum length of the requestor ID string. */ -#define QMI_LOC_NI_MAX_REQUESTOR_ID_LENGTH_V02 200 - -/** Session ID byte length. */ -#define QMI_LOC_NI_SUPL_SLP_SESSION_ID_BYTE_LENGTH_V02 4 - -/** Maximum client name length allowed. */ -#define QMI_LOC_NI_MAX_CLIENT_NAME_LENGTH_V02 64 - -/** Maximum URL length accepted by the location engine. */ -#define QMI_LOC_MAX_SERVER_ADDR_LENGTH_V02 255 - -/** IPV6 address length in bytes. */ -#define QMI_LOC_IPV6_ADDR_LENGTH_V02 8 - -/** SUPL hash length. */ -#define QMI_LOC_NI_SUPL_HASH_LENGTH_V02 8 - -/** Maximum client address length allowed. */ -#define QMI_LOC_NI_MAX_EXT_CLIENT_ADDRESS_V02 20 - -/** Maximum codeword length allowed. */ -#define QMI_LOC_NI_CODEWORD_MAX_LENGTH_V02 20 - -/** Maximum number of NTP Servers sent out with this event. */ -#define QMI_LOC_MAX_NTP_SERVERS_V02 3 - -/** Maximum number of predicted orbits servers supported in the location - engine. */ -#define QMI_LOC_MAX_PREDICTED_ORBITS_SERVERS_V02 3 - -/** 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. */ -#define QMI_LOC_MAX_PREDICTED_ORBITS_PART_LEN_V02 1024 - -/** Maximum length of the delete SV information list */ -#define QMI_LOC_DELETE_MAX_SV_INFO_LENGTH_V02 128 - -/** MAC address length in bytes. */ -#define QMI_LOC_WIFI_MAC_ADDR_LENGTH_V02 6 - -/** Maximum number of APs that the sender can report. */ -#define QMI_LOC_WIFI_MAX_REPORTED_APS_PER_MSG_V02 50 - -/** Maximum number of samples that can be injected in a TLV. */ -#define QMI_LOC_SENSOR_DATA_MAX_SAMPLES_V02 50 - -/** Maximum APN string length allowed. */ -#define QMI_LOC_MAX_APN_NAME_LENGTH_V02 100 - -/** Maximum APN profiles supported. */ -#define QMI_LOC_MAX_APN_PROFILES_V02 6 - -/** Maximum length of SUPL CERT. */ -#define QMI_LOC_MAX_SUPL_CERT_LENGTH_V02 2000 -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Response Message; Generic response definition. This message is used to tell - clients whether their message was accepted for further - processing or rejected. */ -typedef struct { - - /* Mandatory */ - /* Result Code */ - qmi_response_type_v01 resp; -}qmiLocGenRespMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Informs the service of the minor revision of the interface - definition that the control point implements. */ -typedef struct { - - /* Mandatory */ - /* Revision */ - uint32_t revision; - /**< Revision that the control point is using. \n - - Type: Unsigned integer */ -}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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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. */ -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Used by the control point to register for events from the - location subsystem. */ -typedef struct { - - /* Mandatory */ - /* 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 - - 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. - */ -}qmiLocRegEventsReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCFIXRECURRENCEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_RECURRENCE_PERIODIC_V02 = 1, /**< Request periodic position fixes. - Request a single position fix. */ - eQMI_LOC_RECURRENCE_SINGLE_V02 = 2, - QMILOCFIXRECURRENCEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocFixRecurrenceEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCACCURACYLEVELENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_ACCURACY_LOW_V02 = 1, /**< Low accuracy. */ - eQMI_LOC_ACCURACY_MED_V02 = 2, /**< Medium accuracy. - High accuracy. */ - eQMI_LOC_ACCURACY_HIGH_V02 = 3, - QMILOCACCURACYLEVELENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocAccuracyLevelEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCINTERMEDIATEREPORTSTATEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_INTERMEDIATE_REPORTS_ON_V02 = 1, /**< Intermediate reports are turned on. - Intermediate reports are turned off. */ - eQMI_LOC_INTERMEDIATE_REPORTS_OFF_V02 = 2, - QMILOCINTERMEDIATEREPORTSTATEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocIntermediateReportStateEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; The control point sends this message when it wants to - initiate a GPS session. */ -typedef struct { - - /* Mandatory */ - /* Session ID */ - uint8_t sessionId; - /**< 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 - */ - - /* Optional */ - /* Recurrence Type */ - uint8_t fixRecurrence_valid; /**< Must be set to true if fixRecurrence is being passed */ - qmiLocFixRecurrenceEnumT_v02 fixRecurrence; - /**< Specifies the type of session in which the control point is interested. - If this TLV is not specified, recurrence defaults to SINGLE. - - Valid values: \n - - 0x00000001 -- Request periodic fixes \n - - 0x00000002 -- Request a single fix - */ - - /* Optional */ - /* Horizontal Accuracy */ - uint8_t horizontalAccuracyLevel_valid; /**< Must be set to true if horizontalAccuracyLevel is being passed */ - qmiLocAccuracyLevelEnumT_v02 horizontalAccuracyLevel; - /**< 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. - */ - - /* Optional */ - /* Enable/Disable Intermediate Reports */ - uint8_t intermediateReportState_valid; /**< Must be set to true if intermediateReportState is being passed */ - qmiLocIntermediateReportStateEnumT_v02 intermediateReportState; - /**< Specifies if the control point is interested in receiving intermediate - reports. The control point must explicitly set this field to OFF if it - does not wish to receive intermediate position reports. Intermediate - position reports are generated at 1 Hz and are ON by default. If - intermediate reports are turned ON, the client receives position reports - even if the accuracy criteria are not met. The status in such a position - 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 - */ - - /* Optional */ - /* Minimum Interval Between Position Reports */ - uint8_t minInterval_valid; /**< Must be set to true if minInterval is being passed */ - 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 - */ -}qmiLocStartReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; The control point sends this message when it wants to - stop a GPS session. */ -typedef struct { - - /* Mandatory */ - /* Session ID */ - 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 */ -/** - @} - */ - -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. */ -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCSESSIONSTATUSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_SESS_STATUS_SUCCESS_V02 = 0, /**< Session was successful. */ - eQMI_LOC_SESS_STATUS_IN_PROGRESS_V02 = 1, /**< Session still in progress. Further position reports will be - generated until either the fix criteria specified by the client - are met or the client response timeout occurs. */ - eQMI_LOC_SESS_STATUS_GENERAL_FAILURE_V02 = 2, /**< Session failed. */ - eQMI_LOC_SESS_STATUS_TIMEOUT_V02 = 3, /**< Fix request failed because the session timed out. */ - eQMI_LOC_SESS_STATUS_USER_END_V02 = 4, /**< Fix request failed because the session was ended by the user. */ - eQMI_LOC_SESS_STATUS_BAD_PARAMETER_V02 = 5, /**< Fix request failed due to bad parameters in the request. */ - eQMI_LOC_SESS_STATUS_PHONE_OFFLINE_V02 = 6, /**< Fix request failed because the phone is offline. - Fix request failed because the engine is locked. */ - eQMI_LOC_SESS_STATUS_ENGINE_LOCKED_V02 = 7, - QMILOCSESSIONSTATUSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocSessionStatusEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -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 */ -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -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) */ - - float HDOP; - /**< Horizontal dilution of precision.\n - - Type: Floating point \n - - Range: 1 (highest accuracy) to 50 (lowest accuracy) */ - - float VDOP; - /**< Vertical dilution of precision.\n - - Type: Floating point. \n - - Range: 1 (highest accuracy) to 50 (lowest accuracy) */ -}qmiLocDOPStructT_v02; /* Type */ -/** - @} - */ - -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. */ -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. */ -#define QMI_LOC_SENSOR_AIDED_MASK_POSITION_V02 ((qmiLocSensorAidedMaskT_v02)0x00000004) /**< Bitmask to specify whether a sensor was used to calculate position. */ -#define QMI_LOC_SENSOR_AIDED_MASK_VELOCITY_V02 ((qmiLocSensorAidedMaskT_v02)0x00000008) /**< Bitmask to specify whether a sensor was used to calculate velocity. */ -/** @addtogroup loc_qmi_aggregates - @{ - */ -typedef struct { - - qmiLocSensorUsageMaskT_v02 usageMask; - /**< Specifies which sensors are used. - - Valid bitmasks are specified by the following constants: \n - - 0x00000001 -- SENSOR_USED_ACCEL \n - - 0x00000002 -- SENSOR_USED_GYRO */ - - qmiLocSensorAidedMaskT_v02 aidingIndicatorMask; - /**< Specifies which results are aided by sensors. - - Valid bitmasks are specified by the following constants: \n - - 0x00000001 -- AIDED_HEADING \n - - 0x00000002 -- AIDED_SPEED \n - - 0x00000004 -- AIDED_POSITION \n - - 0x00000008 -- AIDED_VELOCITY */ -}qmiLocSensorUsageIndicatorStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCTIMESOURCEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_TIME_SRC_INVALID_V02 = 0, /**< Invalid time. */ - eQMI_LOC_TIME_SRC_NETWORK_TIME_TRANSFER_V02 = 1, /**< Time is set by the 1x system. */ - eQMI_LOC_TIME_SRC_NETWORK_TIME_TAGGING_V02 = 2, /**< Time is set by WCDMA/GSM time tagging (i.e., - associating network time with GPS time). */ - eQMI_LOC_TIME_SRC_EXTERNAL_INPUT_V02 = 3, /**< Time is set by an external injection. */ - eQMI_LOC_TIME_SRC_TOW_DECODE_V02 = 4, /**< Time is set after decoding over-the-air GPS navigation data - from one GPS satellite. */ - eQMI_LOC_TIME_SRC_TOW_CONFIRMED_V02 = 5, /**< Time is set after decoding over-the-air GPS navigation data - from multiple satellites. */ - eQMI_LOC_TIME_SRC_TOW_AND_WEEK_CONFIRMED_V02 = 6, /**< Both time of the week and the GPS week number are known. */ - eQMI_LOC_TIME_SRC_NAV_SOLUTION_V02 = 7, /**< Time is set by the position engine after the fix is obtained. */ - eQMI_LOC_TIME_SRC_SOLVE_FOR_TIME_V02 = 8, /**< Time is set by the position engine after performing SFT. - This is done when the clock time uncertainty is large. */ - eQMI_LOC_TIME_SRC_GLO_TOW_DECODE_V02 = 9, /**< Time is set after decoding GLO satellites */ - eQMI_LOC_TIME_SRC_TIME_TRANSFORM_V02 = 10, /**< Time is set after transforming the GPS to GLO time */ - eQMI_LOC_TIME_SRC_WCDMA_SLEEP_TIME_TAGGING_V02 = 11, /**< Time is set by the sleep time tag provided by the WCDMA network */ - eQMI_LOC_TIME_SRC_GSM_SLEEP_TIME_TAGGING_V02 = 12, /**< Time is set by the sleep time tag provided by the GSM network - Source of the time is unknown */ - eQMI_LOC_TIME_SRC_UNKNOWN_V02 = 13, - QMILOCTIMESOURCEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocTimeSourceEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCRELIABILITYENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_RELIABILITY_NOT_SET_V02 = 0, /**< Location reliability is not set */ - eQMI_LOC_RELIABILITY_VERY_LOW_V02 = 1, /**< Location reliability is very low; use it at your own risk */ - eQMI_LOC_RELIABILITY_LOW_V02 = 2, /**< Location reliability is low; little or no cross-checking is possible */ - eQMI_LOC_RELIABILITY_MEDIUM_V02 = 3, /**< Location reliability is medium; limited cross-check passed - Location reliability is high; strong cross-check passed */ - eQMI_LOC_RELIABILITY_HIGH_V02 = 4, - QMILOCRELIABILITYENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocReliabilityEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; This message is used to send the position report to the - control point. */ -typedef struct { - - /* Mandatory */ - /* Session Status */ - 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 - */ - - /* Mandatory */ - /* Session ID */ - 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 */ - - /* 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 */ - - /* 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 */ - /* 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 - - Type: Floating point \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 - - Type: Floating point \n - - Units: Meters */ - - /* Optional */ - /* Elliptical Horizontal 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 - - Type: Floating point \n - - Units: Decimal degrees \n - - Range: 0 to 180 */ - - /* Optional */ - /* Horizontal Confidence */ - 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 */ - - /* 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: \n - - 0x00000000 -- RELIABILITY_NOT_SET \n - - 0x00000001 -- RELIABILITY_VERY_LOW \n - - 0x00000002 -- RELIABILITY_LOW \n - - 0x00000003 -- RELIABILITY_MEDIUM \n - - 0x00000004 -- RELIABILITY_HIGH - */ - - /* Optional */ - /* Horizontal Speed */ - 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 - - Units: Meters/second */ - - /* 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 \n - - Range: -500 to 15883 */ - - /* 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 */ - /* Vertical Uncertainty */ - 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 */ - /* Vertical Confidence */ - 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 */ - - /* 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: \n - - 0x00000000 -- RELIABILITY_NOT_SET \n - - 0x00000001 -- RELIABILITY_VERY_LOW \n - - 0x00000002 -- RELIABILITY_LOW \n - - 0x00000003 -- RELIABILITY_MEDIUM \n - - 0x00000004 -- RELIABILITY_HIGH */ - - /* 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 */ - /* Heading */ - 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 */ - - /* 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 - - Units: Degrees \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. \n - - Type: Floating point */ - - /* Optional */ - /* Technology Used */ - 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: \n - - 0x00000001 -- SATELLITE \n - - 0x00000002 -- CELLID \n - - 0x00000004 -- WIFI */ - - /* Optional */ - /* Dilution of Precision */ - uint8_t DOP_valid; /**< Must be set to true if DOP is being passed */ - qmiLocDOPStructT_v02 DOP; - /**< \n Dilution of precision associated with this position. */ - - /* Optional */ - /* UTC Timestamp */ - 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 */ - /* Leap Seconds */ - uint8_t leapSeconds_valid; /**< Must be set to true if leapSeconds is being passed */ - uint8_t leapSeconds; - /**< 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 */ - 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 - milliseconds into the current week. */ - - /* Optional */ - /* Time Uncertainty */ - 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 */ - /* Time Source */ - uint8_t timeSrc_valid; /**< Must be set to true if timeSrc is being passed */ - 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 */ - - /* Optional */ - /* Sensor Data Usage */ - uint8_t sensorDataUsage_valid; /**< Must be set to true if sensorDataUsage is being passed */ - qmiLocSensorUsageIndicatorStructT_v02 sensorDataUsage; - /**< \n Whether sensor data was used in computing the position in this - position report. */ - - /* Optional */ - /* Fix Count for This Session */ - uint8_t fixId_valid; /**< Must be set to true if fixId is being passed */ - uint32_t fixId; - /**< Fix count for the session. Starts with 0 and increments by one - for each successive position report for a particular session. */ -}qmiLocEventPositionReportIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCSVSYSTEMENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_SV_SYSTEM_GPS_V02 = 1, /**< GPS satellite. */ - eQMI_LOC_SV_SYSTEM_GALILEO_V02 = 2, /**< GALILEO satellite. */ - eQMI_LOC_SV_SYSTEM_SBAS_V02 = 3, /**< SBAS satellite. */ - eQMI_LOC_SV_SYSTEM_COMPASS_V02 = 4, /**< COMPASS satellite. - GLONASS satellite. */ - eQMI_LOC_SV_SYSTEM_GLONASS_V02 = 5, - QMILOCSVSYSTEMENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocSvSystemEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCSVSTATUSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_SV_STATUS_IDLE_V02 = 1, /**< SV is not being actively processed. */ - eQMI_LOC_SV_STATUS_SEARCH_V02 = 2, /**< The system is searching for this SV. - SV is being tracked. */ - eQMI_LOC_SV_STATUS_TRACK_V02 = 3, - QMILOCSVSTATUSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocSvStatusEnumT_v02; -/** - @} - */ - -typedef uint32_t qmiLocSvInfoValidMaskT_v02; -#define QMI_LOC_SV_INFO_MASK_VALID_SYSTEM_V02 ((qmiLocSvInfoValidMaskT_v02)0x00000001) /**< System field is valid in SV information. */ -#define QMI_LOC_SV_INFO_MASK_VALID_GNSS_SVID_V02 ((qmiLocSvInfoValidMaskT_v02)0x00000002) /**< gnssSvId field is valid in SV information. */ -#define QMI_LOC_SV_INFO_MASK_VALID_HEALTH_STATUS_V02 ((qmiLocSvInfoValidMaskT_v02)0x00000004) /**< healthStatus field is valid in SV information. */ -#define QMI_LOC_SV_INFO_MASK_VALID_PROCESS_STATUS_V02 ((qmiLocSvInfoValidMaskT_v02)0x00000008) /**< processStatus field is valid in SV information. */ -#define QMI_LOC_SV_INFO_MASK_VALID_SVINFO_MASK_V02 ((qmiLocSvInfoValidMaskT_v02)0x00000010) /**< svInfoMask field is valid in SV information. */ -#define QMI_LOC_SV_INFO_MASK_VALID_ELEVATION_V02 ((qmiLocSvInfoValidMaskT_v02)0x00000020) /**< Elevation field is valid in SV information. */ -#define QMI_LOC_SV_INFO_MASK_VALID_AZIMUTH_V02 ((qmiLocSvInfoValidMaskT_v02)0x00000040) /**< Azimuth field is valid in SV information. */ -#define QMI_LOC_SV_INFO_MASK_VALID_SNR_V02 ((qmiLocSvInfoValidMaskT_v02)0x00000080) /**< SNR field is valid in SV information. */ -typedef uint8_t qmiLocSvInfoMaskT_v02; -#define QMI_LOC_SVINFO_MASK_HAS_EPHEMERIS_V02 ((qmiLocSvInfoMaskT_v02)0x01) /**< Ephemeris is available for this SV. */ -#define QMI_LOC_SVINFO_MASK_HAS_ALMANAC_V02 ((qmiLocSvInfoMaskT_v02)0x02) /**< Almanac is available for this SV. */ -/** @addtogroup loc_qmi_aggregates - @{ - */ -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 - - */ - - 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 - */ - - uint16_t gnssSvId; - /**< GNSS SV ID. \n - - - Type: Unsigned integer \n - - Range: \n - -- For GPS: 1 to 32 \n - -- For SBAS: 33 to 64 \n - -- For GLONASS: 65 to 96 */ - - uint8_t healthStatus; - /**< Health status. \n - - Type: Unsigned integer \n - - Range: 0 = unhealthy; 1 = healthy */ - - qmiLocSvStatusEnumT_v02 svStatus; - /**< SV processing status. \n - Valid values:\n - - 0x00000001 -- SV_STATUS_IDLE \n - - 0x00000002 -- SV_STATUS_SEARCH \n - - 0x00000003 -- SV_STATUS_TRACK - */ - - qmiLocSvInfoMaskT_v02 svInfoMask; - /**< Whether almanac and ephemeris information is available. \n - Valid bitmasks: \n - - 0x01 -- SVINFO_HAS_EPHEMERIS \n - - 0x02 -- SVINFO_HAS_ALMANAC - */ - - 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 */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Used to send a satellite report to the control point. */ -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 */ - - /* Optional */ - /* Satellite Info */ - uint8_t svList_valid; /**< Must be set to true if svList is being passed */ - uint32_t svList_len; /**< Must be set to # of elements in svList */ - qmiLocSvInfoStructT_v02 svList[QMI_LOC_SV_INFO_LIST_MAX_SIZE_V02]; - /**< \n SV information list. */ -}qmiLocEventGnssSvInfoIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Used to send NMEA sentences to the control point. */ -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 */ -}qmiLocEventNmeaIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCNINOTIFYVERIFYENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_NI_USER_NO_NOTIFY_NO_VERIFY_V02 = 1, /**< No notification and no verification required. */ - eQMI_LOC_NI_USER_NOTIFY_ONLY_V02 = 2, /**< Notify only; no verification required. */ - eQMI_LOC_NI_USER_NOTIFY_VERIFY_ALLOW_NO_RESP_V02 = 3, /**< Notify and verify, but no response required. */ - eQMI_LOC_NI_USER_NOTIFY_VERIFY_NOT_ALLOW_NO_RESP_V02 = 4, /**< Notify and verify, and require a response. - Notify and Verify, and require a response. */ - eQMI_LOC_NI_USER_NOTIFY_VERIFY_PRIVACY_OVERRIDE_V02 = 5, - QMILOCNINOTIFYVERIFYENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocNiNotifyVerifyEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCNIVXPOSMODEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_NI_VX_MS_ASSISTED_ONLY_V02 = 1, /**< MS-assisted only allowed. */ - eQMI_LOC_NI_VX_MS_BASED_ONLY_V02 = 2, /**< MS-based only allowed. */ - eQMI_LOC_NI_VX_MS_ASSISTED_PREFERRED_MS_BASED_ALLOWED_V02 = 3, /**< MS-assisted preferred, but MS-based allowed. - MS-based preferred, but MS-assisted allowed. */ - eQMI_LOC_NI_VX_MS_BASED_PREFERRED_MS_ASSISTED_ALLOWED_V02 = 4, - QMILOCNIVXPOSMODEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocNiVxPosModeEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCNIVXREQUESTORIDENCODINGSCHEMEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_NI_VX_OCTET_V02 = 0, /**< Encoding is OCTET. */ - eQMI_LOC_NI_VX_EXN_PROTOCOL_MSG_V02 = 1, /**< Encoding is EXN PROTOCOL MSG. */ - eQMI_LOC_NI_VX_ASCII_V02 = 2, /**< Encoding is ASCII. */ - eQMI_LOC_NI_VX_IA5_V02 = 3, /**< Encoding is IA5. */ - eQMI_LOC_NI_VX_UNICODE_V02 = 4, /**< Encoding is UNICODE. */ - eQMI_LOC_NI_VX_SHIFT_JIS_V02 = 5, /**< Encoding is SHIFT JIS. */ - eQMI_LOC_NI_VX_KOREAN_V02 = 6, /**< Encoding is KOREAN. */ - eQMI_LOC_NI_VX_LATIN_HEBREW_V02 = 7, /**< Encoding is LATIN HEBREW. */ - eQMI_LOC_NI_VX_LATIN_V02 = 8, /**< Encoding is LATIN. - Encoding is GSM. */ - eQMI_LOC_NI_VX_GSM_V02 = 9, - QMILOCNIVXREQUESTORIDENCODINGSCHEMEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocNiVxRequestorIdEncodingSchemeEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -typedef struct { - - uint8_t posQosIncl; - /**< Whether quality of service is included:\n - - 0x01 (TRUE) -- QoS is included \n - - 0x00 (FALSE) -- QoS is not included */ - - 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 */ - - 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 - */ - - 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 - */ - - uint32_t requestorId_len; /**< Must be set to # of elements in requestorId */ - uint8_t requestorId[QMI_LOC_NI_MAX_REQUESTOR_ID_LENGTH_V02]; - /**< Requestor ID. \n - - Type: Array of bytes \n - - Maximum array length: 200 - */ - - uint16_t userRespTimerInSeconds; - /**< Time to wait for the user to respond. \n - - Type: Unsigned integer \n - - Units: Seconds */ -}qmiLocNiVxNotifyVerifyStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCNISUPLPOSMETHODENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_NI_SUPL_POSMETHOD_AGPS_SETASSISTED_V02 = 1, /**< Set assisted. */ - eQMI_LOC_NI_SUPL_POSMETHOD_AGPS_SETBASED_V02 = 2, /**< Set based. */ - eQMI_LOC_NI_SUPL_POSMETHOD_AGPS_SETASSISTED_PREF_V02 = 3, /**< Set assisted preferred. */ - eQMI_LOC_NI_SUPL_POSMETHOD_AGPS_SETBASED_PREF_V02 = 4, /**< Set based preferred. */ - eQMI_LOC_NI_SUPL_POSMETHOD_AUTONOMOUS_GPS_V02 = 5, /**< Standalone GPS. */ - eQMI_LOC_NI_SUPL_POSMETHOD_AFLT_V02 = 6, /**< Advanced forward link trilateration. */ - eQMI_LOC_NI_SUPL_POSMETHOD_ECID_V02 = 7, /**< Exclusive chip ID. */ - eQMI_LOC_NI_SUPL_POSMETHOD_EOTD_V02 = 8, /**< Enhnaced observed time difference. */ - eQMI_LOC_NI_SUPL_POSMETHOD_OTDOA_V02 = 9, /**< Observed time delay of arrival. - No position. */ - eQMI_LOC_NI_SUPL_POSMETHOD_NO_POSITION_V02 = 10, - QMILOCNISUPLPOSMETHODENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocNiSuplPosMethodEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCNIDATACODINGSCHEMEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_NI_SS_GERMAN_V02 = 12, /**< Language is German. */ - eQMI_LOC_NI_SS_ENGLISH_V02 = 13, /**< Language is English. */ - eQMI_LOC_NI_SS_ITALIAN_V02 = 14, /**< Language is Italian. */ - eQMI_LOC_NI_SS_FRENCH_V02 = 15, /**< Language is French. */ - eQMI_LOC_NI_SS_SPANISH_V02 = 16, /**< Language is Spanish. */ - eQMI_LOC_NI_SS_DUTCH_V02 = 17, /**< Language is Dutch. */ - eQMI_LOC_NI_SS_SWEDISH_V02 = 18, /**< Language is Swedish. */ - eQMI_LOC_NI_SS_DANISH_V02 = 19, /**< Language is Danish. */ - eQMI_LOC_NI_SS_PORTUGUESE_V02 = 20, /**< Language is Portuguese. */ - eQMI_LOC_NI_SS_FINNISH_V02 = 21, /**< Language is Finnish. */ - eQMI_LOC_NI_SS_NORWEGIAN_V02 = 22, /**< Language is Norwegian. */ - eQMI_LOC_NI_SS_GREEK_V02 = 23, /**< Language is Greek. */ - eQMI_LOC_NI_SS_TURKISH_V02 = 24, /**< Language is Turkish. */ - eQMI_LOC_NI_SS_HUNGARIAN_V02 = 25, /**< Language is Hungarian. */ - eQMI_LOC_NI_SS_POLISH_V02 = 26, /**< Language is Polish. */ - eQMI_LOC_NI_SS_LANGUAGE_UNSPEC_V02 = 27, /**< Language is unspecified. */ - eQMI_LOC_NI_SUPL_UTF8_V02 = 28, /**< Encoding is UTF 8. */ - eQMI_LOC_NI_SUPL_UCS2_V02 = 29, /**< Encoding is UCS 2. - Encoding is GSM default. */ - eQMI_LOC_NI_SUPL_GSM_DEFAULT_V02 = 30, - QMILOCNIDATACODINGSCHEMEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocNiDataCodingSchemeEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCNISUPLFORMATENUMTYPE_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_NI_SUPL_FORMAT_LOGICAL_NAME_V02 = 0, /**< SUPL logical name format. */ - eQMI_LOC_NI_SUPL_FORMAT_EMAIL_ADDRESS_V02 = 1, /**< SUPL email address format. */ - eQMI_LOC_NI_SUPL_FORMAT_MSISDN_V02 = 2, /**< SUPL logical name format. */ - eQMI_LOC_NI_SUPL_FORMAT_URL_V02 = 3, /**< SUPL URL format. */ - eQMI_LOC_NI_SUPL_FORMAT_SIP_URL_V02 = 4, /**< SUPL SIP URL format. */ - eQMI_LOC_NI_SUPL_FORMAT_MIN_V02 = 5, /**< SUPL MIN format. */ - eQMI_LOC_NI_SUPL_FORMAT_MDN_V02 = 6, /**< SUPL MDN format. */ - eQMI_LOC_NI_SUPL_FORMAT_IMSPUBLIC_IDENTITY_V02 = 7, /**< SUPL IMS public identity - SUPL unknown format. */ - eQMI_LOC_NI_SUPL_FORMAT_OSS_UNKNOWN_V02 = 2147483647, - QMILOCNISUPLFORMATENUMTYPE_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocNiSuplFormatEnumType_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -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 - */ - - uint32_t formattedString_len; /**< Must be set to # of elements in formattedString */ - uint8_t formattedString[QMI_LOC_NI_MAX_CLIENT_NAME_LENGTH_V02]; - /**< Formatted string. \n - - Type: Byte array \n - - Maximum string length: 64 - */ -}qmiLocNiSuplFormattedStringStructT_v02; /* Type */ -/** - @} - */ - -typedef uint8_t qmiLocSuplQopValidMaskT_v02; -#define QMI_LOC_NI_SUPL_MASK_QOP_HORZ_ACC_VALID_V02 ((qmiLocSuplQopValidMaskT_v02)0x01) /**< Horizontal accuracy is valid in the Quality of Position (QoP). */ -#define QMI_LOC_NI_SUPL_MASK_QOP_VER_ACC_VALID_V02 ((qmiLocSuplQopValidMaskT_v02)0x02) /**< Vertical accuracy is valid in the QoP. */ -#define QMI_LOC_NI_SUPL_MASK_QOP_MAXAGE_VALID_V02 ((qmiLocSuplQopValidMaskT_v02)0x04) /**< Vertical accuracy is valid in the QoP. */ -#define QMI_LOC_NI_SUPL_MASK_QOP_DELAY_VALID_V02 ((qmiLocSuplQopValidMaskT_v02)0x08) /**< Vertical accuracy is valid in the QoP. */ -/** @addtogroup loc_qmi_aggregates - @{ - */ -typedef struct { - - qmiLocSuplQopValidMaskT_v02 validMask; - /**< Bit field indicating which fields are valid in this value. - - Valid bitmasks: \n - - 0x01 -- QOP_HORZ_ACC_VALID \n - - 0x02 -- QOP_VER_ACC_VALID \n - - 0x04 -- QOP_MAXAGE_VALID \n - - 0x08 -- QOP_DELAY_VALID */ - - 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 */ -/** - @} - */ - -typedef uint8_t qmiLocServerAddrTypeMaskT_v02; -#define QMI_LOC_SERVER_ADDR_TYPE_IPV4_MASK_V02 ((qmiLocServerAddrTypeMaskT_v02)0x01) /**< IPV4 server address type. */ -#define QMI_LOC_SERVER_ADDR_TYPE_IPV6_MASK_V02 ((qmiLocServerAddrTypeMaskT_v02)0x02) /**< IPV6 server address type. */ -#define QMI_LOC_SERVER_ADDR_TYPE_URL_MASK_V02 ((qmiLocServerAddrTypeMaskT_v02)0x04) /**< URL server address type. */ -/** @addtogroup loc_qmi_aggregates - @{ - */ -typedef struct { - - uint32_t addr; - /**< IPV4 address. \n - - Type: Unsigned integer */ - - uint16_t port; - /**< IPV4 port. \n - - Type: Unsigned integer */ -}qmiLocIpV4AddrStructType_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -typedef struct { - - uint16_t addr[QMI_LOC_IPV6_ADDR_LENGTH_V02]; - /**< IPV6 address. \n - - Type: Array of unsigned integers \n - - Maximum length of the array: 8 */ - - uint32_t port; - /**< IPV6 port. \n - - Type: Unsigned integer */ -}qmiLocIpV6AddrStructType_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -typedef struct { - - qmiLocServerAddrTypeMaskT_v02 suplServerAddrTypeMask; - /**< Mask specifying the valid fields in this value. - - Valid bitmasks: \n - - 0x01 -- IPV4 \n - - 0x02 -- IPV6 \n - - 0x04 -- URL - */ - - qmiLocIpV4AddrStructType_v02 ipv4Addr; - /**< IPV4 address and port. */ - - qmiLocIpV6AddrStructType_v02 ipv6Addr; - /**< 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 - */ -}qmiLocNiSuplServerInfoStructT_v02; /* Type */ -/** - @} - */ - -typedef uint32_t qmiLocNiSuplNotifyVerifyValidMaskT_v02; -#define QMI_LOC_SUPL_SERVER_INFO_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000001) /**< Mask to denote that the server information - is present in an NI SUPL notify verify request event. This mask is set in - the valid_flags field of a notify verify structure. */ -#define QMI_LOC_SUPL_SESSION_ID_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000002) /**< Mask to denote that the SUPL session ID - is present in an NI SUPL notify verify request event. - This mask is set in the valid_flags field of a - notify verify structure. */ -#define QMI_LOC_SUPL_HASH_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000004) /**< Mask to denote that the SUPL hash is present - in an NI notify verify request event. - This mask is set in the valid_flags field of a - notify verify structure. */ -#define QMI_LOC_SUPL_POS_METHOD_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000008) /**< Mask to denote that the position method is present - in an NI SUPL notify verify request event. - This mask is set in the valid_flags field of a - notify verify structure. */ -#define QMI_LOC_SUPL_DATA_CODING_SCHEME_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000010) /**< Mask to denote that the data coding scheme - is present in an NI SUPL notify verify request event. - This mask is set in the valid_flags field of a - notify verify structure. */ -#define QMI_LOC_SUPL_REQUESTOR_ID_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000020) /**< Mask to denote that the requestor ID - is present in an NI notify verify request event. - This mask is set in the valid_flags field of a - notify verify structure. */ -#define QMI_LOC_SUPL_CLIENT_NAME_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000040) /**< Mask to denote that the requestor ID - is present in an NI notify verify request event. - This mask is set in the valid_flags field of a - notify verify structure. */ -#define QMI_LOC_SUPL_QOP_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000080) /**< Mask to denote that the quality of position - is present in an NI notify verify request event. - This mask is set in the valid_flags field of a - notify verify structure. */ -#define QMI_LOC_SUPL_USER_RESP_TIMER_MASK_V02 ((qmiLocNiSuplNotifyVerifyValidMaskT_v02)0x00000100) /**< Mask to denote that the user response timer - is present in an NI notify verify request event. - This mask is set in the valid_flags field of a - notify verify structure. */ -/** @addtogroup loc_qmi_aggregates - @{ - */ -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 - */ - - qmiLocNiSuplServerInfoStructT_v02 suplServerInfo; - /**< SUPL server information. */ - - uint8_t suplSessionId[QMI_LOC_NI_SUPL_SLP_SESSION_ID_BYTE_LENGTH_V02]; - /**< SUPL session ID. \n - - Type: Array of unsigned integers \n - - Maximum length of the array: 4 */ - - uint8_t suplHash[QMI_LOC_NI_SUPL_HASH_LENGTH_V02]; - /**< Hash for SUPL_INIT; used to validate that the message was not - corrupted. \n - - Type: Array of unsigned integers \n - - Length of the array: 8 */ - - 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 - */ - - 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 - */ - - qmiLocNiSuplFormattedStringStructT_v02 requestorId; - /**< Requestor ID. The encoding scheme for requestor_id is specified in - the dataCodingScheme field. */ - - qmiLocNiSuplFormattedStringStructT_v02 clientName; - /**< Client name. The encoding scheme for client_name is specified in - the dataCodingScheme field. */ - - qmiLocNiSuplQopStructT_v02 suplQop; - /**< SUPL QoP. */ - - uint16_t userResponseTimer; - /**< Time to wait for the user to respond. \n - - Type: Unsigned integer \n - - Units: Seconds */ -}qmiLocNiSuplNotifyVerifyStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCNILOCATIONTYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_NI_LOCATIONTYPE_CURRENT_LOCATION_V02 = 1, /**< Current location. */ - eQMI_LOC_NI_LOCATIONTYPE_CURRENT_OR_LAST_KNOWN_LOCATION_V02 = 2, /**< Last known location; may be current location. - Initial location. */ - eQMI_LOC_NI_LOCATIONTYPE_INITIAL_LOCATION_V02 = 3, - QMILOCNILOCATIONTYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocNiLocationTypeEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -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 - - */ - - uint32_t codedString_len; /**< Must be set to # of elements in codedString */ - uint8_t codedString[QMI_LOC_NI_CODEWORD_MAX_LENGTH_V02]; - /**< Coded string. \n - - Type: Array of bytes \n - - Maximum string length: 20 */ -}qmiLocNiUmtsCpCodedStringStructT_v02; /* Type */ -/** - @} - */ - -typedef uint16_t qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02; -#define QMI_LOC_UMTS_CP_INVOKE_ID_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0001) /**< Mask to denote that the invoke ID - is present in an NI notify verify request event. - This mask is set in the valid flags field of a - notify verify structure. */ -#define QMI_LOC_UMTS_CP_DATA_CODING_SCHEME_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0002) /**< Mask to denote that the data coding scheme - is present in an NI notify verify request event. - This mask is set in the valid flags field of a - notify verify structure. */ -#define QMI_LOC_UMTS_CP_NOTIFICATION_TEXT_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0004) /**< Mask to denote that the notification text - is present in an NI notify verify request event. - This mask is set in the valid flags field of a - notify verify structure. */ -#define QMI_LOC_UMTS_CP_CLIENT_ADDRESS_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0008) /**< Mask to denote that the client address - is present in an NI notify verify request event. - This mask is set in the valid flags field of a - notify verify structure. */ -#define QMI_LOC_UMTS_CP_LOCATION_TYPE_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0010) /**< Mask to denote that the location type - is present in an NI notify verify request event. - This mask is set in the valid flags field of a - notify verify structure. */ -#define QMI_LOC_UMTS_CP_REQUESTOR_ID_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0020) /**< Mask to denote that the requestor ID - is present in an NI notify verify request event. - This mask is set in the valid flags field of a - notify verify structure. */ -#define QMI_LOC_UMTS_CP_CODEWORD_STRING_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0040) /**< Mask to denote that the code word string - is present in an NI notify verify request event. - This mask is set in the valid flags field of a - notify verify structure. */ -#define QMI_LOC_UMTS_CP_SERVICE_TYPE_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0080) /**< Mask to denote that the service type - is present in an NI notify verify request event. - This mask is set in the valid flags field of a - notify verify structure. */ -#define QMI_LOC_UMTS_CP_USER_RESP_TIMER_MASK_V02 ((qmiLocNiUmtsCpNotifyVerifyValidMaskT_v02)0x0100) /**< Mask to denote that the user response timer - is present in an NI notify verify request event. - This mask is set in the valid flags field of a - notify verify structure. */ -/** @addtogroup loc_qmi_aggregates - @{ - */ -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 - */ - - uint8_t invokeId; - /**< Supplementary Services invoke ID. \n - - Type: Unsigned integer */ - - 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 - */ - - uint32_t notificationText_len; /**< Must be set to # of elements in notificationText */ - uint8_t notificationText[QMI_LOC_NI_MAX_CLIENT_NAME_LENGTH_V02]; - /**< Notification text; the encoding method is specified in - dataCodingScheme. \n - - Type: Array of bytes \n - - Maximum array length: 64 */ - - uint32_t clientAddress_len; /**< Must be set to # of elements in clientAddress */ - uint8_t clientAddress[QMI_LOC_NI_MAX_EXT_CLIENT_ADDRESS_V02]; - /**< Client address; the encoding method is specified in - dataCodingScheme. \n - - Maximum array length: 20 */ - - qmiLocNiLocationTypeEnumT_v02 locationType; - /**< Location type. - - Valid values: \n - - 0x00000001 -- CURRENT_LOCATION \n - - 0x00000002 -- CURRENT_OR_LAST_KNOWN_LOCATION \n - - 0x00000004 -- INITIAL_LOCATION - */ - - qmiLocNiUmtsCpCodedStringStructT_v02 requestorId; - /**< Requestor ID; the encoding method is specified in the - qmiLocNiUmtsCpCodedStringStructT.dataCodingScheme field. */ - - qmiLocNiUmtsCpCodedStringStructT_v02 codewordString; - /**< Codeword string; the encoding method is specified in the - qmiLocNiUmtsCpCodedStringStructT.dataCodingScheme field. */ - - uint8_t lcsServiceTypeId; - /**< Service type ID. \n - - Type: Unsigned integer */ - - uint16_t userResponseTimer; - /**< Time to wait for the user to respond. \n - - Type: Unsigned integer \n - - Units: Seconds */ -}qmiLocNiUmtsCpNotifyVerifyStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCNISERVICEINTERACTIONENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_NI_SERVICE_INTERACTION_ONGOING_NI_INCOMING_MO_V02 = 1, /**< Service interaction between ongoing NI and incoming MO sessions. */ - QMILOCNISERVICEINTERACTIONENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocNiServiceInteractionEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -typedef struct { - - qmiLocNiVxNotifyVerifyStructT_v02 niVxReq; - /**< Ongoing NI session request; this information is currently not filled. */ - - qmiLocNiServiceInteractionEnumT_v02 serviceInteractionType; - /**< Service interaction type specified in qmiLocNiServiceInteractionEnumT. - - Valid values: \n - - 0x00000001 -- ONGOING_NI_INCOMING_MO - */ -}qmiLocNiVxServiceInteractionStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Indicates an NI notify/verify request to the control point. */ -typedef struct { - - /* Mandatory */ - /* Notification Type */ - 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 - */ - - /* Optional */ - /* Network Initiated Vx Request */ - uint8_t NiVxInd_valid; /**< Must be set to true if NiVxInd is being passed */ - qmiLocNiVxNotifyVerifyStructT_v02 NiVxInd; - /**< \n Optional NI Vx request payload. */ - - /* Optional */ - /* Network Initiated SUPL Request */ - uint8_t NiSuplInd_valid; /**< Must be set to true if NiSuplInd is being passed */ - qmiLocNiSuplNotifyVerifyStructT_v02 NiSuplInd; - /**< \n Optional NI SUPL request payload. */ - - /* Optional */ - /* Network Initiated UMTS Control Plane Request */ - uint8_t NiUmtsCpInd_valid; /**< Must be set to true if NiUmtsCpInd is being passed */ - qmiLocNiUmtsCpNotifyVerifyStructT_v02 NiUmtsCpInd; - /**< \n Optional NI UMTS-CP request payload. */ - - /* Optional */ - /* Network Initiated Service Interaction Request */ - uint8_t NiVxServiceInteractionInd_valid; /**< Must be set to true if NiVxServiceInteractionInd is being passed */ - qmiLocNiVxServiceInteractionStructT_v02 NiVxServiceInteractionInd; - /**< \n Optional NI service interaction payload. */ -}qmiLocEventNiNotifyVerifyReqIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -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 */ -}qmiLocAssistanceServerUrlStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -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 */ - qmiLocAssistanceServerUrlStructT_v02 timeServerList[QMI_LOC_MAX_NTP_SERVERS_V02]; - /**< List of Time Server URL's that are recommended by the service for time - information, the list is ordered, the client is to use the first - server specified in the list as the primary URL to fetch NTP time, - the second one as secondary, and so on. \n - - Maximum server list items: 3 */ -}qmiLocTimeServerListStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Requests the control point to inject time information. */ -typedef struct { - - /* Optional */ - /* Time Server Info */ - uint8_t timeServerInfo_valid; /**< Must be set to true if timeServerInfo is being passed */ - qmiLocTimeServerListStructT_v02 timeServerInfo; - /**< \n Contains information about the time servers recommended by the - location service for NTP time. */ -}qmiLocEventInjectTimeReqIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -typedef struct { - - uint32_t maxFileSizeInBytes; - /**< Maximum allowable predicted orbits file size (in bytes). \n - - Type: Unsigned integer */ - - uint32_t maxPartSize; - /**< Maximum allowable predicted orbits file chunk size (in bytes). \n - - Type: Unsigned integer */ -}qmiLocPredictedOrbitsAllowedSizesStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -typedef struct { - - uint32_t serverList_len; /**< Must be set to # of elements in serverList */ - qmiLocAssistanceServerUrlStructT_v02 serverList[QMI_LOC_MAX_PREDICTED_ORBITS_SERVERS_V02]; - /**< List of predicted orbits URLs. The list is ordered, so the client - must use the first server specified in the list as the primary URL - from which to download predicted orbits data, the second one as - secondary, and so on. \n - - Maximum number of servers that can be specified: 3 */ -}qmiLocPredictedOrbitsServerListStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Requests the control point to inject predicted orbits data. */ -typedef struct { - - /* Mandatory */ - /* Allowed Sizes */ - qmiLocPredictedOrbitsAllowedSizesStructT_v02 allowedSizes; - /**< \n Maximum part and file size allowed to be injected in the engine. */ - - /* Optional */ - /* Server List */ - uint8_t serverList_valid; /**< Must be set to true if serverList is being passed */ - qmiLocPredictedOrbitsServerListStructT_v02 serverList; - /**< \n List of servers that can be used by the client to download - predicted orbits data. */ -}qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Requests the control point to inject a position. */ -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 */ - - /* 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 */ - - /* 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 */ -}qmiLocEventInjectPositionReqIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCENGINESTATEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_ENGINE_STATE_ON_V02 = 1, /**< Location engine is on. - Location engine is off. */ - eQMI_LOC_ENGINE_STATE_OFF_V02 = 2, - QMILOCENGINESTATEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocEngineStateEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Sends the engine state to the control point. */ -typedef struct { - - /* Mandatory */ - /* Engine State */ - qmiLocEngineStateEnumT_v02 engineState; - /**< Location engine state. - - Valid values: \n - - 0x00000001 -- ON \n - - 0x00000002 -- OFF - */ -}qmiLocEventEngineStateIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCFIXSESSIONSTATEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_FIX_SESSION_STARTED_V02 = 1, /**< Location fix session has started. - Location fix session has ended. */ - eQMI_LOC_FIX_SESSION_FINISHED_V02 = 2, - QMILOCFIXSESSIONSTATEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocFixSessionStateEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Sends the fix session state to the control point. */ -typedef struct { - - /* Mandatory */ - /* Session State */ - qmiLocFixSessionStateEnumT_v02 sessionState; - /**< LOC fix session state. - - Valid values: \n - - 0x00000001 -- STARTED \n - - 0x00000002 -- FINISHED - */ - - /* Optional */ - /* Session ID */ - uint8_t sessionId_valid; /**< Must be set to true if sessionId is being passed */ - uint8_t sessionId; - /**< 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 */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCWIFIREQUESTENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_WIFI_START_PERIODIC_HI_FREQ_FIXES_V02 = 0, /**< Start periodic fixes with high frequency. */ - eQMI_LOC_WIFI_START_PERIODIC_KEEP_WARM_V02 = 1, /**< Keep warm for low frequency fixes without data downloads. - Stop periodic fixes request. */ - eQMI_LOC_WIFI_STOP_PERIODIC_FIXES_V02 = 2, - QMILOCWIFIREQUESTENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocWifiRequestEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Sends a WiFi request to the control point. */ -typedef struct { - - /* Mandatory */ - /* Request Type */ - 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 - */ - - /* Optional */ - /* Time Between Fixes */ - 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 */ -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -typedef struct { - - uint16_t samplesPerBatch; - /**< Specifies the number of samples per batch the GNSS location engine is to - receive. The sensor sampling frequency can be computed as follows: \n - - samplingFrequency = samplesPerBatch * batchesPerSecond \n - - samplesPerBatch must be a non-zero positive value. - */ - - uint16_t batchesPerSecond; - /**< Number of sensor-data batches the GNSS location engine is to receive - per second. The rate is specified in integral number of batches per - second (Hz). \n - - batchesPerSecond must be a non-zero positive value. - */ -}qmiLocSensorControlConfigSamplingSpecStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -typedef struct { - - uint8_t injectEnable; - /**< 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 - */ - - qmiLocSensorControlConfigSamplingSpecStructT_v02 dataFrequency; - /**< Rate at which the GNSS engine would like the sensor to be sampled. \n - The rate is specified in integral number of samples per second (Hz)\n - and batches per second. - */ -}qmiLocSensorReadyStatusStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Notifies the control point if the GNSS location engine is - ready to accept sensor data. */ -typedef struct { - - /* Optional */ - /* Accelerometer Accept Ready */ - uint8_t accelReady_valid; /**< Must be set to true if accelReady is being passed */ - qmiLocSensorReadyStatusStructT_v02 accelReady; - /**< \n Whether the GNSS location engine is ready to accept accelerometer - sensor data. - */ - - /* Optional */ - /* Gyrometer 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 - data. - */ -}qmiLocEventSensorStreamingReadyStatusIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Notifies the control point to inject time synchronization - data. */ -typedef struct { - - /* Mandatory */ - /* Opaque Time Sync Reference Counter */ - uint32_t refCounter; - /**< 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 */ -}qmiLocEventTimeSyncReqIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Requests the control point to enable Stationary Position - Indicator (SPI) streaming reports. */ -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 */ -}qmiLocEventSetSpiStreamingReportIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCWWANTYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_WWAN_TYPE_INTERNET_V02 = 0, /**< Bring up the WWAN type used for an Internet connection. - Bring up the WWAN type used for AGNSS connections. */ - eQMI_LOC_WWAN_TYPE_AGNSS_V02 = 1, - QMILOCWWANTYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocWWANTypeEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCSERVERREQUESTENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_SERVER_REQUEST_OPEN_V02 = 1, /**< Open a connection to the location server. - Close a connection to the location server. */ - eQMI_LOC_SERVER_REQUEST_CLOSE_V02 = 2, - QMILOCSERVERREQUESTENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocServerRequestEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Requests the client to open or close a connection - to the assisted GPS location server. */ -typedef struct { - - /* Mandatory */ - /* Connection Handle */ - uint32_t connHandle; - /**< Identifies a connection across Open and Close request events. \n - - Type: Unsigned integer */ - - /* Mandatory */ - /* Request Type */ - qmiLocServerRequestEnumT_v02 requestType; - /**< Open or close a connection to the location server. - - Valid values: \n - - 0x00000001 -- OPEN \n - - 0x00000002 -- CLOSE - */ - - /* Mandatory */ - /* 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 - */ -}qmiLocEventLocationServerConnectionReqIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -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_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, - QMILOCSTATUSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocStatusEnumT_v02; -/** - @} - */ - -/* - * qmiLocGetServiceRevisionReqMsgT is empty - * typedef struct { - * }qmiLocGetServiceRevisionReqMsgT_v02; - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Client can query the service revision using this message. */ -typedef struct { - - /* Mandatory */ - /* Get Revision Status */ - 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 - */ - - /* Mandatory */ - /* Interface Definition Minor Revision */ - 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 */ -}qmiLocGetServiceRevisionIndMsgT_v02; /* Message */ -/** - @} - */ - -/* - * qmiLocGetFixCriteriaReqMsgT is empty - * typedef struct { - * }qmiLocGetFixCriteriaReqMsgT_v02; - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Gets the fix criteria from the location engine. */ -typedef struct { - - /* Mandatory */ - /* Get Fix Criteria Status */ - 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 - */ - - /* Optional */ - /* Horizontal Accuracy */ - uint8_t horizontalAccuracyLevel_valid; /**< Must be set to true if horizontalAccuracyLevel is being passed */ - 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. - */ - - /* Optional */ - /* Enable/Disable Intermediate Fixes */ - uint8_t intermediateReportState_valid; /**< Must be set to true if intermediateReportState is being passed */ - qmiLocIntermediateReportStateEnumT_v02 intermediateReportState; - /**< Intermediate Report state (ON, OFF).\n - The client must explicitly set this field to OFF to stop receiving - intermediate position reports. Intermediate position reports are - generated at \n 1 Hz and are ON by default. If intermediate reports - 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 - */ - - /* Optional */ - /* Mimimum 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 */ -}qmiLocGetFixCriteriaIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCNIUSERRESPENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_NI_LCS_NOTIFY_VERIFY_ACCEPT_V02 = 1, /**< User accepted notify verify request. */ - eQMI_LOC_NI_LCS_NOTIFY_VERIFY_DENY_V02 = 2, /**< User denied notify verify request. - User did not respond to notify verify request. */ - eQMI_LOC_NI_LCS_NOTIFY_VERIFY_NORESP_V02 = 3, - QMILOCNIUSERRESPENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocNiUserRespEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Sends the NI user response back to the engine; success or - failure is reported in a separate indication. */ -typedef struct { - - /* Mandatory */ - /* User Response */ - qmiLocNiUserRespEnumT_v02 userResp; - /**< User accepted or denied. - - Valid values: \n - - 0x00000001 -- NOTIFY_VERIFY_ACCEPT \n - - 0x00000002 -- NOTIFY_VERIFY_DENY \n - - 0x00000003 -- NOTIFY_VERIFY_NORESP - */ - - /* Mandatory */ - /* Notification Type */ - 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 - */ - - /* Optional */ - /* Network Initiated Vx Request */ - uint8_t NiVxPayload_valid; /**< Must be set to true if NiVxPayload is being passed */ - qmiLocNiVxNotifyVerifyStructT_v02 NiVxPayload; - /**< \n Optional NI VX request payload. */ - - /* Optional */ - /* Network Initiated SUPL Request */ - uint8_t NiSuplPayload_valid; /**< Must be set to true if NiSuplPayload is being passed */ - qmiLocNiSuplNotifyVerifyStructT_v02 NiSuplPayload; - /**< \n Optional NI SUPL request payload. */ - - /* Optional */ - /* Network Initiated UMTS Control Plane Request */ - uint8_t NiUmtsCpPayload_valid; /**< Must be set to true if NiUmtsCpPayload is being passed */ - qmiLocNiUmtsCpNotifyVerifyStructT_v02 NiUmtsCpPayload; - /**< \n Optional NI UMTS-CP request payload. */ - - /* Optional */ - /* 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. */ -}qmiLocNiUserRespReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Sends the NI user response back to the engine; success or - failure is reported in a separate indication. */ -typedef struct { - - /* Mandatory */ - /* NI User Response Status */ - 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 - */ -}qmiLocNiUserRespIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCPREDICTEDORBITSDATAFORMATENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_PREDICTED_ORBITS_XTRA_V02 = 0, /**< Default is QCOM-XTRA format. */ - QMILOCPREDICTEDORBITSDATAFORMATENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocPredictedOrbitsDataFormatEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Injects predicted orbits data. */ -typedef struct { - - /* Mandatory */ - /* 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 */ - - /* Mandatory */ - /* Part Number */ - uint16_t partNum; - /**< Number of the current predicted orbits data part; starts at 1. \n - - Type: Unsigned integer */ - - /* Mandatory */ - /* Data */ - uint32_t partData_len; /**< Must be set to # of elements in partData */ - char partData[QMI_LOC_MAX_PREDICTED_ORBITS_PART_LEN_V02]; - /**< Predicted orbits data. \n - - Type: Array of bytes \n - - Maximum length of the array: 1024 - */ - - /* Optional */ - /* Format Type */ - uint8_t formatType_valid; /**< Must be set to true if formatType is being passed */ - qmiLocPredictedOrbitsDataFormatEnumT_v02 formatType; - /**< Predicted orbits data format. - - Valid values: \n - - 0x00000000 -- PREDICTED_ORBITS_XTRA - */ -}qmiLocInjectPredictedOrbitsDataReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Injects predicted orbits data. */ -typedef struct { - - /* Mandatory */ - /* Data Injection Status */ - 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 - */ - - /* Optional */ - /* Part Number */ - 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 */ -}qmiLocInjectPredictedOrbitsDataIndMsgT_v02; /* Message */ -/** - @} - */ - -/* - * qmiLocGetPredictedOrbitsDataSourceReqMsgT is empty - * typedef struct { - * }qmiLocGetPredictedOrbitsDataSourceReqMsgT_v02; - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Gets the predicted orbits data source. */ -typedef struct { - - /* Mandatory */ - /* Predicted Oribits 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 - */ - - /* Optional */ - /* Allowed Sizes */ - uint8_t allowedSizes_valid; /**< Must be set to true if allowedSizes is being passed */ - qmiLocPredictedOrbitsAllowedSizesStructT_v02 allowedSizes; - /**< \n Maximum part and file size allowed to be injected in the engine. */ - - /* Optional */ - /* Server List */ - uint8_t serverList_valid; /**< Must be set to true if serverList is being passed */ - qmiLocPredictedOrbitsServerListStructT_v02 serverList; - /**< \n List of servers that can be used by the client to download - predicted orbits data. */ -}qmiLocGetPredictedOrbitsDataSourceIndMsgT_v02; /* Message */ -/** - @} - */ - -/* - * qmiLocGetPredictedOrbitsDataValidityReqMsgT is empty - * typedef struct { - * }qmiLocGetPredictedOrbitsDataValidityReqMsgT_v02; - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -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 */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Gets the predicted orbits data validity. */ -typedef struct { - - /* Mandatory */ - /* Predicted Orbits Data Validity Status */ - 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 - */ - - /* Optional */ - /* Validity Info */ - uint8_t validityInfo_valid; /**< Must be set to true if validityInfo is being passed */ - qmiLocPredictedOrbitsDataValidityStructT_v02 validityInfo; -}qmiLocGetPredictedOrbitsDataValidityIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Injects UTC time in the location engine. */ -typedef struct { - - /* Mandatory */ - /* UTC Time */ - uint64_t timeUtc; - /**< UTC time since Jan. 1, 1970.\n - - Type: Unsigned integer \n - - Units: Milliseconds - */ - - /* Mandatory */ - /* Time Uncertainty */ - uint32_t timeUnc; - /**< Time uncertainty.\n - - Type: Unsigned integer \n - - Units: Milliseconds - */ -}qmiLocInjectUtcTimeReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Injects UTC time in the location engine. */ -typedef struct { - - /* Mandatory */ - /* UTC Time Injection Status */ - 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 - */ -}qmiLocInjectUtcTimeIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCALTSRCENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_ALT_SRC_UNKNOWN_V02 = 0, /**< Source is unknown. */ - eQMI_LOC_ALT_SRC_GPS_V02 = 1, /**< GPS is the source. */ - eQMI_LOC_ALT_SRC_CELL_ID_V02 = 2, /**< Cell ID provided the source. */ - eQMI_LOC_ALT_SRC_ENHANCED_CELL_ID_V02 = 3, /**< Source is enhanced cell ID. */ - eQMI_LOC_ALT_SRC_WIFI_V02 = 4, /**< WiFi is the source. */ - eQMI_LOC_ALT_SRC_TERRESTRIAL_V02 = 5, /**< Terrestrial source. */ - eQMI_LOC_ALT_SRC_TERRESTRIAL_HYBRID_V02 = 6, /**< Hybrid terrestrial source. */ - eQMI_LOC_ALT_SRC_ALTITUDE_DATABASE_V02 = 7, /**< Altitude database is the source. */ - eQMI_LOC_ALT_SRC_BAROMETRIC_ALTIMETER_V02 = 8, /**< Barometric altimeter is the source. - Other sources. */ - eQMI_LOC_ALT_SRC_OTHER_V02 = 9, - QMILOCALTSRCENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocAltSrcEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCALTSRCLINKAGEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_ALT_SRC_LINKAGE_NOT_SPECIFIED_V02 = 0, /**< Not specified. */ - eQMI_LOC_ALT_SRC_LINKAGE_FULLY_INTERDEPENDENT_V02 = 1, /**< Fully interdependent. */ - eQMI_LOC_ALT_SRC_LINKAGE_DEPENDS_ON_LAT_LONG_V02 = 2, /**< Depends on latitude and longitude. - Fully independent. */ - eQMI_LOC_ALT_SRC_LINKAGE_FULLY_INDEPENDENT_V02 = 3, - QMILOCALTSRCLINKAGEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocAltSrcLinkageEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCALTSRCUNCERTAINTYCOVERAGEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_ALT_UNCERTAINTY_NOT_SPECIFIED_V02 = 0, /**< Not specified. */ - eQMI_LOC_ALT_UNCERTAINTY_POINT_V02 = 1, /**< Altitude uncertainty is valid at the injected horizontal - position coordinates only. - Altitude uncertainty applies to the position of the device - regardless of horizontal position (within the horizontal - uncertainty region, if provided). */ - eQMI_LOC_ALT_UNCERTAINTY_FULL_V02 = 2, - QMILOCALTSRCUNCERTAINTYCOVERAGEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocAltSrcUncertaintyCoverageEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -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 - */ - - 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 - */ - - 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). - */ -}qmiLocAltitudeSrcInfoStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -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. - 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*/ -}qmiLocPositionSrcEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Injects a position to the location engine. */ -typedef struct { - - /* 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 - */ - - /* 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 - */ - - /* Optional */ - /* Circular Horizontal 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 */ - /* 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 - This field must be specified together with horizontal uncertainty. - If not specified, the default value will be 50. */ - - /* 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: \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 - */ - - /* 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 */ - - /* 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 */ - /* Vertical Uncertainty */ - uint8_t vertUnc_valid; /**< Must be set to true if vertUnc is being passed */ - 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 - This field must be specified together with the vertical uncertainty. - If not specified, the default value will be 50. */ - - /* 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: \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 - */ - - /* Optional */ - /* Altitude Source Info */ - uint8_t altSourceInfo_valid; /**< Must be set to true if altSourceInfo is being passed */ - qmiLocAltitudeSrcInfoStructT_v02 altSourceInfo; - /**< \n Specifies information regarding the altitude source. */ - - /* Optional */ - /* UTC Timestamp */ - 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 */ - /* Position Age */ - 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. - */ -}qmiLocInjectPositionReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Injects a position to the location engine. */ -typedef struct { - - /* Mandatory */ - /* UTC Position Injection Status */ - 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 - */ -}qmiLocInjectPositionIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCLOCKENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_LOCK_NONE_V02 = 1, /**< Do not lock any position sessions. */ - eQMI_LOC_LOCK_MI_V02 = 2, /**< Lock mobile-initiated position sessions. */ - eQMI_LOC_LOCK_MT_V02 = 3, /**< Lock mobile-terminated position sessions. - Lock all position sessions. */ - eQMI_LOC_LOCK_ALL_V02 = 4, - QMILOCLOCKENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocLockEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Sets the location engine lock. */ -typedef struct { - - /* Mandatory */ - /* Lock Type */ - qmiLocLockEnumT_v02 lockType; - /**< Type of lock. - - Valid values: \n - - 0x00000001 -- LOCK_NONE \n - - 0x00000002 -- LOCK_MI \n - - 0x00000003 -- LOCK_MT \n - - 0x00000004 -- LOCK_ALL - - */ -}qmiLocSetEngineLockReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Sets the location engine lock. */ -typedef struct { - - /* Mandatory */ - /* Set Engine Lock Status */ - 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 - */ -}qmiLocSetEngineLockIndMsgT_v02; /* Message */ -/** - @} - */ - -/* - * qmiLocGetEngineLockReqMsgT is empty - * typedef struct { - * }qmiLocGetEngineLockReqMsgT_v02; - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Gets the location engine lock. */ -typedef struct { - - /* Mandatory */ - /* Get Engine Lock Status */ - 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 - */ - - /* Optional */ - /* Lock Type */ - uint8_t lockType_valid; /**< Must be set to true if lockType is being passed */ - qmiLocLockEnumT_v02 lockType; - /**< Type of lock. - - Valid values: \n - - 0x00000001 -- LOCK_NONE \n - - 0x00000002 -- LOCK_MI \n - - 0x00000003 -- LOCK_MT \n - - 0x00000004 -- LOCK_ALL - */ -}qmiLocGetEngineLockIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Sets the SBAS configuration. */ -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 */ -}qmiLocSetSbasConfigReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Sets the SBAS configuration. */ -typedef struct { - - /* Mandatory */ - /* Set SBAS Config Status */ - 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 - */ -}qmiLocSetSbasConfigIndMsgT_v02; /* Message */ -/** - @} - */ - -/* - * qmiLocGetSbasConfigReqMsgT is empty - * typedef struct { - * }qmiLocGetSbasConfigReqMsgT_v02; - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Gets the SBAS configuration from the location engine. */ -typedef struct { - - /* Mandatory */ - /* Get SBAS Config Status */ - 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 - */ - - /* 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 */ -}qmiLocGetSbasConfigIndMsgT_v02; /* Message */ -/** - @} - */ - -typedef uint32_t qmiLocNmeaSentenceMaskT_v02; -#define QMI_LOC_NMEA_MASK_GGA_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000001) /**< Enable GGA type. */ -#define QMI_LOC_NMEA_MASK_RMC_V02 ((qmiLocNmeaSentenceMaskT_v02)0x00000002) /**< Enable RMC type. */ -#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. */ -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Sets the NMEA types. */ -typedef struct { - - /* Mandatory */ - /* NMEA Sentence Types */ - qmiLocNmeaSentenceMaskT_v02 nmeaSentenceType; - /**< Bitmasks of NMEA types to enable. - - Valid bitmasks: \n - - 0x00000001 -- NMEA_MASK_GGA \n - - 0x00000002 -- NMEA_MASK_RMC \n - - 0x00000004 -- NMEA_MASK_GSV \n - - 0x00000008 -- NMEA_MASK_GSA \n - - 0x00000010 -- NMEA_MASK_VTG - */ -}qmiLocSetNmeaTypesReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Sets the NMEA types. */ -typedef struct { - - /* Mandatory */ - /* Set NMEA Types Status */ - 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 - */ -}qmiLocSetNmeaTypesIndMsgT_v02; /* Message */ -/** - @} - */ - -/* - * qmiLocGetNmeaTypesReqMsgT is empty - * typedef struct { - * }qmiLocGetNmeaTypesReqMsgT_v02; - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Gets the NMEA types from the location engine. */ -typedef struct { - - /* Mandatory */ - /* Get NMEA Types Status */ - 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 - */ - - /* Optional */ - /* NMEA Sentence Types */ - uint8_t nmeaSentenceType_valid; /**< Must be set to true if nmeaSentenceType is being passed */ - qmiLocNmeaSentenceMaskT_v02 nmeaSentenceType; - /**< NMEA types to enable. - - Valid bitmasks: \n - - 0x0000ffff -- NMEA_MASK_ALL \n - - 0x00000001 -- NMEA_MASK_GGA \n - - 0x00000002 -- NMEA_MASK_RMC \n - - 0x00000004 -- NMEA_MASK_GSV \n - - 0x00000008 -- NMEA_MASK_GSA \n - - 0x00000010 -- NMEA_MASK_VTG - */ -}qmiLocGetNmeaTypesIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Enables/disables Low Power Mode (LPM) configuration. */ -typedef struct { - - /* Mandatory */ - /* Enable Low Power Mode */ - uint8_t lowPowerMode; - /**< Whether to enable Low Power mode:\n - - 0x01 (TRUE) -- Enable LPM \n - - 0x00 (FALSE) -- Disable LPM */ -}qmiLocSetLowPowerModeReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Enables/disables Low Power Mode (LPM) configuration. */ -typedef struct { - - /* Mandatory */ - /* Set LPM Status */ - 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 - */ -}qmiLocSetLowPowerModeIndMsgT_v02; /* Message */ -/** - @} - */ - -/* - * qmiLocGetLowPowerModeReqMsgT is empty - * typedef struct { - * }qmiLocGetLowPowerModeReqMsgT_v02; - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Gets the LPM status from the location engine. */ -typedef struct { - - /* Mandatory */ - /* Get LPM Status */ - 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 - */ - - /* Optional */ - /* Enable/Disable LPM */ - uint8_t lowPowerMode_valid; /**< Must be set to true if lowPowerMode is being passed */ - uint8_t lowPowerMode; - /**< Whether to enable Low Power mode:\n - - 0x01 (TRUE) -- Enable LPM \n - - 0x00 (FALSE) -- Disable LPM */ -}qmiLocGetLowPowerModeIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCSERVERTYPEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_SERVER_TYPE_CDMA_PDE_V02 = 1, /**< Server type is CDMA PDE. */ - eQMI_LOC_SERVER_TYPE_CDMA_MPC_V02 = 2, /**< Server type is CDMA MPC. */ - eQMI_LOC_SERVER_TYPE_UMTS_SLP_V02 = 3, /**< Server type is UMTS SLP. - Server type is custom PDE. */ - eQMI_LOC_SERVER_TYPE_CUSTOM_PDE_V02 = 4, - QMILOCSERVERTYPEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocServerTypeEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Specifies the A-GPS server type and address. */ -typedef struct { - - /* Mandatory */ - /* Server Type */ - qmiLocServerTypeEnumT_v02 serverType; - /**< Type of server. - - Valid values: \n - - 0x00000001 -- CDMA_PDE \n - - 0x00000002 -- CDMA_MPC \n - - 0x00000003 -- UMTS_SLP \n - - 0x00000004 -- CUSTOM_PDE - */ - - /* Optional */ - /* IPV4 Address */ - uint8_t ipv4Addr_valid; /**< Must be set to true if ipv4Addr is being passed */ - qmiLocIpV4AddrStructType_v02 ipv4Addr; - /**< \n IPV4 address and port. */ - - /* Optional */ - /* IPV6 Address */ - uint8_t ipv6Addr_valid; /**< Must be set to true if ipv6Addr is being passed */ - qmiLocIpV6AddrStructType_v02 ipv6Addr; - /**< \n IPV6 address and port. */ - - /* Optional */ - /* 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 - */ -}qmiLocSetServerReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Specifies the A-GPS server type and address. */ -typedef struct { - - /* Mandatory */ - /* Set Server Status */ - 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 - */ -}qmiLocSetServerIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Gets the location server from the location engine. */ -typedef struct { - - /* Mandatory */ - /* Server Type */ - qmiLocServerTypeEnumT_v02 serverType; - /**< Type of server, as defined in qmiLocServerTypeEnumT. - - Valid values: \n - - 0x00000001 -- CDMA_PDE \n - - 0x00000002 -- CDMA_MPC \n - - 0x00000003 -- UMTS_SLP \n - - 0x00000004 -- CUSTOM_PDE - */ - - /* Optional */ - /* Server Address Type */ - uint8_t serverAddrTypeMask_valid; /**< Must be set to true if serverAddrTypeMask is being passed */ - qmiLocServerAddrTypeMaskT_v02 serverAddrTypeMask; - /**< Type of address the client wants. If unspecified, the - indication will contain all the types of addresses - it has for the specified server type. - - Valid bitmasks: \n - - 0x01 -- IPV4 \n - - 0x02 -- IPV6 \n - - 0x04 -- URL - */ -}qmiLocGetServerReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Gets the location server from the location engine. */ -typedef struct { - - /* Mandatory */ - /* Get Server Status */ - 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 - */ - - /* Mandatory */ - /* Server Type */ - qmiLocServerTypeEnumT_v02 serverType; - /**< Type of server, as defined in qmiLocServerTypeEnumT. - - Valid values: \n - - 0x00000001 -- CDMA_PDE \n - - 0x00000002 -- CDMA_MPC \n - - 0x00000003 -- UMTS_SLP \n - - 0x00000004 -- CUSTOM_PDE - */ - - /* Optional */ - /* IPV4 Address */ - uint8_t ipv4Addr_valid; /**< Must be set to true if ipv4Addr is being passed */ - qmiLocIpV4AddrStructType_v02 ipv4Addr; - /**< \n IPV4 address and port. */ - - /* Optional */ - /* IPV6 Address */ - uint8_t ipv6Addr_valid; /**< Must be set to true if ipv6Addr is being passed */ - qmiLocIpV6AddrStructType_v02 ipv6Addr; - /**< \n IPV6 address and port. */ - - /* Optional */ - /* 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 - */ -}qmiLocGetServerIndMsgT_v02; /* Message */ -/** - @} - */ - -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 */ -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 */ -#define QMI_LOC_MASK_DELETE_CELLDB_OTA_POS_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000004) /**< Mask to delete cell database OTA position */ -#define QMI_LOC_MASK_DELETE_CELLDB_EXT_REF_POS_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000008) /**< Mask to delete cell database external reference position */ -#define QMI_LOC_MASK_DELETE_CELLDB_TIMETAG_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000010) /**< Mask to delete cell database time tag */ -#define QMI_LOC_MASK_DELETE_CELLDB_CELLID_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000020) /**< Mask to delete cell database cell ID */ -#define QMI_LOC_MASK_DELETE_CELLDB_CACHED_CELLID_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000040) /**< Mask to delete cell database cached cell ID */ -#define QMI_LOC_MASK_DELETE_CELLDB_LAST_SRV_CELL_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000080) /**< Mask to delete cell database last service cell */ -#define QMI_LOC_MASK_DELETE_CELLDB_CUR_SRV_CELL_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000100) /**< Mask to delete cell database current service cell */ -#define QMI_LOC_MASK_DELETE_CELLDB_NEIGHBOR_INFO_V02 ((qmiLocDeleteCelldbDataMaskT_v02)0x00000200) /**< Mask to delete cell database neighbor information */ -typedef uint32_t qmiLocDeleteClockInfoMaskT_v02; -#define QMI_LOC_MASK_DELETE_CLOCK_INFO_TIME_EST_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000001) /**< Mask to delete time estimate from clock information */ -#define QMI_LOC_MASK_DELETE_CLOCK_INFO_FREQ_EST_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000002) /**< Mask to delete frequency estimate from clock information */ -#define QMI_LOC_MASK_DELETE_CLOCK_INFO_WEEK_NUMBER_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000004) /**< Mask to delete week number from clock information */ -#define QMI_LOC_MASK_DELETE_CLOCK_INFO_RTC_TIME_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000008) /**< Mask to delete RTC time from clock information */ -#define QMI_LOC_MASK_DELETE_CLOCK_INFO_TIME_TRANSFER_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000010) /**< Mask to delete time transfer from clock information */ -#define QMI_LOC_MASK_DELETE_CLOCK_INFO_GPSTIME_EST_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000020) /**< Mask to delete GPS time estimate from clock information */ -#define QMI_LOC_MASK_DELETE_CLOCK_INFO_GLOTIME_EST_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000040) /**< Mask to delete GLONASS time estimate from clock information */ -#define QMI_LOC_MASK_DELETE_CLOCK_INFO_GLODAY_NUMBER_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000080) /**< Mask to delete GLONASS day number from clock information */ -#define QMI_LOC_MASK_DELETE_CLOCK_INFO_GLO4YEAR_NUMBER_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000100) /**< Mask to delete GLONASS four year number from clock information */ -#define QMI_LOC_MASK_DELETE_CLOCK_INFO_GLO_RF_GRP_DELAY_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000200) /**< Mask to delete GLONASS RF GRP delay from clock information */ -#define QMI_LOC_MASK_DELETE_CLOCK_INFO_DISABLE_TT_V02 ((qmiLocDeleteClockInfoMaskT_v02)0x00000400) /**< Mask to delete disable TT from clock information */ -typedef uint8_t qmiLocDeleteSvInfoMaskT_v02; -#define QMI_LOC_MASK_DELETE_EPHEMERIS_V02 ((qmiLocDeleteSvInfoMaskT_v02)0x01) /**< Delete ephemeris for the satellite */ -#define QMI_LOC_MASK_DELETE_ALMANAC_V02 ((qmiLocDeleteSvInfoMaskT_v02)0x02) /**< Delete almanac for the satellite */ -/** @addtogroup loc_qmi_aggregates - @{ - */ -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 */ - - 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 - */ - - qmiLocDeleteSvInfoMaskT_v02 deleteSvInfoMask; - /**< Indicates if the ephemeris or almanac for a satellite - is to be deleted. \n - Valid values: \n - - 0x01 -- DELETE_EPHEMERIS \n - - 0x02 -- DELETE_ALMANAC - */ -}qmiLocDeleteSvInfoStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; This command is used to delete the location engine - assistance data */ -typedef struct { - - /* Mandatory */ - /* 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 - 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 */ - - /* 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. - */ - - /* Optional */ - /* Delete GNSS Data */ - 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 - */ - - /* 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 - */ - - /* 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 - */ -}qmiLocDeleteAssistDataReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; This command is used to delete the location engine - assistance data */ -typedef struct { - - /* Mandatory */ - /* Delete Assist Data Status */ - 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 - */ -}qmiLocDeleteAssistDataIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Enables/disables XTRA-T session control. */ -typedef struct { - - /* Mandatory */ - /* Enable XTRA-T */ - uint8_t xtraTSessionControl; - /**< Whether to enable XTRA-T:\n - - 0x01 (TRUE) -- Enable XTRA-T \n - - 0x00 (FALSE) -- Disable XTRA-T */ -}qmiLocSetXtraTSessionControlReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Enables/disables XTRA-T session control. */ -typedef struct { - - /* Mandatory */ - /* Set XTRA-T Session Control Status */ - 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 - */ -}qmiLocSetXtraTSessionControlIndMsgT_v02; /* Message */ -/** - @} - */ - -/* - * qmiLocGetXtraTSessionControlReqMsgT is empty - * typedef struct { - * }qmiLocGetXtraTSessionControlReqMsgT_v02; - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Gets the XTRA-T session control value from the location - engine. */ -typedef struct { - - /* Mandatory */ - /* Get XTRA-T Session Control Status */ - 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 - */ - - /* Optional */ - /* Enable/Disable XTRA-T */ - uint8_t xtraTSessionControl_valid; /**< Must be set to true if xtraTSessionControl is being passed */ - uint8_t xtraTSessionControl; - /**< Whether to enable XTRA-T:\n - - 0x01 (TRUE) -- Enable XTRA-T \n - - 0x00 (FALSE) -- Disable XTRA-T */ -}qmiLocGetXtraTSessionControlIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -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 */ -}qmiLocWifiFixTimeStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCWIFIFIXERRORCODEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_WIFI_FIX_ERROR_SUCCESS_V02 = 0, /**< WiFi fix is successful. */ - eQMI_LOC_WIFI_FIX_ERROR_WIFI_NOT_AVAILABLE_V02 = 1, /**< WiFi fix failed because WiFi is not available on the device. */ - eQMI_LOC_WIFI_FIX_ERROR_NO_AP_FOUND_V02 = 2, /**< WiFi fix failed because no access points were found. */ - eQMI_LOC_WIFI_FIX_ERROR_UNAUTHORIZED_V02 = 3, /**< WiFi fix failed because the server denied access due to bad authorization - code. */ - eQMI_LOC_WIFI_FIX_ERROR_SERVER_UNAVAILABLE_V02 = 4, /**< WiFi fix failed because the WiFi server was unavailable. */ - eQMI_LOC_WIFI_FIX_ERROR_LOCATION_CANNOT_BE_DETERMINED_V02 = 5, /**< WiFi fix failed even though APs were found and the server could be reached. - This may be because the APs found are not in the database. - WiFi fix failed, but the cause could not be determined. */ - eQMI_LOC_WIFI_FIX_ERROR_UNKNOWN_V02 = 6, - QMILOCWIFIFIXERRORCODEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocWifiFixErrorCodeEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -typedef struct { - - double lat; - /**< WiFi position latitude. \n - - Type: Floating point \n - - Units: Degrees */ - - double lon; - /**< WiFi position longitude. \n - - Type: Floating point \n - - Units: Degrees */ - - 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 */ - - qmiLocWifiFixErrorCodeEnumT_v02 fixErrorCode; - /**< WiFi position error code; set to 0 if the fix succeeds. This position - is only used by a module if the value is 0. If there was a failure, - 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 - */ -}qmiLocWifiFixPosStructT_v02; /* Type */ -/** - @} - */ - -typedef uint8_t qmiLocWifiApQualifierMaskT_v02; -#define QMI_LOC_WIFI_AP_QUALIFIER_BEING_USED_V02 ((qmiLocWifiApQualifierMaskT_v02)0x01) /**< Access point is being used by the WPS. */ -#define QMI_LOC_WIFI_AP_QUALIFIER_HIDDEN_SSID_V02 ((qmiLocWifiApQualifierMaskT_v02)0x02) /**< AP does not broadcast SSID. */ -#define QMI_LOC_WIFI_AP_QUALIFIER_PRIVATE_V02 ((qmiLocWifiApQualifierMaskT_v02)0x04) /**< AP has encryption turned on. */ -#define QMI_LOC_WIFI_AP_QUALIFIER_INFRASTRUCTURE_MODE_V02 ((qmiLocWifiApQualifierMaskT_v02)0x08) /**< AP is in infrastructure mode and not in ad-hoc/unknown mode. */ -/** @addtogroup loc_qmi_aggregates - @{ - */ -typedef struct { - - uint8_t macAddr[QMI_LOC_WIFI_MAC_ADDR_LENGTH_V02]; - /**< Associated MAC address of the AP. \n - - Type: Array of unsigned integers \n - - Address length: 6 - */ - - 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 */ - - qmiLocWifiApQualifierMaskT_v02 apQualifier; - /**< A bitmask of Boolean qualifiers for APs. - All unused bits in this mask must be set to 0. \n - Valid values: \n - - 0x01 -- BEING_USED \n - - 0x02 -- HIDDEN_SSID \n - - 0x04 -- PRIVATE \n - - 0x08 -- INFRASTRUCTURE_MODE - */ -}qmiLocWifiApInfoStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Injects the WiFi position. */ -typedef struct { - - /* Optional */ - /* WiFi Fix Time */ - uint8_t wifiFixTime_valid; /**< Must be set to true if wifiFixTime is being passed */ - qmiLocWifiFixTimeStructT_v02 wifiFixTime; - /**< \n Time of WiFi position fix. */ - - /* Optional */ - /* WiFi Position */ - uint8_t wifiFixPosition_valid; /**< Must be set to true if wifiFixPosition is being passed */ - qmiLocWifiFixPosStructT_v02 wifiFixPosition; - /**< \n WiFi position fix. */ - - /* Optional */ - /* WiFi Access Point Information */ - uint8_t apInfo_valid; /**< Must be set to true if apInfo is being passed */ - uint32_t apInfo_len; /**< Must be set to # of elements in apInfo */ - qmiLocWifiApInfoStructT_v02 apInfo[QMI_LOC_WIFI_MAX_REPORTED_APS_PER_MSG_V02]; - /**< \n AP scan list. */ - - /* Optional */ - /* Horizontal Reliability */ - uint8_t horizontalReliability_valid; /**< Must be set to true if horizontalReliability is being passed */ - 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 - */ -}qmiLocInjectWifiPositionReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Injects the WiFi position. */ -typedef struct { - - /* Mandatory */ - /* Inject WiFi Position Status */ - 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 - */ -}qmiLocInjectWifiPositionIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCWIFISTATUSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_WIFI_STATUS_AVAILABLE_V02 = 1, /**< WiFi is available. - WiFi is not available. */ - eQMI_LOC_WIFI_STATUS_UNAVAILABLE_V02 = 2, - QMILOCWIFISTATUSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocWifiStatusEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Notifies the location engine of the WiFi status. */ -typedef struct { - - /* Mandatory */ - /* Availablility of WiFi */ - qmiLocWifiStatusEnumT_v02 wifiStatus; - /**< WiFi status information. - - Valid values: \n - - 0x00000001 -- WIFI_STATUS_AVAILABLE \n - - 0x00000002 -- WIFI_STATUS_UNAVAILABLE - */ -}qmiLocNotifyWifiStatusReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Notifies the location engine of the WiFi status. */ -typedef struct { - - /* Mandatory */ - /* Status of Notify WiFi Status Request */ - 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 - */ -}qmiLocNotifyWifiStatusIndMsgT_v02; /* Message */ -/** - @} - */ - -/* - * qmiLocGetRegisteredEventsReqMsgT is empty - * typedef struct { - * }qmiLocGetRegisteredEventsReqMsgT_v02; - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Gets the mask of the events for which a client has - registered. */ -typedef struct { - - /* Mandatory */ - /* Get Registered Events Status */ - 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 - */ - - /* Optional */ - /* Event Registration Mask */ - uint8_t eventRegMask_valid; /**< Must be set to true if eventRegMask is being passed */ - 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 - */ -}qmiLocGetRegisteredEventsIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCOPERATIONMODEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_OPER_MODE_DEFAULT_V02 = 1, /**< Use the default engine mode. */ - eQMI_LOC_OPER_MODE_MSB_V02 = 2, /**< Use the MS-based mode. */ - eQMI_LOC_OPER_MODE_MSA_V02 = 3, /**< Use the MS-assisted mode. */ - eQMI_LOC_OPER_MODE_STANDALONE_V02 = 4, /**< Use Standalone mode. - Use cell ID. For 1x, this mode corresponds to - AFLT. */ - eQMI_LOC_OPER_MODE_CELL_ID_V02 = 5, - QMILOCOPERATIONMODEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocOperationModeEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Tells the engine to use the specified operation mode while - making the position fixes. This command is not to be used - by multiple clients concurrently. */ -typedef struct { - - /* Mandatory */ - /* Operation Mode */ - 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 - */ -}qmiLocSetOperationModeReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Tells the engine to use the specified operation mode while - making the position fixes. This command is not to be used - by multiple clients concurrently. */ -typedef struct { - - /* Mandatory */ - /* Set Operation Mode Status */ - 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 - */ -}qmiLocSetOperationModeIndMsgT_v02; /* Message */ -/** - @} - */ - -/* - * qmiLocGetOperationModeReqMsgT is empty - * typedef struct { - * }qmiLocGetOperationModeReqMsgT_v02; - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Gets the current operation mode from the engine. */ -typedef struct { - - /* Mandatory */ - /* Get Operation Mode Status */ - 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 - */ - - /* Optional */ - /* Operation Mode */ - uint8_t operationMode_valid; /**< Must be set to true if operationMode is being passed */ - 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 - */ -}qmiLocGetOperationModeIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Used by the control point to set the SPI status, which - indicates whether the device is stationary. */ -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 */ - - /* 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 */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Used by the control point to set the SPI status, which - indicates whether the device is stationary. */ -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 - */ -}qmiLocSetSpiStatusIndMsgT_v02; /* Message */ -/** - @} - */ - -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. */ -/** @addtogroup loc_qmi_aggregates - @{ - */ -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) ) */ - - float yAxis; - /**< Sensor y-axis sample. \n - - Type: Floating point \n - - Units Accelerometer: ( (meters)/(seconds^2) ) \n - - Units Gyrometer: ( (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) ) */ -}qmiLoc3AxisSensorSampleStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -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 - */ - - uint32_t sensorData_len; /**< Must be set to # of elements in sensorData */ - qmiLoc3AxisSensorSampleStructT_v02 sensorData[QMI_LOC_SENSOR_DATA_MAX_SAMPLES_V02]; - /**< Variable length array to specify sensor samples. \n - - Maximum length of the array: 50 */ -}qmiLoc3AxisSensorSampleListStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Used by the control point to inject sensor data into the - GNSS location engine. */ -typedef struct { - - /* Optional */ - /* Opaque Identifier */ - uint8_t opaqueIdentifier_valid; /**< Must be set to true if opaqueIdentifier is being passed */ - 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 */ - - /* Optional */ - /* 3-Axis Accelerometer Data */ - uint8_t threeAxisAccelData_valid; /**< Must be set to true if threeAxisAccelData is being passed */ - qmiLoc3AxisSensorSampleListStructT_v02 threeAxisAccelData; - /**< \n Accelerometer sensor samples. */ - - /* Optional */ - /* 3-Axis Gyrometer Data */ - uint8_t threeAxisGyroData_valid; /**< Must be set to true if threeAxisGyroData is being passed */ - qmiLoc3AxisSensorSampleListStructT_v02 threeAxisGyroData; - /**< \n Gyrometer sensor samples. */ -}qmiLocInjectSensorDataReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Used by the control point to inject sensor data into the - GNSS location engine. */ -typedef struct { - - /* Mandatory */ - /* Inject Sensor Data Status */ - 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 - */ - - /* 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 */ - - /* 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 - were accepted. */ - - /* Optional */ - /* Gyrometer 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 - accepted. */ -}qmiLocInjectSensorDataIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Used by the control point to inject time sync data. */ -typedef struct { - - /* Mandatory */ - /* 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 */ - - /* Mandatory */ - /* Sensor Receive Time */ - uint32_t sensorProcRxTime; - /**< 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 - 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 */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Used by the control point to inject time sync data. */ -typedef struct { - - /* Mandatory */ - /* Inject Time Sync Data Status */ - 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 - */ -}qmiLocInjectTimeSyncDataIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCCRADLEMOUNTSTATEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_CRADLE_STATE_NOT_MOUNTED_V02 = 0, /**< Device is mounted on the cradle */ - eQMI_LOC_CRADLE_STATE_MOUNTED_V02 = 1, /**< Device is not mounted on the cradle - Unknown cradle mount state */ - eQMI_LOC_CRADLE_STATE_UNKNOWN_V02 = 2, - QMILOCCRADLEMOUNTSTATEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocCradleMountStateEnumT_v02; -/** - @} - */ - -/* - * qmiLocGetCradleMountConfigReqMsgT is empty - * typedef struct { - * }qmiLocGetCradleMountConfigReqMsgT_v02; - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Used by the control point to get the current - cradle mount configuration. */ -typedef struct { - - /* Mandatory */ - /* Get Cradle Mount Config Status */ - 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 - */ - - /* Optional */ - /* Cradle Mount State */ - uint8_t cradleMountState_valid; /**< Must be set to true if cradleMountState is being passed */ - 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 - */ - - /* Optional */ - /* Cradle Mount Confidence */ - 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 */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Used by the control point to set the current - cradle mount configuration. */ -typedef struct { - - /* Mandatory */ - /* Cradle Mount State */ - 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 */ - - /* 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 */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Used by the control point to set the current - cradle mount configuration. */ -typedef struct { - - /* Mandatory */ - /* Set Cradle Mount Config Status */ - 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 - */ -}qmiLocSetCradleMountConfigIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCEXTERNALPOWERCONFIGENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_EXTERNAL_POWER_NOT_CONNECTED_V02 = 0, /**< Device is not connected to an external power source. */ - eQMI_LOC_EXTERNAL_POWER_CONNECTED_V02 = 1, /**< Device is connected to an external power source. - Unknown external power state. */ - eQMI_LOC_EXTERNAL_POWER_UNKNOWN_V02 = 2, - QMILOCEXTERNALPOWERCONFIGENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocExternalPowerConfigEnumT_v02; -/** - @} - */ - -/* - * qmiLocGetExternalPowerConfigReqMsgT is empty - * typedef struct { - * }qmiLocGetExternalPowerConfigReqMsgT_v02; - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Used by the control point to get the current - external power configuration. */ -typedef struct { - - /* Mandatory */ - /* Get Ext Power Config Status */ - 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 - */ - - /* Optional */ - /* External Power State */ - uint8_t externalPowerState_valid; /**< Must be set to true if externalPowerState is being passed */ - 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 - */ -}qmiLocGetExternalPowerConfigIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Used by the control point to set the current - external power configuration. */ -typedef struct { - - /* Mandatory */ - /* External Power State */ - 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 - */ -}qmiLocSetExternalPowerConfigReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Used by the control point to set the current - external power configuration. */ -typedef struct { - - /* Mandatory */ - /* Set Ext Power Config Status */ - 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 - */ -}qmiLocSetExternalPowerConfigIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCSERVERPDNENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_APN_PROFILE_PDN_TYPE_IPV4_V02 = 0x01, /**< IPV4 PDN type. */ - eQMI_LOC_APN_PROFILE_PDN_TYPE_IPV6_V02 = 0x02, /**< IPV6 PDN type. */ - eQMI_LOC_APN_PROFILE_PDN_TYPE_IPV4V6_V02 = 0x03, /**< IPV4V6 PDN type. - PPP PDN type. */ - eQMI_LOC_APN_PROFILE_PDN_TYPE_PPP_V02 = 0x04, - QMILOCSERVERPDNENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocServerPDNEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_aggregates - @{ - */ -typedef struct { - - qmiLocServerPDNEnumT_v02 pdnType; - /**< PDN type of the Access Point Name (APN) profile. - - Valid values: \n - - 0x00000001 -- PDN_TYPE_IPV4 \n - - 0x00000002 -- PDN_TYPE_IPV6 \n - - 0x00000003 -- PDN_TYPE_IPV4V6 \n - - 0x00000004 -- PDN_TYPE_PPP - */ - - 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 - */ -}qmiLocApnProfilesStructT_v02; /* Type */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCSERVERREQSTATUSENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_SERVER_REQ_STATUS_SUCCESS_V02 = 1, /**< Location server request was successful. - Location server request failed. */ - eQMI_LOC_SERVER_REQ_STATUS_FAILURE_V02 = 2, - QMILOCSERVERREQSTATUSENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocServerReqStatusEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Used by the control point to inform the service about the - status of the location server connection request that the - service may have sent via the - QMI_LOC_EVENT_LOCATION_SERVER_REQ_IND event. */ -typedef struct { - - /* Mandatory */ - /* Connection Handle */ - uint32_t connHandle; - /**< Connection handle that the service specified in the - Location Server Connection request event. \n - - Type: Unsigned integer */ - - /* Mandatory */ - /* Request Type */ - qmiLocServerRequestEnumT_v02 requestType; - /**< Type of connection request service that was specified in the - Location Server Connection Request event. - - Valid values: \n - - 0x00000001 -- OPEN \n - - 0x00000002 -- CLOSE - */ - - /* Mandatory */ - /* Connection Status */ - qmiLocServerReqStatusEnumT_v02 statusType; - /**< Status of the Connection request. - - Valid values: \n - - 0x00000001 -- STATUS_SUCCESS = 1 \n - - 0x00000002 -- STATUS_FAILURE = 2 - - */ - - /* Optional */ - /* APN Profile */ - uint8_t apnProfile_valid; /**< Must be set to true if apnProfile is being passed */ - qmiLocApnProfilesStructT_v02 apnProfile; - /**< \n APN profile information is present only when requestType - is OPEN and statusType is SUCCESS. */ -}qmiLocInformLocationServerConnStatusReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Used by the control point to inform the service about the - status of the location server connection request that the - service may have sent via the - QMI_LOC_EVENT_LOCATION_SERVER_REQ_IND event. */ -typedef struct { - - /* Mandatory */ - /* Status of Inform Loc Server Conn Status */ - 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 - */ -}qmiLocInformLocationServerConnStatusIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCVXVERSIONENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_VX_VERSION_V1_ONLY_V02 = 1, /**< V1 VX version. - V2 VX version. */ - eQMI_LOC_VX_VERSION_V2_ONLY_V02 = 2, - QMILOCVXVERSIONENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocVxVersionEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCSUPLVERSIONENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_SUPL_VERSION_1_0_V02 = 1, /**< SUPL version 1.0. - SUPL version 2.0. */ - eQMI_LOC_SUPL_VERSION_2_0_V02 = 2, - QMILOCSUPLVERSIONENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocSuplVersionEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Used by the control point to configure parameters stored - in the nonvolatile memory. */ -typedef struct { - - /* 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 */ - - /* Optional */ - /* VX Version */ - uint8_t vxVersion_valid; /**< Must be set to true if vxVersion is being passed */ - qmiLocVxVersionEnumT_v02 vxVersion; - /**< VX version. - - Valid values: \n - - 0x00000001 -- VX_VERSION_V1_ONLY \n - - 0x00000002 -- VX_VERSION_V2_ONLY - */ - - /* Optional */ - /* SUPL Version */ - uint8_t suplVersion_valid; /**< Must be set to true if suplVersion is being passed */ - qmiLocSuplVersionEnumT_v02 suplVersion; - /**< SUPL version. - - Valid values: \n - - 0x00000001 -- SUPL_VERSION_1_0 \n - - 0x00000002 -- SUPL_VERSION_2_0 - */ -}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. */ -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Used by the control point to configure parameters stored - in the nonvolatile memory. */ -typedef struct { - - /* Mandatory */ - /* Set Config Params Status */ - 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 - */ - - /* Optional */ - /* Failed Parameters */ - uint8_t failedProtocolConfigParamMask_valid; /**< Must be set to true if failedProtocolConfigParamMask is being passed */ - qmiLocProtocolConfigParamMaskT_v02 failedProtocolConfigParamMask; - /**< This field is sent only if the status is not a success. And if it is - 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 - */ -}qmiLocSetProtocolConfigParametersIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Used by the control point to get the configuration - parameters stored in the nonvolatile memory. */ -typedef struct { - - /* Mandatory */ - /* Config Parameters */ - 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 - */ -}qmiLocGetProtocolConfigParametersReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Used by the control point to get the configuration - parameters stored in the nonvolatile memory. */ -typedef struct { - - /* Mandatory */ - /* Get Config Params Status */ - 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 - */ - - /* 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 */ - - /* Optional */ - /* VX Version */ - uint8_t vxVersion_valid; /**< Must be set to true if vxVersion is being passed */ - qmiLocVxVersionEnumT_v02 vxVersion; - /**< VX version. - - Valid values: \n - - 0x00000001 -- VX_VERSION_V1_ONLY \n - - 0x00000002 -- VX_VERSION_V2_ONLY - */ - - /* Optional */ - /* SUPL Version */ - uint8_t suplVersion_valid; /**< Must be set to true if suplVersion is being passed */ - qmiLocSuplVersionEnumT_v02 suplVersion; - /**< SUPL version. - - Valid values: \n - - 0x00000001 -- SUPL_VERSION_1_0 \n - - 0x00000002 -- SUPL_VERSION_2_0 - */ -}qmiLocGetProtocolConfigParametersIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCSENSORSCONTROLCONFIGSENSORUSEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_SENSOR_CONFIG_SENSOR_USE_ENABLE_V02 = 0, /**< Sensors data should be requested whenever a position request is - received. If sensor data are injected, the positioning engine - attempts to improve the heading and positioning performance using sensors. - This is the default. - - Inertial sensors are not to be used to aid heading and position - improvement. */ - eQMI_LOC_SENSOR_CONFIG_SENSOR_USE_DISABLE_V02 = 1, - QMILOCSENSORSCONTROLCONFIGSENSORUSEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocSensorsControlConfigSensorUseEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Sets the sensor control configuration. */ -typedef struct { - - /* Optional */ - /* Sensors Usage */ - uint8_t sensorsUsage_valid; /**< Must be set to true if sensorsUsage is being passed */ - qmiLocSensorsControlConfigSensorUseEnumT_v02 sensorsUsage; - /**< 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. - */ -}qmiLocSetSensorControlConfigReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Sets the sensor control configuration. */ -typedef struct { - - /* Mandatory */ - /* Set Sensor Control Config Status */ - 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 - */ -}qmiLocSetSensorControlConfigIndMsgT_v02; /* Message */ -/** - @} - */ - -/* - * qmiLocGetSensorControlConfigReqMsgT is empty - * typedef struct { - * }qmiLocGetSensorControlConfigReqMsgT_v02; - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Retrieves the current sensor control configuration. */ -typedef struct { - - /* Mandatory */ - /* Get Sensor Control Config Status */ - 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 - */ - - /* Optional */ - /* Sensors Usage */ - uint8_t sensorsUsage_valid; /**< Must be set to true if sensorsUsage is being passed */ - qmiLocSensorsControlConfigSensorUseEnumT_v02 sensorsUsage; - /**< 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. - */ -}qmiLocGetSensorControlConfigIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Sets the properties specific to the type of sensor used. - The control point must set sensor properties before they can be - used to aid in heading and positioning performance improvement. - */ -typedef struct { - - /* Optional */ - /* Gyro Bias 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. - 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 - - */ -}qmiLocSetSensorPropertiesReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Sets the properties specific to the type of sensor used. - The control point must set sensor properties before they can be - used to aid in heading and positioning performance improvement. - */ -typedef struct { - - /* Mandatory */ - /* Set Sensor Properties Status */ - 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 - */ -}qmiLocSetSensorPropertiesIndMsgT_v02; /* Message */ -/** - @} - */ - -/* - * qmiLocGetSensorPropertiesReqMsgT is empty - * typedef struct { - * }qmiLocGetSensorPropertiesReqMsgT_v02; - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Retrieves the current sensor properties. */ -typedef struct { - - /* Mandatory */ - /* Get Sensor Properties Status */ - 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 - */ - - /* Optional */ - /* Gyro Bias 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. - 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 - - */ -}qmiLocGetSensorPropertiesIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_enums - @{ - */ -typedef enum { - QMILOCSENSORPERFORMANCECONTROLMODEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ - eQMI_LOC_SENSOR_PERFORMANCE_CONTROL_MODE_AUTO_V02 = 0, /**< Sensors usage is to be determined by the GNSS location engine. - This mode can optimize power consumption and give a - power-balanced positioning and heading enhancement using - inertial sensors - Sensors usage is to be forced ON. - This mode can be requested by the control point when - power consumption is not a restriction to the use of - inertial sensors. */ - eQMI_LOC_SENSOR_PERFORMANCE_CONTROL_MODE_FORCED_V02 = 1, - QMILOCSENSORPERFORMANCECONTROLMODEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ -}qmiLocSensorPerformanceControlModeEnumT_v02; -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Provides fine-grained control of sensor based positioning - performance */ -typedef struct { - - /* Optional */ - /* Sensor Performance Control Mode */ - uint8_t performanceControlMode_valid; /**< Must be set to true if performanceControlMode is being passed */ - qmiLocSensorPerformanceControlModeEnumT_v02 performanceControlMode; - /**< Controls when sensors data is requested during GNSS fix processing. - 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. - */ - - /* Optional */ - /* Accelerometer Sampling Specification */ - uint8_t accelSamplingSpec_valid; /**< Must be set to true if accelSamplingSpec is being passed */ - qmiLocSensorControlConfigSamplingSpecStructT_v02 accelSamplingSpec; - /**< \n Sets the nominal rate at which the GNSS location engine is to request - acceleration data. The sensor data rate is specified in terms of the nominal - number of samples per batch and the number of batches per second. - However, the final control of the actual requested rate resides with - the Sensors Manager Module/GNSS location engine. - */ - - /* Optional */ - /* Gyrometer 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 - gyro data. The sensor data rate is specified in terms of the nominal number of - samples per batch and the number of batches per second. - However, the final control of the actual requested rate resides with - the Sensors Manager Module/GNSS location engine. - */ -}qmiLocSetSensorPerformanceControlConfigReqMsgT_v02; /* Message */ -/** - @} - */ - -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. */ -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Provides fine-grained control of sensor based positioning - performance */ -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 - */ - - /* Optional */ - /* Failed Configuration */ - 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 - */ -}qmiLocSetSensorPerformanceControlConfigIndMsgT_v02; /* Message */ -/** - @} - */ - -/* - * qmiLocGetSensorPerformanceControlConfigReqMsgT is empty - * typedef struct { - * }qmiLocGetSensorPerformanceControlConfigReqMsgT_v02; - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Retrieves the current sensor performance control - configuration. */ -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 - */ - - /* Optional */ - /* Performance Control Mode */ - uint8_t performanceControlMode_valid; /**< Must be set to true if performanceControlMode is being passed */ - qmiLocSensorPerformanceControlModeEnumT_v02 performanceControlMode; - /**< Controls when sensor data is requested during GNSS fix processing. - 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. - */ - - /* Optional */ - /* Accelerometer Sampling Specification */ - uint8_t accelSamplingSpec_valid; /**< Must be set to true if accelSamplingSpec is being passed */ - qmiLocSensorControlConfigSamplingSpecStructT_v02 accelSamplingSpec; - /**< \n Sets the nominal rate at which the GNSS location engine is to request - acceleration data. The sensor data rate is specified in terms of the nominal number of - samples per batch and the number of batches per second. - However, the final control of the actual requested rate resides with - the Sensors Manager Module/GNSS location engine. - */ - - /* Optional */ - /* Gyrometer 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 - gyro data. The sensor data rate is specified in terms of the nominal number of - samples per batch and the number of batches per second. - However, the final control of the actual requested rate resides with - the Sensors Manager Module/GNSS location engine. - */ -}qmiLocGetSensorPerformanceControlConfigIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Inject a SUPL certificate to be used in AGNSS sessions. */ -typedef struct { - - /* Mandatory */ - /* SUPL Certificate Id */ - uint8_t suplCertId; - /**< Certificate Id of the Supl Certificate - Type: Unsigned Integer - Units: Bytes - Range: 0-9 */ - - /* Mandatory */ - /* 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 */ -}qmiLocInjectSuplCertificateReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Inject a SUPL certificate to be used in AGNSS sessions. */ -typedef struct { - - /* Mandatory */ - /* Supl Certificate Injection Status */ - qmiLocStatusEnumT_v02 status; - /**< Status of the inject SUPL certificate request. \n - - 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 - */ -}qmiLocInjectSuplCertificateIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Delete a SUPL certificate. */ -typedef struct { - - /* Optional */ - /* 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. */ -}qmiLocDeleteSuplCertificateReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Delete a SUPL certificate. */ -typedef struct { - - /* Mandatory */ - /* SUPL certifcate Deletion Status */ - qmiLocStatusEnumT_v02 status; - /**< Status of the delete SUPL certificate request. \n - - 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 - */ -}qmiLocDeleteSuplCertificateIndMsgT_v02; /* Message */ -/** - @} - */ - -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 - 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. */ -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Used by the control point to configure position engine - functionality. */ -typedef struct { - - /* Optional */ - /* 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. - */ - - /* 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. - */ - - /* 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. - */ -}qmiLocSetPositionEngineConfigParametersReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Used by the control point to configure position engine - functionality. */ -typedef struct { - - /* Mandatory */ - /* Set Position Engine Configuration Status */ - 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 - */ - - /* 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. - - Valid bitmasks: \n - - 0x00000001 -- INJECTED_POSITION_CONTROL \n - - 0x00000002 -- FILTER_SV_USAGE \n - - 0x00000004 -- STORE_ASSIST_DATA - */ -}qmiLocSetPositionEngineConfigParametersIndMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Request Message; Used by the control point to get the position engine - configuration parameters. */ -typedef struct { - - /* Mandatory */ - /* 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 - */ -}qmiLocGetPositionEngineConfigParametersReqMsgT_v02; /* Message */ -/** - @} - */ - -/** @addtogroup loc_qmi_messages - @{ - */ -/** Indication Message; Used by the control point to get the position engine - configuration parameters. */ -typedef struct { - - /* Mandatory */ - /* Get Position Engine Configuration Status */ - 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 - */ - - /* 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. - */ - - /* 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. - */ - - /* 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. - */ -}qmiLocGetPositionEngineConfigParametersIndMsgT_v02; /* Message */ -/** - @} - */ - -/*Service Message Definition*/ -/** @addtogroup loc_qmi_msg_ids - @{ - */ -#define QMI_LOC_INFORM_CLIENT_REVISION_REQ_V02 0x0020 -#define QMI_LOC_INFORM_CLIENT_REVISION_RESP_V02 0x0020 -#define QMI_LOC_REG_EVENTS_REQ_V02 0x0021 -#define QMI_LOC_REG_EVENTS_RESP_V02 0x0021 -#define QMI_LOC_START_REQ_V02 0x0022 -#define QMI_LOC_START_RESP_V02 0x0022 -#define QMI_LOC_STOP_REQ_V02 0x0023 -#define QMI_LOC_STOP_RESP_V02 0x0023 -#define QMI_LOC_EVENT_POSITION_REPORT_IND_V02 0x0024 -#define QMI_LOC_EVENT_GNSS_SV_INFO_IND_V02 0x0025 -#define QMI_LOC_EVENT_NMEA_IND_V02 0x0026 -#define QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_IND_V02 0x0027 -#define QMI_LOC_EVENT_INJECT_TIME_REQ_IND_V02 0x0028 -#define QMI_LOC_EVENT_INJECT_PREDICTED_ORBITS_REQ_IND_V02 0x0029 -#define QMI_LOC_EVENT_INJECT_POSITION_REQ_IND_V02 0x002A -#define QMI_LOC_EVENT_ENGINE_STATE_IND_V02 0x002B -#define QMI_LOC_EVENT_FIX_SESSION_STATE_IND_V02 0x002C -#define QMI_LOC_EVENT_WIFI_REQ_IND_V02 0x002D -#define QMI_LOC_EVENT_SENSOR_STREAMING_READY_STATUS_IND_V02 0x002E -#define QMI_LOC_EVENT_TIME_SYNC_REQ_IND_V02 0x002F -#define QMI_LOC_EVENT_SET_SPI_STREAMING_REPORT_IND_V02 0x0030 -#define QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02 0x0031 -#define QMI_LOC_GET_SERVICE_REVISION_REQ_V02 0x0032 -#define QMI_LOC_GET_SERVICE_REVISION_RESP_V02 0x0032 -#define QMI_LOC_GET_SERVICE_REVISION_IND_V02 0x0032 -#define QMI_LOC_GET_FIX_CRITERIA_REQ_V02 0x0033 -#define QMI_LOC_GET_FIX_CRITERIA_RESP_V02 0x0033 -#define QMI_LOC_GET_FIX_CRITERIA_IND_V02 0x0033 -#define QMI_LOC_NI_USER_RESPONSE_REQ_V02 0x0034 -#define QMI_LOC_NI_USER_RESPONSE_RESP_V02 0x0034 -#define QMI_LOC_NI_USER_RESPONSE_IND_V02 0x0034 -#define QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02 0x0035 -#define QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_RESP_V02 0x0035 -#define QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_IND_V02 0x0035 -#define QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_REQ_V02 0x0036 -#define QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_RESP_V02 0x0036 -#define QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_IND_V02 0x0036 -#define QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_REQ_V02 0x0037 -#define QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_RESP_V02 0x0037 -#define QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_IND_V02 0x0037 -#define QMI_LOC_INJECT_UTC_TIME_REQ_V02 0x0038 -#define QMI_LOC_INJECT_UTC_TIME_RESP_V02 0x0038 -#define QMI_LOC_INJECT_UTC_TIME_IND_V02 0x0038 -#define QMI_LOC_INJECT_POSITION_REQ_V02 0x0039 -#define QMI_LOC_INJECT_POSITION_RESP_V02 0x0039 -#define QMI_LOC_INJECT_POSITION_IND_V02 0x0039 -#define QMI_LOC_SET_ENGINE_LOCK_REQ_V02 0x003A -#define QMI_LOC_SET_ENGINE_LOCK_RESP_V02 0x003A -#define QMI_LOC_SET_ENGINE_LOCK_IND_V02 0x003A -#define QMI_LOC_GET_ENGINE_LOCK_REQ_V02 0x003B -#define QMI_LOC_GET_ENGINE_LOCK_RESP_V02 0x003B -#define QMI_LOC_GET_ENGINE_LOCK_IND_V02 0x003B -#define QMI_LOC_SET_SBAS_CONFIG_REQ_V02 0x003C -#define QMI_LOC_SET_SBAS_CONFIG_RESP_V02 0x003C -#define QMI_LOC_SET_SBAS_CONFIG_IND_V02 0x003C -#define QMI_LOC_GET_SBAS_CONFIG_REQ_V02 0x003D -#define QMI_LOC_GET_SBAS_CONFIG_RESP_V02 0x003D -#define QMI_LOC_GET_SBAS_CONFIG_IND_V02 0x003D -#define QMI_LOC_SET_NMEA_TYPES_REQ_V02 0x003E -#define QMI_LOC_SET_NMEA_TYPES_RESP_V02 0x003E -#define QMI_LOC_SET_NMEA_TYPES_IND_V02 0x003E -#define QMI_LOC_GET_NMEA_TYPES_REQ_V02 0x003F -#define QMI_LOC_GET_NMEA_TYPES_RESP_V02 0x003F -#define QMI_LOC_GET_NMEA_TYPES_IND_V02 0x003F -#define QMI_LOC_SET_LOW_POWER_MODE_REQ_V02 0x0040 -#define QMI_LOC_SET_LOW_POWER_MODE_RESP_V02 0x0040 -#define QMI_LOC_SET_LOW_POWER_MODE_IND_V02 0x0040 -#define QMI_LOC_GET_LOW_POWER_MODE_REQ_V02 0x0041 -#define QMI_LOC_GET_LOW_POWER_MODE_RESP_V02 0x0041 -#define QMI_LOC_GET_LOW_POWER_MODE_IND_V02 0x0041 -#define QMI_LOC_SET_SERVER_REQ_V02 0x0042 -#define QMI_LOC_SET_SERVER_RESP_V02 0x0042 -#define QMI_LOC_SET_SERVER_IND_V02 0x0042 -#define QMI_LOC_GET_SERVER_REQ_V02 0x0043 -#define QMI_LOC_GET_SERVER_RESP_V02 0x0043 -#define QMI_LOC_GET_SERVER_IND_V02 0x0043 -#define QMI_LOC_DELETE_ASSIST_DATA_REQ_V02 0x0044 -#define QMI_LOC_DELETE_ASSIST_DATA_RESP_V02 0x0044 -#define QMI_LOC_DELETE_ASSIST_DATA_IND_V02 0x0044 -#define QMI_LOC_SET_XTRA_T_SESSION_CONTROL_REQ_V02 0x0045 -#define QMI_LOC_SET_XTRA_T_SESSION_CONTROL_RESP_V02 0x0045 -#define QMI_LOC_SET_XTRA_T_SESSION_CONTROL_IND_V02 0x0045 -#define QMI_LOC_GET_XTRA_T_SESSION_CONTROL_REQ_V02 0x0046 -#define QMI_LOC_GET_XTRA_T_SESSION_CONTROL_RESP_V02 0x0046 -#define QMI_LOC_GET_XTRA_T_SESSION_CONTROL_IND_V02 0x0046 -#define QMI_LOC_INJECT_WIFI_POSITION_REQ_V02 0x0047 -#define QMI_LOC_INJECT_WIFI_POSITION_RESP_V02 0x0047 -#define QMI_LOC_INJECT_WIFI_POSITION_IND_V02 0x0047 -#define QMI_LOC_NOTIFY_WIFI_STATUS_REQ_V02 0x0048 -#define QMI_LOC_NOTIFY_WIFI_STATUS_RESP_V02 0x0048 -#define QMI_LOC_NOTIFY_WIFI_STATUS_IND_V02 0x0048 -#define QMI_LOC_GET_REGISTERED_EVENTS_REQ_V02 0x0049 -#define QMI_LOC_GET_REGISTERED_EVENTS_RESP_V02 0x0049 -#define QMI_LOC_GET_REGISTERED_EVENTS_IND_V02 0x0049 -#define QMI_LOC_SET_OPERATION_MODE_REQ_V02 0x004A -#define QMI_LOC_SET_OPERATION_MODE_RESP_V02 0x004A -#define QMI_LOC_SET_OPERATION_MODE_IND_V02 0x004A -#define QMI_LOC_GET_OPERATION_MODE_REQ_V02 0x004B -#define QMI_LOC_GET_OPERATION_MODE_RESP_V02 0x004B -#define QMI_LOC_GET_OPERATION_MODE_IND_V02 0x004B -#define QMI_LOC_SET_SPI_STATUS_REQ_V02 0x004C -#define QMI_LOC_SET_SPI_STATUS_RESP_V02 0x004C -#define QMI_LOC_SET_SPI_STATUS_IND_V02 0x004C -#define QMI_LOC_INJECT_SENSOR_DATA_REQ_V02 0x004D -#define QMI_LOC_INJECT_SENSOR_DATA_RESP_V02 0x004D -#define QMI_LOC_INJECT_SENSOR_DATA_IND_V02 0x004D -#define QMI_LOC_INJECT_TIME_SYNC_DATA_REQ_V02 0x004E -#define QMI_LOC_INJECT_TIME_SYNC_DATA_RESP_V02 0x004E -#define QMI_LOC_INJECT_TIME_SYNC_DATA_IND_V02 0x004E -#define QMI_LOC_SET_CRADLE_MOUNT_CONFIG_REQ_V02 0x004F -#define QMI_LOC_SET_CRADLE_MOUNT_CONFIG_RESP_V02 0x004F -#define QMI_LOC_SET_CRADLE_MOUNT_CONFIG_IND_V02 0x004F -#define QMI_LOC_GET_CRADLE_MOUNT_CONFIG_REQ_V02 0x0050 -#define QMI_LOC_GET_CRADLE_MOUNT_CONFIG_RESP_V02 0x0050 -#define QMI_LOC_GET_CRADLE_MOUNT_CONFIG_IND_V02 0x0050 -#define QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02 0x0051 -#define QMI_LOC_SET_EXTERNAL_POWER_CONFIG_RESP_V02 0x0051 -#define QMI_LOC_SET_EXTERNAL_POWER_CONFIG_IND_V02 0x0051 -#define QMI_LOC_GET_EXTERNAL_POWER_CONFIG_REQ_V02 0x0052 -#define QMI_LOC_GET_EXTERNAL_POWER_CONFIG_RESP_V02 0x0052 -#define QMI_LOC_GET_EXTERNAL_POWER_CONFIG_IND_V02 0x0052 -#define QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02 0x0053 -#define QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_RESP_V02 0x0053 -#define QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02 0x0053 -#define QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02 0x0054 -#define QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_RESP_V02 0x0054 -#define QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02 0x0054 -#define QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02 0x0055 -#define QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_RESP_V02 0x0055 -#define QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02 0x0055 -#define QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02 0x0056 -#define QMI_LOC_SET_SENSOR_CONTROL_CONFIG_RESP_V02 0x0056 -#define QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02 0x0056 -#define QMI_LOC_GET_SENSOR_CONTROL_CONFIG_REQ_V02 0x0057 -#define QMI_LOC_GET_SENSOR_CONTROL_CONFIG_RESP_V02 0x0057 -#define QMI_LOC_GET_SENSOR_CONTROL_CONFIG_IND_V02 0x0057 -#define QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02 0x0058 -#define QMI_LOC_SET_SENSOR_PROPERTIES_RESP_V02 0x0058 -#define QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02 0x0058 -#define QMI_LOC_GET_SENSOR_PROPERTIES_REQ_V02 0x0059 -#define QMI_LOC_GET_SENSOR_PROPERTIES_RESP_V02 0x0059 -#define QMI_LOC_GET_SENSOR_PROPERTIES_IND_V02 0x0059 -#define QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02 0x005A -#define QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_RESP_V02 0x005A -#define QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02 0x005A -#define QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02 0x005B -#define QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_RESP_V02 0x005B -#define QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02 0x005B -#define QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02 0x005C -#define QMI_LOC_INJECT_SUPL_CERTIFICATE_RESP_V02 0x005C -#define QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02 0x005C -#define QMI_LOC_DELETE_SUPL_CERTIFICATE_REQ_V02 0x005D -#define QMI_LOC_DELETE_SUPL_CERTIFICATE_RESP_V02 0x005D -#define QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02 0x005D -#define QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02 0x005E -#define QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_RESP_V02 0x005E -#define QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02 0x005E -#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 -/** - @} - */ - -/* Service Object Accessor */ -/** @addtogroup wms_qmi_accessor - @{ - */ -/** This function is used internally by the autogenerated code. Clients should use the - macro loc_get_service_object_v02( ) that takes in no arguments. */ -qmi_idl_service_object_type loc_get_service_object_internal_v02 - ( int32_t idl_maj_version, int32_t idl_min_version, int32_t library_version ); - -/** This macro should be used to get the service object */ -#define loc_get_service_object_v02( ) \ - loc_get_service_object_internal_v02( \ - LOC_V02_IDL_MAJOR_VERS, LOC_V02_IDL_MINOR_VERS, \ - LOC_V02_IDL_TOOL_VERS ) -/** - @} - */ - - -#ifdef __cplusplus -} -#endif -#endif -