1. First of all should be opened this Marco __NBR_CELL_INFO__
2. Write two functions similar to the following
//
void mmi_Cell_Info_start_req(module_type mod_id)
{
mmi_frm_set_protocol_event_handler(MSG_ID_L4C_NBR_CELL_INFO_REG_CNF,mmi_Cell_Info_parsing_data,
MMI_FALSE);
mmi_frm_set_protocol_event_handler(MSG_ID_L4C_NBR_CELL_INFO_IND,mmi_Cell_Info_parsing_data,
MMI_FALSE);
mmi_frm_send_ilm(mod_id,MSG_ID_L4C_NBR_CELL_INFO_REG_REQ, NULL, NULL);
return;
}
//
void mmi_Cell_Info_stop_req(module_type mod_id)
{
mmi_frm_clear_protocol_event_handler(MSG_ID_L4C_NBR_CELL_INFO_IND,
(PsIntFuncPtr)mmi_Cell_Info_parsing_data);
mmi_frm_clear_protocol_event_handler(MSG_ID_L4C_NBR_CELL_INFO_REG_CNF,
(PsIntFuncPtr)mmi_Cell_Info_parsing_data);
mmi_frm_send_ilm(mod_id,MSG_ID_L4C_NBR_CELL_INFO_DEREG_REQ, NULL, NULL);
return;
}
3. Response function
void mmi_Cell_Info_parsing_data(void *info, int mod_src)
{
l4c_nbr_cell_info_ind_struct* cell_info;
int valid_cell;
int i=0;
int j;
MMI_CELLS_ID_INFOR cells_id_infor;
memset(&cells_id_infor,0,sizeof(cells_id_infor));
cell_info = (l4c_nbr_cell_info_ind_struct *)info;
//Service cell information
cells_id_infor.cells[0].mcc=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.serv_info.gci.mcc;
cells_id_infor.cells[0].mnc=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.serv_info.gci.mnc;
cells_id_infor.cells[0].lac=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.serv_info.gci.lac;
cells_id_infor.cells[0].cell_id=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.serv_info.gci.ci;
cells_id_infor.total++;
cells_id_infor.cell_id_num[0] = 1;
// neighbor cell information : PLMN, Cell ID, LAC, BSIC, Rx Level, Arfcn
if (cell_info->is_nbr_info_valid)
{
for (j = 0; j < cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_num; j++)
{
//g_mmi_nbr_neighbor_cell_info[mod_src-MOD_L4C][j].mcc = cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].gci.mcc;
//g_mmi_nbr_neighbor_cell_info[mod_src-MOD_L4C][j].mnc = cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].gci.mnc;
//g_mmi_nbr_neighbor_cell_info[mod_src-MOD_L4C][j].lac = cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].gci.lac;
//g_mmi_nbr_neighbor_cell_info[mod_src-MOD_L4C][j].cell_id = cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].gci.ci;
if (cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].nbr_meas_rslt_index>= cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_meas_rslt.nbr_meas_num)
continue;
//Information of the neighboring cells
{
i++;
cells_id_infor.cells[i].mcc=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].gci.mcc;
cells_id_infor.cells[i].mnc=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].gci.mnc;
cells_id_infor.cells[i].lac=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].gci.lac;
cells_id_infor.cells[i].cell_id=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].gci.ci;
cells_id_infor.cells[i].rxlev=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_meas_rslt.nbr_cells[cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].nbr_meas_rslt_index].rxlev;
cells_id_infor.cells[i].arfcn=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_meas_rslt.nbr_cells[cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].nbr_meas_rslt_index].arfcn;
cells_id_infor.cells[i].bsic=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_meas_rslt.nbr_cells[cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].nbr_meas_rslt_index].bsic;
cells_id_infor.total++;
cells_id_infor.cell_id_num[i] = i + 1;
}
}
}
// Here is the preservation of access to the data, according to their actual situation
//Em_SetCellsIdInfor(&cells_id_infor);
return;
}
4.Method
//enable
mmi_Cell_Info_start_req(MOD_L4C);
//disable
mmi_Cell_Info_stop_req(MOD_L4C);
2. Write two functions similar to the following
//
void mmi_Cell_Info_start_req(module_type mod_id)
{
mmi_frm_set_protocol_event_handler(MSG_ID_L4C_NBR_CELL_INFO_REG_CNF,mmi_Cell_Info_parsing_data,
MMI_FALSE);
mmi_frm_set_protocol_event_handler(MSG_ID_L4C_NBR_CELL_INFO_IND,mmi_Cell_Info_parsing_data,
MMI_FALSE);
mmi_frm_send_ilm(mod_id,MSG_ID_L4C_NBR_CELL_INFO_REG_REQ, NULL, NULL);
return;
}
//
void mmi_Cell_Info_stop_req(module_type mod_id)
{
mmi_frm_clear_protocol_event_handler(MSG_ID_L4C_NBR_CELL_INFO_IND,
(PsIntFuncPtr)mmi_Cell_Info_parsing_data);
mmi_frm_clear_protocol_event_handler(MSG_ID_L4C_NBR_CELL_INFO_REG_CNF,
(PsIntFuncPtr)mmi_Cell_Info_parsing_data);
mmi_frm_send_ilm(mod_id,MSG_ID_L4C_NBR_CELL_INFO_DEREG_REQ, NULL, NULL);
return;
}
3. Response function
void mmi_Cell_Info_parsing_data(void *info, int mod_src)
{
l4c_nbr_cell_info_ind_struct* cell_info;
int valid_cell;
int i=0;
int j;
MMI_CELLS_ID_INFOR cells_id_infor;
memset(&cells_id_infor,0,sizeof(cells_id_infor));
cell_info = (l4c_nbr_cell_info_ind_struct *)info;
//Service cell information
cells_id_infor.cells[0].mcc=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.serv_info.gci.mcc;
cells_id_infor.cells[0].mnc=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.serv_info.gci.mnc;
cells_id_infor.cells[0].lac=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.serv_info.gci.lac;
cells_id_infor.cells[0].cell_id=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.serv_info.gci.ci;
cells_id_infor.total++;
cells_id_infor.cell_id_num[0] = 1;
// neighbor cell information : PLMN, Cell ID, LAC, BSIC, Rx Level, Arfcn
if (cell_info->is_nbr_info_valid)
{
for (j = 0; j < cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_num; j++)
{
//g_mmi_nbr_neighbor_cell_info[mod_src-MOD_L4C][j].mcc = cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].gci.mcc;
//g_mmi_nbr_neighbor_cell_info[mod_src-MOD_L4C][j].mnc = cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].gci.mnc;
//g_mmi_nbr_neighbor_cell_info[mod_src-MOD_L4C][j].lac = cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].gci.lac;
//g_mmi_nbr_neighbor_cell_info[mod_src-MOD_L4C][j].cell_id = cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].gci.ci;
if (cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].nbr_meas_rslt_index>= cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_meas_rslt.nbr_meas_num)
continue;
//Information of the neighboring cells
{
i++;
cells_id_infor.cells[i].mcc=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].gci.mcc;
cells_id_infor.cells[i].mnc=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].gci.mnc;
cells_id_infor.cells[i].lac=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].gci.lac;
cells_id_infor.cells[i].cell_id=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].gci.ci;
cells_id_infor.cells[i].rxlev=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_meas_rslt.nbr_cells[cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].nbr_meas_rslt_index].rxlev;
cells_id_infor.cells[i].arfcn=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_meas_rslt.nbr_cells[cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].nbr_meas_rslt_index].arfcn;
cells_id_infor.cells[i].bsic=cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_meas_rslt.nbr_cells[cell_info->ps_nbr_cell_info_union.gas_nbr_cell_info.nbr_cell_info[j].nbr_meas_rslt_index].bsic;
cells_id_infor.total++;
cells_id_infor.cell_id_num[i] = i + 1;
}
}
}
// Here is the preservation of access to the data, according to their actual situation
//Em_SetCellsIdInfor(&cells_id_infor);
return;
}
4.Method
//enable
mmi_Cell_Info_start_req(MOD_L4C);
//disable
mmi_Cell_Info_stop_req(MOD_L4C);