From 417b7a0639df01bd0d0536bb55dbd443d28d6ff2 Mon Sep 17 00:00:00 2001 From: "J. Ritchie Carroll" Date: Sun, 18 Feb 2024 16:54:16 -0600 Subject: [PATCH] Synced updates from GSF.PhasorProtocols --- .../Anonymous/ConfigurationFrame.cs | 7 +++- .../IEC61850_90_5/CommandFrame.cs | 11 +++++ .../IEC61850_90_5/ConfigurationFrame.cs | 11 +++++ .../IEC61850_90_5/DataFrame.cs | 7 ++++ .../IEEE1344/CommandFrame.cs | 4 +- .../IEEE1344/ConfigurationFrame.cs | 5 ++- .../IEEE1344/DataFrame.cs | 3 ++ .../IEEE1344/HeaderFrame.cs | 5 ++- .../IEEEC37_118/AnalogValue.cs | 32 ++++++++++++++- .../IEEEC37_118/CommandFrame.cs | 18 +++++++++ .../IEEEC37_118/ConfigurationFrame1.cs | 40 +++++++++++-------- .../IEEEC37_118/ConfigurationFrame3.cs | 5 +-- .../IEEEC37_118/DataFrame.cs | 14 +++++++ .../IEEEC37_118/FrameParser.cs | 4 +- .../IEEEC37_118/HeaderFrame.cs | 18 +++++++++ .../IEEEC37_118/PhasorValue.cs | 33 ++++++++++++++- .../Macrodyne/ConnectionParameters.cs | 3 +- .../MultiProtocolFrameParser.cs | 1 + .../SelFastMessage/ConfigurationFrame.cs | 2 +- .../SelFastMessage/ConnectionParameters.cs | 3 +- .../SelFastMessage/DataFrame.cs | 4 ++ 21 files changed, 195 insertions(+), 35 deletions(-) diff --git a/src/Gemstone.PhasorProtocols/Anonymous/ConfigurationFrame.cs b/src/Gemstone.PhasorProtocols/Anonymous/ConfigurationFrame.cs index 452b0f00f..c673758b1 100644 --- a/src/Gemstone.PhasorProtocols/Anonymous/ConfigurationFrame.cs +++ b/src/Gemstone.PhasorProtocols/Anonymous/ConfigurationFrame.cs @@ -271,10 +271,13 @@ private static void CacheConfigurationFile(Tuple /// Name of the configuration to get file name for. /// File name with path of the specified . - public static string GetConfigurationCacheFileName(string configurationName) + public static string GetConfigurationCacheFileName(string configurationName, string extension = "configuration.xml", string basePath = null) { // Path traversal attacks are prevented by replacing invalid file name characters - return $"{ConfigurationCachePath}{configurationName.ReplaceCharacters('_', c => Path.GetInvalidFileNameChars().Contains(c))}.configuration.xml"; + return $"{basePath ?? ConfigurationCachePath}{RemoveInvalidCharacters(configurationName)}.{RemoveInvalidCharacters(extension)}"; + + static string RemoveInvalidCharacters(string name) => + name.ReplaceCharacters('_', c => Path.GetInvalidFileNameChars().Contains(c)); } /// diff --git a/src/Gemstone.PhasorProtocols/IEC61850_90_5/CommandFrame.cs b/src/Gemstone.PhasorProtocols/IEC61850_90_5/CommandFrame.cs index 2b66b4c40..147760bea 100644 --- a/src/Gemstone.PhasorProtocols/IEC61850_90_5/CommandFrame.cs +++ b/src/Gemstone.PhasorProtocols/IEC61850_90_5/CommandFrame.cs @@ -116,6 +116,8 @@ protected CommandFrame(SerializationInfo info, StreamingContext context) { // Deserialize command frame m_frameHeader = (CommonFrameHeader)info.GetValue("frameHeader", typeof(CommonFrameHeader)); + m_frameHeader.Timestamp = base.Timestamp; + m_frameHeader.IDCode = base.IDCode; } #endregion @@ -158,6 +160,15 @@ public override Ticks Timestamp base.Timestamp = value; } } + public override ushort IDCode + { + get => CommonHeader.IDCode; + set + { + CommonHeader.IDCode = value; + base.IDCode = value; + } + } /// /// Gets the IEC 61850-90-5 protocol version of this . diff --git a/src/Gemstone.PhasorProtocols/IEC61850_90_5/ConfigurationFrame.cs b/src/Gemstone.PhasorProtocols/IEC61850_90_5/ConfigurationFrame.cs index 3580cf2db..ed0a46b5c 100644 --- a/src/Gemstone.PhasorProtocols/IEC61850_90_5/ConfigurationFrame.cs +++ b/src/Gemstone.PhasorProtocols/IEC61850_90_5/ConfigurationFrame.cs @@ -92,6 +92,8 @@ protected ConfigurationFrame(SerializationInfo info, StreamingContext context) // Deserialize configuration frame m_frameHeader = (CommonFrameHeader)info.GetValue("frameHeader", typeof(CommonFrameHeader)); m_timebase = info.GetUInt32("timebase"); + m_frameHeader.Timestamp = base.Timestamp; + m_frameHeader.IDCode = base.IDCode; } #endregion @@ -129,6 +131,15 @@ public override Ticks Timestamp base.Timestamp = value; } } + public override ushort IDCode + { + get => CommonHeader.IDCode; + set + { + CommonHeader.IDCode = value; + base.IDCode = value; + } + } /// /// Gets or sets current . diff --git a/src/Gemstone.PhasorProtocols/IEC61850_90_5/DataFrame.cs b/src/Gemstone.PhasorProtocols/IEC61850_90_5/DataFrame.cs index ab1f3dd59..ab7d1a938 100644 --- a/src/Gemstone.PhasorProtocols/IEC61850_90_5/DataFrame.cs +++ b/src/Gemstone.PhasorProtocols/IEC61850_90_5/DataFrame.cs @@ -142,6 +142,8 @@ protected DataFrame(SerializationInfo info, StreamingContext context) m_configurationRevision = info.GetUInt32("configurationRevision"); SampleSynchronization = info.GetByte("sampleSynchronization"); m_sampleRate = info.GetUInt16("sampleRate"); + m_frameHeader.Timestamp = base.Timestamp; + m_frameHeader.IDCode = base.IDCode; } #endregion @@ -178,6 +180,11 @@ public override Ticks Timestamp base.Timestamp = value; } } + public override ushort IDCode + { + get => CommonHeader.IDCode; + set => CommonHeader.IDCode = value; + } /// /// Gets the identifier that is used to identify the IEC 61850-90-5 frame. diff --git a/src/Gemstone.PhasorProtocols/IEEE1344/CommandFrame.cs b/src/Gemstone.PhasorProtocols/IEEE1344/CommandFrame.cs index a99784203..eab35a29e 100644 --- a/src/Gemstone.PhasorProtocols/IEEE1344/CommandFrame.cs +++ b/src/Gemstone.PhasorProtocols/IEEE1344/CommandFrame.cs @@ -98,7 +98,7 @@ public CommandFrame(byte[] buffer, int startIndex, int length) public CommandFrame(ulong idCode, DeviceCommand command) : base(new CommandCellCollection(0), command) { - m_idCode = idCode; + IDCode = idCode; Timestamp = DateTime.UtcNow.Ticks; } @@ -111,7 +111,7 @@ protected CommandFrame(SerializationInfo info, StreamingContext context) : base(info, context) { // Deserialize command frame - m_idCode = info.GetUInt64("idCode64Bit"); + IDCode = info.GetUInt64("idCode64Bit"); } #endregion diff --git a/src/Gemstone.PhasorProtocols/IEEE1344/ConfigurationFrame.cs b/src/Gemstone.PhasorProtocols/IEEE1344/ConfigurationFrame.cs index dd21a1506..90d73d7b2 100644 --- a/src/Gemstone.PhasorProtocols/IEEE1344/ConfigurationFrame.cs +++ b/src/Gemstone.PhasorProtocols/IEEE1344/ConfigurationFrame.cs @@ -91,7 +91,10 @@ protected ConfigurationFrame(SerializationInfo info, StreamingContext context) { // Deserialize configuration frame m_frameHeader = (CommonFrameHeader)info.GetValue("frameHeader", typeof(CommonFrameHeader)); - m_idCode = info.GetUInt64("idCode64Bit"); + IDCode = info.GetUInt64("idCode64Bit"); + + // Copy in associated properties from base class deserialization that are proxied for use by CommonFrameHeader + m_frameHeader.Timestamp = base.Timestamp; } #endregion diff --git a/src/Gemstone.PhasorProtocols/IEEE1344/DataFrame.cs b/src/Gemstone.PhasorProtocols/IEEE1344/DataFrame.cs index 5bbb6a5a4..8812f07e6 100644 --- a/src/Gemstone.PhasorProtocols/IEEE1344/DataFrame.cs +++ b/src/Gemstone.PhasorProtocols/IEEE1344/DataFrame.cs @@ -84,6 +84,9 @@ protected DataFrame(SerializationInfo info, StreamingContext context) { // Deserialize data frame m_frameHeader = (CommonFrameHeader)info.GetValue("frameHeader", typeof(CommonFrameHeader)); + + // Copy in associated properties from base class deserialization that are proxied for use by CommonFrameHeader + m_frameHeader.Timestamp = base.Timestamp; } #endregion diff --git a/src/Gemstone.PhasorProtocols/IEEE1344/HeaderFrame.cs b/src/Gemstone.PhasorProtocols/IEEE1344/HeaderFrame.cs index b65e86a2c..309b05133 100644 --- a/src/Gemstone.PhasorProtocols/IEEE1344/HeaderFrame.cs +++ b/src/Gemstone.PhasorProtocols/IEEE1344/HeaderFrame.cs @@ -73,7 +73,10 @@ protected HeaderFrame(SerializationInfo info, StreamingContext context) { // Deserialize header frame m_frameHeader = (CommonFrameHeader)info.GetValue("frameHeader", typeof(CommonFrameHeader)); - m_idCode = info.GetUInt64("idCode64Bit"); + IDCode = info.GetUInt64("idCode64Bit"); + + // Copy in associated properties from base class deserialization that are proxied for use by CommonFrameHeader + m_frameHeader.Timestamp = base.Timestamp; } #endregion diff --git a/src/Gemstone.PhasorProtocols/IEEEC37_118/AnalogValue.cs b/src/Gemstone.PhasorProtocols/IEEEC37_118/AnalogValue.cs index 52755cab0..7cfa96019 100644 --- a/src/Gemstone.PhasorProtocols/IEEEC37_118/AnalogValue.cs +++ b/src/Gemstone.PhasorProtocols/IEEEC37_118/AnalogValue.cs @@ -26,6 +26,7 @@ //****************************************************************************************************** using System; +using System.Collections.Generic; using System.Runtime.Serialization; namespace Gemstone.PhasorProtocols.IEEEC37_118 @@ -91,6 +92,35 @@ protected AnalogValue(SerializationInfo info, StreamingContext context) set => base.Definition = value; } + /// + /// Gets or sets the associated with this . + /// + public virtual AnalogDefinition3 Definition3 + { + get => base.Definition as AnalogDefinition3; + set => base.Definition = value; + } + + /// + /// of string based property names and values for the object. + /// + public override Dictionary Attributes + { + get + { + AnalogDefinition3 definition3 = Definition3; + + if (definition3 is null) + return base.Attributes; + + Dictionary baseAttributes = base.Attributes; + + baseAttributes.Add("Analog Value Scaled", $"{Value * definition3.Multiplier + definition3.Adder}"); + + return baseAttributes; + } + } + #endregion #region [ Static ] @@ -109,4 +139,4 @@ internal static IAnalogValue CreateNewValue(IDataCell parent, IAnalogDefinition #endregion } -} \ No newline at end of file +} diff --git a/src/Gemstone.PhasorProtocols/IEEEC37_118/CommandFrame.cs b/src/Gemstone.PhasorProtocols/IEEEC37_118/CommandFrame.cs index 4b618fca0..4241c6eb8 100644 --- a/src/Gemstone.PhasorProtocols/IEEEC37_118/CommandFrame.cs +++ b/src/Gemstone.PhasorProtocols/IEEEC37_118/CommandFrame.cs @@ -118,6 +118,10 @@ protected CommandFrame(SerializationInfo info, StreamingContext context) { // Deserialize command frame m_frameHeader = (CommonFrameHeader)info.GetValue("frameHeader", typeof(CommonFrameHeader)); + + // Copy in associated properties from base class deserialization that are proxied for use by CommonFrameHeader + m_frameHeader.Timestamp = base.Timestamp; + m_frameHeader.IDCode = base.IDCode; } #endregion @@ -161,6 +165,20 @@ public override Ticks Timestamp } } + /// + /// Gets or sets the ID code. + /// + public override ushort IDCode + { + get => CommonHeader.IDCode; + set + { + // Keep ID code updates synchronized... + CommonHeader.IDCode = value; + base.IDCode = value; + } + } + /// /// Gets the IEEE C37.118 protocol version of this . /// diff --git a/src/Gemstone.PhasorProtocols/IEEEC37_118/ConfigurationFrame1.cs b/src/Gemstone.PhasorProtocols/IEEEC37_118/ConfigurationFrame1.cs index c2a743316..49439fad8 100644 --- a/src/Gemstone.PhasorProtocols/IEEEC37_118/ConfigurationFrame1.cs +++ b/src/Gemstone.PhasorProtocols/IEEEC37_118/ConfigurationFrame1.cs @@ -51,11 +51,6 @@ public class ConfigurationFrame1 : ConfigurationFrameBase, ISupportSourceIdentif // Fields private CommonFrameHeader m_frameHeader; - /// - /// Represents the TimeBase of the configuration frame. - /// - protected uint m_timebase; - #endregion #region [ Constructors ] @@ -98,7 +93,10 @@ protected ConfigurationFrame1(SerializationInfo info, StreamingContext context) { // Deserialize configuration frame m_frameHeader = (CommonFrameHeader)info.GetValue("frameHeader", typeof(CommonFrameHeader)); - m_timebase = info.GetUInt32("timebase"); + + // Copy in associated properties from base class deserialization that are proxied for use by CommonFrameHeader + m_frameHeader.Timestamp = base.Timestamp; + m_frameHeader.IDCode = base.IDCode; } #endregion @@ -137,6 +135,20 @@ public override Ticks Timestamp } } + /// + /// Gets or sets the ID code. + /// + public override ushort IDCode + { + get => CommonHeader.IDCode; + set + { + // Keep ID code updates synchronized... + CommonHeader.IDCode = value; + base.IDCode = value; + } + } + /// /// Gets or sets current . /// @@ -154,7 +166,6 @@ public CommonFrameHeader CommonHeader State = m_frameHeader.State as IConfigurationFrameParsingState; base.IDCode = m_frameHeader.IDCode; base.Timestamp = m_frameHeader.Timestamp; - m_timebase = m_frameHeader.Timebase; } } @@ -179,12 +190,8 @@ public byte Version /// public uint Timebase { - get => m_timebase; - set - { - m_timebase = value & ~Common.TimeQualityFlagsMask; - CommonHeader.Timebase = m_timebase; - } + get => CommonHeader.Timebase; + set => CommonHeader.Timebase = value & ~Common.TimeQualityFlagsMask; } /// @@ -227,7 +234,7 @@ protected override byte[] HeaderImage int index = 0; CommonHeader.BinaryImage.CopyImage(buffer, ref index, CommonFrameHeader.FixedLength); - BigEndian.CopyBytes(m_timebase, buffer, index); + BigEndian.CopyBytes(CommonHeader.Timebase, buffer, index); BigEndian.CopyBytes((ushort)Cells.Count, buffer, index + 4); return buffer; @@ -298,8 +305,7 @@ protected override int ParseHeaderImage(byte[] buffer, int startIndex, int lengt // Skip past header that was already parsed... startIndex += CommonFrameHeader.FixedLength; - m_timebase = BigEndian.ToUInt32(buffer, startIndex) & ~Common.TimeQualityFlagsMask; - CommonHeader.Timebase = m_timebase; + CommonHeader.Timebase = BigEndian.ToUInt32(buffer, startIndex) & ~Common.TimeQualityFlagsMask; State.CellCount = BigEndian.ToUInt16(buffer, startIndex + 4); return FixedHeaderLength; @@ -342,7 +348,7 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont // Serialize configuration frame info.AddValue("frameHeader", m_frameHeader, typeof(CommonFrameHeader)); - info.AddValue("timebase", m_timebase); + info.AddValue("timebase", m_frameHeader.Timebase); } #endregion diff --git a/src/Gemstone.PhasorProtocols/IEEEC37_118/ConfigurationFrame3.cs b/src/Gemstone.PhasorProtocols/IEEEC37_118/ConfigurationFrame3.cs index 3a87701f8..b6888a799 100644 --- a/src/Gemstone.PhasorProtocols/IEEEC37_118/ConfigurationFrame3.cs +++ b/src/Gemstone.PhasorProtocols/IEEEC37_118/ConfigurationFrame3.cs @@ -128,7 +128,7 @@ protected override byte[] HeaderImage CommonHeader.BinaryImage.CopyImage(buffer, ref index, CommonFrameHeader.FixedLength); BigEndian.CopyBytes((ushort)0, buffer, index); // CONT_IDX - BigEndian.CopyBytes(m_timebase, buffer, index + 2); + BigEndian.CopyBytes(Timebase, buffer, index + 2); BigEndian.CopyBytes((ushort)Cells.Count, buffer, index + 6); return buffer; @@ -301,8 +301,7 @@ protected override int ParseHeaderImage(byte[] buffer, int startIndex, int lengt // Skip past header that was already parsed... startIndex += FrameHeaderLength; // Includes CONT_IDX - m_timebase = BigEndian.ToUInt32(buffer, startIndex) & ~Common.TimeQualityFlagsMask; - CommonHeader.Timebase = m_timebase; + Timebase = BigEndian.ToUInt32(buffer, startIndex) & ~Common.TimeQualityFlagsMask; State.CellCount = BigEndian.ToUInt16(buffer, startIndex + 4); return FixedHeaderLength; diff --git a/src/Gemstone.PhasorProtocols/IEEEC37_118/DataFrame.cs b/src/Gemstone.PhasorProtocols/IEEEC37_118/DataFrame.cs index c9e3b2991..79c97b338 100644 --- a/src/Gemstone.PhasorProtocols/IEEEC37_118/DataFrame.cs +++ b/src/Gemstone.PhasorProtocols/IEEEC37_118/DataFrame.cs @@ -88,6 +88,10 @@ protected DataFrame(SerializationInfo info, StreamingContext context) { // Deserialize data frame m_frameHeader = (CommonFrameHeader)info.GetValue("frameHeader", typeof(CommonFrameHeader)); + + // Copy in associated properties from base class deserialization that are proxied for use by CommonFrameHeader + m_frameHeader.Timestamp = base.Timestamp; + m_frameHeader.IDCode = base.IDCode; } #endregion @@ -125,6 +129,16 @@ public override Ticks Timestamp } } + /// + /// Gets or sets the ID code. + /// + public override ushort IDCode + { + get => CommonHeader.IDCode; + // Keep ID code updates synchronized... + set => CommonHeader.IDCode = value; + } + /// /// Gets the identifier that is used to identify the IEEE C37.118 frame. /// diff --git a/src/Gemstone.PhasorProtocols/IEEEC37_118/FrameParser.cs b/src/Gemstone.PhasorProtocols/IEEEC37_118/FrameParser.cs index 1d880244c..508eaf7e1 100644 --- a/src/Gemstone.PhasorProtocols/IEEEC37_118/FrameParser.cs +++ b/src/Gemstone.PhasorProtocols/IEEEC37_118/FrameParser.cs @@ -386,13 +386,13 @@ protected override void OnReceivedChannelFrame(IChannelFrame frame) ReceivedDataFrame?.SafeInvoke(this, new EventArgs(dataFrame)); break; } - // Configuration frame type 3 has priority over type 2, so we check it first + // Configuration frame type 3 is more specific than type 1 (and more common), so we check it first case ConfigurationFrame3 configFrame3: { ReceivedConfigurationFrame3?.SafeInvoke(this, new EventArgs(configFrame3)); break; } - // Configuration frame type 2 is more specific than type 1 (and more common), so we check it next + // Configuration frame type 2 is more specific than type 1 (and more common), so we check it first case ConfigurationFrame2 configFrame2: { ReceivedConfigurationFrame2?.SafeInvoke(this, new EventArgs(configFrame2)); diff --git a/src/Gemstone.PhasorProtocols/IEEEC37_118/HeaderFrame.cs b/src/Gemstone.PhasorProtocols/IEEEC37_118/HeaderFrame.cs index 2cd6d38a9..505a69507 100644 --- a/src/Gemstone.PhasorProtocols/IEEEC37_118/HeaderFrame.cs +++ b/src/Gemstone.PhasorProtocols/IEEEC37_118/HeaderFrame.cs @@ -82,6 +82,10 @@ protected HeaderFrame(SerializationInfo info, StreamingContext context) { // Deserialize data frame m_frameHeader = (CommonFrameHeader)info.GetValue("frameHeader", typeof(CommonFrameHeader)); + + // Copy in associated properties from base class deserialization that are proxied for use by CommonFrameHeader + m_frameHeader.Timestamp = base.Timestamp; + m_frameHeader.IDCode = base.IDCode; } #endregion @@ -105,6 +109,20 @@ public override Ticks Timestamp } } + /// + /// Gets or sets the ID code. + /// + public override ushort IDCode + { + get => CommonHeader.IDCode; + set + { + // Keep ID code updates synchronized... + CommonHeader.IDCode = value; + base.IDCode = value; + } + } + /// /// Gets the identifier that is used to identify the IEEE C37.118 frame. /// diff --git a/src/Gemstone.PhasorProtocols/IEEEC37_118/PhasorValue.cs b/src/Gemstone.PhasorProtocols/IEEEC37_118/PhasorValue.cs index 23e711e8c..d76aee394 100644 --- a/src/Gemstone.PhasorProtocols/IEEEC37_118/PhasorValue.cs +++ b/src/Gemstone.PhasorProtocols/IEEEC37_118/PhasorValue.cs @@ -26,6 +26,7 @@ //****************************************************************************************************** using System; +using System.Collections.Generic; using System.Runtime.Serialization; using Gemstone.Units; @@ -105,6 +106,15 @@ protected PhasorValue(SerializationInfo info, StreamingContext context) set => base.Definition = value; } + /// + /// Gets or sets the associated with this . + /// + public virtual PhasorDefinition3 Definition3 + { + get => base.Definition as PhasorDefinition3; + set => base.Definition = value; + } + /// /// Gets or sets the unscaled integer representation of the real value of this . /// @@ -135,6 +145,27 @@ public override int UnscaledImaginary } } + /// + /// of string based property names and values for the object. + /// + public override Dictionary Attributes + { + get + { + PhasorDefinition3 definition3 = Definition3; + + if (definition3 is null) + return base.Attributes; + + Dictionary baseAttributes = base.Attributes; + + baseAttributes.Add("Angle Value Scaled", $"{Angle.ToDegrees() + definition3.AngleAdder}°"); + baseAttributes.Add("Magnitude Value Scaled", $"{Magnitude * definition3.MagnitudeMultiplier}"); + + return baseAttributes; + } + } + #endregion #region [ Static ] @@ -153,4 +184,4 @@ internal static IPhasorValue CreateNewValue(IDataCell parent, IPhasorDefinition #endregion } -} \ No newline at end of file +} diff --git a/src/Gemstone.PhasorProtocols/Macrodyne/ConnectionParameters.cs b/src/Gemstone.PhasorProtocols/Macrodyne/ConnectionParameters.cs index a1d0e900b..53dac49a6 100644 --- a/src/Gemstone.PhasorProtocols/Macrodyne/ConnectionParameters.cs +++ b/src/Gemstone.PhasorProtocols/Macrodyne/ConnectionParameters.cs @@ -129,8 +129,7 @@ public string ConfigurationFileName /// Gets or sets device section label, as defined in associated INI file. /// [Category("Required Connection Parameters")] - [Description( - "Set to the Macrodyne device ID label as defined in the associated INI file as a [section] entry. This is only required when protocol version is 1690G.")] + [Description("Set to the Macrodyne device ID label as defined in the associated INI file as a [section] entry. This is only required when protocol version is 1690G.")] public string DeviceLabel { get => m_deviceLabel; diff --git a/src/Gemstone.PhasorProtocols/MultiProtocolFrameParser.cs b/src/Gemstone.PhasorProtocols/MultiProtocolFrameParser.cs index b34b1bb97..6083a794f 100644 --- a/src/Gemstone.PhasorProtocols/MultiProtocolFrameParser.cs +++ b/src/Gemstone.PhasorProtocols/MultiProtocolFrameParser.cs @@ -2193,6 +2193,7 @@ public string Status status.AppendLine($"Allowed parsing exceptions: {AllowedParsingExceptions:N0}"); status.AppendLine($" Parsing exception window: {ParsingExceptionWindow.ToSeconds():0.00} seconds"); status.AppendLine($"Using simulated timestamps: {(InjectSimulatedTimestamp ? "Yes" : "No")}"); + status.AppendLine($"Configuration frame option: {ConfigurationFrameVersion}"); if (m_transportProtocol == TransportProtocol.File) { diff --git a/src/Gemstone.PhasorProtocols/SelFastMessage/ConfigurationFrame.cs b/src/Gemstone.PhasorProtocols/SelFastMessage/ConfigurationFrame.cs index 26bd9f1a2..5c2d34e87 100644 --- a/src/Gemstone.PhasorProtocols/SelFastMessage/ConfigurationFrame.cs +++ b/src/Gemstone.PhasorProtocols/SelFastMessage/ConfigurationFrame.cs @@ -126,7 +126,7 @@ protected ConfigurationFrame(SerializationInfo info, StreamingContext context) // Deserialize configuration frame FrameSize = (FrameSize)info.GetValue("frameSize", typeof(FrameSize)); MessagePeriod = (MessagePeriod)info.GetValue("messagePeriod", typeof(MessagePeriod)); - m_idCode = info.GetUInt32("idCode32Bit"); + IDCode = info.GetUInt32("idCode32Bit"); } #endregion diff --git a/src/Gemstone.PhasorProtocols/SelFastMessage/ConnectionParameters.cs b/src/Gemstone.PhasorProtocols/SelFastMessage/ConnectionParameters.cs index 93fe3c1de..0eb9290c0 100644 --- a/src/Gemstone.PhasorProtocols/SelFastMessage/ConnectionParameters.cs +++ b/src/Gemstone.PhasorProtocols/SelFastMessage/ConnectionParameters.cs @@ -78,8 +78,7 @@ protected ConnectionParameters(SerializationInfo info, StreamingContext context) /// Gets or sets desired for SEL device. /// [Category("Optional Connection Parameters")] - [Description( - "Defines desired message period for SEL device. Default rate is 20 messages per second. Note that slower rates (i.e., 20 messages per minute down to 1 message per minute) are only supported by the SEL 300 series relays.")] + [Description("Defines desired message period for SEL device. Default rate is 20 messages per second. Note that slower rates (i.e., 20 messages per minute down to 1 message per minute) are only supported by the SEL 300 series relays.")] [DefaultValue(typeof(MessagePeriod), "DefaultRate")] public MessagePeriod MessagePeriod { diff --git a/src/Gemstone.PhasorProtocols/SelFastMessage/DataFrame.cs b/src/Gemstone.PhasorProtocols/SelFastMessage/DataFrame.cs index e648e863e..ed4ec2a2d 100644 --- a/src/Gemstone.PhasorProtocols/SelFastMessage/DataFrame.cs +++ b/src/Gemstone.PhasorProtocols/SelFastMessage/DataFrame.cs @@ -87,6 +87,10 @@ protected DataFrame(SerializationInfo info, StreamingContext context) { // Deserialize data frame m_frameHeader = (CommonFrameHeader)info.GetValue("frameHeader", typeof(CommonFrameHeader)); + + // Copy in associated properties from base class deserialization that are proxied for use by CommonFrameHeader + m_frameHeader.Timestamp = base.Timestamp; + m_frameHeader.IDCode = base.IDCode; } #endregion