Пример #1
0
        public CellIntraFreqHoView Query()
        {
            var zteCellGroup = _zteCellGroupRepository.GetRecentList(_eNodebId, _sectorId);
            int configId;

            if (zteCellGroup != null && zteCellGroup.Count > 0)
            {
                var fields = zteCellGroup[0].intraFHOMeasCfg.Split(',');
                configId = fields.Length > 0 ? fields[0].ConvertToInt(0) : 0;
            }
            else
            {
                var zteGroup = _zteGroupRepository.GetRecent(_eNodebId);
                var fields   = zteGroup?.intraFHOMeasCfg.Split(',');
                configId = fields != null && fields.Length > 0 ? fields[0].ConvertToInt(0) : 0;
            }

            var ztePara = _zteMeasurementRepository.GetRecent(_eNodebId, configId);

            if (ztePara == null)
            {
                return(null);
            }
            var result = Mapper.Map <UeEUtranMeasurementZte, CellIntraFreqHoView>(ztePara);

            result.SectorId = _sectorId;
            return(result);
        }
Пример #2
0
        public void Test_GetBySectorId()
        {
            var result = _repository.GetRecentList(502776, 48);

            Assert.IsNotNull(result);
            Assert.AreEqual(result[0].iDate, "20160408");
        }
        public void Test_GetRecentBySectorId()
        {
            var results = _repository.GetRecentList(501777, 49);

            Assert.IsNotNull(results);
            Assert.AreEqual(results[0].eNodeB_Id, 501777);
            Assert.AreEqual(results[0].description, "cellLocalId=49");
            Assert.AreEqual(results[0].CDMA2000MeasParas_cdmaType, 0);
        }
Пример #4
0
        public CellHuaweiMongo Query()
        {
            var zteCell  = _zteCellRepository.GetRecent(_eNodebId, _sectorId);
            var zteMeas  = _zteMeasRepository.GetRecentList(_eNodebId, _sectorId);
            var ztePrach = _ztePrachRepository.GetRecent(_eNodebId, _sectorId);

            return(new CellHuaweiMongo
            {
                PhyCellId = zteCell?.pci ?? 0,
                CellSpecificOffset = zteCell?.ocs ?? 15,
                QoffsetFreq = zteMeas[0]?.eutranMeasParas_offsetFreq ?? 15,
                RootSequenceIdx = ztePrach?.rootSequenceIndex ?? -1
            });
        }
Пример #5
0
        public List <CellInterFreqHoView> Query()
        {
            var zteGroup     = _zteGroupRepository.GetRecent(_eNodebId);
            var zteCellGroup = _zteCellGroupRepository.GetRecentList(_eNodebId, _sectorId);
            var idA1         = zteGroup == null ? 10 : int.Parse(zteGroup.closedInterFMeasCfg.Split(',')[0]);
            var idA2         = zteGroup == null ? 20 : int.Parse(zteGroup.openInterFMeasCfg.Split(',')[0]);
            var meas         = _zteMeasurementRepository.GetRecent(_eNodebId, idA1);
            var eventA1      = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA1>(meas);

            meas = _zteMeasurementRepository.GetRecent(_eNodebId, idA2);
            var eventA2 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA2>(meas);

            if (zteCellGroup.Count > 1)
            {
                return(zteCellGroup.Select(group =>
                {
                    var view = new CellInterFreqHoView
                    {
                        Earfcn = (int)group.eutranMeasParas_interCarriFreq,
                        InterFreqEventA1 = eventA1,
                        InterFreqEventA2 = eventA2
                    };

                    var configId = int.Parse(group.interFHOMeasCfg.Split(',')[0]);
                    var measurement = _zteMeasurementRepository.GetRecent(_eNodebId, configId);
                    if (measurement == null)
                    {
                        return view;
                    }
                    view.InterFreqHoEventType = measurement.eventId;
                    view.InterFreqEventA3 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA3>(measurement);
                    view.InterFreqEventA4 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA4>(measurement);
                    view.InterFreqEventA5 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA5>(measurement);
                    return view;
                }).ToList());
            }
            if (zteCellGroup.Count == 0)
            {
                return(new List <CellInterFreqHoView>());
            }
            var configIds = zteCellGroup[0].interFHOMeasCfg.Split(',').Select(int.Parse).Distinct();

            return(configIds.Select(id =>
            {
                var view = new CellInterFreqHoView
                {
                    Earfcn = (int)zteCellGroup[0].eutranMeasParas_interCarriFreq,
                    InterFreqEventA1 = eventA1,
                    InterFreqEventA2 = eventA2
                };

                var measurement = _zteMeasurementRepository.GetRecent(_eNodebId, id);
                if (measurement != null)
                {
                    view.InterFreqHoEventType = measurement.eventId;
                    view.InterFreqEventA3 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA3>(measurement);
                    view.InterFreqEventA4 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA4>(measurement);
                    view.InterFreqEventA5 = Mapper.Map <UeEUtranMeasurementZte, InterFreqEventA5>(measurement);
                }
                return view;
            }).ToList());
        }