Example #1
0
 /// <summary>
 /// Creates a new <see cref="PhasorValue"/> from specified parameters.
 /// </summary>
 /// <param name="parent">The <see cref="DataCell"/> parent of this <see cref="PhasorValue"/>.</param>
 /// <param name="phasorDefinition">The <see cref="PhasorDefinition"/> associated with this <see cref="PhasorValue"/>.</param>
 /// <param name="angle">The <see cref="GSF.Units.Angle"/> value (a.k.a., the argument) of this <see cref="PhasorValue"/>, in radians.</param>
 /// <param name="magnitude">The magnitude value (a.k.a., the absolute value or modulus) of this <see cref="PhasorValue"/>.</param>
 public PhasorValue(DataCell parent, PhasorDefinition phasorDefinition, Angle angle, double magnitude)
     : base(parent, phasorDefinition, angle, magnitude)
 {
 }
Example #2
0
        // Static Methods

        // Delegate handler to create a new IEEE C37.118 data cell
        internal static IDataCell CreateNewCell(IChannelFrame parent, IChannelFrameParsingState<IDataCell> state, int index, byte[] buffer, int startIndex, out int parsedLength)
        {
            DataCell dataCell = new DataCell(parent as IDataFrame, (state as IDataFrameParsingState).ConfigurationFrame.Cells[index]);

            parsedLength = dataCell.ParseBinaryImage(buffer, startIndex, 0);

            return dataCell;
        }
Example #3
0
 /// <summary>
 /// Creates a new <see cref="PhasorValue"/> from specified parameters.
 /// </summary>
 /// <param name="parent">The <see cref="DataCell"/> parent of this <see cref="PhasorValue"/>.</param>
 /// <param name="phasorDefinition">The <see cref="PhasorDefinition"/> associated with this <see cref="PhasorValue"/>.</param>
 /// <param name="real">The real value of this <see cref="PhasorValue"/>.</param>
 /// <param name="imaginary">The imaginary value of this <see cref="PhasorValue"/>.</param>
 public PhasorValue(DataCell parent, PhasorDefinition phasorDefinition, double real, double imaginary)
     : base(parent, phasorDefinition, real, imaginary)
 {
 }
 /// <summary>
 /// Creates a new <see cref="FrequencyValue"/> from specified parameters.
 /// </summary>
 /// <param name="parent">The <see cref="DataCell"/> parent of this <see cref="FrequencyValue"/>.</param>
 /// <param name="frequencyDefinition">The <see cref="FrequencyDefinition"/> associated with this <see cref="FrequencyValue"/>.</param>
 /// <param name="frequency">The floating point value that represents this <see cref="FrequencyValue"/>.</param>
 /// <param name="dfdt">The floating point value that represents the change in this <see cref="FrequencyValue"/> over time.</param>
 public FrequencyValue(DataCell parent, FrequencyDefinition frequencyDefinition, double frequency, double dfdt)
     : base(parent, frequencyDefinition, frequency, dfdt)
 {
 }
Example #5
0
 /// <summary>
 /// Creates a new <see cref="AnalogValue"/> from specified parameters.
 /// </summary>
 /// <param name="parent">The <see cref="DataCell"/> parent of this <see cref="AnalogValue"/>.</param>
 /// <param name="analogDefinition">The <see cref="AnalogDefinition"/> associated with this <see cref="AnalogValue"/>.</param>
 /// <param name="value">The floating point value that represents this <see cref="AnalogValue"/>.</param>
 public AnalogValue(DataCell parent, AnalogDefinition analogDefinition, double value)
     : base(parent, analogDefinition, value)
 {
 }
Example #6
0
 /// <summary>
 /// Creates a new <see cref="PhasorValue"/> from specified parameters.
 /// </summary>
 /// <param name="parent">The <see cref="DataCell"/> parent of this <see cref="PhasorValue"/>.</param>
 /// <param name="phasorDefinition">The <see cref="PhasorDefinition"/> associated with this <see cref="PhasorValue"/>.</param>
 /// <param name="real">The real value of this <see cref="PhasorValue"/>.</param>
 /// <param name="imaginary">The imaginary value of this <see cref="PhasorValue"/>.</param>
 public PhasorValue(DataCell parent, PhasorDefinition phasorDefinition, double real, double imaginary)
     : base(parent, phasorDefinition, real, imaginary)
 {
 }
