Example #1
0
 public ISubSystemData ConvertXls(XlsTable[] xlsTables)
 {
     PredictionSystemData predictionData = new PredictionSystemData();
     IEventViewService eventViewService = this.m_AppContext.Lookup(typeof(IEventViewService).FullName) as IEventViewService;
     foreach (XlsTable table in xlsTables)
     {
         if (table.TableName == LTEPredictionResource.PREDICTION_TABLE_NAME)
         {
             XLSPredictionDataExportTool.PredictionTableToData(predictionData, table, eventViewService);
             this.PredictionTableToData(predictionData, table, eventViewService);
         }
     }
     return predictionData;
 }
Example #2
0
 private void SetTreeState(PredictionSystemData psd, TreeNode rootNode, string nodename)
 {
     foreach (TreeNode node in rootNode.Nodes)
     {
         string str = nodename + node.Text;
         if ((node.Level == 3) && (nodename.Contains("PDSCH MCS") || nodename.Contains("PUSCH MCS")))
         {
             str = str + node.Tag.ToString();
         }
         this.m_PredictionResultManager.NodeCheckEvent(node, psd.PredictionTreeState[str] != 1);
         node.StateImageIndex = psd.PredictionTreeState[str];
         this.SetTreeState(psd, node, str);
     }
 }
Example #3
0
 private void SaveTreeState(PredictionSystemData psd, TreeNode rootNode, string nodename)
 {
     foreach (TreeNode node in rootNode.Nodes)
     {
         string key = nodename + node.Text;
         if ((node.Level == 3) && (nodename.Contains("PDSCH MCS") || nodename.Contains("PUSCH MCS")))
         {
             key = key + node.Tag.ToString();
         }
         psd.PredictionTreeState.Add(key, node.StateImageIndex);
         this.SaveTreeState(psd, node, key);
     }
 }
Example #4
0
 public ISubSystemData Serialize()
 {
     PredictionSystemData psd = new PredictionSystemData();
     psd.PredictionConfig = this.m_PredictionGroupsManager.PredictionConfigTemplate;
     psd.PredictionGroupList = this.m_PredictionGroupsManager.PredictionGroups;
     psd.RootNodeState = this.m_PredictionGroupsManager.RootNode.StateImageIndex;
     psd.NeedShowIndex = this.m_PredictionGroupsManager.PredictionLegendManagement.m_needShowIndexdic;
     this.SaveTreeState(psd, this.m_PredictionGroupsManager.RootNode, string.Empty);
     return psd;
 }
Example #5
0
 private void PredictionTableToData(PredictionSystemData predictionData, XlsTable xTable, IEventViewService eventViewService)
 {
     PredictionConfig config = new PredictionConfig();
     for (int i = 0; i < xTable.Data.Rows.Count; i++)
     {
         DataRow row = xTable.Data.Rows[i];
         try
         {
             config.Resolution = float.Parse(row["Default Resolution(m)"].ToString());
             config.UEHeight = float.Parse(row["Receiver Height(m)"].ToString());
         }
         catch (Exception exception)
         {
             eventViewService.WriteLog(string.Format(LTEPredictionResource.PREDICTION_TABLE_CONVERT_FAIL, Convert.ToString((int) (i + 1))), Huawei.UNet.Frame.Interface.LogLevel.Warning);
             WriteLog.Logger.Error(exception.StackTrace);
             config = null;
         }
     }
     predictionData.PredictionConfig = config;
 }