diff --git a/loc_api/libloc_api_50001/LocApiAdapter.h b/loc_api/libloc_api_50001/LocApiAdapter.h index 1c5e02b2..57d0eae0 100644 --- a/loc_api/libloc_api_50001/LocApiAdapter.h +++ b/loc_api/libloc_api_50001/LocApiAdapter.h @@ -203,7 +203,9 @@ public: {LOC_LOGW("%s: default implementation invoked", __func__); return LOC_API_ADAPTER_ERR_SUCCESS;} inline virtual enum loc_api_adapter_err setSensorPerfControlConfig(int controlMode, int accelSamplesPerBatch, int accelBatchesPerSec, - int gyroSamplesPerBatch, int gyroBatchesPerSec, int algorithmConfig) + int gyroSamplesPerBatch, int gyroBatchesPerSec, + int accelSamplesPerBatchHigh, int accelBatchesPerSecHigh, + int gyroSamplesPerBatchHigh, int gyroBatchesPerSecHigh, int algorithmConfig) {LOC_LOGW("%s: default implementation invoked", __func__); return LOC_API_ADAPTER_ERR_SUCCESS;} inline virtual enum loc_api_adapter_err setExtPowerConfig(int isBatteryCharging) diff --git a/loc_api/libloc_api_50001/loc_eng.cpp b/loc_api/libloc_api_50001/loc_eng.cpp index 9958ca56..821d9624 100644 --- a/loc_api/libloc_api_50001/loc_eng.cpp +++ b/loc_api/libloc_api_50001/loc_eng.cpp @@ -94,8 +94,13 @@ static loc_param_s_type loc_parameter_table[] = {"SENSOR_ACCEL_SAMPLES_PER_BATCH", &gps_conf.SENSOR_ACCEL_SAMPLES_PER_BATCH, NULL, 'n'}, {"SENSOR_GYRO_BATCHES_PER_SEC", &gps_conf.SENSOR_GYRO_BATCHES_PER_SEC, NULL, 'n'}, {"SENSOR_GYRO_SAMPLES_PER_BATCH", &gps_conf.SENSOR_GYRO_SAMPLES_PER_BATCH, NULL, 'n'}, + {"SENSOR_ACCEL_BATCHES_PER_SEC_HIGH", &gps_conf.SENSOR_ACCEL_BATCHES_PER_SEC_HIGH, NULL, 'n'}, + {"SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH", &gps_conf.SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH, NULL, 'n'}, + {"SENSOR_GYRO_BATCHES_PER_SEC_HIGH", &gps_conf.SENSOR_GYRO_BATCHES_PER_SEC_HIGH, NULL, 'n'}, + {"SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH", &gps_conf.SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH, NULL, 'n'}, {"SENSOR_CONTROL_MODE", &gps_conf.SENSOR_CONTROL_MODE, NULL, 'n'}, {"SENSOR_USAGE", &gps_conf.SENSOR_USAGE, NULL, 'n'}, + {"SENSOR_ALGORITHM_CONFIG_MASK", &gps_conf.SENSOR_ALGORITHM_CONFIG_MASK, NULL, 'n'}, {"QUIPC_ENABLED", &gps_conf.QUIPC_ENABLED, NULL, 'n'}, {"LPP_PROFILE", &gps_conf.LPP_PROFILE, NULL, 'n'}, }; @@ -114,6 +119,10 @@ static void loc_default_parameters(void) gps_conf.SENSOR_ACCEL_SAMPLES_PER_BATCH = 5; gps_conf.SENSOR_GYRO_BATCHES_PER_SEC = 2; gps_conf.SENSOR_GYRO_SAMPLES_PER_BATCH = 5; + gps_conf.SENSOR_ACCEL_BATCHES_PER_SEC_HIGH = 4; + gps_conf.SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH = 25; + gps_conf.SENSOR_GYRO_BATCHES_PER_SEC_HIGH = 4; + gps_conf.SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH = 25; gps_conf.SENSOR_CONTROL_MODE = 0; /* AUTO */ gps_conf.SENSOR_USAGE = 0; /* Enabled */ gps_conf.SENSOR_ALGORITHM_CONFIG_MASK = 0; /* INS Disabled = FALSE*/ @@ -374,6 +383,10 @@ static int loc_eng_reinit(loc_eng_data_s_type &loc_eng_data) gps_conf.SENSOR_ACCEL_BATCHES_PER_SEC, gps_conf.SENSOR_GYRO_SAMPLES_PER_BATCH, gps_conf.SENSOR_GYRO_BATCHES_PER_SEC, + gps_conf.SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH, + gps_conf.SENSOR_ACCEL_BATCHES_PER_SEC_HIGH, + gps_conf.SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH, + gps_conf.SENSOR_GYRO_BATCHES_PER_SEC_HIGH, gps_conf.SENSOR_ALGORITHM_CONFIG_MASK)); msg_q_snd((void*)((LocEngContext*)(loc_eng_data.context))->deferred_q, sensor_perf_control_conf_msg, loc_eng_free_msg); @@ -1444,7 +1457,10 @@ static void loc_eng_deferred_action_thread(void* arg) { loc_eng_msg_sensor_perf_control_config *spccMsg = (loc_eng_msg_sensor_perf_control_config*)msg; loc_eng_data_p->client_handle->setSensorPerfControlConfig(spccMsg->controlMode, spccMsg->accelSamplesPerBatch, spccMsg->accelBatchesPerSec, - spccMsg->gyroSamplesPerBatch, spccMsg->gyroBatchesPerSec, spccMsg->algorithmConfig); + spccMsg->gyroSamplesPerBatch, spccMsg->gyroBatchesPerSec, + spccMsg->accelSamplesPerBatchHigh, spccMsg->accelBatchesPerSecHigh, + spccMsg->gyroSamplesPerBatchHigh, spccMsg->gyroBatchesPerSecHigh, + spccMsg->algorithmConfig); } break; @@ -1498,6 +1514,15 @@ static void loc_eng_deferred_action_thread(void* arg) // turn off the session flag. loc_eng_data_p->client_handle->setInSession(false); } + + // Free the allocated memory for rawData + GpsLocation* gp = (GpsLocation*)&(rpMsg->location); + if (gp != NULL && gp->rawData != NULL) + { + delete (char*)gp->rawData; + gp->rawData = NULL; + gp->rawDataSize = 0; + } } break; @@ -1852,6 +1877,19 @@ bool loc_eng_inject_raw_command(loc_eng_data_s_type &loc_eng_data, LOC_LOGD("loc_eng_send_extra_command: %s\n", command); ret_val = TRUE; + if((loc_eng_data.ulp_initialized == true) && (gps_conf.CAPABILITIES & ULP_CAPABILITY)) + { + ulp_msg_inject_raw_command *msg( + new ulp_msg_inject_raw_command(&loc_eng_data,command, length)); + msg_q_snd( (void*)((LocEngContext*)(loc_eng_data.context))->ulp_q + , msg, loc_eng_free_msg); + ret_val = 0; + }else + { + ret_val = -1; + } + + EXIT_LOG(%s, loc_logger_boolStr[ret_val!=0]); return ret_val; } diff --git a/loc_api/libloc_api_50001/loc_eng.h b/loc_api/libloc_api_50001/loc_eng.h index e1cf95cc..a14f5bd1 100644 --- a/loc_api/libloc_api_50001/loc_eng.h +++ b/loc_api/libloc_api_50001/loc_eng.h @@ -157,6 +157,10 @@ typedef struct loc_gps_cfg_s unsigned long SENSOR_ACCEL_SAMPLES_PER_BATCH; unsigned long SENSOR_GYRO_BATCHES_PER_SEC; unsigned long SENSOR_GYRO_SAMPLES_PER_BATCH; + unsigned long SENSOR_ACCEL_BATCHES_PER_SEC_HIGH; + unsigned long SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH; + unsigned long SENSOR_GYRO_BATCHES_PER_SEC_HIGH; + unsigned long SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH; unsigned long SENSOR_CONTROL_MODE; unsigned long SENSOR_USAGE; unsigned long QUIPC_ENABLED; diff --git a/loc_api/libloc_api_50001/loc_eng_msg.h b/loc_api/libloc_api_50001/loc_eng_msg.h index 4a1cae63..adc138fe 100644 --- a/loc_api/libloc_api_50001/loc_eng_msg.h +++ b/loc_api/libloc_api_50001/loc_eng_msg.h @@ -223,10 +223,16 @@ struct loc_eng_msg_sensor_perf_control_config : public loc_eng_msg { const int accelBatchesPerSec; const int gyroSamplesPerBatch; const int gyroBatchesPerSec; + const int accelSamplesPerBatchHigh; + const int accelBatchesPerSecHigh; + const int gyroSamplesPerBatchHigh; + const int gyroBatchesPerSecHigh; const int algorithmConfig; inline loc_eng_msg_sensor_perf_control_config(void* instance, int controlMode, int accelSamplesPerBatch, int accelBatchesPerSec, int gyroSamplesPerBatch, int gyroBatchesPerSec, + int accelSamplesPerBatchHigh, int accelBatchesPerSecHigh, + int gyroSamplesPerBatchHigh, int gyroBatchesPerSecHigh, int algorithmConfig) : loc_eng_msg(instance, LOC_ENG_MSG_SET_SENSOR_PERF_CONTROL_CONFIG), controlMode(controlMode), @@ -234,15 +240,25 @@ struct loc_eng_msg_sensor_perf_control_config : public loc_eng_msg { accelBatchesPerSec(accelBatchesPerSec), gyroSamplesPerBatch(gyroSamplesPerBatch), gyroBatchesPerSec(gyroBatchesPerSec), + accelSamplesPerBatchHigh(accelSamplesPerBatchHigh), + accelBatchesPerSecHigh(accelBatchesPerSecHigh), + gyroSamplesPerBatchHigh(gyroSamplesPerBatchHigh), + gyroBatchesPerSecHigh(gyroBatchesPerSecHigh), algorithmConfig(algorithmConfig) { LOC_LOGV("Sensor Perf Control Config (performanceControlMode)(%u) " - "accel(#smp,#batches) (%u,%u) gyro(#smp,#batches) (%u,%u), algorithmConfig(%u)\n", + "accel(#smp,#batches) (%u,%u) gyro(#smp,#batches) (%u,%u), " + "accel_high(#smp,#batches) (%u,%u) gyro_high(#smp,#batches) (%u,%u), " + "algorithmConfig(%u)\n", controlMode, accelSamplesPerBatch, accelBatchesPerSec, gyroSamplesPerBatch, gyroBatchesPerSec, + accelSamplesPerBatchHigh, + accelBatchesPerSecHigh, + gyroSamplesPerBatchHigh, + gyroBatchesPerSecHigh, algorithmConfig ); } @@ -749,6 +765,26 @@ struct ulp_msg_update_criteria : public loc_eng_msg { } }; +struct ulp_msg_inject_raw_command : public loc_eng_msg { + const char* rawCommand; + const int rawCommandLength; + inline ulp_msg_inject_raw_command (void* instance, char* command, int length) : + loc_eng_msg(instance, ULP_MSG_INJECT_RAW_COMMAND), + rawCommand(new char[length]), + rawCommandLength(length) + { + memcpy((void*)rawCommand, (void*)command, length); + LOC_LOGV("inject raw command: command %s\n command length: %d\n ", + rawCommand, + rawCommandLength); + } + + inline ~ulp_msg_inject_raw_command() + { + delete[] rawCommand; + } +}; + struct ulp_msg_inject_phone_context_settings : public loc_eng_msg { const UlpPhoneContextSettings phoneSetting; inline ulp_msg_inject_phone_context_settings(void* instance, UlpPhoneContextSettings setting) : diff --git a/loc_api/libloc_api_50001/loc_eng_msg_id.h b/loc_api/libloc_api_50001/loc_eng_msg_id.h index ff5a6bd7..0c3f5755 100644 --- a/loc_api/libloc_api_50001/loc_eng_msg_id.h +++ b/loc_api/libloc_api_50001/loc_eng_msg_id.h @@ -117,7 +117,11 @@ enum loc_eng_msg_ids_t { /* Message is sent by HAL to LOC API to configure LTE Positioning Profile in modem */ - LOC_ENG_MSG_LPP_CONFIG + LOC_ENG_MSG_LPP_CONFIG, + + // Message is sent by Android framework (GpsLocationProvider) + // to inject the raw command + ULP_MSG_INJECT_RAW_COMMAND, }; #ifdef __cplusplus diff --git a/loc_api/loc_api_v02/LocApiV02Adapter.cpp b/loc_api/loc_api_v02/LocApiV02Adapter.cpp index 92acfc75..f352af19 100644 --- a/loc_api/loc_api_v02/LocApiV02Adapter.cpp +++ b/loc_api/loc_api_v02/LocApiV02Adapter.cpp @@ -1335,6 +1335,8 @@ enum loc_api_adapter_err LocApiV02Adapter :: setSensorProperties(bool gyroBiasVa enum loc_api_adapter_err LocApiV02Adapter :: setSensorPerfControlConfig(int controlMode, int accelSamplesPerBatch, int accelBatchesPerSec, int gyroSamplesPerBatch, int gyroBatchesPerSec, + int accelSamplesPerBatchHigh, int accelBatchesPerSecHigh, + int gyroSamplesPerBatchHigh, int gyroBatchesPerSecHigh, int algorithmConfig) { locClientStatusEnumType result = eLOC_CLIENT_SUCCESS; @@ -1345,6 +1347,7 @@ enum loc_api_adapter_err LocApiV02Adapter :: setSensorPerfControlConfig(int cont LOC_LOGD("%s:%d]: Sensor Perf Control Config (performanceControlMode)(%u) " "accel(#smp,#batches) (%u,%u) gyro(#smp,#batches) (%u,%u) " + "accel_high(#smp,#batches) (%u,%u) gyro_high(#smp,#batches) (%u,%u) " "algorithmConfig(%u)\n", __FUNCTION__, __LINE__, @@ -1353,6 +1356,10 @@ enum loc_api_adapter_err LocApiV02Adapter :: setSensorPerfControlConfig(int cont accelBatchesPerSec, gyroSamplesPerBatch, gyroBatchesPerSec, + accelSamplesPerBatchHigh, + accelBatchesPerSecHigh, + gyroSamplesPerBatchHigh, + gyroBatchesPerSecHigh, algorithmConfig ); @@ -1367,6 +1374,12 @@ enum loc_api_adapter_err LocApiV02Adapter :: setSensorPerfControlConfig(int cont sensor_perf_config_req.gyroSamplingSpec_valid = 1; sensor_perf_config_req.gyroSamplingSpec.batchesPerSecond = gyroBatchesPerSec; sensor_perf_config_req.gyroSamplingSpec.samplesPerBatch = gyroSamplesPerBatch; + sensor_perf_config_req.accelSamplingSpecHigh_valid = 1; + sensor_perf_config_req.accelSamplingSpecHigh.batchesPerSecond = accelBatchesPerSecHigh; + sensor_perf_config_req.accelSamplingSpecHigh.samplesPerBatch = accelSamplesPerBatchHigh; + sensor_perf_config_req.gyroSamplingSpecHigh_valid = 1; + sensor_perf_config_req.gyroSamplingSpecHigh.batchesPerSecond = gyroBatchesPerSecHigh; + sensor_perf_config_req.gyroSamplingSpecHigh.samplesPerBatch = gyroSamplesPerBatchHigh; sensor_perf_config_req.algorithmConfig_valid = 1; sensor_perf_config_req.algorithmConfig = algorithmConfig; diff --git a/loc_api/loc_api_v02/LocApiV02Adapter.h b/loc_api/loc_api_v02/LocApiV02Adapter.h index 04f931ee..60c2a5ce 100644 --- a/loc_api/loc_api_v02/LocApiV02Adapter.h +++ b/loc_api/loc_api_v02/LocApiV02Adapter.h @@ -157,7 +157,9 @@ public: virtual enum loc_api_adapter_err setSensorPerfControlConfig(int controlMode, int accelSamplesPerBatch, int accelBatchesPerSec, - int gyroSamplesPerBatch, int gyroBatchesPerSec, int algorithmConfig); + int gyroSamplesPerBatch, int gyroBatchesPerSec, + int accelSamplesPerBatchHigh, int accelBatchesPerSecHigh, + int gyroSamplesPerBatchHigh, int gyroBatchesPerSecHigh, int algorithmConfig); virtual enum loc_api_adapter_err setExtPowerConfig(int isBatteryCharging); }; diff --git a/loc_api/loc_api_v02/location_service_v02.c b/loc_api/loc_api_v02/location_service_v02.c index ebd1a376..e1bf6f55 100644 --- a/loc_api/loc_api_v02/location_service_v02.c +++ b/loc_api/loc_api_v02/location_service_v02.c @@ -578,6 +578,25 @@ static const uint8_t qmiLocNiSuplVer2ExtStructT_data_v02[] = { QMI_IDL_FLAG_END_VALUE }; +static const uint8_t qmiLocMotionDataStructT_data_v02[] = { + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocMotionDataStructT_v02, motion_state), + + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocMotionDataStructT_v02, motion_mode), + + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocMotionDataStructT_v02, probability_of_state), + + QMI_IDL_GENERIC_2_BYTE, + QMI_IDL_OFFSET8(qmiLocMotionDataStructT_v02, age), + + QMI_IDL_GENERIC_2_BYTE, + QMI_IDL_OFFSET8(qmiLocMotionDataStructT_v02, timeout), + + QMI_IDL_FLAG_END_VALUE +}; + /*Message Definitions*/ static const uint8_t qmiLocGenRespMsgT_data_v02[] = { QMI_IDL_TLV_FLAGS_LAST_TLV | 0x02, @@ -1805,10 +1824,15 @@ static const uint8_t qmiLocSetProtocolConfigParametersReqMsgT_data_v02[] = { QMI_IDL_GENERIC_4_BYTE, QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, suplVersion), - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, lppConfig) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, lppConfig_valid)), + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, lppConfig) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, lppConfig_valid)), 0x13, QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, lppConfig) + QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, lppConfig), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, assistedGlonassProtocolMask) - QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, assistedGlonassProtocolMask_valid)), + 0x14, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocSetProtocolConfigParametersReqMsgT_v02, assistedGlonassProtocolMask) }; static const uint8_t qmiLocSetProtocolConfigParametersIndMsgT_data_v02[] = { @@ -1848,10 +1872,15 @@ static const uint8_t qmiLocGetProtocolConfigParametersIndMsgT_data_v02[] = { QMI_IDL_GENERIC_4_BYTE, QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, suplVersion), - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, lppConfig) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, lppConfig_valid)), + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, lppConfig) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, lppConfig_valid)), 0x13, QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, lppConfig) + QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, lppConfig), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, assistedGlonassProtocolMask) - QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, assistedGlonassProtocolMask_valid)), + 0x14, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetProtocolConfigParametersIndMsgT_v02, assistedGlonassProtocolMask) }; static const uint8_t qmiLocSetSensorControlConfigReqMsgT_data_v02[] = { @@ -1977,10 +2006,22 @@ static const uint8_t qmiLocSetSensorPerformanceControlConfigReqMsgT_data_v02[] = QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, gyroSamplingSpec), 19, 0, - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, algorithmConfig) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, algorithmConfig_valid)), + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, algorithmConfig) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, algorithmConfig_valid)), 0x13, QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, algorithmConfig) + QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, algorithmConfig), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, accelSamplingSpecHigh) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, accelSamplingSpecHigh_valid)), + 0x14, + QMI_IDL_AGGREGATE, + QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, accelSamplingSpecHigh), + 19, 0, + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, gyroSamplingSpecHigh) - QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, gyroSamplingSpecHigh_valid)), + 0x15, + QMI_IDL_AGGREGATE, + QMI_IDL_OFFSET8(qmiLocSetSensorPerformanceControlConfigReqMsgT_v02, gyroSamplingSpecHigh), + 19, 0 }; static const uint8_t qmiLocSetSensorPerformanceControlConfigIndMsgT_data_v02[] = { @@ -2022,10 +2063,22 @@ static const uint8_t qmiLocGetSensorPerformanceControlConfigIndMsgT_data_v02[] = QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, gyroSamplingSpec), 19, 0, - QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, algorithmConfig) - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, algorithmConfig_valid)), + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, algorithmConfig) - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, algorithmConfig_valid)), 0x13, QMI_IDL_GENERIC_4_BYTE, - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, algorithmConfig) + QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, algorithmConfig), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, accelSamplingSpecHigh) - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, accelSamplingSpecHigh_valid)), + 0x14, + QMI_IDL_AGGREGATE, + QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, accelSamplingSpecHigh), + 19, 0, + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, gyroSamplingSpecHigh) - QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, gyroSamplingSpecHigh_valid)), + 0x15, + QMI_IDL_AGGREGATE, + QMI_IDL_OFFSET8(qmiLocGetSensorPerformanceControlConfigIndMsgT_v02, gyroSamplingSpecHigh), + 19, 0 }; static const uint8_t qmiLocInjectSuplCertificateReqMsgT_data_v02[] = { @@ -2440,6 +2493,43 @@ static const uint8_t qmiLocGetBestAvailablePositionIndMsgT_data_v02[] = { QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, gnssSvUsedList) - QMI_IDL_OFFSET16RELATIVE(qmiLocGetBestAvailablePositionIndMsgT_v02, gnssSvUsedList_len) }; +static const uint8_t qmiLocInjectMotionDataReqMsgT_data_v02[] = { + QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, + QMI_IDL_AGGREGATE, + QMI_IDL_OFFSET8(qmiLocInjectMotionDataReqMsgT_v02, motion_data), + 33, 0 +}; + +static const uint8_t qmiLocInjectMotionDataIndMsgT_data_v02[] = { + QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocInjectMotionDataIndMsgT_v02, status) +}; + +static const uint8_t qmiLocGetNiGeofenceIdListReqMsgT_data_v02[] = { + QMI_IDL_TLV_FLAGS_LAST_TLV | 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListReqMsgT_v02, transactionId) +}; + +static const uint8_t qmiLocGetNiGeofenceIdListIndMsgT_data_v02[] = { + 0x01, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, status), + + QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, transactionId) - QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, transactionId_valid)), + 0x10, + QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, transactionId), + + QMI_IDL_TLV_FLAGS_LAST_TLV | QMI_IDL_TLV_FLAGS_OPTIONAL | (QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, niGeofenceIdList) - QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, niGeofenceIdList_valid)), + 0x11, + QMI_IDL_FLAGS_IS_ARRAY | QMI_IDL_FLAGS_IS_VARIABLE_LEN | QMI_IDL_GENERIC_4_BYTE, + QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, niGeofenceIdList), + QMI_LOC_MAX_NI_GEOFENCE_ID_LIST_LENGTH_V02, + QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, niGeofenceIdList) - QMI_IDL_OFFSET8(qmiLocGetNiGeofenceIdListIndMsgT_v02, niGeofenceIdList_len) +}; + /* Type Table */ static const qmi_idl_type_table_entry loc_type_table_v02[] = { {sizeof(qmiLocApplicationIdStructT_v02), qmiLocApplicationIdStructT_data_v02}, @@ -2474,7 +2564,8 @@ static const qmi_idl_type_table_entry loc_type_table_v02[] = { {sizeof(qmiLoc3AxisSensorSampleListStructT_v02), qmiLoc3AxisSensorSampleListStructT_data_v02}, {sizeof(qmiLocApnProfilesStructT_v02), qmiLocApnProfilesStructT_data_v02}, {sizeof(qmiLocCircularGeofenceArgsStructT_v02), qmiLocCircularGeofenceArgsStructT_data_v02}, - {sizeof(qmiLocNiSuplVer2ExtStructT_v02), qmiLocNiSuplVer2ExtStructT_data_v02} + {sizeof(qmiLocNiSuplVer2ExtStructT_v02), qmiLocNiSuplVer2ExtStructT_data_v02}, + {sizeof(qmiLocMotionDataStructT_v02), qmiLocMotionDataStructT_data_v02} }; /* Message Table */ @@ -2602,7 +2693,11 @@ static const qmi_idl_message_table_entry loc_message_table_v02[] = { {sizeof(qmiLocEditGeofenceReqMsgT_v02), qmiLocEditGeofenceReqMsgT_data_v02}, {sizeof(qmiLocEditGeofenceIndMsgT_v02), qmiLocEditGeofenceIndMsgT_data_v02}, {sizeof(qmiLocGetBestAvailablePositionReqMsgT_v02), qmiLocGetBestAvailablePositionReqMsgT_data_v02}, - {sizeof(qmiLocGetBestAvailablePositionIndMsgT_v02), qmiLocGetBestAvailablePositionIndMsgT_data_v02} + {sizeof(qmiLocGetBestAvailablePositionIndMsgT_v02), qmiLocGetBestAvailablePositionIndMsgT_data_v02}, + {sizeof(qmiLocInjectMotionDataReqMsgT_v02), qmiLocInjectMotionDataReqMsgT_data_v02}, + {sizeof(qmiLocInjectMotionDataIndMsgT_v02), qmiLocInjectMotionDataIndMsgT_data_v02}, + {sizeof(qmiLocGetNiGeofenceIdListReqMsgT_v02), qmiLocGetNiGeofenceIdListReqMsgT_data_v02}, + {sizeof(qmiLocGetNiGeofenceIdListIndMsgT_v02), qmiLocGetNiGeofenceIdListIndMsgT_data_v02} }; /* Predefine the Type Table Object */ @@ -2662,13 +2757,13 @@ static const qmi_idl_service_message_table_entry loc_service_command_messages_v0 {QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02, TYPE16(0, 86), 7}, {QMI_LOC_GET_EXTERNAL_POWER_CONFIG_REQ_V02, TYPE16(0, 84), 0}, {QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02, TYPE16(0, 88), 129}, - {QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02, TYPE16(0, 90), 25}, + {QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02, TYPE16(0, 90), 32}, {QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02, TYPE16(0, 92), 11}, {QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02, TYPE16(0, 94), 7}, {QMI_LOC_GET_SENSOR_CONTROL_CONFIG_REQ_V02, TYPE16(0, 96), 0}, {QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02, TYPE16(0, 98), 35}, {QMI_LOC_GET_SENSOR_PROPERTIES_REQ_V02, TYPE16(0, 100), 7}, - {QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02, TYPE16(0, 102), 28}, + {QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02, TYPE16(0, 102), 42}, {QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02, TYPE16(0, 104), 0}, {QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02, TYPE16(0, 106), 2009}, {QMI_LOC_DELETE_SUPL_CERTIFICATE_REQ_V02, TYPE16(0, 108), 4}, @@ -2678,7 +2773,9 @@ static const qmi_idl_service_message_table_entry loc_service_command_messages_v0 {QMI_LOC_DELETE_GEOFENCE_REQ_V02, TYPE16(0, 116), 14}, {QMI_LOC_QUERY_GEOFENCE_REQ_V02, TYPE16(0, 118), 14}, {QMI_LOC_EDIT_GEOFENCE_REQ_V02, TYPE16(0, 120), 25}, - {QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02, TYPE16(0, 122), 7} + {QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02, TYPE16(0, 122), 7}, + {QMI_LOC_INJECT_MOTION_DATA_REQ_V02, TYPE16(0, 124), 19}, + {QMI_LOC_GET_NI_GEOFENCE_ID_LIST_REQ_V02, TYPE16(0, 126), 7} }; static const qmi_idl_service_message_table_entry loc_service_response_messages_v02[] = { @@ -2736,7 +2833,9 @@ static const qmi_idl_service_message_table_entry loc_service_response_messages_v {QMI_LOC_DELETE_GEOFENCE_RESP_V02, TYPE16(0, 0), 7}, {QMI_LOC_QUERY_GEOFENCE_RESP_V02, TYPE16(0, 0), 7}, {QMI_LOC_EDIT_GEOFENCE_RESP_V02, TYPE16(0, 0), 7}, - {QMI_LOC_GET_BEST_AVAILABLE_POSITION_RESP_V02, TYPE16(0, 0), 7} + {QMI_LOC_GET_BEST_AVAILABLE_POSITION_RESP_V02, TYPE16(0, 0), 7}, + {QMI_LOC_INJECT_MOTION_DATA_RESP_V02, TYPE16(0, 0), 7}, + {QMI_LOC_GET_NI_GEOFENCE_ID_LIST_RESP_V02, TYPE16(0, 0), 7} }; static const qmi_idl_service_message_table_entry loc_service_indication_messages_v02[] = { @@ -2789,13 +2888,13 @@ static const qmi_idl_service_message_table_entry loc_service_indication_messages {QMI_LOC_GET_EXTERNAL_POWER_CONFIG_IND_V02, TYPE16(0, 85), 14}, {QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_IND_V02, TYPE16(0, 89), 7}, {QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_IND_V02, TYPE16(0, 91), 18}, - {QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02, TYPE16(0, 93), 32}, + {QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_IND_V02, TYPE16(0, 93), 39}, {QMI_LOC_SET_SENSOR_CONTROL_CONFIG_IND_V02, TYPE16(0, 95), 7}, {QMI_LOC_GET_SENSOR_CONTROL_CONFIG_IND_V02, TYPE16(0, 97), 14}, {QMI_LOC_SET_SENSOR_PROPERTIES_IND_V02, TYPE16(0, 99), 14}, {QMI_LOC_GET_SENSOR_PROPERTIES_IND_V02, TYPE16(0, 101), 42}, {QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02, TYPE16(0, 103), 14}, - {QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02, TYPE16(0, 105), 35}, + {QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_IND_V02, TYPE16(0, 105), 49}, {QMI_LOC_INJECT_SUPL_CERTIFICATE_IND_V02, TYPE16(0, 107), 7}, {QMI_LOC_DELETE_SUPL_CERTIFICATE_IND_V02, TYPE16(0, 109), 7}, {QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_IND_V02, TYPE16(0, 111), 14}, @@ -2807,7 +2906,9 @@ static const qmi_idl_service_message_table_entry loc_service_indication_messages {QMI_LOC_DELETE_GEOFENCE_IND_V02, TYPE16(0, 117), 21}, {QMI_LOC_QUERY_GEOFENCE_IND_V02, TYPE16(0, 119), 65}, {QMI_LOC_EDIT_GEOFENCE_IND_V02, TYPE16(0, 121), 28}, - {QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02, TYPE16(0, 123), 391} + {QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02, TYPE16(0, 123), 391}, + {QMI_LOC_INJECT_MOTION_DATA_IND_V02, TYPE16(0, 125), 7}, + {QMI_LOC_GET_NI_GEOFENCE_ID_LIST_IND_V02, TYPE16(0, 127), 82} }; /*Service Object*/ @@ -2821,7 +2922,7 @@ struct qmi_idl_service_object loc_qmi_idl_service_object_v02 = { 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, - 0x0B, + 0x0D, NULL }; diff --git a/loc_api/loc_api_v02/location_service_v02.h b/loc_api/loc_api_v02/location_service_v02.h index c3d67702..d2da6915 100644 --- a/loc_api/loc_api_v02/location_service_v02.h +++ b/loc_api/loc_api_v02/location_service_v02.h @@ -82,11 +82,11 @@ extern "C" { /** Major Version Number of the IDL used to generate this file */ #define LOC_V02_IDL_MAJOR_VERS 0x02 /** Revision Number of the IDL used to generate this file */ -#define LOC_V02_IDL_MINOR_VERS 0x0B +#define LOC_V02_IDL_MINOR_VERS 0x0D /** Major Version Number of the qmi_idl_compiler used to generate this file */ #define LOC_V02_IDL_TOOL_VERS 0x05 /** Maximum Defined Message ID */ -#define LOC_V02_MAX_MESSAGE_ID 0x0067; +#define LOC_V02_MAX_MESSAGE_ID 0x0069; /** @} */ @@ -180,6 +180,10 @@ extern "C" { /** Maximum length of the SUPL certificate. */ #define QMI_LOC_MAX_SUPL_CERT_LENGTH_V02 2000 + +/** Maximum length of the Network Initiated Geofence ID + list */ +#define QMI_LOC_MAX_NI_GEOFENCE_ID_LIST_LENGTH_V02 16 /** @} */ @@ -476,6 +480,8 @@ typedef uint32_t qmiLocPosTechMaskT_v02; #define QMI_LOC_POS_TECH_MASK_WIFI_V02 ((qmiLocPosTechMaskT_v02)0x00000004) /**< WiFi access points were used to generate the fix. */ #define QMI_LOC_POS_TECH_MASK_SENSORS_V02 ((qmiLocPosTechMaskT_v02)0x00000008) /**< Sensors were used to generate the fix. */ #define QMI_LOC_POS_TECH_MASK_REFERENCE_LOCATION_V02 ((qmiLocPosTechMaskT_v02)0x00000010) /**< Reference Location was used to generate the fix. */ +#define QMI_LOC_POS_TECH_MASK_INJECTED_COARSE_POSITION_V02 ((qmiLocPosTechMaskT_v02)0x00000020) /**< Coarse position injected into the location engine was used to + generate the fix. */ /** @addtogroup loc_qmi_enums @{ */ @@ -836,7 +842,8 @@ typedef struct { - 0x00000002 -- CELLID \n - 0x00000004 -- WIFI \n - 0x00000008 -- SENSORS \n - - 0x00000010 -- REFERENCE_LOCATION */ + - 0x00000010 -- REFERENCE_LOCATION \n + - 0x00000020 -- INJECTED_COARSE_POSITION */ /* Optional */ /* Dilution of Precision */ @@ -2671,7 +2678,7 @@ typedef struct { Valid values: \begin{itemize1} \item 0x00000001 -- GEOFENCE_BREACH_TYPE_ENTERING - \item 0x00000001 -- GEOFENCE_BREACH_TYPE_LEAVING + \item 0x00000002 -- GEOFENCE_BREACH_TYPE_LEAVING \vspace{-0.18in} \end{itemize1} */ @@ -4766,10 +4773,12 @@ typedef enum { 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, + eQMI_LOC_OPER_MODE_STANDALONE_V02 = 4, /**< Use Standalone mode. */ + eQMI_LOC_OPER_MODE_CELL_ID_V02 = 5, /**< Use cell ID. This mode is valid only for GSM/UMTS network + Use WWAN measurements to calculate position. If this mode is + set then for 1x network AFLT will used and for LTE network + OTDOA will used. */ + eQMI_LOC_OPER_MODE_WWAN_V02 = 6, QMILOCOPERATIONMODEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ }qmiLocOperationModeEnumT_v02; /** @@ -4796,6 +4805,7 @@ typedef struct { \item 0x00000003 -- OPER_MODE_MSA \item 0x00000004 -- OPER_MODE_STANDALONE \item 0x00000005 -- OPER_MODE_CELL_ID + \item 0x00000006 -- OPER_MODE_WWAN \vspace{-0.18in} \end{itemize1} */ }qmiLocSetOperationModeReqMsgT_v02; /* Message */ @@ -4874,6 +4884,7 @@ typedef struct { \item 0x00000003 -- OPER_MODE_MSA \item 0x00000004 -- OPER_MODE_STANDALONE \item 0x00000005 -- OPER_MODE_CELL_ID + \item 0x00000006 -- OPER_MODE_WWAN \vspace{-0.18in} \end{itemize1} */ }qmiLocGetOperationModeIndMsgT_v02; /* Message */ @@ -5550,6 +5561,9 @@ typedef enum { typedef uint32_t qmiLocLppConfigMaskT_v02; #define QMI_LOC_LPP_CONFIG_ENABLE_USER_PLANE_V02 ((qmiLocLppConfigMaskT_v02)0x00000001) /**< Enable user plane configuration for LTE Positioning Profile (LPP). */ #define QMI_LOC_LPP_CONFIG_ENABLE_CONTROL_PLANE_V02 ((qmiLocLppConfigMaskT_v02)0x00000002) /**< Enable control plane configuration for LPP. */ +typedef uint32_t qmiLocAssistedGlonassProtocolMaskT_v02; +#define QMI_LOC_ASSISTED_GLONASS_PROTOCOL_MASK_RRC_CP_V02 ((qmiLocAssistedGlonassProtocolMaskT_v02)0x00000001) /**< Assisted GLONASS is supported over RRC in Control Plane */ +#define QMI_LOC_ASSISTED_GLONASS_PROTOCOL_MASK_RRLP_UP_V02 ((qmiLocAssistedGlonassProtocolMaskT_v02)0x00000002) /**< Assisted GLONASS is supported over RRLP in User Plane */ /** @addtogroup loc_qmi_messages @{ */ @@ -5603,6 +5617,20 @@ typedef struct { \item 0x00000002 -- LPP_CONFIG_ENABLE_CONTROL_PLANE \vspace{-0.18in} \end{itemize1} */ + + /* Optional */ + /* Assisted GLONASS Protocol Mask */ + uint8_t assistedGlonassProtocolMask_valid; /**< Must be set to true if assistedGlonassProtocolMask is being passed */ + qmiLocAssistedGlonassProtocolMaskT_v02 assistedGlonassProtocolMask; + /**< Configures the protocols that the location service can indicate it supports, + for Assisted Glonass. + + Valid bitmasks: + \begin{itemize1} + \item 0x00000001 -- ASSISTED_GLONASS_PROTOCOL_MASK_RRC_CP + \item 0x00000002 -- ASSISTED_GLONASS_PROTOCOL_MASK_RRLP_UP + \vspace{-0.18in} \end{itemize1} + */ }qmiLocSetProtocolConfigParametersReqMsgT_v02; /* Message */ /** @} @@ -5613,6 +5641,7 @@ typedef uint64_t qmiLocProtocolConfigParamMaskT_v02; #define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_VX_VERSION_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000002ull) /**< Mask for the VX version configuration parameter. */ #define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_SUPL_VERSION_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000004ull) /**< Mask for the SUPL version configuration parameter. */ #define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_LPP_CONFIG_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000008ull) /**< Mask for the LPP configuration parameter. */ +#define QMI_LOC_PROTOCOL_CONFIG_PARAM_MASK_ASSISTED_GLONASS_PROTOCOL_V02 ((qmiLocProtocolConfigParamMaskT_v02)0x0000000000000010ull) /**< Mask for the LPP configuration parameter. */ /** @addtogroup loc_qmi_messages @{ */ @@ -5651,6 +5680,7 @@ typedef struct { \item 0x0000000000000002 -- CONFIG_PARAM_MASK_VX_VERSION \item 0x0000000000000004 -- CONFIG_PARAM_MASK_SUPL_VERSION \item 0x0000000000000008 -- CONFIG_PARAM_MASK_LPP_CONFIG + \item 0x0000000000000010 -- CONFIG_PARAM_MASK_ASSISTED_GLONASS_PROTOCOL \vspace{-0.18in} \end{itemize1} */ }qmiLocSetProtocolConfigParametersIndMsgT_v02; /* Message */ @@ -5676,6 +5706,7 @@ typedef struct { \item 0x0000000000000002 -- CONFIG_PARAM_MASK_VX_VERSION \item 0x0000000000000004 -- CONFIG_PARAM_MASK_SUPL_VERSION \item 0x0000000000000008 -- CONFIG_PARAM_MASK_LPP_CONFIG + \item 0x0000000000000010 -- CONFIG_PARAM_MASK_ASSISTED_GLONASS_PROTOCOL \vspace{-0.18in} \end{itemize1} */ }qmiLocGetProtocolConfigParametersReqMsgT_v02; /* Message */ @@ -5753,6 +5784,19 @@ typedef struct { \item 0x00000002 -- LPP_CONFIG_ENABLE_CONTROL_PLANE \vspace{-0.18in} \end{itemize1} */ + + /* Optional */ + /* Assisted GLONASS Protocol Mask */ + uint8_t assistedGlonassProtocolMask_valid; /**< Must be set to true if assistedGlonassProtocolMask is being passed */ + qmiLocAssistedGlonassProtocolMaskT_v02 assistedGlonassProtocolMask; + /**< Assisted GLONASS Protocol Mask. + + Valid bitmasks: + \begin{itemize1} + \item 0x00000001 -- ASSISTED_GLONASS_PROTOCOL_MASK_RRC_CP + \item 0x00000002 -- ASSISTED_GLONASS_PROTOCOL_MASK_RRLP_UP + \vspace{-0.18in} \end{itemize1} + */ }qmiLocGetProtocolConfigParametersIndMsgT_v02; /* Message */ /** @} @@ -6181,10 +6225,12 @@ typedef struct { 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. + acceleration data to be used by the low data rate filter. 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. + The default specification is 10Hz sampling rate and 2Hz batching rate. */ /* Optional */ @@ -6192,10 +6238,12 @@ typedef struct { 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. + gyro data to be used by the high data rate filter. 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. + The default specification is 10Hz sampling rate and 2Hz batching rate. */ /* Optional */ @@ -6209,6 +6257,32 @@ typedef struct { \item 0x00000001 -- DISABLE_INS_POSITIONING_FILTER \vspace{-0.18in} \end{itemize1} */ + + /* Optional */ + /* High Data Rate Filter Accelerometer Sampling Specification */ + uint8_t accelSamplingSpecHigh_valid; /**< Must be set to true if accelSamplingSpecHigh is being passed */ + qmiLocSensorControlConfigSamplingSpecStructT_v02 accelSamplingSpecHigh; + /**< \n Sets the nominal rate at which the GNSS location engine is to request + acceleration data to be used by the high data rate filter. 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. + The default specification is 100Hz sampling rate and 4Hz batching rate. + */ + + /* Optional */ + /* High Data Rate Filter Gyroscope Sampling Specification */ + uint8_t gyroSamplingSpecHigh_valid; /**< Must be set to true if gyroSamplingSpecHigh is being passed */ + qmiLocSensorControlConfigSamplingSpecStructT_v02 gyroSamplingSpecHigh; + /**< \n Sets the nominal rate at which the GNSS location engine is to request + gyro data to be used by the high data rate filter. 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. + The default specification is 100Hz sampling rate and 4Hz batching rate. + */ }qmiLocSetSensorPerformanceControlConfigReqMsgT_v02; /* Message */ /** @} @@ -6219,6 +6293,8 @@ typedef uint32_t qmiLocSensorPerformanceControlConfigFailureMaskT_v02; #define QMI_LOC_SENSOR_PERFORMANCE_CONTROL_CONFIG_PARAM_MASK_ACCEL_SAMPLING_SPEC_V02 ((qmiLocSensorPerformanceControlConfigFailureMaskT_v02)0x00000002) /**< Failed to set the accelerometer sampling specification. */ #define QMI_LOC_SENSOR_PERFORMANCE_CONTROL_CONFIG_PARAM_MASK_GYRO_SAMPLING_SPEC_V02 ((qmiLocSensorPerformanceControlConfigFailureMaskT_v02)0x00000004) /**< Failed to set the gyroscope sampling specification. */ #define QMI_LOC_SENSOR_PERFORMANCE_CONTROL_CONFIG_PARAM_MASK_ALGORITHM_CONFIG_V02 ((qmiLocSensorPerformanceControlConfigFailureMaskT_v02)0x00000008) /**< Failed to set the algorithm configuration */ +#define QMI_LOC_SENSOR_PERFORMANCE_CONTROL_CONFIG_PARAM_MASK_ACCEL_SAMPLING_SPEC_HIGH_V02 ((qmiLocSensorPerformanceControlConfigFailureMaskT_v02)0x00000010) /**< Failed to set the accelerometer sampling specification. */ +#define QMI_LOC_SENSOR_PERFORMANCE_CONTROL_CONFIG_PARAM_MASK_GYRO_SAMPLING_SPEC_HIGH_V02 ((qmiLocSensorPerformanceControlConfigFailureMaskT_v02)0x00000020) /**< Failed to set the gyroscope sampling specification. */ /** @addtogroup loc_qmi_messages @{ */ @@ -6256,6 +6332,8 @@ typedef struct { \item 0x00000002 -- ACCEL_SAMPLING_SPEC \item 0x00000004 -- GYRO_SAMPLING_SPEC \item 0x00000008 -- ALGORITHM_CONFIG + \item 0x00000010 -- ACCEL_SAMPLING_SPEC_HIGH + \item 0x00000020 -- GYRO_SAMPLING_SPEC_HIGH \vspace{-0.18in} \end{itemize1} */ }qmiLocSetSensorPerformanceControlConfigIndMsgT_v02; /* Message */ @@ -6317,10 +6395,12 @@ typedef struct { 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. + acceleration data to be used by the high data rate filter. 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. + The default specification is 10Hz sampling rate and 2Hz batching rate. */ /* Optional */ @@ -6328,10 +6408,12 @@ typedef struct { 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. + gyro data to be used by the high data rate filter. 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. + The default specification is 10Hz sampling rate and 2Hz batching rate. */ /* Optional */ @@ -6345,6 +6427,32 @@ typedef struct { \item 0x00000001 -- DISABLE_INS_POSITIONING_FILTER \vspace{-0.18in} \end{itemize1} */ + + /* Optional */ + /* High Data Rate Filter Accelerometer Sampling Specification */ + uint8_t accelSamplingSpecHigh_valid; /**< Must be set to true if accelSamplingSpecHigh is being passed */ + qmiLocSensorControlConfigSamplingSpecStructT_v02 accelSamplingSpecHigh; + /**< \n Sets the nominal rate at which the GNSS location engine is to request + acceleration data to be used by the high data rate filter. 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. + The default specification is 100Hz sampling rate and 4Hz batching rate. + */ + + /* Optional */ + /* High Data Rate Filter Gyroscope Sampling Specification */ + uint8_t gyroSamplingSpecHigh_valid; /**< Must be set to true if gyroSamplingSpecHigh is being passed */ + qmiLocSensorControlConfigSamplingSpecStructT_v02 gyroSamplingSpecHigh; + /**< \n Sets the nominal rate at which the GNSS location engine is to request + gyro data to be used by the high data rate filter. 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. + The default specification is 100Hz sampling rate and 4Hz batching rate. + */ }qmiLocGetSensorPerformanceControlConfigIndMsgT_v02; /* Message */ /** @} @@ -7409,6 +7517,7 @@ typedef struct { \item 0x00000004 -- WIFI \item 0x00000008 -- SENSORS \item 0x00000010 -- REFERENCE_LOCATION + \item 0x00000020 -- INJECTED_COARSE_POSITION \vspace{-0.18in} \end{itemize1} */ /* Optional */ @@ -7465,6 +7574,193 @@ typedef struct { @} */ +/** @addtogroup loc_qmi_enums + @{ + */ +typedef enum { + QMILOCMOTIONSTATEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ + eQMI_LOC_MOTION_STATE_UNKNOWN_V02 = 0, /**< Device state is not known */ + eQMI_LOC_MOTION_STATE_STATIONARY_V02 = 1, /**< Device state is stationary + Device state is in motion */ + eQMI_LOC_MOTION_STATE_IN_MOTION_V02 = 2, + QMILOCMOTIONSTATEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ +}qmiLocMotionStateEnumT_v02; +/** + @} + */ + +/** @addtogroup loc_qmi_enums + @{ + */ +typedef enum { + QMILOCMOTIONMODEENUMT_MIN_ENUM_VAL_V02 = -2147483647, /**< To force a 32 bit signed enum. Do not change or use*/ + eQMI_LOC_MOTION_MODE_UNKNOWN_V02 = 0, /**< Device movement is not known */ + eQMI_LOC_MOTION_MODE_STATIONARY_V02 = 1, /**< Device is not moving */ + eQMI_LOC_MOTION_MODE_PEDESTRIAN_UNKNOWN_V02 = 200, /**< Device movement is in pedestrian mode, nothing else is known about the movement */ + eQMI_LOC_MOTION_MODE_PEDESTRIAN_WALKING_V02 = 201, /**< Device movement is in pedestrian walking mode */ + eQMI_LOC_MOTION_MODE_PEDESTRIAN_RUNNING_V02 = 202, /**< Device movement is in pedestrian running mode + Device movement is in vehicular mode, nothing else is known about the movement */ + eQMI_LOC_MOTION_MODE_VEHICLE_UNKNOWN_V02 = 300, + QMILOCMOTIONMODEENUMT_MAX_ENUM_VAL_V02 = 2147483647 /**< To force a 32 bit signed enum. Do not change or use*/ +}qmiLocMotionModeEnumT_v02; +/** + @} + */ + +/** @addtogroup loc_qmi_aggregates + @{ + */ +typedef struct { + + qmiLocMotionStateEnumT_v02 motion_state; + /**< Current motion state of the user. States of user motion: \n + Options are: */ + + qmiLocMotionModeEnumT_v02 motion_mode; + /**< Modes of user motion.\n + Options are: */ + + float probability_of_state; + /**< Probability that the device is actually undergoing the motion state + specified by the combination of the values of motion_state, motion_mode, + and motion_sub_mode. \vspace{0.06in} + + This value is a floating point number in the range of 0 to 100, in + units of percent probability. Any value greater than 99.9999 is + applied as 99.9999. \vspace{0.06in} + + It is recommended that if a particular combination of motion_state and + motion_mode cannot be determined with more than 50 percent confidence, + that a more general statement of user motion be made. + For example, if the mode of In-Motion + Pedestrian-Running can only be + determined with 50 percent probability, and the simpler statement of In-Motion + can be determined with 90 percent probability, it is recommended that this field + be used to simply state In-Motion with 90 percent probability. \vspace{0.06in} + + If the motion_state is not known, the value in this field is not used. + */ + + uint16_t age; + /**< Age of the motion data in milliseconds at the time of injection. + */ + + uint16_t timeout; + /**< If the age of the motion data input exceeds the timeout value, it + will no longer be used. The timeout value is in units of milliseconds. + Values in the range of 0 to 10000 are accepted. If 65535 is provided, + the motion data input is applied indefinitely until the next input is + received. \vspace{0.06in} + + If the determination of motion data is an instantaneous observation, + and no notice is guaranteed to be given via QMI on a change in the + state of motion data, it is recommended that this field be set to 0. \vspace{0.06in} + + If the determination of motion data is continuously monitored + external to QMI, and an update is always applied to QMI upon any + change in state, a value of 65535 is used for this field. + Note that in this case, if a certain mode is set and is not later + unset (e.g., by sending in the request message with a user motion + state of Unknown), the value is applied indefinitely. + */ +}qmiLocMotionDataStructT_v02; /* Type */ +/** + @} + */ + +/** @addtogroup loc_qmi_messages + @{ + */ +/** Request Message; Injects motion data for MSM GPS service use. */ +typedef struct { + + /* Mandatory */ + /* Motion Data */ + qmiLocMotionDataStructT_v02 motion_data; +}qmiLocInjectMotionDataReqMsgT_v02; /* Message */ +/** + @} + */ + +/** @addtogroup loc_qmi_messages + @{ + */ +/** Indication Message; Injects motion data for MSM GPS service use. */ +typedef struct { + + /* Mandatory */ + /* Inject motion data request status */ + qmiLocStatusEnumT_v02 status; + /**< Status of the Inject Motion Data request. + + Valid values: \n + - 0x00000000 -- SUCCESS \n + - 0x00000001 -- GENERAL_FAILURE \n + - 0x00000002 -- UNSUPPORTED \n + - 0x00000003 -- INVALID_PARAMETER \n + - 0x00000004 -- ENGINE_BUSY \n + */ +}qmiLocInjectMotionDataIndMsgT_v02; /* Message */ +/** + @} + */ + +/** @addtogroup loc_qmi_messages + @{ + */ +/** Request Message; Used by the control point to retrieve the list of network + initiated geofence ID's. */ +typedef struct { + + /* Mandatory */ + /* Transaction Id */ + uint32_t transactionId; + /**< Identifies the transaction, the same transaction Id + will be returned in the Get NI Geofence ID List indication. + - Type -- Unsigned Integer. */ +}qmiLocGetNiGeofenceIdListReqMsgT_v02; /* Message */ +/** + @} + */ + +/** @addtogroup loc_qmi_messages + @{ + */ +/** Indication Message; Used by the control point to retrieve the list of network + initiated geofence ID's. */ +typedef struct { + + /* Mandatory */ + /* Get NI Geofence ID List status */ + qmiLocStatusEnumT_v02 status; + /**< Status of the Get NI Geofence ID List request. + Valid values: \n + - 0x00000000 -- SUCCESS \n + - 0x00000001 -- GENERAL_FAILURE \n + - 0x00000002 -- UNSUPPORTED \n + - 0x00000004 -- ENGINE_BUSY \n + - 0x00000006 -- TIMEOUT */ + + /* Optional */ + /* Transaction Id */ + uint8_t transactionId_valid; /**< Must be set to true if transactionId is being passed */ + uint32_t transactionId; + /**< Transaction Id which was specified in the Get NI + Geofence ID List request. + - Type -- Unsigned Integer. */ + + /* Optional */ + /* NI Geofence ID List */ + uint8_t niGeofenceIdList_valid; /**< Must be set to true if niGeofenceIdList is being passed */ + uint32_t niGeofenceIdList_len; /**< Must be set to # of elements in niGeofenceIdList */ + uint32_t niGeofenceIdList[QMI_LOC_MAX_NI_GEOFENCE_ID_LIST_LENGTH_V02]; + /**< List containing the NI Geofence Id's. + - Type: Array of unsigned 32 bit integers. \n + - Maximum NI Geofence ID List length : 16 */ +}qmiLocGetNiGeofenceIdListIndMsgT_v02; /* Message */ +/** + @} + */ + /*Service Message Definition*/ /** @addtogroup loc_qmi_msg_ids @{ @@ -7647,6 +7943,12 @@ typedef struct { #define QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02 0x0067 #define QMI_LOC_GET_BEST_AVAILABLE_POSITION_RESP_V02 0x0067 #define QMI_LOC_GET_BEST_AVAILABLE_POSITION_IND_V02 0x0067 +#define QMI_LOC_INJECT_MOTION_DATA_REQ_V02 0x0068 +#define QMI_LOC_INJECT_MOTION_DATA_RESP_V02 0x0068 +#define QMI_LOC_INJECT_MOTION_DATA_IND_V02 0x0068 +#define QMI_LOC_GET_NI_GEOFENCE_ID_LIST_REQ_V02 0x0069 +#define QMI_LOC_GET_NI_GEOFENCE_ID_LIST_RESP_V02 0x0069 +#define QMI_LOC_GET_NI_GEOFENCE_ID_LIST_IND_V02 0x0069 /** @} */