コード例 #1
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] InformationList)
        {
            Log.SaveLogToTxt("Step1...Check InputParameters");

            if (InformationList.Length < inPutParametersNameArray.Count)
            {
                Log.SaveLogToTxt("InputParameters are not enough!");
                return(false);
            }
            else
            {
                int  index = -1;
                bool isParametersComplete = true;

                if (isParametersComplete)
                {
                    if (Algorithm.FindFileName(InformationList, "LOSAINPUTPOWER", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                        adjustLosStruct.LosASetPower = Convert.ToDouble(temp);
                    }
                }
                Log.SaveLogToTxt("OK!");
                return(true);
            }
        }
コード例 #2
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] InformationList)
        {
            try
            {
                Log.SaveLogToTxt("Step1...Check InputParameters");

                int  index           = -1;
                bool isParaCompleted = true;

                if (isParaCompleted)
                {
                    if (Algorithm.FindFileName(InformationList, "DMICOEFB", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);
                        if (temp < 0)
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is equal or lesser than 0");
                            return(false);
                        }
                        else
                        {
                            myStruct.DmiCoefB = (ushort)Convert.ToDouble(temp);
                        }
                    }

                    if (Algorithm.FindFileName(InformationList, "DMICOEFC", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);
                        if (temp < 0)
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is equal or lesser than 0");
                            return(false);
                        }
                        else
                        {
                            myStruct.DmiCoefC = (ushort)Convert.ToDouble(temp);
                        }
                    }

                    Log.SaveLogToTxt("OK!");
                    return(true);
                }
                return(false);
            }
            catch (Exception ex)
            {
                Log.SaveLogToTxt("Input parameter error!");
                Log.SaveLogToTxt(ex.Message);
                return(false);
            }
        }
コード例 #3
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] InformationList)
        {
            Log.SaveLogToTxt("Step1...Check InputParameters");

            if (InformationList.Length < inPutParametersNameArray.Count)
            {
                Log.SaveLogToTxt("InputParameters are not enough!");
                return(false);
            }
            else
            {
                int  index = -1;
                bool isParametersComplete = false;
                for (byte i = 0; i < inPutParametersNameArray.Count; i++)
                {
                    if (Algorithm.FindFileName(InformationList, inPutParametersNameArray[i].ToString(), out index) == false)
                    {
                        Log.SaveLogToTxt(inPutParametersNameArray[i].ToString() + "is not exist");
                        isParametersComplete = false;
                        return(isParametersComplete);
                    }
                    else
                    {
                        isParametersComplete = true;
                        continue;
                    }
                }
                if (isParametersComplete)
                {
                    if (Algorithm.FindFileName(InformationList, "PRBSLength", out index))
                    {
                        pTestTxEyeRinOMAStruct.PRBS = InformationList[index].DefaultValue.ToString();
                    }
                    else
                    {
                        return(false);
                    }
                    if (Algorithm.FindFileName(InformationList, "TargetPower", out index))
                    {
                        pTestTxEyeRinOMAStruct.RinTargetPower = Convert.ToDouble(InformationList[index].DefaultValue);
                    }
                    else
                    {
                        return(false);
                    }
                }
                Log.SaveLogToTxt("OK!");
                return(true);
            }
        }
コード例 #4
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] InformationList)
        {
            lock (tempAtten)
            {
                Log.SaveLogToTxt("Step1...Check InputParameters");
                if (InformationList.Length < inPutParametersNameArray.Count)
                {
                    Log.SaveLogToTxt("InputParameters are not enough!");
                    return(false);
                }
                else
                {
                    int  index = -1;
                    bool isParametersComplete = true;

                    if (isParametersComplete)
                    {
                        //for (byte i = 0; i < InformationList.Length; i++)
                        {
                            if (Algorithm.FindFileName(InformationList, "RXPOWERARRLIST(DBM)", out index))
                            {
                                char[]    tempCharArray = new char[] { ',' };
                                ArrayList tempAR        = Algorithm.StringtoArraylistDeletePunctuations(InformationList[index].DefaultValue, tempCharArray);
                                if (tempAR == null)
                                {
                                    Log.SaveLogToTxt(InformationList[index].FiledName + "is Null!");
                                    return(false);
                                }
                                else
                                {
                                    testRxPowerDmiStruct.ArrayListRxInputPower = tempAR;
                                }

                                for (byte j = 0; j < testRxPowerDmiStruct.ArrayListRxInputPower.Count; j++)
                                {
                                    double temp = Convert.ToDouble(testRxPowerDmiStruct.ArrayListRxInputPower[j]);
                                    if (temp > 0)
                                    {
                                        temp = -temp;
                                        testRxPowerDmiStruct.ArrayListRxInputPower[j] = temp;
                                    }
                                }
                            }
                        }
                    }
                    Log.SaveLogToTxt("OK!");
                    return(true);
                }
            }
        }
