Пример #1
0
        /// <summary>
        /// Converts <see cref="AnalogChannel"/> to its string format.
        /// </summary>
        public override string ToString()
        {
            // An,ch_id,ph,ccbm,uu,a,b,skew,min,max
            List <string> values = new List <string>
            {
                Index.ToString(),
                          Name,
                          PhaseID,
                          CircuitComponent,
                          Units,
                          Multiplier.ToString(CultureInfo.InvariantCulture),
                Adder.ToString(CultureInfo.InvariantCulture),
                Skew.ToString(CultureInfo.InvariantCulture),
                MinValue.ToString(CultureInfo.InvariantCulture),
                MaxValue.ToString(CultureInfo.InvariantCulture)
            };

            // ...,primary,secondary,PS
            if (m_version >= 1999)
            {
                values.Add(PrimaryRatio.ToString(CultureInfo.InvariantCulture));
                values.Add(SecondaryRatio.ToString(CultureInfo.InvariantCulture));
                values.Add(ScalingIdentifier.ToString());
            }

            return(string.Join(",", values));
        }
Пример #2
0
        /// <summary>
        /// Converts <see cref="AnalogChannel"/> to its string format.
        /// </summary>
        public override string ToString()
        {
            string[] values = new string[13];

            // An,ch_id,ph,ccbm,uu,a,b,skew,min,max,primary,secondary,PS
            values[0]  = Index.ToString();
            values[1]  = Name;
            values[2]  = PhaseID;
            values[3]  = CircuitComponent;
            values[4]  = Units;
            values[5]  = Multiplier.ToString(CultureInfo.InvariantCulture);
            values[6]  = Adder.ToString(CultureInfo.InvariantCulture);
            values[7]  = Skew.ToString(CultureInfo.InvariantCulture);
            values[8]  = MinValue.ToString();
            values[9]  = MaxValue.ToString();
            values[10] = PrimaryRatio.ToString(CultureInfo.InvariantCulture);
            values[11] = SecondaryRatio.ToString(CultureInfo.InvariantCulture);
            values[12] = ScalingIdentifier.ToString();

            return(values.ToDelimitedString(','));
        }