Exemple #1
0
        public static bool ContainsData(this TestTypeItem item, Dictionary <string, ITestData> testDatas, string temp, int port, double dataID)
        {
            if (!testDatas.ContainsKey(item.ID))
            {
                return(false);
            }
            var testData = testDatas[item.ID];

            switch (item.ID)
            {
            case "None":
                return(true);

            case "Swept":
            case "SweptPDL":
                return(testData.ContainsDataItem(temp, port, -1D));

            case "Point":
            case "PointPDL":
            case "ManualPointPDL":
            case "RL":
            case "Manual":
                return(testData.ContainsDataItem(temp, port, dataID));

            default:
                return(false);
            }
        }
Exemple #2
0
        public static bool AddData(this TestTypeItem item, Dictionary <string, ITestData> testDatas, string temp, int port, SortedList <double, PointTestItem> data)
        {
            if (!testDatas.ContainsKey(item.ID))
            {
                return(false);
            }
            var testData = testDatas[item.ID];

            switch (item.ID)
            {
            case "None":
                break;

            case "Swept":
            case "SweptPDL":
                return(testData.SetData(temp, port, data));

            case "Point":
            case "PointPDL":
            case "ManualPointPDL":
            case "RL":
            case "Manual":
                return(testData.AddDataRange(temp, port, data));

            default:
                return(false);
            }

            return(true);
        }
Exemple #3
0
        public static ITestData CreatTestData(this TestTypeItem item, string[] temps, int[] ports)
        {
            var data = default(ITestData);

            if (item.TestDataType == null)
            {
                return(data);
            }

            data = Activator.CreateInstance(item.TestDataType) as ITestData;
            if (data == null)
            {
                return(data);
            }

            data.CreateDataStruct(temps, ports);

            return(data);
        }