コード例 #5
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] InformationList)
        {
            Log.SaveLogToTxt("Step1...Check InputParameters");

            if (InformationList.Length < inPutParametersNameArray.Count)
            {
                Log.SaveLogToTxt("InputParameters are not enough!");
                return(false);
            }
            else
            {
                int  index = -1;
                bool isParametersComplete = false;
                for (byte i = 0; i < inPutParametersNameArray.Count; i++)
                {
                    if (Algorithm.FindFileName(InformationList, inPutParametersNameArray[i].ToString(), out index) == false)
                    {
                        Log.SaveLogToTxt(inPutParametersNameArray[i].ToString() + "is not exist");
                        isParametersComplete = false;
                        return(isParametersComplete);
                    }
                    else
                    {
                        isParametersComplete = true;
                        continue;
                    }
                }
                if (isParametersComplete)
                {
                    if (Algorithm.FindFileName(InformationList, "SINGLEORMULTI", out index))
                    {
                        flagSingleTest = Convert.ToBoolean(InformationList[index].DefaultValue);
                    }
                    if (Algorithm.FindFileName(InformationList, "FLAGREADRXPOWERDMI", out index))
                    {
                        flagReadRxpowerDmi = Convert.ToBoolean(InformationList[index].DefaultValue);
                    }
                    if (Algorithm.FindFileName(InformationList, "FLAGREADTXPOWERDMI", out index))
                    {
                        flagReadTxpowerDmi = Convert.ToBoolean(InformationList[index].DefaultValue);
                    }
                }
                Log.SaveLogToTxt("OK!");
                return(true);
            }
        }
コード例 #6
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] InformationList)
        {
            Log.SaveLogToTxt("Step1...Check InputParameters");

            if (InformationList.Length < inList.Count)
            {
                Log.SaveLogToTxt("InputParameters are not enough!");
                return(false);
            }
            else
            {
                int  index          = -1;
                bool isParaComplete = true;

                if (isParaComplete)
                {
                    if (Algorithm.FindFileName(InformationList, "INPUTRXPWR(DBM)", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                        if (double.IsInfinity(temp) || double.IsNaN(temp))
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                            vcmiVecStruct.SensePoint = -20;
                        }
                        else
                        {
                            if (temp > 0)
                            {
                                temp = -temp;
                            }
                            vcmiVecStruct.SensePoint = temp;
                        }
                    }
                    else
                    {
                        return(false);
                    }
                }
                Log.SaveLogToTxt("OK!");
                return(true);
            }
        }
コード例 #7
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] InformationList)
        {
            Log.SaveLogToTxt("Step1...Check InputParameters");

            if (InformationList.Length < inPutParametersNameArray.Count)
            {
                Log.SaveLogToTxt("InputParameters are not enough!");
                return(false);
            }
            else
            {
                int  index = -1;
                bool isParametersComplete = true;

                if (isParametersComplete)
                {
                    //for (byte i = 0; i < InformationList.Length; i++)
                    {
                        if (Algorithm.FindFileName(InformationList, "VCCARRAYLIST(V)", out index))
                        {
                            char[]    tempCharArray = new char[] { ',' };
                            ArrayList tempAR        = Algorithm.StringtoArraylistDeletePunctuations(InformationList[index].DefaultValue, tempCharArray);
                            if (tempAR == null)
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is null!");
                                return(false);
                            }
                            else
                            {
                                calVccDmiStruct.ArrayListVcc = tempAR;
                            }
                        }
                    }
                }
                Log.SaveLogToTxt("OK!");
                return(true);
            }
        }
コード例 #8
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] InformationList)
        {
            Log.SaveLogToTxt("Step1...Check InputParameters");

            if (InformationList.Length < inPutParametersNameArray.Count)
            {
                Log.SaveLogToTxt("InputParameters are not enough!");
                return false;
            }
            else
            {
                int index = -1;
                bool isParametersComplete = true;

                if (isParametersComplete)
                {
                    //for (byte i = 0; i < InformationList.Length; i++)
                    {

                        if (Algorithm.FindFileName(InformationList, "RXPOWERPOINT(DBM)", out index))
                        {
                            double temp= Convert.ToDouble(InformationList[index].DefaultValue);
                            if (temp>0)
                            {
                                temp=-temp;
                            }
                            TestAlarmWarningStruct.RxPowerAWPoint = temp;
                        }   
                       
                    }

                }
                Log.SaveLogToTxt("OK!");
                return true;
            }
        }
