/// <summary> /// Adds event/exception validation items to the validation list. /// </summary> /// <param name="ValidationList">The list to add validaiton items to.</param> // Revision History // MM/DD/YY who Version ID Number Description // -------- --- ------- -- ------ --------------------------------------- // 12/09/13 jrf 3.50.16 TQ 9560 Created. // protected override void GetEventExceptionValidationItems(List <EDLValidationItem> ValidationList) { CENTRON_AMI_EventDictionary EventDictionary = new CENTRON_AMI_EventDictionary(); CENTRON_AMI_CommEventDictionary CommEventDictionary = new CENTRON_AMI_CommEventDictionary(); for (int iIndex = 0; iIndex < 280; iIndex++) { // Get the description from the EventDictionary string strDescription; bool bValidString; bValidString = EventDictionary.TryGetValue(iIndex, out strDescription); if (bValidString == false) { // It could be a MFG event since an event number is either STD or MFG but not both bValidString = EventDictionary.TryGetValue(2048 + iIndex, out strDescription); } if (bValidString == false) { // We don't have a description for the item. strDescription = "Unknown Event " + iIndex.ToString(CultureInfo.InvariantCulture); } ValidationList.Add(new EDLValidationItem((long)GatewayTblEnum.MFGTBL0_HISTORY_LOG_MONITORED_FLAGS, new int[] { iIndex }, strDescription, "Events")); } // Exceptions ValidationList.Add(new EDLValidationItem((long)StdTableEnum.STDTBL123_EXCEPTION_REPORT, null, "Exceptions", "Exceptions")); // Comm Log - Standard LAN Events // TODO: Implement Standard LAN Events when they exist // Comm Log - Mfg LAN Events for (int iIndex = (int)LANEvents.BEGIN_MFG_LAN_EVENTS; iIndex < (int)LANEvents.END_MFG_LAN_EVENTS; iIndex++) { // Get the description from the EventDictionary string strDescription; bool bValidString; bValidString = CommEventDictionary.TryGetValue(iIndex, out strDescription); if (bValidString == false) { // We don't have a description for the item. strDescription = "Unknown Event " + iIndex.ToString(CultureInfo.InvariantCulture); } // Items in the MFG_EVENTS_MONITORED_FLAGS field do not include the MFG Bit. (Must subtract off 2048) ValidationList.Add(new EDLValidationItem((long)GatewayTblEnum.MFGTBL113_MFG_EVENTS_MONITORED_FLAGS, new int[] { iIndex - 2048 }, strDescription, "Mfg LAN Events")); } // Comm Log - Standard HAN Events // TODO: Implement Standard HAN Events when they exist //If table is not supported in the meter then it doesn't make sense to validate these items. if (true == Table00.IsTableUsed(115)) { // Comm Log - Mfg HAN Events for (int iIndex = (int)HANEvents.BEGIN_MFG_HAN_EVENTS; iIndex < (int)HANEvents.END_MFG_HAN_EVENTS; iIndex++) { // Get the description from the EventDictionary string strDescription; bool bValidString; bValidString = CommEventDictionary.TryGetValue(iIndex, out strDescription); if (bValidString == false) { // We don't have a description for the item. strDescription = "Unknown Event " + iIndex.ToString(CultureInfo.InvariantCulture); } // Items in the MFG_EVENTS_MONITORED_FLAGS field do not include the MFG Bit. (Must subtract off 2048) ValidationList.Add(new EDLValidationItem((long)GatewayTblEnum.MFGTBL115_MFG_EVENTS_MONITORED_FLAGS, new int[] { iIndex - 2048 }, strDescription, "Mfg HAN Events")); } } // HAN 2 events CENTRON_AMI_DownstreamHANEventDictionary DownstreamEvtDictionary = new CENTRON_AMI_DownstreamHANEventDictionary(); for (int iIndex = 2305; iIndex < 2431; iIndex++) { string strDescription; bool bValidString; bValidString = DownstreamEvtDictionary.TryGetValue((ushort)iIndex, out strDescription); // We won't worry about unknown events for now if (bValidString) { ValidationList.Add(new EDLValidationItem((long)GatewayTblEnum.MfgTbl212Han2LoggerControl, new int[] { iIndex - 2048 - 256 }, strDescription, "HAN Events", VERSION_M2GTWY_2_0)); } } CENTRON_AMI_UpstreamHANEventDictionary UpstreamEvtDictionary = new CENTRON_AMI_UpstreamHANEventDictionary(); for (int iIndex = 2432; iIndex < 2559; iIndex++) { string strDescription; bool bValidString; bValidString = UpstreamEvtDictionary.TryGetValue((ushort)iIndex, out strDescription); // We won't worry about unknown events for now if (bValidString) { ValidationList.Add(new EDLValidationItem((long)GatewayTblEnum.MfgTbl212Han2LoggerControl, new int[] { iIndex - 2048 - 256 }, strDescription, "HAN Events", VERSION_M2GTWY_2_0)); } } }
/// <summary> /// Creates the list of validation items. /// </summary> /// <returns>A list of items that will be validated.</returns> // Revision History // MM/DD/YY who Version ID Number Description // -------- --- ------- -- ------ --------------------------------------- // 05/17/07 RCG 8.10.05 Created // 05/20/09 AF 2.20.05 Corrected a typo in a string // 02/23/12 jrf 2.53.43 194414 When HAN LOG CTRL table is not present in the meter, // validation of HAN events configured there in the // program is being removed. // 03/26/12 AF 2.53.52 196102 Added missing LED pulse weights and HAN 2 events // 02/15/13 jrf 2.70.69 243289 Adding appropriate code to exclude items added in Lithium // (extended voltage monitoring, instrumentation profile) when // they are not appropriate. Removed extended energies from validation // since only appropriate to ITRE & ITRF. // 02/20/13 AF 2.70.69 322427 Set a max f/w version for InterPAN Mode which became obsolete in Lithium // 08/09/13 jrf 2.85.14 TQ 7657 Adding validation of items new to Michigan. // 12/09/13 jrf 3.50.16 TQ 9560 Refactored retrieval of items into unique methods. // 05/11/16 PGH 4.50.266 683886 Added Push Data and Temperature // protected override List <EDLValidationItem> GetValidationList() { List <EDLValidationItem> ValidationList = new List <EDLValidationItem>(); CENTRON_AMI_EventDictionary EventDictionary = new CENTRON_AMI_EventDictionary(); CENTRON_AMI_CommEventDictionary CommEventDictionary = new CENTRON_AMI_CommEventDictionary(); // TOU/Time configuration GetTOUTimeValidationItems(ValidationList); // Security GetSecurityValidationItems(ValidationList); // Quantities GetQuantityValidationItems(ValidationList); // Register Operations GetRegisterOperationValidationItems(ValidationList); // Device Multipliers GetDeviceMultiplierValidationItems(ValidationList); // Load Profile GetLoadProfileValidationItems(ValidationList); // Instrumentation Profile GetInstrumentaionProfileValidationItems(ValidationList); // Voltage Monitor GetVoltageMonitoringValidationItems(ValidationList); // Enhanced Voltage Monitoring GetEnhancedVoltageMonitoringValidationItems(ValidationList); // User Data GetUserDataValidationList(ValidationList); // Display GetDisplayValidationItems(ValidationList); // Events/Exceptions GetEventExceptionValidationItems(ValidationList); // Communications GetCommunicationsValidationItems(ValidationList); // SiteScan GetSiteScanValidationItems(ValidationList); // LED GetLEDValidationItems(ValidationList); // Push Set GetPushSetValidationItems(ValidationList); // Push Group GetPushGroupValidationItems(ValidationList); // Temperature GetTemperatureValidationItems(ValidationList); return(ValidationList); }