/// <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)
 {
 }
Exemple #2
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)
 {
 }
 /// <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)
 {
 }
Exemple #4
0
        /// <summary>
        /// Creates a new BPA PDCstream 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>
        /// <returns>New BPA PDCstream <see cref="DataFrame"/> at given <paramref name="timestamp"/>.</returns>
        /// <remarks>
        /// Note that the <see cref="ConcentratorBase"/> class (which the <see cref="ActionAdapterBase"/> is derived from)
        /// is designed to sort <see cref="IMeasurement"/> implementations into an <see cref="IFrame"/> which represents
        /// a collection of measurements at a given timestamp. The <c>CreateNewFrame</c> method allows consumers to create
        /// their own <see cref="IFrame"/> implementations, in our case this will be a BPA PDCstream data frame.
        /// </remarks>
        protected override IFrame CreateNewFrame(Ticks timestamp)
        {
            // We create a new BPA PDCstream data frame based on current configuration frame
            ushort sampleNumber = (ushort)((timestamp.DistanceBeyondSecond() + 1.0D) / base.TicksPerFrame);

            DataFrame dataFrame = new DataFrame(timestamp, m_configurationFrame, 1, sampleNumber);
            DataCell dataCell;

            foreach (ConfigurationCell configurationCell in m_configurationFrame.Cells)
            {
                // Create a new BPA PDCstream 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;
        }
Exemple #5
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)
 {
 }
 /// <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)
 {
 }
Exemple #7
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)
 {
 }
Exemple #8
0
        // Static Methods

        // Delegate handler to create a new BPA PDCstream 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;
        }
Exemple #9
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)
 {
 }
Exemple #10
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)
 {
 }