Sample code for Neighboring Cells Information
//--------------------------------------------------------------------------------------------------/*** Test: Neighbor Cells Information.**///--------------------------------------------------------------------------------------------------static void Testle_mrc_GetNeighboringCellsInfo(void){le_result_t res;le_mrc_NeighborCellsRef_t ngbrRef;le_mrc_CellInfoRef_t cellRef;uint32_t i = 0;uint32_t cid = 0;uint32_t lac = 0;int32_t rxLevel = 0;le_mrc_Rat_t rat = 0;int32_t ecio = 0;int32_t intraRsrp = 0;int32_t intraRsrq = 0;int32_t interRsrp = 0;int32_t interRsrq = 0;LE_INFO("Start Testle_mrc_GetNeighborCellsInfo");ngbrRef = le_mrc_GetNeighborCellsInfo();LE_ASSERT(ngbrRef);if (ngbrRef){i = 0;cellRef = le_mrc_GetFirstNeighborCellInfo(ngbrRef);LE_ASSERT(cellRef);cid = le_mrc_GetNeighborCellId(cellRef);lac = le_mrc_GetNeighborCellLocAreaCode(cellRef);rxLevel = le_mrc_GetNeighborCellRxLevel(cellRef);rat = le_mrc_GetNeighborCellRat(cellRef);LE_INFO("Cell #%d, cid.%d, lac.%d, rxLevel.%ddBm, RAT.%d", i, cid, lac, rxLevel, rat);// Specific values for UMTS and LTEswitch(rat){case LE_MRC_RAT_UMTS:ecio = le_mrc_GetNeighborCellUmtsEcIo(cellRef);break;case LE_MRC_RAT_LTE:res = le_mrc_GetNeighborCellLteIntraFreq(cellRef, &intraRsrq, &intraRsrp);LE_ASSERT(res == LE_OK);res = le_mrc_GetNeighborCellLteInterFreq(cellRef, &interRsrq, &interRsrp);LE_ASSERT(res == LE_OK);LE_INFO("Cell #%d, LTE Intra-RSRQ.%010.1fdB, Intra-RSRP.%010.1fdBm, ""Inter-RSRQ.%010.1fdB, Inter-RSRP.%010.1fdBm",i, ((double)intraRsrq/10), ((double)intraRsrp/10),((double)interRsrq/10), ((double)interRsrp/10));break;default:LE_INFO("Nothing more to display");break;}while ((cellRef = le_mrc_GetNextNeighborCellInfo(ngbrRef)) != NULL){i++;cid = le_mrc_GetNeighborCellId(cellRef);lac = le_mrc_GetNeighborCellLocAreaCode(cellRef);rxLevel = le_mrc_GetNeighborCellRxLevel(cellRef);rat = le_mrc_GetNeighborCellRat(cellRef);LE_INFO("Cell #%d, cid.%d, lac.%d, rxLevel.%ddBm, RAT.%d", i, cid, lac, rxLevel, rat);// Specific values for UMTS and LTEswitch(rat){case LE_MRC_RAT_UMTS:ecio = le_mrc_GetNeighborCellUmtsEcIo(cellRef);break;case LE_MRC_RAT_LTE:res = le_mrc_GetNeighborCellLteIntraFreq(cellRef, &intraRsrq, &intraRsrp);LE_ASSERT(res == LE_OK);res = le_mrc_GetNeighborCellLteInterFreq(cellRef, &interRsrq, &interRsrp);LE_ASSERT(res == LE_OK);LE_INFO("Cell #%d, LTE Intra-RSRQ.%010.1fdB, Intra-RSRP.%010.1fdBm, ""Inter-RSRQ.%010.1fdB, Inter-RSRP.%010.1fdBm",i, ((double)intraRsrq/10), ((double)intraRsrp/10),((double)interRsrq/10), ((double)interRsrp/10));break;default:LE_INFO("Nothing more to display");break;}}le_mrc_DeleteNeighborCellsInfo(ngbrRef);}}