コード例 #1
0
ファイル: XLSImportManage.cs プロジェクト: xiaoyj/Space
 public SubsystemDataImple convertXls(XlsTable[] xlsTables)
 {
     SubsystemDataImple systemDateImple = new SubsystemDataImple();
     systemDateImple.SubSystemName = NEResource.NE_SUBSYS;
     for (int i = 0; i < xlsTables.Length; i++)
     {
         XlsTable xlsSiteTable = xlsTables[i];
         string sheetName = xlsSiteTable.SheetName;
         if (sheetName != null)
         {
             if (!(sheetName == "Sites"))
             {
                 if (sheetName == "Transceivers")
                 {
                     goto Label_0088;
                 }
                 if (sheetName == "Cells")
                 {
                     goto Label_0098;
                 }
                 if (sheetName == "NetWork")
                 {
                     goto Label_00A8;
                 }
                 if (sheetName == "Equipment")
                 {
                     goto Label_00B3;
                 }
             }
             else
             {
                 systemDateImple.Site = this.ConvertXLSToSite(xlsSiteTable);
             }
         }
         continue;
     Label_0088:
         systemDateImple.Transceiver = this.ConvertXLSToTranceiver(xlsSiteTable);
         continue;
     Label_0098:
         systemDateImple.LTECell = this.ConvertXLSToCell(xlsSiteTable);
         continue;
     Label_00A8:
         this.ConvertXLSFromNetWorkName(systemDateImple, xlsSiteTable);
         continue;
     Label_00B3:
         this.ConvertXLSFromEquipmentName(systemDateImple, xlsSiteTable);
     }
     return systemDateImple;
 }
コード例 #2
0
ファイル: XLSImportManage.cs プロジェクト: xiaoyj/Space
 private void ConvertXLSFromEquipmentName(SubsystemDataImple systemDateImple, XlsTable xlsEquipTable)
 {
     if (xlsEquipTable.TableName == "Feeder Equipment")
     {
         this.ConvertXLSToFeederEquipment(systemDateImple, xlsEquipTable);
     }
     else if (xlsEquipTable.TableName == "TMA Equipment")
     {
         this.ConvertXLSToTmaEquipment(systemDateImple, xlsEquipTable);
     }
     else if (xlsEquipTable.TableName == "eNodeB Equipment")
     {
         this.ConvertXLSToBtsEquipment(systemDateImple, xlsEquipTable);
     }
 }
コード例 #3
0
ファイル: XLSImportManage.cs プロジェクト: xiaoyj/Space
 private void ImportTranceiverData(bool isUpdate, SubsystemDataImple systemDateImple)
 {
     string info = string.Empty;
     Huawei.UNet.Frame.Interface.LogLevel warning = Huawei.UNet.Frame.Interface.LogLevel.Info;
     TranceiverTableEditor editor = new TranceiverTableEditor(this.m_Model, new List<Transceiver>());
     editor.ClearModuleEvent();
     if (editor.DumpNEData(ref info, isUpdate, systemDateImple.Transceiver, NEResource.NE_CELL))
     {
         info = string.Format(NEResource.NE_TABLE_IMPORT_SUCCESSED, NEResource.NE_CELL);
     }
     else
     {
         warning = Huawei.UNet.Frame.Interface.LogLevel.Warning;
         info = string.Format(Huawei.UNet.Common.GlobalResource.GlobalResource.EXCEL_IMPORT_FAIL, NEResource.NE_CELL);
     }
     this.m_IEventViewService.WriteLog(info, warning);
 }
コード例 #4
0
ファイル: XLSImportManage.cs プロジェクト: xiaoyj/Space
 private void ImportSectorData(bool isUpdate, SubsystemDataImple systemDateImple)
 {
     string info = string.Empty;
     Huawei.UNet.Frame.Interface.LogLevel warning = Huawei.UNet.Frame.Interface.LogLevel.Info;
     SectorTableModule module = new SectorTableModule(this.m_Model);
     if (module.DumpData(ref info, isUpdate, systemDateImple.AntConfig))
     {
         info = string.Format(NEResource.NE_TABLE_IMPORT_SUCCESSED, NEResource.NE_SECTOR);
     }
     else
     {
         warning = Huawei.UNet.Frame.Interface.LogLevel.Warning;
         info = string.Format(Huawei.UNet.Common.GlobalResource.GlobalResource.EXCEL_IMPORT_FAIL, "Sector");
     }
     this.m_IEventViewService.WriteLog(info, warning);
 }
