/// <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="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) { }
/// <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) { }
/// <summary> /// Creates a new IEC 61850-90-5 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="ConfigurationFrame"/> for the new <see cref="DataFrame"/>.</param> /// <param name="msvID">MSVID to use for <see cref="DataFrame"/>.</param> /// <param name="asduCount">ASDU count.</param> /// <param name="asduImages">Concentrator's ASDU image cache.</param> /// <param name="configurationRevision">Configuration revision.</param> /// <returns>New IEC 61850-90-5 <see cref="DataFrame"/> at given <paramref name="timestamp"/>.</returns> public static DataFrame CreateDataFrame(Ticks timestamp, ConfigurationFrame configurationFrame, string msvID, int asduCount, byte[][] asduImages, uint configurationRevision) { // We create a new IEC 61850-90-5 data frame based on current configuration frame DataFrame dataFrame = new DataFrame(timestamp, configurationFrame, msvID, asduCount, asduImages, configurationRevision); DataCell dataCell; foreach (ConfigurationCell configurationCell in configurationFrame.Cells) { // Create a new IEC 61850-90-5 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; }
/// <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) { }
/// <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="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="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) { }
// Static Methods // Delegate handler to create a new IEC 61850-90-5 data cell internal static IDataCell CreateNewCell(IChannelFrame parent, IChannelFrameParsingState<IDataCell> state, int index, byte[] buffer, int startIndex, out int parsedLength) { IDataFrameParsingState parsingState = state as IDataFrameParsingState; IConfigurationCell configurationCell = null; // With or without an associated configuration, we'll parse the data cell if (parsingState != null && parsingState.ConfigurationFrame != null) configurationCell = parsingState.ConfigurationFrame.Cells[index]; DataCell dataCell = new DataCell(parent as IDataFrame, configurationCell); parsedLength = dataCell.ParseBinaryImage(buffer, startIndex, 0); return dataCell; }