コード例 #9
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] InformationList)
        {
            Log.SaveLogToTxt("Step1...Check InputParameters");

            if (InformationList.Length < inPutParametersNameArray.Count)
            {
                Log.SaveLogToTxt("InputParameters are not enough!");
                return(false);
            }
            else
            {
                int  index = -1;
                bool isParametersComplete = true;

                if (isParametersComplete)
                {
                    //for (byte i = 0; i < InformationList.Length; i++)
                    {
                        if (Algorithm.FindFileName(InformationList, "LOSA_DAC_START", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);
                            if (temp <= 0)
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is equal or lesser than 0");
                                return(false);
                            }
                            else
                            {
                                adjustLosStruct.LosAVoltageStartValue = Convert.ToDouble(temp);
                            }
                        }

                        if (Algorithm.FindFileName(InformationList, "LOSA_DAC_MAX", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);
                            if (temp <= 0)
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is equal or lesser than 0");
                                return(false);
                            }
                            else
                            {
                                adjustLosStruct.LosAVoltageUperLimit = Convert.ToDouble(temp);
                            }
                        }

                        if (Algorithm.FindFileName(InformationList, "LOSA_DAC_MIN", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);
                            if (temp <= 0)
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is equal or lesser than 0");
                                return(false);
                            }
                            else
                            {
                                adjustLosStruct.LosAVoltageLowLimit = Convert.ToUInt32(temp);
                            }
                        }

                        if (Algorithm.FindFileName(InformationList, "LOSA_TUNESTEP", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);
                            if (temp <= 0)
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is equal or lesser than 0");
                                return(false);
                            }
                            else
                            {
                                adjustLosStruct.LosAVoltageTuneStep = Convert.ToByte(temp);
                            }
                        }
                        if (Algorithm.FindFileName(InformationList, "LOSAINPUTPOWER", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);
                            if (temp <= -40)
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is equal or lesser than 0");
                                return(false);
                            }
                            else
                            {
                                adjustLosStruct.LosASetPower = Convert.ToDouble(temp);
                            }
                        }
                        if (Algorithm.FindFileName(InformationList, "LOSD_DAC_START", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);
                            if (temp <= 0)
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is equal or lesser than 0");
                                return(false);
                            }
                            else
                            {
                                adjustLosStruct.LosDVoltageStartValue = Convert.ToDouble(temp);
                            }
                        }

                        if (Algorithm.FindFileName(InformationList, "LOSD_DAC_MAX", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);
                            if (temp <= 0)
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is equal or lesser than 0");
                                return(false);
                            }
                            else
                            {
                                adjustLosStruct.LosDVoltageUperLimit = Convert.ToDouble(temp);
                            }
                        }


                        if (Algorithm.FindFileName(InformationList, "LOSD_DAC_MIN", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);
                            if (temp <= 0)
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is equal or lesser than 0");
                                return(false);
                            }
                            else
                            {
                                adjustLosStruct.LosDVoltageLowLimit = Convert.ToDouble(temp);
                            }
                        }

                        if (Algorithm.FindFileName(InformationList, "LOSD_TUNESTEP", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);
                            if (temp <= 0)
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is equal or lesser than 0");
                                return(false);
                            }
                            else
                            {
                                adjustLosStruct.LosDVoltageTuneStep = Convert.ToByte(temp);
                            }
                        }


                        if (Algorithm.FindFileName(InformationList, "LOSDINPUTPOWER", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);
                            if (temp <= -40)
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is equal or lesser than 0");
                                return(false);
                            }
                            else
                            {
                                adjustLosStruct.LosDSetPower = Convert.ToDouble(temp);
                            }
                        }


                        if (Algorithm.FindFileName(InformationList, "ISADJUSTLOSA", out index))
                        {
                            string temp = InformationList[index].DefaultValue;
                            if (temp.ToUpper().Trim() == "1" || temp.ToUpper().Trim() == "TRUE")
                            {
                                adjustLosStruct.isAdjustLosA = true;
                            }
                            else
                            {
                                adjustLosStruct.isAdjustLosA = false;
                            }
                        }

                        if (Algorithm.FindFileName(InformationList, "ISADJUSTLOSD", out index))
                        {
                            string temp = InformationList[index].DefaultValue;
                            if (temp.ToUpper().Trim() == "1" || temp.ToUpper().Trim() == "TRUE")
                            {
                                adjustLosStruct.isAdjustLosD = true;
                            }
                            else
                            {
                                adjustLosStruct.isAdjustLosD = false;
                            }
                        }
                    }
                    if (adjustLosStruct.LosAVoltageStartValue > adjustLosStruct.LosAVoltageUperLimit || adjustLosStruct.LosAVoltageStartValue < adjustLosStruct.LosAVoltageLowLimit || adjustLosStruct.LosAVoltageUperLimit <= adjustLosStruct.LosAVoltageLowLimit ||
                        adjustLosStruct.LosDVoltageStartValue > adjustLosStruct.LosDVoltageUperLimit || adjustLosStruct.LosDVoltageStartValue < adjustLosStruct.LosDVoltageLowLimit || adjustLosStruct.LosDVoltageUperLimit <= adjustLosStruct.LosDVoltageLowLimit)
                    {
                        Log.SaveLogToTxt("input data is wrong!");
                        return(false);
                    }
                }
                Log.SaveLogToTxt("OK!");
                return(true);
            }
        }
