nas: add 'UMTS Info Neighboring LTE' TLV to 'Cell Location Info'

This commit is contained in:
Aleksander Morgado 2014-05-28 12:32:57 +02:00
parent 846d307071
commit d4a02795c7
4 changed files with 86 additions and 1 deletions

View File

@ -1560,7 +1560,32 @@
"id" : "0x17",
"mandatory" : "no",
"type" : "TLV",
"format" : "guint32" } ] },
"format" : "guint32" },
{ "name" : "UMTS Info Neighboring LTE",
"id" : "0x18",
"mandatory" : "no",
"type" : "TLV",
"format" : "sequence",
"contents" : [ { "name" : "RRC state",
"format" : "guint32",
"public-format" : "QmiNasWcdmaRrcState" },
{ "name" : "Frequency",
"format" : "array",
"array-element" : { "name" : "Element",
"format" : "struct",
"contents" : [ { "name" : "EUTRA Absolute RF Channel Number",
"format" : "guint16" },
{ "name" : "Physical Cell ID",
"format" : "guint16" },
{ "name" : "RSRP",
"format" : "gfloat" },
{ "name" : "RSRQ",
"format" : "gfloat" },
{ "name" : "Cell Selection RX Level",
"format" : "gint16" },
{ "name" : "Is TDD",
"format" : "guint8",
"public-format" : "gboolean" } ] } } ] } ] },
// *********************************************************************************
{ "name" : "Network Time",

View File

@ -246,6 +246,7 @@ QmiNasSimRejectState
QmiNasCdmaPilotType
QmiNasDayOfWeek
QmiNasDaylightSavingsAdjustment
QmiNasWcdmaRrcState
<SUBSECTION Methods>
qmi_nas_radio_interface_get_string
qmi_nas_active_band_get_string
@ -285,6 +286,7 @@ qmi_nas_sim_reject_state_get_string
qmi_nas_cdma_pilot_type_get_string
qmi_nas_day_of_week_get_string
qmi_nas_daylight_savings_adjustment_get_string
qmi_nas_wcdma_rrc_state_get_string
<SUBSECTION Private>
qmi_nas_radio_interface_build_string_from_mask
qmi_nas_active_band_build_string_from_mask
@ -322,6 +324,7 @@ qmi_nas_sim_reject_state_build_string_from_mask
qmi_nas_cdma_pilot_type_build_string_from_mask
qmi_nas_day_of_week_build_string_from_mask
qmi_nas_daylight_savings_adjustment_build_string_from_mask
qmi_nas_wcdma_rrc_state_build_string_from_mask
<SUBSECTION Standard>
QMI_TYPE_NAS_ACTIVE_BAND
QMI_TYPE_NAS_ATTACH_STATE
@ -359,6 +362,7 @@ QMI_TYPE_NAS_WCDMA_HS_SERVICE
QMI_TYPE_NAS_CDMA_PILOT_TYPE
QMI_TYPE_NAS_DAY_OF_WEEK
QMI_TYPE_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT
QMI_TYPE_NAS_WCDMA_RRC_STATE
qmi_nas_active_band_get_type
qmi_nas_attach_state_get_type
qmi_nas_call_barring_status_get_type
@ -395,6 +399,7 @@ qmi_nas_wcdma_hs_service_get_type
qmi_nas_cdma_pilot_type_get_type
qmi_nas_day_of_week_get_type
qmi_nas_daylight_savings_adjustment_get_type
qmi_nas_wcdma_rrc_state_get_type
</SECTION>
<SECTION>

View File

@ -872,4 +872,25 @@ typedef enum {
QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_TWO_HOURS = 2
} QmiNasDaylightSavingsAdjustment;
/*****************************************************************************/
/* Helper enums for the 'QMI NAS Get Cell Location Info' request/response */
/**
* QmiNasWcdmaRrcState:
* @QMI_NAS_WCDMA_RRC_STATE_DISCONNECTED: Disconnected.
* @QMI_NAS_WCDMA_RRC_STATE_CELL_PCH: WCDMA RRC state is CELL_PCH.
* @QMI_NAS_WCDMA_RRC_STATE_URA_PCH: WCDMA RRC state is URA_PCH.
* @QMI_NAS_WCDMA_RRC_STATE_CELL_FACH: WCDMA RRC state is CELL_FACH.
* @QMI_NAS_WCDMA_RRC_STATE_CELL_DCH: WCDMA RRC state is CELL_DCH.
*
* RRC state.
*/
typedef enum {
QMI_NAS_WCDMA_RRC_STATE_DISCONNECTED = 0,
QMI_NAS_WCDMA_RRC_STATE_CELL_PCH = 1,
QMI_NAS_WCDMA_RRC_STATE_URA_PCH = 2,
QMI_NAS_WCDMA_RRC_STATE_CELL_FACH = 3,
QMI_NAS_WCDMA_RRC_STATE_CELL_DCH = 4
} QmiNasWcdmaRrcState;
#endif /* _LIBQMI_GLIB_QMI_ENUMS_NAS_H_ */

View File

@ -2256,6 +2256,8 @@ get_cell_location_info_ready (QmiClientNas *client,
guint8 serving_cell_low_threshold;
guint8 s_intra_search_threshold;
QmiNasWcdmaRrcState rrc_state;
output = qmi_client_nas_get_cell_location_info_finish (client, res, &error);
if (!output) {
g_printerr ("error: operation failed: %s\n", error->message);
@ -2622,6 +2624,38 @@ get_cell_location_info_ready (QmiClientNas *client,
g_print ("UMTS Cell ID: '%" G_GUINT32_FORMAT"'\n", cell_id);
}
array = NULL;
if (qmi_message_nas_get_cell_location_info_output_get_umts_info_neighboring_lte (
output,
&rrc_state,
&array, NULL)) {
guint i;
g_print ("UMTS Info Neighboring LTE\n"
"\tRRC State: '%s'\n", qmi_nas_wcdma_rrc_state_get_string (rrc_state));
for (i = 0; i < array->len; i++) {
QmiMessageNasGetCellLocationInfoOutputUmtsInfoNeighboringLteFrequencyElement *element;
element = &g_array_index (array, QmiMessageNasGetCellLocationInfoOutputUmtsInfoNeighboringLteFrequencyElement, i);
g_print ("\tFrequency [%u]:\n"
"\t\tEUTRA Absolute RF Channel Number: '%" G_GUINT16_FORMAT"'\n"
"\t\tPhysical Cell ID: '%" G_GUINT16_FORMAT "'\n"
"\t\tRSRP: '%f'\n"
"\t\tRSRQ: '%f'\n"
"\t\tCell Selection RX Level: '%" G_GINT16_FORMAT"'\n"
"\t\tIs TDD?: '%s'\n",
i,
element->eutra_absolute_rf_channel_number,
element->physical_cell_id,
element->rsrp,
element->rsrq,
element->cell_selection_rx_level,
element->is_tdd ? "yes" : "no");
}
}
qmi_message_nas_get_cell_location_info_output_unref (output);
shutdown (TRUE);
}