コード例 #5
0
ファイル: XLSImportManage.cs プロジェクト: xiaoyj/Space
 private void ImportFrequceBand(bool isUpdate, SubsystemDataImple systemDateImple)
 {
     string info = string.Empty;
     Huawei.UNet.Frame.Interface.LogLevel warning = Huawei.UNet.Frame.Interface.LogLevel.Info;
     FreBandEditor editor = new FreBandEditor(this.m_Model, new List<FrequencyBand>(), NetWorkType.LTE);
     editor.ClearModuleEvent();
     if (editor.DumpNEData(ref info, isUpdate, systemDateImple.FrequencyBand, NEResource.NE_FREQUENCY_BANDS))
     {
         info = string.Format(NEResource.NE_TABLE_IMPORT_SUCCESSED, NEResource.NE_FREQUENCY_BANDS);
     }
     else
     {
         warning = Huawei.UNet.Frame.Interface.LogLevel.Warning;
         info = string.Format(Huawei.UNet.Common.GlobalResource.GlobalResource.EXCEL_IMPORT_FAIL, NEResource.NE_FREQUENCY_BANDS);
     }
     this.m_IEventViewService.WriteLog(info, warning);
 }
コード例 #6
0
ファイル: XLSImportManage.cs プロジェクト: xiaoyj/Space
 private void ImportFeederEquipment(bool isUpdate, SubsystemDataImple systemDateImple)
 {
     string info = string.Empty;
     Huawei.UNet.Frame.Interface.LogLevel warning = Huawei.UNet.Frame.Interface.LogLevel.Info;
     FeederTableEditor editor = new FeederTableEditor(this.m_Model);
     editor.ClearModuleEvent();
     if (editor.DumpNEData(ref info, isUpdate, systemDateImple.FeederEquipment, NEResource.NE_FEEDER_EQUIPMENT))
     {
         info = string.Format(NEResource.NE_TABLE_IMPORT_SUCCESSED, NEResource.NE_FEEDER_EQUIPMENT);
     }
     else
     {
         warning = Huawei.UNet.Frame.Interface.LogLevel.Warning;
         info = string.Format(Huawei.UNet.Common.GlobalResource.GlobalResource.EXCEL_IMPORT_FAIL, NEResource.NE_FEEDER_EQUIPMENT);
     }
     this.m_IEventViewService.WriteLog(info, warning);
 }
コード例 #7
0
ファイル: XLSImportManage.cs プロジェクト: xiaoyj/Space
 private void ImportCellData(bool isUpdate, SubsystemDataImple systemDateImple)
 {
     DataTable dt = ConvertObj2DTTool.ConvertCell(this.m_Model, systemDateImple.LTECell);
     string info = string.Empty;
     Huawei.UNet.Frame.Interface.LogLevel warning = Huawei.UNet.Frame.Interface.LogLevel.Info;
     CellTableFormTestEditor editor = new CellTableFormTestEditor(this.m_Model, new List<IACell>());
     editor.ClearModuleEvent();
     if (editor.DumpCellData(ref info, isUpdate, dt, true))
     {
         info = string.Format(NEResource.NE_TABLE_IMPORT_SUCCESSED, NEResource.NE_CARRIER);
     }
     else
     {
         warning = Huawei.UNet.Frame.Interface.LogLevel.Warning;
         info = string.Format(Huawei.UNet.Common.GlobalResource.GlobalResource.EXCEL_IMPORT_FAIL, NEResource.NE_CARRIER);
     }
     this.m_IEventViewService.WriteLog(info, warning);
 }
コード例 #8
0
ファイル: XLSImportManage.cs プロジェクト: xiaoyj/Space
 public void Import(SubsystemDataImple subsystemData, bool isUpdate)
 {
     this.ImportTmaEquipment(isUpdate, subsystemData);
     this.ImportBtsEquipment(isUpdate, subsystemData);
     this.ImportFeederEquipment(isUpdate, subsystemData);
     this.ImportFrequceBand(isUpdate, subsystemData);
     this.ImportSiteData(isUpdate, subsystemData);
     this.ImportTranceiverData(isUpdate, subsystemData);
     this.ImportSectorData(isUpdate, subsystemData);
     this.ImportCellData(isUpdate, subsystemData);
     this.ImportRepeaterBand(isUpdate, subsystemData);
 }
