Beispiel #1
0
        public void GetAllDesiredSignals(HashSet <MetadataBase> activeSignals, HashSet <SignalGroup> currentlyActiveGroups)
        {
            MetadataBase signalReference = null;

            m_frequencySignals.Clear();
            m_voltageAngleSignals.Clear();
            foreach (SignalGroup group in currentlyActiveGroups)
            {
                SinglePhasorTerminal calc = group as SinglePhasorTerminal;
                if (calc != null)
                {
                    if (signalReference is null)
                    {
                        signalReference = calc.VoltageAngle;
                        m_framework.SetAngleReference(signalReference);
                    }

                    m_frequencySignals.Add(calc.VoltageAngleReference.SignalId);
                    activeSignals.Add(calc.VoltageAngleReference);
                    //m_frequencySignals.Add(calc.Frequency.SignalId);
                    //activeSignals.Add(calc.Frequency);
                    m_voltageAngleSignals.Add(calc.VoltageMagnitudePu.SignalId);
                    activeSignals.Add(calc.VoltageMagnitudePu);
                    //m_voltageAngleSignals.Add(calc.VoltageAngle.SignalId);
                    //activeSignals.Add(calc.VoltageAngle);
                }
            }
        }
        public SignalGroup CreateGroup(Dictionary <ulong, MetadataBase> points, MetadataBase signalReference)
        {
            SinglePhasorTerminal signal = new SinglePhasorTerminal();

            signal.SignalGroupName = GroupName;
            AssignIfFound(Im, ref signal.CurrentMagnitude, points);
            AssignIfFound(Ia, ref signal.CurrentAngle, points);
            AssignIfFound(Vm, ref signal.VoltageMagnitude, points);
            AssignIfFound(Va, ref signal.VoltageAngle, points);
            AssignIfFound(Dfdt, ref signal.Dfdt, points);
            AssignIfFound(Freq, ref signal.Frequency, points);
            AssignIfFound(Status, ref signal.Status, points);
            signal.ExtraData = this;

            signal.CreateCalculatedSignals(signalReference);
            return(signal);
        }