Exemple #1
0
        public static int IFActive(uint ascanNum, GateType type, ref IFActive active)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.gate[gateNum].IF;
            uint val     = 0;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqGet(ascanNum, attr, ref val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Get IF Gate failed!", "错误:获得IF Gate失败!");
            }
            active = (IFActive)val;
            return(error_code);
        }
Exemple #2
0
        public static int Threshold(uint ascanNum, GateType type, ref double threshold)
        {
            int    error_code;
            int    gateNum = (int)type;
            uint   attr    = DaqAttrType.gate[gateNum].Threshold;
            double val     = 0;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqGet((uint)ascanNum, attr, ref val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Get the Threshold of gate failed", "错误:获得门的高度失败");
            }
            threshold = val;
            return(error_code);
        }
Exemple #3
0
        /**gate measment mode, pls see MeasMode Enum for part of list*/
        public static int MeasMode(uint ascanNum, GateType type, ref MeasMode mode)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.gate[gateNum].MeasMode;
            uint val     = 0;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqGet(ascanNum, attr, ref val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Get the Gate measment mode failed!", "错误:获取Gate measment mode失败!");
            }
            mode = (MeasMode)val;
            return(error_code);
        }
Exemple #4
0
        public static int AlarmSignalLength(uint ascanNum, GateType type, ref GateAlarmSignalLength len)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.gate[gateNum].AlarmSignalLength;
            uint val     = 0;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqGet(ascanNum, attr, ref val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Get the Gate alarm signal length failed!", "错误:获取Gate alarm signal length失败!");
            }
            len = (GateAlarmSignalLength)val;
            return(error_code);
        }
Exemple #5
0
        ////public static int AlarmTimeLength(uint ascanNum, GateType type, ref GateAlarmSignalLength len)
        //{
        //    int error_code;
        //    int gateNum = (int)type;
        //    uint attr = DaqAttrType.gate[gateNum].AlarmActive;
        //    uint val = (uint)len;

        //    if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
        //    {
        //        error_code = -1;
        //        return error_code;
        //    }

        //    if (type < gateTypeMin || type > gateTypeMax)
        //    {
        //        error_code = -1;
        //        return error_code;
        //    }

        //    error_code = DAQ.daqGet(ascanNum, attr, ref val);
        //    if (error_code != (int)PDAQ_ERR.GOOD)
        //    {
        //        MessageShow.show("Error:Get the Gate alarm signal length failed!", "错误:获取Gate alarm signal length失败!");
        //    }
        //    return error_code;
        //}

        public static int AlarmActiveLevel(uint ascanNum, GateType type, ref GateAlarmLevel level)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.gate[gateNum].AlarmActiveLevel;
            uint val     = 0;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqGet(ascanNum, attr, ref val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Get alarm active level failed!", "错误:获取Alarm active level失败!");
            }
            level = (GateAlarmLevel)val;
            return(error_code);
        }
Exemple #6
0
        /**TM suppress counter(TMSc)*/
        public static int TolMonitorSc(uint ascanNum, GateType type, ref uint cnt)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.gate[gateNum].TolMonitorSc;
            uint val     = 0;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqGet(ascanNum, attr, ref val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Get Tolerance Monitor Suppress Counter failed!", "错误:获取Tolerance Monitor Suppress Counter失败!");
            }
            cnt = val;
            return(error_code);
        }
Exemple #7
0
        public static int DtsStep(uint ascanNum, GateType type, ref double step)
        {
            int    error_code;
            int    gateNum = (int)type;
            uint   attr    = DaqAttrType.gate[gateNum].DtsStep;
            double val     = 0;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqGet(ascanNum, attr, ref val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Get the dts Step failed!", "错误:获取BTS step失败!");
            }
            step = val;
            return(error_code);
        }
Exemple #8
0
        public static int Width(uint ascanNum, GateType type, ref double width)
        {
            int    error_code;
            int    gateNum = (int)type;
            uint   attr    = DaqAttrType.gate[gateNum].Width;
            double val     = 0;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqGet(ascanNum, attr, ref val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Get the Width of gate failed", "错误:获得门的宽度失败");
            }
            width = val;
            return(error_code);
        }
Exemple #9
0
        /**get gate suppress counter active*/
        public static int ScActive(uint ascanNum, GateType type, ref SuppressCounterActive active)
        {
            int  error_code;
            int  gateNum = (int)type;
            uint attr    = DaqAttrType.gate[gateNum].ScActive;
            uint val     = 0;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqGet(ascanNum, attr, ref val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Get the Active of Suppress Counter failed!", "错误:获取Suppress Counter Active失败!");
            }
            active = (SuppressCounterActive)val;
            return(error_code);
        }
Exemple #10
0
        public static int DnsBw(uint ascanNum, GateType type, ref double dnsBw)
        {
            int    error_code;
            int    gateNum = (int)type;
            uint   attr    = DaqAttrType.gate[gateNum].DnsBw;
            double val     = 0;

            if (ascanNum < ascanNumMin || ascanNum > ascanNumMax)
            {
                error_code = -1;
                return(error_code);
            }

            if (type < gateTypeMin || type > gateTypeMax)
            {
                error_code = -1;
                return(error_code);
            }

            error_code = DAQ.daqGet(ascanNum, attr, ref val);
            if (error_code != (int)PDAQ_ERR.GOOD)
            {
                MessageShow.show("Error:Get the dns Band width failed!", "错误:获取BNS Bandwidth失败!");
            }
            dnsBw = val;
            return(error_code);
        }