/// <summary> /// Clears the SiteScan Diag counters /// </summary> // Revision History // MM/DD/YY Who Version ID Number Description // -------- --- ------- -- ------ ------------------------------------------- // 09/17/09 RCG 2.30.00 Created // 09/19/14 jrf 4.00.63 WR 534158 Modified way the test details are set. private void ClearSiteScanDiagCounts() { ItronDeviceResult Result = ItronDeviceResult.ERROR; ISiteScan SiteScanDevice = m_AmiDevice as ISiteScan; bool bSkipped = SiteScanDevice == null; string strReason = ""; string strDetails = ""; if (IsAborted == false) { if (bSkipped == false) { Result = SiteScanDevice.ResetDiagCounters(); strReason = DetermineReason(Result); strDetails = GetClearDetails(Result == ItronDeviceResult.SUCCESS); } else { strReason = TestResources.ReasonSiteScanNotSupported; strDetails = TestResources.ReasonSiteScanNotSupported; } AddTestDetail(TestResources.ClearSiteScanDiagnosticCounts, GetResultString(bSkipped, Result == ItronDeviceResult.SUCCESS), strDetails, strReason); } }
/// <summary> /// Shows the activity counters. /// </summary> // Revision History // MM/DD/YY Who Version ID Number Description // -------- --- ------- -- ------ ------------------------------------------- // 09/17/09 RCG 2.30.00 Created // 09/19/14 jrf 4.00.63 WR 534158 Modified way the test details are set. // 04/27/15 jrf 4.20.03 WR 576493 Added check for ICM event log cleared event. private void ShowCounters() { ISiteScan SiteScanDevice = m_AmiDevice as ISiteScan; string strLogClearedEventName = ""; int LogClearedEventCount = 0; if (IsAborted == false) { AddTestDetail(TestResources.DemandResetCount, GetResultString(m_AmiDevice.NumDemandResets == 0), GetClearCountDetails(m_AmiDevice.NumDemandResets)); AddTestDetail(TestResources.PowerOutageCount, GetResultString(m_AmiDevice.NumOutages == 0), GetClearCountDetails(m_AmiDevice.NumOutages)); AddTestDetail(TestResources.ProgrammedCount, GetResultString(m_AmiDevice.NumTimeProgrammed == 0), GetClearCountDetails(m_AmiDevice.NumTimeProgrammed)); AddTestDetail(TestResources.InversionTamperCount, GetResultString(m_AmiDevice.NumberOfInversionTampers == 0), GetClearCountDetails((int)m_AmiDevice.NumberOfInversionTampers)); AddTestDetail(TestResources.RemovalTamperCount, GetResultString(m_AmiDevice.NumberOfRemovalTampers == 0), GetClearCountDetails((int)m_AmiDevice.NumberOfRemovalTampers)); if (SiteScanDevice != null) { foreach (CDiagnostics.Diag CurrentDiag in SiteScanDevice.Diagnostics.m_Diags) { AddTestDetail(CurrentDiag.Name, GetResultString(CurrentDiag.Count == 0), GetClearCountDetails(CurrentDiag.Count)); } } //Retrieve the register event log cleared event name m_AmiDevice.EventDescriptions.TryGetValue((int)CANSIDevice.HistoryEvents.HIST_LOG_CLEARED, out strLogClearedEventName); LogClearedEventCount = m_AmiDevice.HistoryLogEventList.Where(e => e.Description == strLogClearedEventName && e.Enabled).Count(); //We need to look for the ICM Event Log Cleared event. Because of a bug 3G ICM comm module firmware, //the ICM event log cleared event will show up as not supported when it actually is. This means it won't show up in //the HistoryLogEventList property showing all supported events and whether they are monitored. To get around this the //code below is only checking ICM comm module monitored events, not supported ones, to see if ICM event log cleared //event is configured. if (m_AmiDevice.CommModule is ICSCommModule) { strLogClearedEventName = ""; //Retrieve the ICS event log cleared event name ICS_Gateway_EventDictionary ICMEventDescriptions = new ICS_Gateway_EventDictionary(); ICMEventDescriptions.TryGetValue((int)ICS_Gateway_EventDictionary.CommModuleHistoryEvents.ICM_EVENT_LOG_CLEARED, out strLogClearedEventName); LogClearedEventCount += ((ICSCommModule)m_AmiDevice.CommModule).CommModuleEventMonitored.Where(e => e.Description == strLogClearedEventName).Count(); } AddTestDetail(TestResources.EventLogCount, GetResultString(LogClearedEventCount == m_AmiDevice.Events.Count), GetEventLogCountDetails(LogClearedEventCount, m_AmiDevice.Events.Count)); } }