コード例 #10
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] InformationList)
        {
            Log.SaveLogToTxt("Step1...Check InputParameters");

            if (InformationList.Length < inPutParametersNameArray.Count)
            {
                Log.SaveLogToTxt("InputParameters are not enough!");
                return(false);
            }
            else
            {
                int  index = -1;
                bool isParametersComplete = false;
                for (byte i = 0; i < inPutParametersNameArray.Count; i++)
                {
                    if (Algorithm.FindFileName(InformationList, inPutParametersNameArray[i].ToString(), out index) == false)
                    {
                        Log.SaveLogToTxt(inPutParametersNameArray[i].ToString() + "is not exist");
                        isParametersComplete = false;
                        return(isParametersComplete);
                    }
                    else
                    {
                        isParametersComplete = true;
                        continue;
                    }
                }
                if (isParametersComplete)
                {
                    if (Algorithm.FindFileName(InformationList, "SingleThread", out index))
                    {
                        flagSingleTest = Convert.ToBoolean(InformationList[index].DefaultValue);
                    }


                    if (Algorithm.FindFileName(InformationList, "RxInputPower(DBM)", out index))
                    {
                        RxInputPower = Convert.ToDouble(InformationList[index].DefaultValue);
                    }

                    if (Algorithm.FindFileName(InformationList, "Rref", out index))
                    {
                        //string s = InformationList[index].DefaultValue;
                        decimal dData = Convert.ToDecimal(Decimal.Parse(InformationList[index].DefaultValue, System.Globalization.NumberStyles.Float));

                        Rref = Convert.ToDouble(dData);
                    }
                    if (Algorithm.FindFileName(InformationList, "Resolution", out index))
                    {
                        Resolution = Convert.ToDouble(InformationList[index].DefaultValue);
                    }
                    if (Algorithm.FindFileName(InformationList, "Vref", out index))
                    {
                        Vref = Convert.ToDouble(InformationList[index].DefaultValue);
                    }
                    if (Algorithm.FindFileName(InformationList, "ReadRxPowerAdcCount", out index))
                    {
                        ReadRxPowerAdcCount = Convert.ToByte(InformationList[index].DefaultValue);
                    }
                    if (Algorithm.FindFileName(InformationList, "Ratio", out index))
                    {
                        Ratio = Convert.ToByte(InformationList[index].DefaultValue);
                    }

                    //inPutParametersNameArray.Add("SINGLEORMULTI");
                    //inPutParametersNameArray.Add("RxInputPower(DBM)");
                    //inPutParametersNameArray.Add("Rref");
                    //inPutParametersNameArray.Add("Resolution");
                    //inPutParametersNameArray.Add("Vref");
                    //inPutParametersNameArray.Add("ReadRxPowerAdcCount");
                }
                Log.SaveLogToTxt("OK!");
                return(true);
            }
        }
