Example #1
0
        public void ReLoadSignalsAndSignalGroups()
        {
            MetadataBase angleReference;

            m_angleReference.GetPoints(out angleReference);

            AllSignals      allSignals      = new AllSignals();
            AllSignalGroups allSignalGroups = new AllSignalGroups();

            m_allSignals.Clear();
            allSignals.Signals.ForEach(x => m_allSignals.Add(x.MakeSignal()));
            Dictionary <ulong, MetadataBase> allPoints = m_allSignals.ToDictionary(signal => signal.HistorianId.Value);

            m_allSignalGroups.Clear();
            allSignalGroups.SignalGroups.ForEach(x =>
            {
                SignalGroup group = x.CreateGroup(allPoints, angleReference);
                group.GetAllSignals().ToList().ForEach(y => m_allSignals.Add(y));
                m_allSignalGroups.Add(group);
            });
        }