コード例 #9
0
ファイル: XLSImportManage.cs プロジェクト: xiaoyj/Space
 private void ConvertXLSToTmaEquipment(SubsystemDataImple systemDateImple, XlsTable xlsTmaTable)
 {
     List<TmaEquipment> list = new List<TmaEquipment>();
     for (int i = 0; i < xlsTmaTable.Data.Rows.Count; i++)
     {
         DataRow row = xlsTmaTable.Data.Rows[i];
         try
         {
             TmaEquipment item = new TmaEquipment();
             item.Name = row["Name"].ToString();
             item.NoiseFigure = float.Parse(row["Noise figureTMA (dB)"].ToString());
             item.UlGain = float.Parse(row["Reception gain TMA (dB)"].ToString());
             item.DlLoss = float.Parse(row["Transmission losses TMA (dB)"].ToString());
             list.Add(item);
         }
         catch (Exception exception)
         {
             this.m_Model.EventVierService.WriteLog("Tma Equipment Table's " + (i + 1) + "row import error", Huawei.UNet.Frame.Interface.LogLevel.Warning);
             WriteLog.Logger.Error(exception.StackTrace);
         }
     }
     systemDateImple.TmaEquipment = list;
 }
コード例 #10
0
ファイル: XLSImportManage.cs プロジェクト: xiaoyj/Space
 private void ConvertXLSToSector(SubsystemDataImple systemDateImple, XlsTable xlsNetWorkTable)
 {
     List<AntConfig> list = new List<AntConfig>();
     Dictionary<string, string> xlsNameToProper = new Dictionary<string, string>();
     XLSProConst.CellXlsToAntConfigPro(xlsNameToProper);
     xlsNameToProper.Remove("Site Name");
     xlsNameToProper.Remove("Site ID");
     xlsNameToProper.Remove("Transceiver Name");
     Dictionary<string, string> dictionary2 = new Dictionary<string, string>();
     XLSProConst.AntConfigXlsToObjPro(dictionary2);
     for (int i = 0; i < xlsNetWorkTable.Data.Rows.Count; i++)
     {
         DataRow dr = xlsNetWorkTable.Data.Rows[i];
         string colName = string.Empty;
         try
         {
             AntConfig data = new AntConfig();
             data.IsMainAnt = false;
             this.FillValue(xlsNameToProper, dr, data, ref colName);
             foreach (string str2 in dictionary2.Keys)
             {
                 string antennaName = dr[str2].ToString();
                 if (str2.Equals("Antenna"))
                 {
                     AntennaEntity entity = this.m_Model.Antennas.FindAntennaByName(antennaName);
                     data.OutdoorAntenna = null;
                     if (entity.Name != "createnewtempantenna")
                     {
                         data.OutdoorAntenna = entity;
                     }
                 }
                 if (str2.Equals("TMA Equipment"))
                 {
                     data.Tma = this.m_Model.TmaColl.FindTmaByName(antennaName);
                 }
                 if (str2.Equals("Feeder Equipment"))
                 {
                     data.Feeder = this.m_Model.FeederColl.FindFeederByName(antennaName);
                 }
             }
             Transceiver transceiver = new Transceiver();
             transceiver.Name = dr["Transceiver Name"].ToString();
             data.Parent = transceiver;
             list.Add(data);
         }
         catch (Exception exception)
         {
             this.m_Model.EventVierService.WriteLog(string.Concat(new object[] { "Sector: Rows=(", i, ")", colName, "Error" }), Huawei.UNet.Frame.Interface.LogLevel.Warning);
             WriteLog.Logger.Warn(exception.Message);
         }
     }
     systemDateImple.AntConfig = list;
 }
