Ejemplo n.º 1
0
        public void SetMark(string id, string value, FrequencyUnit unit)
        {
            string cmd = "Mark" + id + " " + value + unit.ToString();

            this.ExecuteCommand(cmd);

            if (!this._marksSetCount.Contains(id))
            {
                this._marksSetCount.Add(id);
                this.MarksCount++;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 设置SPAN
        /// </summary>
        /// <param name="value">带宽</param>
        /// <param name="unit">单位</param>
        /// <returns></returns>
        public override bool SetSpan(double value, FrequencyUnit unit)
        {
            string sendMsg = "FREQ:SPAN " + value + unit.ToString();

            try
            {
                return(base.WriteString(sendMsg));
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 设置SPAN
        /// </summary>
        /// <param name="value">带宽</param>
        /// <param name="unit">单位</param>
        /// <returns></returns>
        public override bool SetSpan(double value, FrequencyUnit unit)
        {
            string sendMsg = "SP " + value + unit.ToString();

            try
            {
                return(base.WriteString(sendMsg));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                return(false);
            }
        }
Ejemplo n.º 4
0
 public override string ToString()
 {
     return(value.ToString() + unit.ToString());
 }
Ejemplo n.º 5
0
        public void SetOrphanMark(string id, string value, FrequencyUnit unit)
        {
            string cmd = "Mark" + id + " " + value + unit.ToString();

            this.ExecuteCommand(cmd);
        }
Ejemplo n.º 6
0
        public static string Format(float value, FrequencyUnit unit)
        {
            string formattedValue = string.Format("{0}{1}", value / Ratio[(int)unit], unit.ToString());

            return(formattedValue);
        }
Ejemplo n.º 7
0
 public void SetOrphanMark(string id, string value, FrequencyUnit unit)
 {
     string cmd = "Mark" + id + " " + value + unit.ToString();
     this.ExecuteCommand(cmd);
 }
Ejemplo n.º 8
0
        public void SetMark(string id, string value, FrequencyUnit unit)
        {
            string cmd = "Mark" + id + " " + value + unit.ToString();
            this.ExecuteCommand(cmd);

            if (!this._marksSetCount.Contains(id))
            {
                this._marksSetCount.Add(id);
                this.MarksCount++;
            }
        }