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

            if (infoList.Length < inParaList.Count)
            {
                Log.SaveLogToTxt("InputParameters are not enough!");
                return(false);
            }
            else
            {
                string outString;
                bool   isGetten = Algorithm.Getconf(infoList, "Length", true, out outString);

                int getLength = 0;
                isGetten = isGetten && Int32.TryParse(outString, out getLength);
                if (!isGetten)
                {
                    Log.SaveLogToTxt("Length is wrong!");
                    return(false);
                }

                isGetten = Algorithm.Getconf(infoList, "Data", true, out outString);
                if (outString == "")
                {
                    Log.SaveLogToTxt("Data is wrong!");
                    return(false);
                }

                myStruct = new TestPolarityStruct(getLength, outString);
                Log.SaveLogToTxt("OK!");

                return(true);
            }
        }
コード例 #2
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++)
                    {
                        //inPutParametersNameArray.Add("WavelengthDacMax");
                        //inPutParametersNameArray.Add("WavelengthDacMin");
                        //inPutParametersNameArray.Add("WavelengthDacStep");
                        //inPutParametersNameArray.Add("WavelengthDacStart");
                        //inPutParametersNameArray.Add("WavelengthTargetMax");
                        //inPutParametersNameArray.Add("WavelengthTargetMin");

                        string StrTemp;

                        if (!Algorithm.Getconf(InformationList, "WavelengthDacMax", true, out StrTemp))
                        {
                            Log.SaveLogToTxt("WavelengthDacMax is wrong!");
                            return(false);
                        }

                        else
                        {
                            MyStruct.WavelengthDacMax = Int32.Parse(StrTemp);
                        }

                        if (!Algorithm.Getconf(InformationList, "WavelengthDacMin", true, out StrTemp))
                        {
                            Log.SaveLogToTxt("WavelengthDacMax is wrong!");
                            return(false);
                        }

                        else
                        {
                            MyStruct.WavelengthDacMin = Int32.Parse(StrTemp);
                        }

                        if (!Algorithm.Getconf(InformationList, "WavelengthDacStart", true, out StrTemp))
                        {
                            Log.SaveLogToTxt("WavelengthDacMax is wrong!");
                            return(false);
                        }

                        else
                        {
                            MyStruct.WavelengthDacStart = Int32.Parse(StrTemp);
                        }

                        if (!Algorithm.Getconf(InformationList, "WavelengthTargetMax", true, out StrTemp))
                        {
                            Log.SaveLogToTxt("WavelengthDacMax is wrong!");
                            return(false);
                        }

                        else
                        {
                            MyStruct.WavelengthTargetMax = double.Parse(StrTemp);
                        }

                        if (!Algorithm.Getconf(InformationList, "WavelengthTargetMin", true, out StrTemp))
                        {
                            Log.SaveLogToTxt("WavelengthDacMin is wrong!");
                            return(false);
                        }

                        else
                        {
                            MyStruct.WavelengthTargetMin = double.Parse(StrTemp);
                        }
                    }
                }
                Log.SaveLogToTxt("OK!");
                return(true);
            }
        }
コード例 #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
            {
                bool isParametersComplete = true;

                if (isParametersComplete)
                {
                    string StrTemp;

                    if (!Algorithm.Getconf(InformationList, "MaskLimit", true, out StrTemp))
                    {
                        Log.SaveLogToTxt("MaskLimit is wrong!");
                        return(false);
                    }

                    else
                    {
                        MyStruct.MaskLimit = int.Parse(StrTemp);
                    }


                    if (!Algorithm.Getconf(InformationList, "MaskDACMax", true, out StrTemp))
                    {
                        Log.SaveLogToTxt("MaskDacMin is wrong!");
                        return(false);
                    }

                    else
                    {
                        MyStruct.DACMax = Int32.Parse(StrTemp);
                    }

                    if (!Algorithm.Getconf(InformationList, "MaskDACMin", true, out StrTemp))
                    {
                        Log.SaveLogToTxt("MaskDACMin is wrong!");
                        return(false);
                    }

                    else
                    {
                        MyStruct.DACMin = Int32.Parse(StrTemp);
                    }

                    if (!Algorithm.Getconf(InformationList, "MaskDACStart", true, out StrTemp))
                    {
                        Log.SaveLogToTxt("MaskDACMin is wrong!");
                        return(false);
                    }

                    else
                    {
                        MyStruct.DACStart = Int32.Parse(StrTemp);
                    }
                    if (!Algorithm.Getconf(InformationList, "AdjustMaskMethod", true, out StrTemp))
                    {
                        Log.SaveLogToTxt("AdjustMethod is wrong!");
                        return(false);
                    }

                    else
                    {
                        MyStruct.AdjustMethod = byte.Parse(StrTemp);
                    }
                    //
                    if (!Algorithm.Getconf(InformationList, "MaskDacStep", true, out StrTemp))
                    {
                        Log.SaveLogToTxt("MaskDACMin is wrong!");
                        return(false);
                    }
                    else
                    {
                        MyStruct.DacStep = Int32.Parse(StrTemp);
                    }

                    //if (!Algorithm.Getconf(InformationList, "AdjustMaskMethod", true, out StrTemp))////AdjustMaskMethod
                    //{
                    //    Log.SaveLogToTxt("AdjustMaskMethod is wrong!");
                    //    return false;
                    //}
                    //else
                    //{
                    //    MyStruct.AdjustMethod = byte.Parse(StrTemp);
                    //}
                    //ICType
                    if (!Algorithm.Getconf(InformationList, "ICType", true, out StrTemp))    ////AdjustMaskMethod
                    {
                        Log.SaveLogToTxt("ICType is wrong!");
                        return(false);
                    }
                    else
                    {
                        MyStruct.IC_Type = byte.Parse(StrTemp);
                    }
                }
                Log.SaveLogToTxt("OK!");
                return(true);
            }
        }
