예제 #1
0
        /**********************************************************/

        public void addDescriptionEnergyItem(string rID, string resourceID, ReportEnumeratedType reportType, ReadingTypeEnumeratedType readingType,
                                             string marketContext, int minSamplingPeriod, int maxSamplingPeriod, bool onChange, DurationModifier durationModifier,
                                             eEnergyItemType energyItemType, string description, string units, SiScaleCodeType siScaleCode)
        {
            EnergyItemType energyItem = null;

            switch (energyItemType)
            {
            case eEnergyItemType.EnergyApparent:
                energyItem = new EnergyApparentType();
                break;

            case eEnergyItemType.EnergyReactive:
                energyItem = new EnergyReactiveType();
                break;

            case eEnergyItemType.EnergyReal:
                energyItem = new EnergyRealType();
                break;

            default:
                energyItem = new EnergyApparentType();
                break;
            }

            energyItem.itemDescription = description;
            energyItem.itemUnits       = units;
            energyItem.siScaleCode     = siScaleCode;

            addDescription(rID, resourceID, reportType, readingType, marketContext, minSamplingPeriod, maxSamplingPeriod, onChange, durationModifier, energyItem);
        }
예제 #2
0
        /******************************************************************************/

        public void testEnergyItemType(EnergyItemType energyType)
        {
            energyType.itemDescription = "energy";
            energyType.itemUnits       = "KW";
            energyType.siScaleCode     = SiScaleCodeType.none;

            testItemBase(energyType);
        }
예제 #3
0
        /******************************************************************************/

        private EnergyItemType generateEnergy(eEnergyItemType energyType)
        {
            EnergyItemType energy = null;

            switch (energyType)
            {
            case eEnergyItemType.EnergyApparent:
                energy = new EnergyApparentType();
                break;

            case eEnergyItemType.EnergyReactive:
                energy = new EnergyReactiveType();
                break;

            case eEnergyItemType.EnergyReal:
                energy = new EnergyRealType();
                break;
            }

            return(energy);
        }