/// <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); }
/// <summary> /// Creates an EDL file that contains all of the data for a meter. /// </summary> /// <param name="FileName">The file name that will be used to store the file.</param> /// <returns>CreateEDLResult code.</returns> // Revision History // MM/DD/YY who Version Issue# Description // -------- --- ------- ------ --------------------------------------- // 07/06/10 AF 2.42.02 Created // public override CreateEDLResult CreateEDLFromMeter(string FileName) { EDLSections AllSections = EDLSections.HistoryLog | EDLSections.NetworkTables | EDLSections.LANandHANLog; return(CreateEDLFromMeter(FileName, AllSections)); }
/// <summary> /// Creates a list of tables to read from the meter. /// </summary> /// <returns>The list of tables to read.</returns> // Revision History // MM/DD/YY who Version Issue# Description // -------- --- ------- ------ --------------------------------------- // 05/12/09 RCG 2.20.04 Created protected override List <ushort> GetTablesToRead(EDLSections IncludedSections) { List <ushort> TableList = base.GetTablesToRead(IncludedSections); TableList.Add(2169); // LED Configuration return(TableList); }
/// <summary> /// Creates a list of tables to read from the meter. /// </summary> /// <returns>The list of tables to read.</returns> // Revision History // MM/DD/YY who Version Issue# Description // -------- --- ------- ------ --------------------------------------- // 05/12/09 RCG 2.20.04 Created protected override List <ushort> GetTablesToRead(EDLSections IncludedSections) { List <ushort> TableList = base.GetTablesToRead(IncludedSections); TableList.Add(2091); // SiteScan Toolbox Table return(TableList); }
/// <summary> /// Creates an EDL file that contains all of the data for a meter. /// </summary> /// <param name="FileName">The file name that will be used to store the file.</param> /// <returns>CreateEDLResult code.</returns> // Revision History // MM/DD/YY who Version Issue# Description // -------- --- ------- ------ --------------------------------------- // 10/19/06 RCG 7.40.00 Created // 07/06/10 AF 2.42.02 Made virtual for use in the M2 Gateway public override CreateEDLResult CreateEDLFromMeter(string FileName) { // EDLSections AllSections = EDLSections.HistoryLog // | EDLSections.LoadProfile // | EDLSections.NetworkTables // | EDLSections.VoltageMonitoring // | EDLSections.LANandHANLog; EDLSections AllSections = (EDLSections.HistoryLog | EDLSections.LoadProfile | EDLSections.VoltageMonitoring); return(CreateEDLFromMeter(FileName, AllSections)); }
/// <summary> /// Creates a list of tables to read from the meter when creating EDL file. /// </summary> /// <param name="IncludedSections">EDL Sections to include</param> /// <returns>The list of tables to read.</returns> // Revision History // MM/DD/YY Who Version Issue# Description // -------- --- ------- -------- ------------------------------------------- // 12/12/13 jrf 3.50.16 TQ9527 Created. // 06/13/14 jrf 3.51.00 WR519359 Bridge meters need to remove certain tables. protected override List <ushort> GetTablesToRead(EDLSections IncludedSections) { List <ushort> TableList = base.GetTablesToRead(IncludedSections); if (null != m_BridgeDevice) { TableList.AddRange(m_BridgeDevice.GetTablesToRead()); foreach (ushort Table in m_BridgeDevice.GetTablesToRemove()) { TableList.Remove(Table); } } return(TableList); }
/// <summary> /// Creates an EDL file with the specified sections. /// </summary> /// <param name="FileName">Path to the file where the EDL file will be written.</param> /// <param name="IncludedSections">The sections to include in the EDL file.</param> /// <returns>CreateEDLResult Code.</returns> // Revision History // MM/DD/YY who Version Issue# Description // -------- --- ------- ------ --------------------------------------- // 07/06/10 AF 2.42.02 Created // public override CreateEDLResult CreateEDLFromMeter(string FileName, EDLSections IncludedSections) { GatewayTables MeterTables = new GatewayTables(); List <ushort> TablesToRead; int iFileNameStart; string strDirectory; CreateEDLResult Result = CreateEDLResult.SUCCESS; PSEMResponse PSEMResult = PSEMResponse.Ok; // First check to make sure we can create the file iFileNameStart = FileName.LastIndexOf(@"\", StringComparison.Ordinal); if (iFileNameStart > 0) { strDirectory = FileName.Substring(0, iFileNameStart); if (Directory.Exists(strDirectory) == false) { Result = CreateEDLResult.INVALID_PATH; } } // Make sure we will be able to write to the file if (Result == CreateEDLResult.SUCCESS && File.Exists(FileName) == true) { FileInfo OutputFile = new FileInfo(FileName); if ((OutputFile.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly) { Result = CreateEDLResult.INVALID_PATH; } } if (Result == CreateEDLResult.SUCCESS) { // Read the data from the meter TablesToRead = GetTablesToRead(IncludedSections); OnShowProgress(new ShowProgressEventArgs(1, TablesToRead.Count, "Creating EDL file...", "Creating EDL file...")); foreach (ushort TableID in TablesToRead) { if (PSEMResult == PSEMResponse.Ok) { // Read the table if it exists if ((Table00.IsTableUsed(TableID) == true)) { if (MeterTables.GetTableDependencies(TableID).Contains(TableID) || MeterTables.GetTableLength(TableID) > 0) { PSEMResult = ReadTable(TableID, ref MeterTables); if (PSEMResult == PSEMResponse.Bsy || PSEMResult == PSEMResponse.Dnr || PSEMResult == PSEMResponse.Iar || PSEMResult == PSEMResponse.Onp || PSEMResult == PSEMResponse.Err) { // We can't read the table but we should be able to continue we just need to // clear out anything that is there. MeterTables.ClearTable(TableID); PSEMResult = PSEMResponse.Ok; } } } OnStepProgress(new ProgressEventArgs()); } } if (PSEMResult == PSEMResponse.Isc) { Result = CreateEDLResult.SECURITY_ERROR; } else if (PSEMResult != PSEMResponse.Ok) { Result = CreateEDLResult.PROTOCOL_ERROR; } } #if (WindowsCE) //The saving of the EDL file on the handheld can take over 6 seconds so we need //to send a wait before. m_PSEM.Wait(CPSEM.MAX_WAIT_TIME); #endif // Generate the EDL file if (Result == CreateEDLResult.SUCCESS) { XmlWriterSettings WriterSettings = new XmlWriterSettings(); WriterSettings.Encoding = Encoding.ASCII; WriterSettings.Indent = true; WriterSettings.CheckCharacters = false; XmlWriter EDLWriter = XmlWriter.Create(FileName, WriterSettings); MeterTables.SaveEDLFile(EDLWriter, null, AllowTableExport, AllowFieldExport); } OnHideProgress(new EventArgs()); return(Result); }
/// <summary> /// Creates a list of tables to read from the meter. /// </summary> /// <returns>The list of tables to read.</returns> // Revision History // MM/DD/YY who Version Issue# Description // -------- --- ------- ------ --------------------------------------- // 07/06/10 AF 2.42.03 Created // 07/28/10 AF 2.42.08 Moved table 71 to always read because it is // needed by 2048 and removed unsupported tables. // 03/09/12 AF 2.53.48 194187 Added HAN2 log tables and other missing tables // protected override List <ushort> GetTablesToRead(EDLSections IncludedSections) { List <ushort> TableList = new List <ushort>(); TableList.Add(0); // General Configuration TableList.Add(1); // Manufacturer Identification TableList.Add(4); // Pending Status TableList.Add(5); // Device Identification TableList.Add(6); // Utility Information TableList.Add(30); // Dimension Display TableList.Add(31); // Actual Display TableList.Add(32); // Display Source TableList.Add(34); // Secondary Display List TableList.Add(51); // Actual Time and TOU TableList.Add(52); // Clock TableList.Add(53); // Time offset TableList.Add(55); // Clock State TableList.Add(71); // Actual Log if ((IncludedSections & EDLSections.HistoryLog) == EDLSections.HistoryLog) { TableList.Add(72); // Events Identification TableList.Add(73); // History Logger Control TableList.Add(74); // History Logger Data TableList.Add(75); // Event logger control TableList.Add(76); // Event logger data } TableList.Add(120); // Dim Network Table TableList.Add(121); // Actual Network Table TableList.Add(123); // Exception Report Table if ((IncludedSections & EDLSections.NetworkTables) == EDLSections.NetworkTables) { TableList.Add(122); // Interface Control Table TableList.Add(125); // Interface Status Table TableList.Add(126); // Registration Status Table TableList.Add(127); // Network Statistics Table } TableList.Add(2048); // Manufacturer Configuration Table TableList.Add(2062); // C12.22 Status Table if ((IncludedSections & EDLSections.NetworkTables) == EDLSections.NetworkTables) { TableList.Add(2064); //Comm Module General Config Table if (CommModule is RFLANCommModule) { TableList.Add(2078); // RFLAN Neighbor Table } } if ((IncludedSections & EDLSections.NetworkTables) == EDLSections.NetworkTables) { TableList.Add(2098); // HAN Dimension Limiting Table TableList.Add(2099); // Actual HAN Limiting Table TableList.Add(2100); // HAN Client Configuration TableList.Add(2102); // HAN Transmit Data Table TableList.Add(2103); // HAN Recieve Data Table TableList.Add(2104); // HAN Network Info Table } TableList.Add(2106); // HAN Config Paramaters TableList.Add(2108); // MCU Information if ((IncludedSections & EDLSections.LANandHANLog) == EDLSections.LANandHANLog) { TableList.Add(2158); // Communications Log Dimension Limiting Table TableList.Add(2159); // Communications Log Actual Limiting Table TableList.Add(2160); // Communications Events Identification Table TableList.Add(2161); // Communications Log Control Table TableList.Add(2162); // LAN Log Data Table TableList.Add(2163); // HAN Communications Log Control Table TableList.Add(2164); // HAN Log Data Table } TableList.Add(2190); // Communications Config TableList.Add(2193); // Enhanced Security Table TableList.Add(2239); // Actual HAN Event Log Table TableList.Add(2240); // HAN Events Identification Table TableList.Add(2241); // HAN Events Control Table if ((IncludedSections & EDLSections.LANandHANLog) == EDLSections.LANandHANLog) { TableList.Add(2242); // HAN Upstream Log Table TableList.Add(2243); // HAN Downstream Log Table } TableList.Add(2260); // SR 3.0 Config Table TableList.Add(2261); // Fatal Error Recovery Status Table TableList.Add(2265); // Non Metrological Configuration Data Table return(TableList); }
/// <summary> /// Creates a list of tables to read from the meter. /// </summary> /// <returns>The list of tables to read.</returns> // Revision History // MM/DD/YY who Version Issue# Description // -------- --- ------- ------ --------------------------------------- // 10/19/06 RCG 7.40.00 Created // 05/05/08 jrf 1.50.22 114166 When network tables are not included // tables 121 and 123 still need to be included // since they are part of the EDL configuration. // This keeps the EDL viewer from throwing an exception. // 05/20/08 KRC 1.50.26 115111 Remove Table 24 from EDL creation since it causes an error // in the firmware and is not needed since it is not supported. // 10/10/08 KRC 2.00.00 Add 2062 - C12.22 Status Table // 08/04/09 jrf 2.20.20 137693 Adding 2064 - Comm Module General Config Table. // protected override List <ushort> GetTablesToRead(EDLSections IncludedSections) { List <ushort> TableList = new List <ushort>(); TableList.Add(0); // General Configuration TableList.Add(1); // Manufacturer Identification TableList.Add(3); // Mode and Status TableList.Add(4); // Pending Status TableList.Add(5); // Device Identification TableList.Add(6); // Utility Information TableList.Add(11); // Actual Sources TableList.Add(12); // Unit of Measure TableList.Add(13); // Demand Control TableList.Add(14); // Data Control TableList.Add(15); // Constant TableList.Add(16); // Source Definition TableList.Add(21); // Actual Registers TableList.Add(22); // Data selection TableList.Add(23); // Current Register Data TableList.Add(24); // Previous Season Data TableList.Add(25); // Previous Demand Reset Data TableList.Add(26); // Self Read Data TableList.Add(27); // Present Register Selection TableList.Add(28); // Present Register Data TableList.Add(51); // Actual Time and TOU TableList.Add(52); // Clock TableList.Add(53); // Time offset TableList.Add(54); // Calendar TableList.Add(55); // Clock State if ((IncludedSections & EDLSections.LoadProfile) == EDLSections.LoadProfile) { TableList.Add(61); // Actual Load Profile TableList.Add(62); // Load Profile Control TableList.Add(63); // Load Profile status TableList.Add(64); // Load Profile data set 1 } if ((IncludedSections & EDLSections.HistoryLog) == EDLSections.HistoryLog) { TableList.Add(71); // Actual Log TableList.Add(72); // Events Identification TableList.Add(73); // History Logger Control TableList.Add(74); // History Logger Data TableList.Add(75); // Event logger control TableList.Add(76); // Event logger data } // TableList.Add(120); // Dim Network Table // TableList.Add(121); // Actual Network Table TableList.Add(123); // Exception Report Table if ((IncludedSections & EDLSections.NetworkTables) == EDLSections.NetworkTables) { TableList.Add(122); // Interface Control Table TableList.Add(125); // Interface Status Table TableList.Add(126); // Registration Status Table TableList.Add(127); // Network Statistics Table } TableList.Add(2048); // Manufacturer Configuration Table TableList.Add(2053); // Next to last demand reset snap shot // TableList.Add(2062); // C12.22 Status Table //if ((IncludedSections & EDLSections.NetworkTables) == EDLSections.NetworkTables) //{ // TableList.Add(2064); //Comm Module General Config Table // if (CommModule is RFLANCommModule) // { // TableList.Add(2078); // RFLAN Neighbor Table // } //} // TableList.Add(2090); // Calendar Config if ((IncludedSections & EDLSections.NetworkTables) == EDLSections.NetworkTables) { TableList.Add(2098); // HAN Dimension Limiting Table TableList.Add(2099); // Actual HAN Limiting Table TableList.Add(2100); // HAN Client Configuration TableList.Add(2102); // HAN Transmit Data Table TableList.Add(2103); // HAN Recieve Data Table TableList.Add(2104); // HAN Network Info Table } // TableList.Add(2106); // HAN Config Paramaters TableList.Add(2108); // MCU Information // TableList.Add(2138); // Dimension Limiting Disconnect Switch Table // TableList.Add(2139); // Actual Limiting Disconnect Switch Table // TableList.Add(2140); // Disconnect Switch Status Table // TableList.Add(2141); // Disconnect Seitch Configuration Table // TableList.Add(2142); // Disconnect Override Table // TableList.Add(2143); // Service Limiting Failsafe Table if ((IncludedSections & EDLSections.VoltageMonitoring) == EDLSections.VoltageMonitoring) { TableList.Add(2148); // Voltage Monitoring Dimension Limiting Table TableList.Add(2149); // Voltage Monitoring Actual Limiting Table TableList.Add(2150); // Voltage Monitoring Control Table TableList.Add(2151); // Voltage Monitoring Status Table TableList.Add(2152); // Voltage Monitoring Data Set Table } if ((IncludedSections & EDLSections.LANandHANLog) == EDLSections.LANandHANLog) { TableList.Add(2158); // Communications Log Dimension Limiting Table TableList.Add(2159); // Communications Log Actual Limiting Table TableList.Add(2160); // Communications Events Identification Table TableList.Add(2161); // Communications Log Control Table TableList.Add(2162); // LAN Log Data Table TableList.Add(2163); // HAN Communications Log Control Table TableList.Add(2164); // HAN Log Data Table } TableList.Add(2168); // Meter Swap Out Table TableList.Add(2190); // Communications Config TableList.Add(2193); // Enhanced Security Table TableList.Add(2260); // SR 3.0 Config Table TableList.Add(2261); // Fatal Error Recovery Status Table //Temporary solution to table 2262 timing out when trying to read it in non-HW3.0 meter. //Accelerometer tables are only valid for HW 3.0 and up anyway. if (0 <= Utilities.VersionChecker.CompareTo(HWRevision, HW_VERSION_3_0)) { TableList.Add(2262); // Tamper/Tap Status Table TableList.Add(2263); // Tamper/Tap Data Table } TableList.Add(2264); // Program State Table return(TableList); }