Пример #1
0
        /// <summary>
        /// Creates a list of tables to read from the meter.
        /// </summary>
        /// <param name="IncludedSections">EDL Sections to include</param>
        /// <returns>The list of tables to read.</returns>
        // Revision History
        // MM/DD/YY Who Version ID Number Description
        // -------- --- ------- -- ------ ----------------------------------------------------------
        // 11/21/13 DLG 3.50.07           Overriding here to add ICS related tables.
        // 01/15/14 DLG 3.50.25           Added table 2529.
        // 03/14/14 AF  3.50.49 WR 464163 Call SetUpForICMEvents instead of Events to prevent the tables from being read twice.
        // 05/12/14 AF  3.50.92 WR 503772 Removed table 2529 from the list. It's not supported by the CE dll so no point in adding it.
        //
        protected override List <ushort> GetTablesToRead(EDLSections IncludedSections)
        {
            List <ushort> TableList         = base.GetTablesToRead(IncludedSections);
            DateTime      startTime         = new DateTime(2000, 1, 1);
            byte          byDataRecordCount = 0;
            byte          byStatRecordCount = 0;
            byte          byDataRecordSize  = 0;

            ICSCommModule ICSModule = CommModule as ICSCommModule;

            if (ICSModule != null)
            {
                TableList.Add(2510);            // ICS ERT Dimension Table
                TableList.Add(2509);            // ICS ERT Configuration Table

                try
                {
                    // Send the command to the meter to update the ERT data tables.
                    ICSModule.UpdateERTDataTables(out byDataRecordCount, out byStatRecordCount, out byDataRecordSize);
                }
                catch
                {
                    //Something went wrong. Make sure counts are zero.
                    byDataRecordCount = 0;
                    byStatRecordCount = 0;
                    byDataRecordSize  = 0;
                }

                //Only add the tables if procedure indicates that there is data in them.
                if (0 < byDataRecordCount)
                {
                    TableList.Add(2508);        // ICS ERT Data Table
                }

                if (0 < byStatRecordCount)
                {
                    TableList.Add(2511);        // ICS ERT Statistics Table
                }

                if ((IncludedSections & EDLSections.HistoryLog) == EDLSections.HistoryLog)
                {
                    if (ProcedureResultCodes.COMPLETED == SetUpForICMEvents())
                    {
                        TableList.Add(2521);    // ICS Events Actual
                        TableList.Add(2522);    // ICS Events ID
                        TableList.Add(2523);    // ICS Events Log Control
                        TableList.Add(2524);    // ICS Log Data Table
                    }
                }

                TableList.Add(2512);            // ICS Module Configuration Table
                TableList.Add(2515);            // ICS Module Data Table
                TableList.Add(2516);            // ICS Module Status Table
                TableList.Add(2517);            // ICS Cellular Configuration Table
                TableList.Add(2518);            // ICS Cellular Data Table
                TableList.Add(2519);            // ICS Cellular Status Table
            }

            return(TableList);
        }