Пример #1
0
        public static VectorSignalGenerator CreateDetectedVectorSignalGenerator(string address)
        {
            VectorSignalGenerator PsgEsg;

            try
            {
                string str = ScpiInstrument.DetermineModel(address);
                if (string.IsNullOrEmpty(str))
                {
                }
                if (VectorSignalGenerator.IsEVSGC(str) || VectorSignalGenerator.IsPVSG(str))
                {
                    PsgEsg = new AgilentEsgAndPsg(address);
                }
                else
                {
                    PsgEsg = null;
                }
            }
            catch (Exception exception)
            {
                throw new Exception(string.Concat("连接到矢量信号源出错: ", exception.Message));
            }
            return(PsgEsg);
        }
Пример #2
0
        public static SignalGenerator CreateDetectedAnalogSignalGenerator(string address)
        {
            SignalGenerator PsgEsg;

            try
            {
                string str = ScpiInstrument.DetermineModel(address);
                if (SignalGenerator.IsEVSGC(str) || SignalGenerator.IsPVSG(str))
                {
                    PsgEsg = new AgilentEsgAndPsg(address);
                }
                else if (SignalGenerator.IsAnalogE8257D(str))
                {
                    ///E8257D的代码
                    PsgEsg = new AgilentE8257D(address);
                }
                else if (SignalGenerator.IsAV1464B(str))
                {
                    PsgEsg = new AV1464BSignalGenerator(address);
                }
                else if (!SignalGenerator.IsEVSGB(str))
                {
                    return(null);
                }
                else
                {
                    PsgEsg = null;
                }
            }
            catch (Exception exception)
            {
                throw new Exception(string.Concat("连接至模拟信号源出错: ", exception.Message));
            }
            return(PsgEsg);
        }