/// <summary> /// Formats the contents of the table into a string /// </summary> /// <returns></returns> // Revision History // MM/DD/YY Who Version Issue# Description // -------- --- ------- ------ --------------------------------------------- // 11/11/11 RCG 2.53.05 Created public override string ToString() { string TableString = ""; // Make sure we have read all of the data first Read(); TableString += "MFG Table 242 (2290) - ZigBee Reset Info\r\n"; TableString += " Reset Statistics:\r\n"; TableString += " Total ZigBee Resets = " + TotalHANResets.ToString(CultureInfo.InvariantCulture) + "\r\n"; TableString += " Last Reset Time = " + LastResetTime.ToString("G", CultureInfo.CurrentCulture) + "\r\n"; TableString += " Total Code Fatals = " + TotalCodeFatalErrors.ToString(CultureInfo.InvariantCulture) + "\r\n"; TableString += " Total Watchdogs = " + TotalWatchdogErrors.ToString(CultureInfo.InvariantCulture) + "\r\n"; TableString += " Total Faults = " + TotalCoreFaults.ToString(CultureInfo.InvariantCulture) + "\r\n"; TableString += " Total Stack Lockups = " + TotalStackLockups.ToString(CultureInfo.InvariantCulture) + "\r\n"; TableString += " Total Initial Reg Table Add = " + TotalFirstUseResets.ToString(CultureInfo.InvariantCulture) + "\r\n"; TableString += " High Water Mark For Reset Limiting = " + HighWaterMark.ToString(CultureInfo.InvariantCulture) + "\r\n"; TableString += " Current Reset Limiting Period = " + CurrentResetLimitPeriod.ToString(CultureInfo.InvariantCulture) + "\r\n"; TableString += " Current Reset Limiting Count = " + CurrentResetLimitCount.ToString(CultureInfo.InvariantCulture) + "\r\n"; TableString += " Halt Due to Over Reset Limit = " + isHaltedDueToOverResetLimit.ToString(CultureInfo.InvariantCulture) + "\r\n"; for (int Index = 0; Index < ValidEntrySequenceNumbers.Count(); Index++) { TableString += " Valid Entry Sequence [" + Index.ToString(CultureInfo.InvariantCulture) + "] = " + ValidEntrySequenceNumbers[Index].ToString(CultureInfo.InvariantCulture) + "\r\n"; } for (int Index = 0; Index < ResetLogEntries.Count(); Index++) { TableString += " Entries [" + Index.ToString(CultureInfo.InvariantCulture) + "]\r\n"; TableString += ResetLogEntries[Index].ToString(); } return(TableString); }
/// <summary> /// Resets the launch count. /// </summary> public void ResetLaunchCount() { LastResetTime = DateTime.UtcNow; LaunchCount = 0; _localObjectStorageHelper.Save(nameof(LastResetTime), LastResetTime.ToFileTimeUtc()); _localObjectStorageHelper.Save(nameof(LaunchCount), LaunchCount); }