예제 #1
0
        public override void Initialize(MeterDataSet meterDataSet)
        {
            DataGroupsResource dataGroupsResource = meterDataSet.GetResource <DataGroupsResource>();
            CycleDataResource  cycleDataResource  = meterDataSet.GetResource <CycleDataResource>();
            FaultDataResource  faultDataResource  = meterDataSet.GetResource <FaultDataResource>();

            for (int i = 0; i < cycleDataResource.DataGroups.Count; i++)
            {
                DataGroup   dataGroup   = cycleDataResource.DataGroups[i];
                VIDataGroup viDataGroup = cycleDataResource.VIDataGroups[i];
                FaultGroup  faultGroup;

                if (!faultDataResource.FaultLookup.TryGetValue(dataGroup, out faultGroup))
                {
                    faultGroup = null;
                }

                m_classifications.Add(dataGroup, Classify(meterDataSet, dataGroup, viDataGroup, faultGroup));
            }

            foreach (DataGroup dataGroup in dataGroupsResource.DataGroups)
            {
                if (dataGroup.DataSeries.Count > 0)
                {
                    continue;
                }

                m_classifications.Add(dataGroup, Classify(meterDataSet, dataGroup));
            }
        }
예제 #2
0
        public override void Initialize(MeterDataSet meterDataSet)
        {
            CycleDataResource cycleDataResource = meterDataSet.GetResource <CycleDataResource>();
            FaultDataResource faultDataResource = meterDataSet.GetResource(() => new FaultDataResource(m_dbAdapterContainer));
            FaultGroup        faultGroup;

            DataGroup        dataGroup;
            VICycleDataGroup viCycleDataGroup;

            for (int i = 0; i < cycleDataResource.DataGroups.Count; i++)
            {
                dataGroup        = cycleDataResource.DataGroups[i];
                viCycleDataGroup = cycleDataResource.VICycleDataGroups[i];

                if (!faultDataResource.FaultLookup.TryGetValue(dataGroup, out faultGroup))
                {
                    faultGroup = null;
                }

                m_classifications.Add(dataGroup, Classify(meterDataSet, dataGroup, viCycleDataGroup, faultGroup));
            }
        }