Example #7
0
 /// <summary>
 /// Creates a new <see cref="PhasorValue"/> from specified parameters.
 /// </summary>
 /// <param name="parent">The <see cref="DataCell"/> parent of this <see cref="PhasorValue"/>.</param>
 /// <param name="phasorDefinition">The <see cref="PhasorDefinition"/> associated with this <see cref="PhasorValue"/>.</param>
 /// <param name="angle">The <see cref="GSF.Units.Angle"/> value (a.k.a., the argument) of this <see cref="PhasorValue"/>, in radians.</param>
 /// <param name="magnitude">The magnitude value (a.k.a., the absolute value or modulus) of this <see cref="PhasorValue"/>.</param>
 public PhasorValue(DataCell parent, PhasorDefinition phasorDefinition, Angle angle, double magnitude)
     : base(parent, phasorDefinition, angle, magnitude)
 {
 }
Example #8
0
 /// <summary>
 /// Creates a new <see cref="FrequencyValue"/> from specified parameters.
 /// </summary>
 /// <param name="parent">The <see cref="DataCell"/> parent of this <see cref="FrequencyValue"/>.</param>
 /// <param name="frequencyDefinition">The <see cref="FrequencyDefinition"/> associated with this <see cref="FrequencyValue"/>.</param>
 /// <param name="frequency">The floating point value that represents this <see cref="FrequencyValue"/>.</param>
 /// <param name="dfdt">The floating point value that represents the change in this <see cref="FrequencyValue"/> over time.</param>
 public FrequencyValue(DataCell parent, FrequencyDefinition frequencyDefinition, double frequency, double dfdt)
     : base(parent, frequencyDefinition, frequency, dfdt)
 {
 }
Example #9
0
 /// <summary>
 /// Creates a new <see cref="DigitalValue"/> from specified parameters.
 /// </summary>
 /// <param name="parent">The <see cref="DataCell"/> parent of this <see cref="DigitalValue"/>.</param>
 /// <param name="digitalDefinition">The <see cref="DigitalDefinition"/> associated with this <see cref="DigitalValue"/>.</param>
 /// <param name="value">The unsigned 16-bit integer value (composed of digital bits) that represents this <see cref="DigitalValue"/>.</param>
 public DigitalValue(DataCell parent, DigitalDefinition digitalDefinition, ushort value)
     : base(parent, digitalDefinition, value)
 {
 }
Example #10
0
 /// <summary>
 /// Creates a new <see cref="DigitalValue"/> from specified parameters.
 /// </summary>
 /// <param name="parent">The <see cref="DataCell"/> parent of this <see cref="DigitalValue"/>.</param>
 /// <param name="digitalDefinition">The <see cref="DigitalDefinition"/> associated with this <see cref="DigitalValue"/>.</param>
 /// <param name="value">The unsigned 16-bit integer value (composed of digital bits) that represents this <see cref="DigitalValue"/>.</param>
 public DigitalValue(DataCell parent, DigitalDefinition digitalDefinition, ushort value)
     : base(parent, digitalDefinition, value)
 {
 }
Example #11
0
 /// <summary>
 /// Creates a new <see cref="AnalogValue"/> from specified parameters.
 /// </summary>
 /// <param name="parent">The <see cref="DataCell"/> parent of this <see cref="AnalogValue"/>.</param>
 /// <param name="analogDefinition">The <see cref="AnalogDefinition"/> associated with this <see cref="AnalogValue"/>.</param>
 /// <param name="value">The floating point value that represents this <see cref="AnalogValue"/>.</param>
 public AnalogValue(DataCell parent, AnalogDefinition analogDefinition, double value)
     : base(parent, analogDefinition, value)
 {
 }
Example #12
0
        /// <summary>
        /// Creates a new IEEE C37.118 specific <see cref="DataFrame"/> for the given <paramref name="timestamp"/>.
        /// </summary>
        /// <param name="timestamp">Timestamp for new <see cref="IFrame"/> in <see cref="Ticks"/>.</param>
        /// <param name="configurationFrame">Associated <see cref="ConfigurationFrame1"/> for the new <see cref="DataFrame"/>.</param>
        /// <returns>New IEEE C37.118 <see cref="DataFrame"/> at given <paramref name="timestamp"/>.</returns>
        public static DataFrame CreateDataFrame(Ticks timestamp, ConfigurationFrame1 configurationFrame)
        {
            // We create a new IEEE C37.118 data frame based on current configuration frame
            DataFrame dataFrame = new DataFrame(timestamp, configurationFrame);
            DataCell dataCell;

            foreach (ConfigurationCell configurationCell in configurationFrame.Cells)
            {
                // Create a new IEEE C37.118 data cell (i.e., a PMU entry for this frame)
                dataCell = new DataCell(dataFrame, configurationCell, true);

                // Add data cell to the frame
                dataFrame.Cells.Add(dataCell);
            }

            return dataFrame;
        }