protected override bool AnalysisOutputParameters(TestModeEquipmentParameters[] InformationList) { lock (tempAtten) { try { outputParameters = new TestModeEquipmentParameters[2]; outputParameters[0].FiledName = "CSEN_Intensify(DBM)"; sensitivityPoint = Algorithm.ISNaNorIfinity(sensitivityPoint); if (testBerStruct.IsBerQuickTest == true) { outputParameters[0].DefaultValue = sensitivityPoint.ToString().Trim(); } else { outputParameters[0].DefaultValue = Math.Round(sensitivityPoint, 4).ToString().Trim(); } outputParameters[1].FiledName = "CSENOMA_Intensify(DBM)"; sensOMA = Algorithm.CalculateOMA(sensitivityPoint, Convert.ToDouble(OSERValueArray[GlobalParameters.CurrentChannel - 1])); outputParameters[1].DefaultValue = Math.Round(sensOMA, 4).ToString().Trim(); return(true); } catch (System.Exception ex) { throw ex; } } }
protected override bool AnalysisOutputParameters(TestModeEquipmentParameters[] InformationList) { try { outputParameters = new TestModeEquipmentParameters[2]; outputParameters[0].FiledName = "Overload(dbm)"; OverloadPoint = Algorithm.ISNaNorIfinity(OverloadPoint); outputParameters[0].DefaultValue = Math.Round(OverloadPoint, 4).ToString().Trim(); outputParameters[1].FiledName = "OverloadOMA(dbm)"; OverloadOMA = Algorithm.CalculateOMA(OverloadPoint, Convert.ToDouble(OSERValueArray[GlobalParameters.CurrentChannel - 1])); outputParameters[1].DefaultValue = Math.Round(OverloadOMA, 4).ToString().Trim(); return(true); } catch (InnoExCeption ex)//from driver { //Log.SaveLogToTxt(ex.ID + ": " + ex.Message + "\r\n" + ex.StackTrace); exceptionList.Add(ex); return(false); } catch (Exception error)//from itself { //one way: deal this exception itself InnoExCeption ex = new InnoExCeption(ExceptionDictionary.Code._0x02F04, error.StackTrace); //Log.SaveLogToTxt(ex.ID + ": " + ex.Message + "\r\n" + ex.StackTrace); exceptionList.Add(ex); return(false); //the other way is: should throw exception, rather than the above three code. see below: //throw new InnoExCeption(ExceptionDictionary.Code._0x02F04, error.StackTrace); } }
protected override bool AnalysisOutputParameters(TestModeEquipmentParameters[] InformationList) { lock (tempAtten) { try { outputParameters = new TestModeEquipmentParameters[5]; outputParameters[0].FiledName = "LOSA(DBM)"; losA = Algorithm.ISNaNorIfinity(losA); outputParameters[0].DefaultValue = Math.Round(losA, 4).ToString().Trim(); outputParameters[1].FiledName = "LOSD(DBM)"; losD = Algorithm.ISNaNorIfinity(losD); outputParameters[1].DefaultValue = Math.Round(losD, 4).ToString().Trim(); outputParameters[2].FiledName = "LOSH(DBM)"; losH = Algorithm.ISNaNorIfinity(losH); outputParameters[2].DefaultValue = Math.Round(losH, 4).ToString().Trim(); outputParameters[3].FiledName = "LOSA_OMA(DBM)"; losAOma = Algorithm.CalculateOMA(losA, Convert.ToDouble(OSERValueArray[GlobalParameters.CurrentChannel - 1])); outputParameters[3].DefaultValue = Math.Round(losAOma, 4).ToString().Trim(); outputParameters[4].FiledName = "LOSD_OMA(DBM)"; losDOma = Algorithm.CalculateOMA(losD, Convert.ToDouble(OSERValueArray[GlobalParameters.CurrentChannel - 1])); outputParameters[4].DefaultValue = Math.Round(losDOma, 4).ToString().Trim(); for (int i = 0; i < outputParameters.Length; i++) { Log.SaveLogToTxt(outputParameters[i].FiledName + " : " + outputParameters[i].DefaultValue); } return(true); } catch (InnoExCeption ex)//from driver { //Log.SaveLogToTxt(ex.ID + ": " + ex.Message + "\r\n" + ex.StackTrace); exceptionList.Add(ex); return(false); } catch (Exception error)//from itself { //one way: deal this exception itself InnoExCeption ex = new InnoExCeption(ExceptionDictionary.Code._0x02F04, error.StackTrace); //Log.SaveLogToTxt(ex.ID + ": " + ex.Message + "\r\n" + ex.StackTrace); exceptionList.Add(ex); return(false); //the other way is: should throw exception, rather than the above three code. see below: //throw new InnoExCeption(ExceptionDictionary.Code._0x02F04, error.StackTrace); } } }