コード例 #11
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] InformationList)
        {
            lock (tempAtten)
            {
                Log.SaveLogToTxt("Step1...Check InputParameters");

                if (GlobalParameters.OpticalSourseERArray == null || GlobalParameters.OpticalSourseERArray == "")
                {
                    return(false);
                }
                else
                {
                    char[] tempCharArray = new char[] { ',' };
                    OSERValueArray = Algorithm.StringtoArraylistDeletePunctuations(GlobalParameters.OpticalSourseERArray, tempCharArray);
                }
                bool isParametersComplete = false;
                if (InformationList.Length < inPutParametersNameArray.Count)
                {
                    isParametersComplete = false;
                    Log.SaveLogToTxt("inputData is NotEnough!");
                    return(false);
                }
                else
                {
                    isParametersComplete = true;
                }
                int index = -1;
                //  isParametersComplete = true;

                if (isParametersComplete)
                {
                    //for (byte i = 0; i < InformationList.Length; i++)
                    {
                        if (Algorithm.FindFileName(InformationList, "CsenAlignRxPwr", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                            if (double.IsInfinity(temp) || double.IsNaN(temp))
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                                return(false);
                            }
                            else
                            {
                                if (temp > 0)
                                {
                                    temp = -temp;
                                }
                                testBerStruct.CsenAlignRxPwr = temp;
                            }
                        }
                        if (Algorithm.FindFileName(InformationList, "CsenStartingRxPwr", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                            if (double.IsInfinity(temp) || double.IsNaN(temp))
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                                return(false);
                            }
                            else
                            {
                                if (temp > 0)
                                {
                                    temp = -temp;
                                }
                                testBerStruct.CsenStartingRxPwr = temp;
                            }
                        }
                        if (Algorithm.FindFileName(InformationList, "FirstPointErrorRateUL", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                            if (double.IsInfinity(temp) || double.IsNaN(temp))
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                                return(false);
                            }
                            else
                            {
                                if (temp < 0)
                                {
                                    temp = -temp;
                                }
                                testBerStruct.FirstPointErrorRateUL = temp;
                            }
                        }
                        if (Algorithm.FindFileName(InformationList, "FirstPointErrorRateLL", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                            if (double.IsInfinity(temp) || double.IsNaN(temp))
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                                return(false);
                            }
                            else
                            {
                                if (temp < 0)
                                {
                                    temp = -temp;
                                }
                                testBerStruct.FirstPointErrorRateLL = temp;
                            }
                        }
                        if (Algorithm.FindFileName(InformationList, "FirstPointRxPowerUL", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                            if (double.IsInfinity(temp) || double.IsNaN(temp))
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                                return(false);
                            }
                            else
                            {
                                if (temp > 0)
                                {
                                    temp = -temp;
                                }
                                testBerStruct.FirstPointRxPowerUL = temp;
                            }
                        }
                        if (Algorithm.FindFileName(InformationList, "FirstPointRxPowerLL", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                            if (double.IsInfinity(temp) || double.IsNaN(temp))
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                                return(false);
                            }
                            else
                            {
                                if (temp > 0)
                                {
                                    temp = -temp;
                                }
                                testBerStruct.FirstPointRxPowerLL = temp;
                            }
                        }

                        if (Algorithm.FindFileName(InformationList, "CoefCsenSubStep", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                            if (double.IsInfinity(temp) || double.IsNaN(temp))
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                                testBerStruct.CoefCsenSubStep = 0.5;
                            }
                            else
                            {
                                if (temp < 0)
                                {
                                    temp = -temp;
                                }
                                testBerStruct.CoefCsenSubStep = temp;
                            }
                        }
                        if (Algorithm.FindFileName(InformationList, "CoefCsenAddStep", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                            if (double.IsInfinity(temp) || double.IsNaN(temp))
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                                testBerStruct.CoefCsenAddStep = 0.5;
                            }
                            else
                            {
                                if (temp < 0)
                                {
                                    temp = -temp;
                                }
                                testBerStruct.CoefCsenAddStep = temp;
                            }
                        }
                        if (Algorithm.FindFileName(InformationList, "IsBerQuickTest", out index))
                        {
                            string temp = InformationList[index].DefaultValue;
                            if (temp.Trim().ToUpper() == "0" || temp.Trim().ToUpper() == "FALSE")
                            {
                                testBerStruct.IsBerQuickTest = false;
                            }
                            else
                            {
                                testBerStruct.IsBerQuickTest = true;
                            }
                        }
                        if (Algorithm.FindFileName(InformationList, "IsOpticalSourceUnitOMA", out index))
                        {
                            string temp = InformationList[index].DefaultValue;
                            if (temp.Trim().ToUpper() == "0" || temp.Trim().ToUpper() == "FALSE")
                            {
                                testBerStruct.IsOpticalSourceUnitOMA = false;
                            }
                            else
                            {
                                testBerStruct.IsOpticalSourceUnitOMA = true;
                            }
                        }
                        //SearchTargetBerStep
                        if (Algorithm.FindFileName(InformationList, "FirstPointStep", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                            if (double.IsInfinity(temp) || double.IsNaN(temp))
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                                testBerStruct.FirstPointStep = 0.5;
                            }
                            else
                            {
                                if (temp < 0)
                                {
                                    testBerStruct.FirstPointStep = 0.5;
                                }
                                testBerStruct.FirstPointStep = temp;
                            }
                        }
                        //testBerStruct.SearchTargetBerMethod
                        if (Algorithm.FindFileName(InformationList, "SearchTargetBerMethod", out index))
                        {
                            byte temp = Convert.ToByte(InformationList[index].DefaultValue);

                            if (double.IsInfinity(temp) || double.IsNaN(temp))
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                                testBerStruct.SearchTargetBerMethod = 0;
                            }
                            else
                            {
                                testBerStruct.SearchTargetBerMethod = temp;
                            }
                        }
                        //BER_ERP

                        if (Algorithm.FindFileName(InformationList, "BER_ERP", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                            if (double.IsInfinity(temp) || double.IsNaN(temp))
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                                testBerStruct.Ber_ERP = 1E-12;
                            }
                            else
                            {
                                testBerStruct.Ber_ERP = temp;
                            }
                        }
                        if (Algorithm.FindFileName(InformationList, "CoefErrorRateUL", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                            if (double.IsInfinity(temp) || double.IsNaN(temp))
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                                testBerStruct.CoefErrorRateUL = temp;
                            }
                            else
                            {
                                testBerStruct.CoefErrorRateUL = temp;
                            }
                        }
                        if (Algorithm.FindFileName(InformationList, "CoefErrorRateLL", out index))
                        {
                            double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                            if (double.IsInfinity(temp) || double.IsNaN(temp))
                            {
                                Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                                testBerStruct.Ber_ERP = 1E-11;
                            }
                            else
                            {
                                testBerStruct.CoefErrorRateLL = temp;
                            }
                        }
                    }
                }
                if (testBerStruct.FirstPointErrorRateUL <= testBerStruct.FirstPointErrorRateLL || testBerStruct.FirstPointRxPowerUL <= testBerStruct.FirstPointRxPowerLL)
                {
                    Log.SaveLogToTxt("inputData is wrong!");
                    return(false);
                }
                Log.SaveLogToTxt("OK!");
                return(true);
            }
        }
