/// <summary>
 /// Selects and runs the measurement item in the S/A (spectrum analysis) mode. Thequery version of this command returns the current measurement item.
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par"></param>
 public static void SetMeas(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(MEAS + " " + par);
 }
 /// <summary>
 /// Selects or queries the filter for the channel power measurement
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par">RECTangle selects the rectangular filter. 
 /// GAUSsian selects the Gaussian filter.
 /// NYQuist selects the Nyquist filter (default).
 /// RNYQuist selects the Root Nyquist filter.</param>
 public static void SetCHPFilterType(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(CHP_FILTER_TYPE + " " + par);
 }
 /// <summary>
 /// Sets or queries the span.
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par">specifies the span. The valid range depends on the measurement mode as listed in Table 2--53</param>
 public static void SetFreqSpan(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(SPAN + " " + par + "hz");
 }
 /// <summary>
 /// Determines whether to use the continuous mode to acquire the input signal
 /// OFF or 0 specifies that the single mode, rather than the continuous mode, is used for data acquisition. To initiate the acquisition, use the :INITiate[:IMMediate]
 /// To stop the acquisition because the trigger is not generated in single mode, send the following command: :INITiate:CONTinuous OFF
 /// ON or 1 initiates data acquisition in the continuous mode.
 /// To stop the acquisition in the continuous mode, send the following command::INITiate:CONTinuous OFF
 /// </summary>
 /// <param name="s"></param>
 public static void SetInitContOff(SpectrumMeterModel s)
 {
     s.WriteCommand(REPEAT_SINGLE);
 }
 /// <summary>
 /// Sets or queries the center frequency. 
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par"><freq>::=<NRf> specifies the center frequency. For the setting range</param>
 public static void SetFreqCenter(SpectrumMeterModel s, string par)
 {
     try { s.WriteCommand(FREQ_CENTER + " " + par + "hz"); }
     catch (Exception e) { Log.Error(_logTarget + "Set FREQ_CENTER: " + e.ToString(), e); }
 }
 /// <summary>
 /// Determines whether to automatically set the step size (amount per click by which the up and down keys change a setting value) of the center frequency by the span setting.
 /// OFF or 0 specifies that the step size of the center frequency is not set automatically. 
 /// To set it, use the [:SENSe]:FREQuency:CENTer:STEP[:INCRement] command. 
 /// ON or 1 specifies that the step size of the center frequency is set automatically by the span.
 /// </summary>
 /// <param name="s"></param>
 public static void SetFreqCenterStepAutoOn(SpectrumMeterModel s)
 {
     s.WriteCommand(FREQ_STEP_AUTO_ON);
 }
 /// <summary>
 /// Determines whether to automatically set the input attenuation according to the reference level
 /// ON or 1 specifies that the input attenuation is set automatically.
 /// </summary>
 /// <param name="s"></param>
 public static void SetAmplAutoAttOn(SpectrumMeterModel s)
 {
     s.WriteCommand(AMP_ATT_AUTO_ON);
 }
 /// <summary>
 /// Sets or queries the number of FFT points. This command is valid when [:SENSe]:SPECtrum:BANDwidth|:BWIDth:STATe is OFF.
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par">sets the number of FFT points. Range: 64 to 65536 in powers of 2.</param>
 public static void SetFFTPoints(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(FFT_POINTS + " " + par);
 }
 /// <summary>
 /// Determines whether to perform the resolution bandwidth (RBW) process
 /// ON or 1 specifies that the RBW process is performed.
 /// </summary>
 /// <param name="s"></param>
 public static void SetRBWStateOn(SpectrumMeterModel s)
 {
     s.WriteCommand(RBW_STATE_ON);
 }
 /// <summary>
 /// Returns spectrum waveform data in the S/A (spectrum analysis) mode.
 /// </summary>
 /// <param name="s"></param>
 /// <returns>#Num_digit Num_byte Data(1)Data(2)...Data(n)
 /// Where
 /// Num_digit is the number of digits in <Num_byte>.
 /// Num_byte is the number of bytes of the data that follow.
 /// Data(n) is the amplitude spectrum in dBm.
 /// 4-byte little endian floating-point format specified in IEEE 488.2
 /// n: Max 240001</returns>
 public static string FetchSpectrum(SpectrumMeterModel s)
 {
     string res = String.Empty;
     try { s.WriteCommand(FETCH_SPECTRUM); }
     catch (Exception e) { Log.Error(_logTarget + "Get FETCH_SPECTRUM: " + e.ToString(), e); }
     return res;
 }
 /// <summary>
 /// Sets or queries the resolution bandwidth (RBW) when [:SENSe]:SPECtrum: BANDwidth|:BWIDth[:RESolution]:AUTO is set to Off.
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par">specifies the RBW. For the setting range, refer to Table D--4 in Appendix D.</param>
 public static void SetRBWMan(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(RBW_MAN + " " + par + "Hz");
 }
 /// <summary>
 /// Selects or queries the RBW filter.
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par">RECTangle selects the rectangular filter. 
 /// GAUSsian selects the Gaussian filter.
 /// NYQuist selects the Nyquist filter (default).
 /// RNYQuist selects the Root Nyquist filter.</param>
 public static void SetRBWFilter(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(RBW_FILTER + " " + par);
 }
 /// <summary>
 /// Determines whether to automatically set the resolution bandwidth (RBW) by the span setting.
 /// ON or 1 specifies that the RBW is set automatically.
 /// </summary>
 /// <param name="s"></param>
 public static void SetRBWAutoOn(SpectrumMeterModel s)
 {
     s.WriteCommand(RBW_AUTO_ON);
 }
 /// <summary>
 /// Selects or queries the filter for the channel power measurement
 /// Sets or queries the roll-off rate of the filter for the channel power measurement when you have selected either NYQuist (Nyquist filter) or RNYQuist (Root Nyquist filter) in the [:SENSe]:CHPower:FILTer:TYPE command
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par">Range: 0.0001 to 1</param>
 public static void SetCHPRollOff(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(CHP_ROLLOFF + " " + par);
 }
 /// <summary>
 /// Adjusts amplitude automatically for the best system performance using the input signal as a guide.
 /// </summary>
 /// <param name="s"></param>
 public static void SetAmplAutoLvl(SpectrumMeterModel s)
 {
     s.WriteCommand(AMP_REF_LEVEL);
 }
 /// <summary>
 /// Determines whether to enable the extended resolution that eliminates the limit on the number of FFT points (it is normally limited internally).
 /// ON or 1 allows you to set the number of FFT points up to 65536. Use the [:SENSe]:SPECtrum:FFT:LENGth command to set the number.
 /// </summary>
 /// <param name="s"></param>
 public static void SetExtendedOn(SpectrumMeterModel s)
 {
     s.WriteCommand(FFT_EXTENDED_ON);
 }
 /// <summary>
 /// When you have selected OFF or 0 in the :INPut:ATTenuation:AUTO command, use this command to set the input attenuation. The query version of this command returns the input attenuation setting.
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par">specifies the input attenuation. The valid settings depend on the measurement frequency band as shown in Table 2--41.</param>
 public static void SetAmplRefAtt(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(AMP_RF_ATT_DB + " " + par);
 }
 /// <summary>
 /// Selects or queries the FFT window function. This command is valid when [:SENSe]:SPECtrum:BANDwidth|:BWIDth:STATe is OFF.
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par">{ BH3A | BH3B | BH4A | BH4B | BLACkman | HAMMing | HANNing | PARZen | ROSenfield | WELCh | SLOBe | SCUBed | ST4T | FLATtop | RECT }</param>
 public static void SetFFTWindowType(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(FFT_WINDOW_TYPE + " " + par);
 }
 /// <summary>
 /// Sets or queries the reference level. Using this command to set the reference level is equivalent to pressing the AMPLITUDE key and then the Ref Level side key on the front panel.
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par">specifies the reference level. The valid settings depend on the measurement frequency band as shown in Table 2--43</param>
 public static void SetAmplRefLvl(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(AMP_REF_LEVEL + " " + par);
 }
 /// <summary>
 /// Sets or queries the step size (amount per click by which the up and down keys change a setting value) of the center frequency when [:SENSe]:FREQuency:CENTer:STEP:AUTO is OFF.
 /// Note: doesn't affect frontpanel
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par">the step size of the center frequency</param>
 public static void SetFreqCenterStepAutoIncr(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(STEP_AUTO_INCR + " " + par);
 }
 /// <summary>
 /// Selects or queries the mixer level.
 /// To set the mixer level, you must have selected On in the :INPut:ATTenuation:AUTO command.
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par">specifies the mixer level. The valid settings depend on the measurement frequency band as shown in Table 2--42.</param>
 public static void SetAmpMixerLvl(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(AMP_MIX_LVL + " " + par);
 }
 /// <summary>
 /// Selects the channel table. The query command returns the selected channel table.
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par">specifies a channel table. 
 /// The table name is represented with the communication standard name followed by “-FL” (forward link), “-RL” (reverse link), “-UL” (uplink), or “-DL” (downlink).</param>
 public static void SetFreqChanCat(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(FREQ_CHAN_TAB_SEL + " " + par);
 }
 /// <summary>
 /// Sets or queries the vertical, or amplitude, scale (per division) in the spectrum view.
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par">specifies the horizontal scale in the spectrum view. Range: 0 to 10 dB/div.</param>
 public static void SetAmpVertScale(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(AMP_VERT_SCALE + " " + par);
 }
 /// <summary>
 /// Sets or queries the start frequency.
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par">specifies the stop frequency. For the setting range, refer to Table 2--52 on page 2--428</param>
 public static void SetFreqStop(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(FREQ_STOP + " " + par + "hz");
 }
 /// <summary>
 /// Sets or queries the channel bandwidth for the channel power measurement (seeFigure 2--18).
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par">specifies the channel bandwidth for the channel power measurement. Range: (Bin bandwidth)×8 to full span [Hz]</param>
 public static void SetChannelBand(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(CHP_BANDWIDTH + " " + par + "hz");
 }
 /// <summary>
 /// Determines whether to use the continuous mode to acquire the input signal
 /// OFF or 0 specifies that the single mode, rather than the continuous mode, is used for data acquisition. To initiate the acquisition, use the :INITiate[:IMMediate]
 /// To stop the acquisition because the trigger is not generated in single mode, send the following command: :INITiate:CONTinuous OFF
 /// ON or 1 initiates data acquisition in the continuous mode.
 /// To stop the acquisition in the continuous mode, send the following command::INITiate:CONTinuous OFF
 /// NOTE: When the analyzer receives a :FETCh command while operating in the continuous mode, it returns an execution error. 
 /// If you want to run a :FETCh, use the :INITiate[:IMMediate] command.
 /// </summary>
 /// <param name="s"></param>
 public static void SetInitContOn(SpectrumMeterModel s)
 {
     s.WriteCommand(REPEAT_CONTINUOUS);
 }
 /// <summary>
 /// Selects or queries the measurement mode
 /// NOTE. If you want to change the measurement mode, stop the data acquisition with the :INITiate:CONTinuous OFF command.
 /// </summary>
 /// <param name="s"></param>
 /// <param name="par">measurement mode</param>
 public static void SetInstrumentSelect(SpectrumMeterModel s, string par)
 {
     s.WriteCommand(INSTRUMENT_SELECT + " " + par);
 }