Esempio n. 1
0
        public bool GetMarkerStimulus(CHANNEL channel,
                                      MEASUREMENT measurement,
                                      MARKERS marker,
                                      out double stimulus)
        {
            stimulus = 0;
            try
            {
                IAgNAMeasurement chMeasurement;
                if (measurement != MEASUREMENT.LIKE_CHANNEL)
                {
                    chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement);
                }
                else
                {
                    chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel);
                }

                stimulus = chMeasurement.Markers.Item[getMarker(marker)].Stimulus;
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Esempio n. 2
0
        public bool MarkerQueryBandwidth(CHANNEL channel, MEASUREMENT measurement, MARKERS marker,
                                         ref double pBandWidthVal,
                                         ref double pCenterFreqVal,
                                         ref double pQVal,
                                         ref double pLossVal)
        {
            try
            {
                IAgNAMeasurement chMeasurement;
                if (measurement != MEASUREMENT.LIKE_CHANNEL)
                {
                    chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement);
                }
                else
                {
                    chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel);
                }

                chMeasurement.Markers.Item[getMarker(marker)].QueryBandwidth(ref pBandWidthVal, ref pCenterFreqVal, ref pQVal, ref pLossVal);


                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Esempio n. 3
0
        public bool GetMarkerTargetValue(CHANNEL channel,
                                         MEASUREMENT measurement,
                                         MARKERS marker,
                                         out double targetValue,
                                         out string outMessage)
        {
            targetValue = 0;
            outMessage  = string.Empty;
            try
            {
                IAgNAMeasurement chMeasurement;
                if (measurement != MEASUREMENT.LIKE_CHANNEL)
                {
                    chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement);
                }
                else
                {
                    chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel);
                }

                targetValue = chMeasurement.Markers.Item[getMarker(marker)].TargetValue;
                return(true);
            }
            catch (Exception err)
            {
                outMessage = err.Message;
                return(false);
            }
        }
Esempio n. 4
0
        string getMarker(MARKERS m)
        {
            switch (m)
            {
            case MARKERS.MARKER1:
                return("MARKER1");

            case MARKERS.MARKER2:
                return("MARKER2");

            case MARKERS.MARKER3:
                return("MARKER3");

            case MARKERS.MARKER4:
                return("MARKER4");

            case MARKERS.MARKER5:
                return("MARKER5");

            case MARKERS.MARKER6:
                return("MARKER6");

            case MARKERS.MARKER7:
                return("MARKER7");
            }
            throw (new SystemException("marker is not correct"));
        }
Esempio n. 5
0
        public bool SetMarkerTrackEnabled(CHANNEL channel, MEASUREMENT measurement, MARKERS marker, bool te)
        {
            try
            {
                IAgNAMeasurement chMeasurement;
                if (measurement != MEASUREMENT.LIKE_CHANNEL)
                {
                    chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement);
                }
                else
                {
                    chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel);
                }

                chMeasurement.Markers.Item[getMarker(marker)].MarkerTrackEnabled = te;
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Esempio n. 6
0
        public bool MarkerSearch(CHANNEL channel, MEASUREMENT measurement, MARKERS marker, AgNAMarkerSearchTypeEnum s)
        {
            try
            {
                IAgNAMeasurement chMeasurement;
                if (measurement != MEASUREMENT.LIKE_CHANNEL)
                {
                    chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement);
                }
                else
                {
                    chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel);
                }

                chMeasurement.Markers.Item[getMarker(marker)].Search(s);
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Esempio n. 7
0
        public bool MarkerQueryValue(CHANNEL channel, MEASUREMENT measurement, MARKERS marker,
                                     ref double pRealVal, ref double pImagVal)
        {
            try
            {
                IAgNAMeasurement chMeasurement;
                if (measurement != MEASUREMENT.LIKE_CHANNEL)
                {
                    chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement);
                }
                else
                {
                    chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel);
                }

                chMeasurement.Markers.Item[getMarker(marker)].QueryValue(ref pRealVal, ref pImagVal);
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Esempio n. 8
0
        public bool GetMarkerPeakExcursion(CHANNEL channel, MEASUREMENT measurement, MARKERS marker, out double targetValue)
        {
            targetValue = 0;
            try
            {
                IAgNAMeasurement chMeasurement;
                if (measurement != MEASUREMENT.LIKE_CHANNEL)
                {
                    chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement);
                }
                else
                {
                    chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel);
                }

                targetValue = chMeasurement.Markers.Item[getMarker(marker)].PeakExcursion;
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Esempio n. 9
0
        public bool SetMarkerBandwidthThreshold(CHANNEL channel, MEASUREMENT measurement, MARKERS marker, double t)
        {
            try
            {
                IAgNAMeasurement chMeasurement;
                if (measurement != MEASUREMENT.LIKE_CHANNEL)
                {
                    chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)measurement);
                }
                else
                {
                    chMeasurement = agNAChannel[(int)channel - 1].Measurements.get_Item("Measurement" + (int)channel);
                }

                chMeasurement.Markers.Item[getMarker(marker)].BandwidthThreshold = t;
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Esempio n. 10
0
 public void AddMarker(TGeoMarker m)
 {
     MARKERS.Add(m);
 }