コード例 #12
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] infoList)
        {
            try
            {
                ArrayList inParaList = new ArrayList();
                inParaList.Clear();

                inParaList.Add("BiasDACArray");
                inParaList.Add("ModDACArray");
                inParaList.Add("AdjustMethod");

                Log.SaveLogToTxt("Step1...Check InputParameters");

                if (infoList.Length < inParaList.Count)
                {
                    Log.SaveLogToTxt("InputParameters are not enough!");
                    return(false);
                }
                else
                {
                    int  index           = -1;
                    bool isParaCompleted = true;

                    if (isParaCompleted)
                    {
                        if (Algorithm.FindFileName(infoList, "BIASDACARRAY", out index))
                        {
                            char[]    tempCharArray = new char[] { ',' };
                            ArrayList tempAR        = Algorithm.StringtoArraylistDeletePunctuations(infoList[index].DefaultValue, tempCharArray);
                            if (tempAR == null)
                            {
                                Log.SaveLogToTxt(infoList[index].FiledName + "is null!");
                                return(false);
                            }
                            else if (tempAR.Count > GlobalParameters.TotalChCount)
                            {
                                myStruct.BiasDACs = new ArrayList();
                                for (int i = 0; i < GlobalParameters.TotalChCount; i++)
                                {
                                    myStruct.BiasDACs.Add(tempAR[i]);
                                }
                            }
                            else
                            {
                                myStruct.BiasDACs = tempAR;
                            }
                        }

                        if (Algorithm.FindFileName(infoList, "MODDACARRAY", out index))
                        {
                            char[]    tempCharArray = new char[] { ',' };
                            ArrayList tempAR        = Algorithm.StringtoArraylistDeletePunctuations(infoList[index].DefaultValue, tempCharArray);
                            if (tempAR == null)
                            {
                                Log.SaveLogToTxt(infoList[index].FiledName + "is null!");
                                return(false);
                            }
                            else if (tempAR.Count > GlobalParameters.TotalChCount)
                            {
                                myStruct.ModDACs = new ArrayList();
                                for (int i = 0; i < GlobalParameters.TotalChCount; i++)
                                {
                                    myStruct.ModDACs.Add(tempAR[i]);
                                }
                            }
                            else
                            {
                                myStruct.ModDACs = tempAR;
                            }
                        }

                        if (Algorithm.FindFileName(infoList, "ADJUSTMETHOD", out index))
                        {
                            double temp = Convert.ToDouble(infoList[index].DefaultValue);
                            if (double.IsInfinity(temp) || double.IsNaN(temp))
                            {
                                Log.SaveLogToTxt(infoList[index].FiledName + "is wrong!");
                                return(false);
                            }
                            else
                            {
                                myStruct.MethodID = Convert.ToByte(temp);
                            }
                        }

                        Log.SaveLogToTxt("OK!");
                        return(true);
                    }
                }
                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._0x02001, 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._0x02001, error.StackTrace);
            }
        }
コード例 #13
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] InformationList)
        {
            lock (tempAtten)
            {
                Log.SaveLogToTxt("Step1...Check InputParameters");
                if (GlobalParameters.OpticalSourseERArray == null || GlobalParameters.OpticalSourseERArray == "")
                {
                    return(false);
                }
                else
                {
                    char[] tempCharArray = new char[] { ',' };
                    OSERValueArray = Algorithm.StringtoArraylistDeletePunctuations(GlobalParameters.OpticalSourseERArray, tempCharArray);
                }
                if (InformationList.Length < inPutParametersNameArray.Count)
                {
                    Log.SaveLogToTxt("InputParameters are not enough!");
                    return(false);
                }
                else
                {
                    int  index = -1;
                    bool isParametersComplete = true;

                    if (isParametersComplete)
                    {
                        //for (byte i = 0; i < InformationList.Length; i++)
                        {
                            if (Algorithm.FindFileName(InformationList, "LOSADTUNESTEP", out index))
                            {
                                double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                                if (double.IsInfinity(temp) || double.IsNaN(temp))
                                {
                                    Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                                    testRXLosADStruct.LosADStep = 0.5;
                                }
                                else
                                {
                                    if (temp < 0)
                                    {
                                        temp = -temp;
                                    }
                                    testRXLosADStruct.LosADStep = temp;
                                }
                            }
                            if (Algorithm.FindFileName(InformationList, "ISLOSDETAIL", out index))
                            {
                                string temp = InformationList[index].DefaultValue;

                                if (temp.ToUpper().Trim() == "0" || temp.ToUpper().Trim() == "FALSE")
                                {
                                    testRXLosADStruct.isLosDetail = false;
                                }
                                else
                                {
                                    testRXLosADStruct.isLosDetail = true;
                                }
                            }
                        }
                    }
                    Log.SaveLogToTxt("OK!");
                    return(true);
                }
            }
        }