コード例 #11
0
ファイル: XLSImportManage.cs プロジェクト: xiaoyj/Space
 private void ConvertXLSToRepeater(SubsystemDataImple systemDateImple, XlsTable xlsNetWorkTable)
 {
     Dictionary<string, string> xlsNameToProper = new Dictionary<string, string>();
     XLSProConst.RepeatersToObj(xlsNameToProper);
     List<Repeater> list = new List<Repeater>();
     for (int i = 0; i < xlsNetWorkTable.Data.Rows.Count; i++)
     {
         DataRow row = xlsNetWorkTable.Data.Rows[i];
         try
         {
             Repeater item = new Repeater();
             item.Name = row["Name"].ToString();
             item.Active = bool.Parse(row["Active"].ToString());
             item.DX = double.Parse(row["DX(m)"].ToString());
             item.DY = double.Parse(row["DY(m)"].ToString());
             item.LinkType = (RepeaterLinkType) Enum.Parse(typeof(RepeaterLinkType), row["Link Type"].ToString());
             item.LinkLoss = float.Parse(row["Link Loss(dB)"].ToString());
             item.LinkDelay = float.Parse(row["Link Delay(dB)"].ToString());
             item.UlTotalGain = float.Parse(row["Upload Total Gain(dB)"].ToString());
             item.DlTotalGain = float.Parse(row["Download Total Gain(dB)"].ToString());
             item.Comments = row["Comment"].ToString();
             item.DonorAntConfig = new AntConfig();
             AntConfig config = new AntConfig();
             config.OutdoorAntenna = this.m_Model.Antennas.FindAntennaByName(row["Antenna Donor side"].ToString());
             config.Feeder = this.m_Model.FeederColl.FindFeederByName(row["Feeder Donor Side"].ToString());
             config.UlFeederLength = float.Parse(row["Feeder Length Tansmission(Donor)"].ToString());
             config.DlFeederLength = float.Parse(row["Feeder Length Reception(Donor)"].ToString());
             config.Height = float.Parse(row["Antenna Height(Donor)(m)"].ToString());
             config.Azimuth = float.Parse(row["Azimuth(Donor)"].ToString());
             config.Tilt = float.Parse(row["Mechanical Downtilt(Donor)"].ToString());
             item.DonorAntConfig = config;
             AntConfig config2 = new AntConfig();
             config2.OutdoorAntenna = this.m_Model.Antennas.FindAntennaByName(row["Antenna Coverage Side"].ToString());
             config2.Feeder = this.m_Model.FeederColl.FindFeederByName(row["Feeder Coverage Side"].ToString());
             config2.UlFeederLength = float.Parse(row["Feeder Length Transmission(Coverage)"].ToString());
             config2.DlFeederLength = float.Parse(row["Feeder Length Reception(Coverage)"].ToString());
             config2.Height = float.Parse(row["Antenna Height(Coverage)(m)"].ToString());
             config2.Azimuth = float.Parse(row["Azimuth(Coverage)"].ToString());
             config2.Tilt = float.Parse(row["Mechanical Downtilt(Coverage)"].ToString());
             item.ConverageAntConfig = config2;
             item.Equipment = this.m_Model.RepeaterEquipCollection.GetRepeaterEquipByName(row["Equipment"].ToString());
             item.PropModels = new List<PropModelConfig>();
             PropModelConfig config3 = new PropModelConfig();
             config3.PropModelID = NECommon.GetPropIDByName(row["Main propagation model"].ToString(), this.m_Model.PropagetionColl.GetPropagationModelList());
             config3.CalcRadius = int.Parse(row["Main calculation radius (m)"].ToString());
             config3.CalcResolution = int.Parse(row["Main resolution"].ToString());
             item.PropModels.Add(config3);
             if (row["Extended propagation model"].ToString() != string.Empty)
             {
                 PropModelConfig config4 = new PropModelConfig();
                 config4.PropModelID = NECommon.GetPropIDByName(row["Extended propagation model"].ToString(), this.m_Model.PropagetionColl.GetPropagationModelList());
                 config4.CalcRadius = int.Parse(row["Extended calculation radius (m)"].ToString());
                 config4.CalcResolution = int.Parse(row["Extended resolution"].ToString());
                 item.PropModels.Add(config4);
             }
             foreach (string str2 in xlsNameToProper.Keys)
             {
                 string str3 = row[str2].ToString();
                 if (str2.Equals("Donor Cell"))
                 {
                     Transceiver transceiver = new Transceiver();
                     transceiver.Name = str3;
                     item.Parent = transceiver;
                 }
             }
             list.Add(item);
         }
         catch (Exception exception)
         {
             this.m_Model.EventVierService.WriteLog("Repeaters Table's " + (i + 1) + "row import error", Huawei.UNet.Frame.Interface.LogLevel.Warning);
             WriteLog.Logger.Error(exception.StackTrace);
         }
     }
     systemDateImple.LTERepeater = list;
 }