コード例 #4
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] infoList)
        {
            Log.SaveLogToTxt("Step1...Check InputParameters");

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

                if (isParaComplete)
                {
                    string outString;

                    if (!Algorithm.Getconf(infoList, "SpecMax_PR", true, out outString))
                    {
                        Log.SaveLogToTxt("SpecMax_PR is wrong!");
                        return(false);
                    }
                    else
                    {
                        myStruct.SpecMax_PR = byte.Parse(outString);
                    }

                    if (!Algorithm.Getconf(infoList, "SpecMin_PR", true, out outString))
                    {
                        Log.SaveLogToTxt("SpecMin_PR is wrong!");
                        return(false);
                    }
                    else
                    {
                        myStruct.SpecMin_PR = byte.Parse(outString);
                    }


                    if (!Algorithm.Getconf(infoList, "CrossingDACMax", true, out outString))
                    {
                        Log.SaveLogToTxt("CrossingDacMin is wrong!");
                        return(false);
                    }
                    else
                    {
                        myStruct.DACMax = Int32.Parse(outString);
                    }

                    if (!Algorithm.Getconf(infoList, "CrossingDACMin", true, out outString))
                    {
                        Log.SaveLogToTxt("CrossingDACMin is wrong!");
                        return(false);
                    }
                    else
                    {
                        myStruct.DACMin = Int32.Parse(outString);
                    }

                    if (!Algorithm.Getconf(infoList, "CrossingDACStart", true, out outString))
                    {
                        Log.SaveLogToTxt("CrossingDACMin is wrong!");
                        return(false);
                    }
                    else
                    {
                        myStruct.DACStart = Int32.Parse(outString);
                    }

                    if (!Algorithm.Getconf(infoList, "AdjustMethod", true, out outString))
                    {
                        Log.SaveLogToTxt("AdjustMethod is wrong!");
                        return(false);
                    }
                    else
                    {
                        myStruct.AdjustMethod = byte.Parse(outString);
                    }

                    if (!Algorithm.Getconf(infoList, "CrossingDacStep", true, out outString))
                    {
                        Log.SaveLogToTxt("CrossingDACMin is wrong!");
                        return(false);
                    }
                    else
                    {
                        myStruct.DacStep = Int32.Parse(outString);
                    }
                }
                Log.SaveLogToTxt("OK!");
                return(true);
            }
        }
コード例 #5
0
        protected override bool AnalysisInputParameters(TestModeEquipmentParameters[] infoList)
        {
            Log.SaveLogToTxt("Step1...Check InputParameters");

            if (infoList.Length < inParaList.Count)
            {
                Log.SaveLogToTxt("InputParameters are not enough!");
                return(false);
            }
            else
            {
                string[] search    = new string[] { "DACMax", "DACMin", "DACStart", "DACStep", "AdjustMethod" };
                int[]    paraValue = new int[search.Length];

                for (int i = 0; i < search.Length; i++)
                {
                    string outString;
                    bool   isGetten = Algorithm.Getconf(infoList, search[i], true, out outString);
                    int    temp     = 0;
                    isGetten = isGetten && Int32.TryParse(outString, out temp);
                    if (isGetten)
                    {
                        paraValue[i] = temp;
                    }
                    else
                    {
                        Log.SaveLogToTxt(search[i] + " is wrong!");
                        return(false);
                    }
                }

                myStruct = new AdjustJitterStruct(paraValue);

                #region prepare to replaced by the above code
                //if (!Algorithm.Getconf(infoList, "DACMax", true, out outString))
                //{
                //    Log.SaveLogToTxt("MaxDacMin is wrong!");
                //    return false;
                //}
                //else
                //{
                //    myStruct.DACMax = Int32.Parse(outString);
                //}

                //if (!Algorithm.Getconf(infoList, "DACMin", true, out outString))
                //{
                //    Log.SaveLogToTxt("MinDACMin is wrong!");
                //    return false;
                //}
                //else
                //{
                //    myStruct.DACMin = Int32.Parse(outString);
                //}

                //if (!Algorithm.Getconf(infoList, "DACStart", true, out outString))
                //{
                //    Log.SaveLogToTxt("DACMin is wrong!");
                //    return false;
                //}
                //else
                //{
                //    myStruct.DACStart = Int32.Parse(outString);
                //}

                //if (!Algorithm.Getconf(infoList, "AdjustMethod", true, out outString))
                //{
                //    Log.SaveLogToTxt("AdjustMethod is wrong!");
                //    return false;
                //}
                //else
                //{
                //    myStruct.AdjustMethod = byte.Parse(outString);
                //}

                //if (!Algorithm.Getconf(infoList, "DacStep", true, out outString))
                //{
                //    Log.SaveLogToTxt("DacStep is wrong!");
                //    return false;
                //}
                //else
                //{
                //    myStruct.DACStep = Int32.Parse(outString);
                //}
                #endregion

                Log.SaveLogToTxt("OK!");
                return(true);
            }
        }