示例#1
0
        /// <summary>
        /// Parse that data that was just read.
        /// </summary>
        // Revision History
        // MM/DD/YY who Version Issue# Description
        // -------- --- ------- ------ ---------------------------------------
        // 12/14/10 SCW 9.70.18 N/A    Created for CENTRON II

        private void ParseData()
        {
            if (m_Table21.IncludeDateTime)
            {
                m_EndDateTime = m_Reader.ReadSTIME((PSEMBinaryReader.TM_FORMAT)m_Table0.TimeFormat);
            }

            if (m_Table21.IncludeSeasonInfo)
            {
                m_SeasonIndex = m_Reader.ReadByte();
            }

            m_DemandResetRegisterData = new RegisterDataRecord(m_Table0, m_Table21);

            m_DemandResetRegisterData.Parse(m_Reader);
        }
示例#2
0
        /// <summary>
        /// Determines that size of the table.
        /// </summary>
        /// <param name="Table0">The table 0 object for the current device.</param>
        /// <param name="Table21">The table 21 object for the current device.</param>
        /// <returns>The size of the table in bytes.</returns>
        // Revision History
        // MM/DD/YY who Version Issue# Description
        // -------- --- ------- ------ ---------------------------------------
        // 12/14/10 SCW 9.70.18 N/A    Created for CENTRON II

        private static uint DetermineTableSize(CTable00 Table0, StdTable21 Table21)
        {
            uint uiTableSize = 0;

            // End Time
            if (Table21.IncludeDateTime)
            {
                uiTableSize += Table0.STIMESize;
            }

            // Season index
            if (Table21.IncludeSeasonInfo)
            {
                uiTableSize += 1;
            }

            // Demand Reset Data
            uiTableSize += RegisterDataRecord.Size(Table0, Table21);

            return(uiTableSize);
        }
示例#3
0
        /// <summary>
        /// Gets the Demand Reset Coincident Values for the specified Demand Reset.
        /// </summary>
        /// <param name="uiIndex">The index of the Demand Reset to get.</param>
        /// <returns>The list of coincidents.</returns>
        ///

        protected override List <Quantity> DRCoincidentValues(uint uiIndex)
        {
            List <Quantity> Coincidents = new List <Quantity>();

            if (uiIndex == 0)
            {
                for (int iIndex = 0; iIndex < Table21.NumberOfCoincidentValues; iIndex++)
                {
                    byte     bySelection       = Table22.CoincidentSelection[iIndex];
                    byte     byDemandSelection = Table22.CoincidentDemandAssocations[iIndex];
                    LID      CoincidentLID     = CreateLID(Table14.SourceIDs[bySelection]);
                    Quantity CoincQuantity     = new Quantity(CoincidentLID.lidDescription);

                    RegisterDataRecord DataRecord = Table25.DemandResetRegisterData;

                    // Add the total values
                    CoincQuantity.TotalMaxDemand = new DemandMeasurement(DataRecord.TotalDataBlock.Coincidents[iIndex].Coincidents[0], CoincidentLID.lidDescription);
                    CoincQuantity.TotalMaxDemand.TimeOfOccurrence = DataRecord.TotalDataBlock.Demands[byDemandSelection].TimeOfOccurances[0];

                    if (Table21.NumberOfTiers > 0)
                    {
                        CoincQuantity.TOUMaxDemand = new List <DemandMeasurement>();

                        // Add the rate values
                        for (int iRateIndex = 0; iRateIndex < Table21.NumberOfTiers; iRateIndex++)
                        {
                            LID RateLID = GetDemandLIDForRate(CoincidentLID, iRateIndex);

                            CoincQuantity.TOUMaxDemand.Add(new DemandMeasurement(DataRecord.TierDataBlocks[iRateIndex].Coincidents[iIndex].Coincidents[0], RateLID.lidDescription));
                            CoincQuantity.TOUMaxDemand[iRateIndex].TimeOfOccurrence = DataRecord.TierDataBlocks[iRateIndex].Demands[byDemandSelection].TimeOfOccurances[0];
                        }
                    }

                    Coincidents.Add(CoincQuantity);
                }
            }

            return(Coincidents);
        }