コード例 #12
0
ファイル: XLSImportManage.cs プロジェクト: xiaoyj/Space
 private void ConvertXLSToFrequencyEquipment(SubsystemDataImple systemDateImple, XlsTable xlsNetWorkTable)
 {
     List<FrequencyBand> list = new List<FrequencyBand>();
     for (int i = 0; i < xlsNetWorkTable.Data.Rows.Count; i++)
     {
         DataRow row = xlsNetWorkTable.Data.Rows[i];
         try
         {
             FrequencyBand item = new FrequencyBand();
             item.Name = row["Name"].ToString();
             if (string.IsNullOrEmpty(item.Name))
             {
                 this.m_Model.EventVierService.WriteLog("Frequency Bands Table's " + (i + 1) + "row import error", Huawei.UNet.Frame.Interface.LogLevel.Warning);
             }
             else
             {
                 item.ACIR = float.Parse(row["ACIR"].ToString());
                 item.BandWidth = float.Parse(row["BandWidth (MHz)"].ToString());
                 item.DLFrequency = float.Parse(row["Downlink Frequency (MHz)"].ToString());
                 item.EndChIndex = int.Parse(row["End Channel"].ToString());
                 item.ExcludedChannels = row["Excluded Channels"].ToString();
                 item.StartChIndex = int.Parse(row["Start Channel"].ToString());
                 item.ULFrequency = float.Parse(row["Uplink Frequency (MHz)"].ToString());
                 item.DuplexingMethod = (FrequencyBand.eDupMethod) Enum.Parse(typeof(FrequencyBand.eDupMethod), row["Duplexing"].ToString());
                 list.Add(item);
             }
         }
         catch (Exception exception)
         {
             this.m_Model.EventVierService.WriteLog("Frequency Bands Table's " + (i + 1) + "row import error", Huawei.UNet.Frame.Interface.LogLevel.Warning);
             WriteLog.Logger.Error(exception.StackTrace);
         }
     }
     systemDateImple.FrequencyBand = list;
 }
コード例 #13
0
ファイル: XLSImportManage.cs プロジェクト: xiaoyj/Space
 private void ConvertXLSToFeederEquipment(SubsystemDataImple systemDateImple, XlsTable xlsTmaTable)
 {
     List<FeederEquipment> list = new List<FeederEquipment>();
     for (int i = 0; i < xlsTmaTable.Data.Rows.Count; i++)
     {
         DataRow row = xlsTmaTable.Data.Rows[i];
         try
         {
             FeederEquipment item = new FeederEquipment();
             item.Name = row["Name"].ToString();
             item.LossPerHundredMeter = float.Parse(row["Feeder loss per metre (dB/100m)"].ToString());
             list.Add(item);
         }
         catch (Exception exception)
         {
             this.m_Model.EventVierService.WriteLog("Feeder Equipment Table's " + (i + 1) + "row import error", Huawei.UNet.Frame.Interface.LogLevel.Warning);
             WriteLog.Logger.Error(exception.StackTrace);
         }
     }
     systemDateImple.FeederEquipment = list;
 }
コード例 #14
0
ファイル: XLSImportManage.cs プロジェクト: xiaoyj/Space
 private void ConvertXLSFromNetWorkName(SubsystemDataImple systemDateImple, XlsTable xlsNetWorkTable)
 {
     string tableName = xlsNetWorkTable.TableName;
     if (tableName != null)
     {
         if (!(tableName == "Frequency Bands"))
         {
             if (tableName == "Repeaters")
             {
                 this.ConvertXLSToRepeater(systemDateImple, xlsNetWorkTable);
             }
             else if (tableName == "Sectors")
             {
                 this.ConvertXLSToSector(systemDateImple, xlsNetWorkTable);
             }
         }
         else
         {
             this.ConvertXLSToFrequencyEquipment(systemDateImple, xlsNetWorkTable);
         }
     }
 }