コード例 #14
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] InformationList)
        {
            Log.SaveLogToTxt("Step1...Check InputParameters");

            if (InformationList.Length < inPutParametersNameArray.Count)
            {
                Log.SaveLogToTxt("InputParameters are not enough!");
                return(false);
            }
            else
            {
                int  index = -1;
                bool isParametersComplete = true;

                if (isParametersComplete)
                {
                    if (Algorithm.FindFileName(InformationList, "TargetPower", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                        if (double.IsInfinity(temp) || double.IsNaN(temp))
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                            return(false);
                        }
                        else
                        {
                            testTxReturnLostToleranceStruct.TargetPower = temp;
                        }
                    }
                    if (Algorithm.FindFileName(InformationList, "ReturnLosTolerancePRBS", out index))
                    {
                        byte temp = Convert.ToByte(InformationList[index].DefaultValue);

                        if (double.IsInfinity(temp) || double.IsNaN(temp))
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                            return(false);
                        }
                        else
                        {
                            testTxReturnLostToleranceStruct.ReturnLosTolerancePRBS = temp;
                        }
                    }
                    if (Algorithm.FindFileName(InformationList, "RXAttStep", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                        if (double.IsInfinity(temp) || double.IsNaN(temp))
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                            return(false);
                        }
                        else
                        {
                            testTxReturnLostToleranceStruct.RXAttStep = temp;
                        }
                    }
                    if (Algorithm.FindFileName(InformationList, "TXAttStep", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                        if (double.IsInfinity(temp) || double.IsNaN(temp))
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                            return(false);
                        }
                        else
                        {
                            testTxReturnLostToleranceStruct.TXAttStep = temp;
                        }
                    }
                    if (Algorithm.FindFileName(InformationList, "CsenAlignRxPwr", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                        if (double.IsInfinity(temp) || double.IsNaN(temp))
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                            return(false);
                        }
                        else
                        {
                            testTxReturnLostToleranceStruct.CsenAlignRxPwr = temp;
                        }
                    }
                    if (Algorithm.FindFileName(InformationList, "StartRxPwr", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                        if (double.IsInfinity(temp) || double.IsNaN(temp))
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                            return(false);
                        }
                        else
                        {
                            testTxReturnLostToleranceStruct.StartRxPwr = temp;
                        }
                    }
                    if (Algorithm.FindFileName(InformationList, "LoopTime", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                        if (double.IsInfinity(temp) || double.IsNaN(temp))
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                            return(false);
                        }
                        else
                        {
                            testTxReturnLostToleranceStruct.LoopTime = temp;
                        }
                    }
                    if (Algorithm.FindFileName(InformationList, "GatingTime", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                        if (double.IsInfinity(temp) || double.IsNaN(temp))
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                            return(false);
                        }
                        else
                        {
                            testTxReturnLostToleranceStruct.GatingTime = temp;
                        }
                    }
                }
                Log.SaveLogToTxt("OK!");
                return(true);
            }
        }
コード例 #15
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] InformationList)
        {
            Log.SaveLogToTxt("Step1...Check InputParameters");

            if (GlobalParameters.OpticalSourseERArray == null || GlobalParameters.OpticalSourseERArray == "")
            {
                return(false);
            }
            else
            {
                char[] tempCharArray = new char[] { ',' };
                OSERValueArray = Algorithm.StringtoArraylistDeletePunctuations(GlobalParameters.OpticalSourseERArray, tempCharArray);
            }

            if (InformationList.Length < inPutParametersNameArray.Count)
            {
                Log.SaveLogToTxt("InputParameters are not enough!");
                return(false);
            }
            else
            {
                int  index = -1;
                bool isParametersComplete = true;

                if (isParametersComplete)
                {
                    if (Algorithm.FindFileName(InformationList, "LoopTime", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                        if (double.IsInfinity(temp) || double.IsNaN(temp))
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                            return(false);
                        }
                        else
                        {
                            testRxOverloadStruct.LoopTime = temp;
                        }
                    }
                    if (Algorithm.FindFileName(InformationList, "AttStep", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                        if (double.IsInfinity(temp) || double.IsNaN(temp))
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                            return(false);
                        }
                        else
                        {
                            testRxOverloadStruct.AttStep = temp;
                        }
                    }
                    if (Algorithm.FindFileName(InformationList, "GatingTime", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                        if (double.IsInfinity(temp) || double.IsNaN(temp))
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                            return(false);
                        }
                        else
                        {
                            testRxOverloadStruct.GatingTime = temp;
                        }
                    }
                    //if (Algorithm.FindFileName(InformationList, "IsOptSourceUnitOMA", out index))
                    //{
                    //    string temp = InformationList[index].DefaultValue;
                    //    if (temp.Trim().ToUpper() == "0" || temp.Trim().ToUpper() == "FALSE")
                    //    {
                    //        testRxOverloadStruct.IsOptSourceUnitOMA = false;
                    //    }
                    //    else
                    //    {
                    //        testRxOverloadStruct.IsOptSourceUnitOMA = true;
                    //    }
                    //}
                    //if (Algorithm.FindFileName(InformationList, "SpecDelta", out index))
                    //{
                    //    double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                    //    if (double.IsInfinity(temp) || double.IsNaN(temp))
                    //    {
                    //        Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                    //        return false;
                    //    }
                    //    else
                    //    {
                    //        testRxOverloadStruct.SpecDelta = temp;
                    //    }

                    //}
                    if (Algorithm.FindFileName(InformationList, "CsenAlignRxPwr", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);

                        if (double.IsInfinity(temp) || double.IsNaN(temp))
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                            return(false);
                        }
                        else
                        {
                            testRxOverloadStruct.CsenAlignRxPwr = temp;
                        }
                    }
                }
                Log.SaveLogToTxt("OK!");
                return(true);
            }
        }
