Пример #1
0
        /// <summary>
        /// Creates a new <see cref="DataCell"/> from specified parameters.
        /// </summary>
        /// <param name="parent">The reference to parent <see cref="DataFrame"/> of this <see cref="DataCell"/>.</param>
        /// <param name="configurationCell">The <see cref="ConfigurationCell"/> associated with this <see cref="DataCell"/>.</param>
        /// <param name="addEmptyValues">If <c>true</c>, adds empty values for each defined configuration cell definition.</param>
        public DataCell(DataFrame parent, ConfigurationCell configurationCell, bool addEmptyValues)
            : this(parent, configurationCell)
        {
            if (!addEmptyValues)
            {
                return;
            }

            // Define needed phasor values
            foreach (IPhasorDefinition phasorDefinition in configurationCell.PhasorDefinitions)
            {
                PhasorValues.Add(new PhasorValue(this, phasorDefinition));
            }

            // Define a frequency and df/dt
            FrequencyValue = new FrequencyValue(this, configurationCell.FrequencyDefinition);

            // Define any analog values
            foreach (IAnalogDefinition analogDefinition in configurationCell.AnalogDefinitions)
            {
                AnalogValues.Add(new AnalogValue(this, analogDefinition));
            }

            // Define any digital values
            foreach (IDigitalDefinition digitalDefinition in configurationCell.DigitalDefinitions)
            {
                DigitalValues.Add(new DigitalValue(this, digitalDefinition));
            }
        }
Пример #2
0
 /// <summary>
 /// Creates a new <see cref="DigitalDefinition"/> from specified parameters.
 /// </summary>
 /// <param name="parent">The <see cref="ConfigurationCell"/> parent of this <see cref="DigitalDefinition"/>.</param>
 /// <param name="label">The label of this <see cref="DigitalDefinition"/>.</param>
 /// <param name="normalStatus">The normal status for this <see cref="DigitalDefinition"/>.</param>
 /// <param name="validInputs">The valid input for this <see cref="DigitalDefinition"/>.</param>
 public DigitalDefinition(ConfigurationCell parent, string label, ushort normalStatus, ushort validInputs)
     : base(parent, label)
 {
     m_normalStatus = normalStatus;
     m_validInputs  = validInputs;
 }
Пример #3
0
 /// <summary>
 /// Creates a new <see cref="AnalogDefinition"/> from specified parameters.
 /// </summary>
 /// <param name="parent">The <see cref="ConfigurationCell"/> parent of this <see cref="AnalogDefinition"/>.</param>
 /// <param name="label">The label of this <see cref="AnalogDefinition"/>.</param>
 /// <param name="scale">The integer scaling value of this <see cref="AnalogDefinition"/>.</param>
 /// <param name="offset">The offset of this <see cref="AnalogDefinition"/>.</param>
 /// <param name="type">The <see cref="AnalogType"/> of this <see cref="AnalogDefinition"/>.</param>
 public AnalogDefinition(ConfigurationCell parent, string label, uint scale, double offset, AnalogType type)
     : base(parent, label, scale, offset, type)
 {
 }
Пример #4
0
 /// <summary>
 /// Creates a new <see cref="PhasorDefinition"/> from specified parameters.
 /// </summary>
 /// <param name="parent">The <see cref="ConfigurationCell"/> parent of this <see cref="PhasorDefinition"/>.</param>
 /// <param name="label">The label of this <see cref="PhasorDefinition"/>.</param>
 /// <param name="scale">The integer scaling value of this <see cref="PhasorDefinition"/>.</param>
 /// <param name="offset">The offset of this <see cref="PhasorDefinition"/>.</param>
 /// <param name="type">The <see cref="PhasorType"/> of this <see cref="PhasorDefinition"/>.</param>
 /// <param name="voltageReference">The associated <see cref="IPhasorDefinition"/> that represents the voltage reference (if any).</param>
 public PhasorDefinition(ConfigurationCell parent, string label, uint scale, double offset, PhasorType type, PhasorDefinition voltageReference)
     : base(parent, label, scale, offset, type, voltageReference)
 {
 }