Exemple #1
0
        private IEnumerable <COMTRADEChannelData> ToAnalogChannelCollection(int cycleDataGroupIndex, string channelKey, CycleDataGroup cycleDataGroup)
        {
            // Get the RMS channel data from the given cycle data group
            COMTRADEChannelData rmsChannelData = new COMTRADEChannelData()
            {
                GroupOrder           = 2,
                LoadOrder            = cycleDataGroupIndex,
                OriginalChannelIndex = -1,
                Name  = channelKey + " RMS",
                Units = GetUnits(channelKey),
                Data  = cycleDataGroup.RMS
            };

            // Get the phase angle channel data from the given cycle group
            COMTRADEChannelData phaseChannelData = new COMTRADEChannelData()
            {
                GroupOrder           = 3,
                LoadOrder            = cycleDataGroupIndex,
                OriginalChannelIndex = -1,
                Name  = channelKey + " phase angle",
                Units = string.Empty,
                Data  = cycleDataGroup.Phase
            };

            // Return the channel data obtained from the given cycle group
            return(new COMTRADEChannelData[] { rmsChannelData, phaseChannelData });
        }
        private IEnumerable<COMTRADEChannelData> ToAnalogChannelCollection(int cycleDataGroupIndex, string channelKey, CycleDataGroup cycleDataGroup)
        {
            // Get the RMS channel data from the given cycle data group
            COMTRADEChannelData rmsChannelData = new COMTRADEChannelData()
            {
                GroupOrder = 2,
                LoadOrder = cycleDataGroupIndex,
                OriginalChannelIndex = -1,
                Name = channelKey + " RMS",
                Units = GetUnits(channelKey),
                Data = cycleDataGroup.RMS
            };

            // Get the phase angle channel data from the given cycle group
            COMTRADEChannelData phaseChannelData = new COMTRADEChannelData()
            {
                GroupOrder = 3,
                LoadOrder = cycleDataGroupIndex,
                OriginalChannelIndex = -1,
                Name = channelKey + " phase angle",
                Units = string.Empty,
                Data = cycleDataGroup.Phase
            };

            // Return the channel data obtained from the given cycle group
            return new COMTRADEChannelData[] { rmsChannelData, phaseChannelData };
        }