コード例 #16
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] InformationList)
        {
            Log.SaveLogToTxt("Step1...Check InputParameters");
            if (InformationList.Length < inPutParametersNameArray.Count)
            {
                Log.SaveLogToTxt("InputParameters are not enough!");
                return(false);
            }
            else
            {
                int  index = -1;
                bool isParametersComplete = true;

                if (isParametersComplete)
                {
                    if (Algorithm.FindFileName(InformationList, "RxInputPowerMax", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);
                        if (double.IsInfinity(temp) || double.IsNaN(temp))
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                            return(false);
                        }
                        else
                        {
                            testRxDmiPowErrorCurveStruct.RxInputPowerMax = temp;
                        }
                    }

                    if (Algorithm.FindFileName(InformationList, "RxInputPowerMin", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);
                        if (double.IsInfinity(temp) || double.IsNaN(temp))
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                            return(false);
                        }
                        else
                        {
                            testRxDmiPowErrorCurveStruct.RxInputPowerMin = temp;
                        }

                        if (testRxDmiPowErrorCurveStruct.RxInputPowerMin > testRxDmiPowErrorCurveStruct.RxInputPowerMax)
                        {
                            testRxDmiPowErrorCurveStruct.RxInputPowerMin = testRxDmiPowErrorCurveStruct.RxInputPowerMax;
                        }
                    }

                    if (Algorithm.FindFileName(InformationList, "AttStep", out index))
                    {
                        double temp = Convert.ToDouble(InformationList[index].DefaultValue);
                        if (double.IsInfinity(temp) || double.IsNaN(temp))
                        {
                            Log.SaveLogToTxt(InformationList[index].FiledName + "is wrong!");
                            return(false);
                        }
                        else
                        {
                            testRxDmiPowErrorCurveStruct.AttStep = temp;
                        }
                    }
                }
                Log.SaveLogToTxt("OK!");
                return(true);
            }
        }
コード例 #17
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] InformationList)
        {
            Log.SaveLogToTxt("Step1...Check InputParameters");

            try
            {
                if (InformationList.Length < inPutParametersNameArray.Count)
                {
                    Log.SaveLogToTxt("InputParameters are not enough!");
                    return(false);
                }
                else
                {
                    int  index = -1;
                    bool isParametersComplete = true;

                    if (isParametersComplete)
                    {
                        //for (byte i = 0; i < InformationList.Length; i++)
                        {
                            if (Algorithm.FindFileName(InformationList, "RxInputPower", out index))
                            {
                                adjustAPDStruct.RxInputPower = Convert.ToDouble(InformationList[index].DefaultValue);
                            }

                            if (Algorithm.FindFileName(InformationList, "SETPOINTS", out index))
                            {
                                char[]    tempCharArray = new char[] { ',' };
                                ArrayList tempAL        = Algorithm.StringtoArraylistDeletePunctuations(InformationList[index].DefaultValue, tempCharArray);
                                if (tempAL == null)
                                {
                                    Log.SaveLogToTxt(InformationList[index].FiledName + "is null");
                                    return(false);
                                }
                                else
                                {
                                    adjustAPDStruct.SetPoints = new Int32[tempAL.Count];
                                    for (int i = 0; i < tempAL.Count; i++)
                                    {
                                        adjustAPDStruct.SetPoints[i] = Int32.Parse(tempAL[i].ToString());
                                    }
                                }
                            }

                            if (Algorithm.FindFileName(InformationList, "ScanCount", out index))
                            {
                                adjustAPDStruct.ScanCount = Convert.ToByte(InformationList[index].DefaultValue);
                            }

                            if (Algorithm.FindFileName(InformationList, "Formula_X_Type", out index))
                            {
                                adjustAPDStruct.Formula_X_Type = Convert.ToByte(InformationList[index].DefaultValue);
                            }
                        }
                    }
                    Log.SaveLogToTxt("OK!");
                    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._0x02001, 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._0x02001, error.StackTrace);
            }
        }