Esempio n. 1
0
        /// <summary>
        /// Creates a new <see cref="PhasorDefinition3"/> from specified parameters.
        /// </summary>
        /// <param name="parent">The <see cref="ConfigurationCell3"/> parent of this <see cref="PhasorDefinition3"/>.</param>
        /// <param name="label">The label of this <see cref="PhasorDefinition3"/>.</param>
        /// <param name="scale">The integer scaling value of this <see cref="PhasorDefinition3"/>.</param>
        /// <param name="offset">The offset of this <see cref="PhasorDefinition3"/>.</param>
        /// <param name="type">The <see cref="PhasorType"/> of this <see cref="PhasorDefinition3"/>.</param>
        /// <param name="voltageReference">The associated <see cref="IPhasorDefinition"/> that represents the voltage reference (if any).</param>
        /// <param name="phase">The phase of this <see cref="PhasorDefinition3"/>.</param>
        public PhasorDefinition3(ConfigurationCell3 parent, string label, uint scale, double offset, PhasorType type, PhasorDefinition3 voltageReference, char phase)
            : base(parent, label, scale, offset)
        {
            PhasorType         = type;
            m_voltageReference = type == PhasorType.Voltage ? this : voltageReference;

            PhasorComponent = phase switch
            {
                'A' => PhasorComponent.PhaseA,
                'B' => PhasorComponent.PhaseB,
                'C' => PhasorComponent.PhaseC,
                '+' => PhasorComponent.PositiveSequence,
                '-' => PhasorComponent.NegativeSequence,
                '0' => PhasorComponent.ZeroSequence,
                _ => PhasorComponent.PositiveSequence,// If phase is not a value IEEE C37.118-2011 supports, default to positive sequence
            };
        }
Esempio n. 2
0
        /// <summary>
        /// Creates a new <see cref="PhasorDefinition3"/> from specified parameters.
        /// </summary>
        /// <param name="parent">The <see cref="ConfigurationCell3"/> parent of this <see cref="PhasorDefinition3"/>.</param>
        /// <param name="label">The label of this <see cref="PhasorDefinition3"/>.</param>
        /// <param name="scale">The integer scaling value of this <see cref="PhasorDefinition3"/>.</param>
        /// <param name="offset">The offset of this <see cref="PhasorDefinition3"/>.</param>
        /// <param name="type">The <see cref="PhasorType"/> of this <see cref="PhasorDefinition3"/>.</param>
        /// <param name="voltageReference">The associated <see cref="IPhasorDefinition"/> that represents the voltage reference (if any).</param>
        /// <param name="phase">The phase of this <see cref="PhasorDefinition3"/>.</param>
        public PhasorDefinition3(ConfigurationCell3 parent, string label, uint scale, double offset, PhasorType type, PhasorDefinition3 voltageReference, char phase)
            : base(parent, label, scale, offset)
        {
            PhasorType         = type;
            m_voltageReference = type == PhasorType.Voltage ? this : voltageReference;

            switch (phase)
            {
            case 'A':
                PhasorComponent = PhasorComponent.PhaseA;
                break;

            case 'B':
                PhasorComponent = PhasorComponent.PhaseB;
                break;

            case 'C':
                PhasorComponent = PhasorComponent.PhaseC;
                break;

            case '+':
                PhasorComponent = PhasorComponent.PositiveSequence;
                break;

            case '-':
                PhasorComponent = PhasorComponent.NegativeSequence;
                break;

            case '0':
                PhasorComponent = PhasorComponent.ZeroSequence;
                break;

            default:
                // If phase is not a value IEEE C37.118-2011 supports, default to positive sequence
                PhasorComponent = PhasorComponent.PositiveSequence;
                break;
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Creates a new <see cref="DigitalDefinition3"/> from specified parameters.
 /// </summary>
 /// <param name="parent">The <see cref="ConfigurationCell3"/> parent of this <see cref="DigitalDefinition3"/>.</param>
 /// <param name="label">The label of this <see cref="DigitalDefinition3"/>.</param>
 /// <param name="normalStatus">The normal status for this <see cref="DigitalDefinition3"/>.</param>
 /// <param name="validInputs">The valid input for this <see cref="DigitalDefinition3"/>.</param>
 public DigitalDefinition3(ConfigurationCell3 parent, string label, ushort normalStatus, ushort validInputs)
     : base(parent, label, 1, 0.0D)
 {
     NormalStatus = normalStatus;
     ValidInputs  = validInputs;
 }
Esempio n. 4
0
 /// <summary>
 /// Creates a new <see cref="AnalogDefinition3"/> from specified parameters.
 /// </summary>
 /// <param name="parent">The <see cref="ConfigurationCell3"/> parent of this <see cref="AnalogDefinition3"/>.</param>
 /// <param name="label">The label of this <see cref="AnalogDefinition3"/>.</param>
 /// <param name="scale">The integer scaling value of this <see cref="AnalogDefinition3"/>.</param>
 /// <param name="offset">The offset of this <see cref="AnalogDefinition3"/>.</param>
 /// <param name="type">The <see cref="AnalogType"/> of this <see cref="AnalogDefinition3"/>.</param>
 public AnalogDefinition3(ConfigurationCell3 parent, string label, uint scale, double offset, AnalogType type)
     : base(parent, label, scale, offset)
 {
     AnalogType = type;
 }