//****************************************************************************************************** // ConfigurationCell.cs - Gbtc // // Copyright © 2012, Grid Protection Alliance. All Rights Reserved. // // Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See // the NOTICE file distributed with this work for additional information regarding copyright ownership. // The GPA licenses this file to you under the MIT License (MIT), the "License"; you may // not use this file except in compliance with the License. You may obtain a copy of the License at: // // http://www.opensource.org/licenses/MIT // // Unless agreed to in writing, the subject software distributed under the License is distributed on an // "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the // License for the specific language governing permissions and limitations. // // Code Modification History: // ---------------------------------------------------------------------------------------------------- // 02/08/2007 - J. Ritchie Carroll & Jian Ryan Zuo // Generated original version of source code. // 08/07/2009 - Josh L. Patterson // Edited Comments. // 09/15/2009 - Stephen C. Wills // Added new header and license agreement. // 12/17/2012 - Starlynn Danyelle Gilliam // Modified Header. // //****************************************************************************************************** using System; using System.Runtime.Serialization; namespace GSF.PhasorProtocols.SelFastMessage { /// /// Represents the SEL Fast Message implementation of a that can be sent or received. /// [Serializable] public class ConfigurationCell : ConfigurationCellBase { #region [ Constructors ] /// /// Creates a new from specified parameters. /// /// The parent . public ConfigurationCell(ConfigurationFrame parent) : base(parent, 0, Common.MaximumPhasorValues, Common.MaximumAnalogValues, Common.MaximumDigitalValues) { } /// /// Creates a new from serialization parameters. /// /// The with populated with data. /// The source for this deserialization. protected ConfigurationCell(SerializationInfo info, StreamingContext context) : base(info, context) { } #endregion #region [ Properties ] /// /// Gets a reference to the parent for this . /// public new ConfigurationFrame Parent { get => base.Parent as ConfigurationFrame; set => base.Parent = value; } /// /// Gets or sets the ID code of this . /// public new uint IDCode { // SEL Fast Message only allows one device, so we share ID code with parent frame... get => Parent.IDCode; set { Parent.IDCode = value; // Base classes constrain maximum value to 65535 base.IDCode = value > ushort.MaxValue ? ushort.MaxValue : (ushort)value; } } /// /// Gets or sets the for the objects in the of this . /// /// /// This property only supports floating-point data; SEL Fast Message doesn't transport scaled values. /// /// SEL Fast Message only supports floating-point data. public override DataFormat PhasorDataFormat { get => DataFormat.FloatingPoint; set { if (value != DataFormat.FloatingPoint) throw new NotSupportedException("SEL Fast Message only supports floating-point data"); } } /// /// Gets or sets the for the objects in the of this . /// /// /// This property only supports polar phasor data; SEL Fast Message doesn't transport rectangular phasor values. /// /// SEL Fast Message only supports polar phasor data. public override CoordinateFormat PhasorCoordinateFormat { get => CoordinateFormat.Polar; set { if (value != CoordinateFormat.Polar) throw new NotSupportedException("SEL Fast Message only supports polar phasor data"); } } /// /// Gets or sets the of the of this . /// /// /// This property only supports floating-point data; SEL Fast Message doesn't transport scaled values. /// /// SEL Fast Message only supports floating-point data. public override DataFormat FrequencyDataFormat { get => DataFormat.FloatingPoint; set { if (value != DataFormat.FloatingPoint) throw new NotSupportedException("SEL Fast Message only supports floating-point data"); } } /// /// Gets or sets the for the objects in the of this . /// /// /// This property only supports floating-point data; SEL Fast Message doesn't transport scaled values. /// /// SEL Fast Message only supports floating-point data. public override DataFormat AnalogDataFormat { get => DataFormat.FloatingPoint; set { if (value != DataFormat.FloatingPoint) throw new NotSupportedException("SEL Fast Message only supports floating-point data"); } } /// /// Gets the maximum length of the of this . /// public override int MaximumStationNameLength => // The station name is defined external to the protocol, so there is no set limit int.MaxValue; #endregion } }