public static string PrettifyModePage_1C(ModePage_1C?modePage) { if (!modePage.HasValue) { return(null); } ModePage_1C page = modePage.Value; var sb = new StringBuilder(); sb.AppendLine("SCSI Informational exceptions control page:"); if (page.PS) { sb.AppendLine("\tParameters can be saved"); } if (page.DExcpt) { sb.AppendLine("\tInformational exceptions are disabled"); } else { sb.AppendLine("\tInformational exceptions are enabled"); switch (page.MRIE) { case 0: sb.AppendLine("\tNo reporting of informational exception condition"); break; case 1: sb.AppendLine("\tAsynchronous event reporting of informational exceptions"); break; case 2: sb.AppendLine("\tGenerate unit attention on informational exceptions"); break; case 3: sb.AppendLine("\tConditionally generate recovered error on informational exceptions"); break; case 4: sb.AppendLine("\tUnconditionally generate recovered error on informational exceptions"); break; case 5: sb.AppendLine("\tGenerate no sense on informational exceptions"); break; case 6: sb.AppendLine("\tOnly report informational exception condition on request"); break; default: sb.AppendFormat("\tUnknown method of reporting {0}", page.MRIE).AppendLine(); break; } if (page.Perf) { sb.AppendLine("\tInformational exceptions reporting should not affect drive performance"); } if (page.Test) { sb.AppendLine("\tA test informational exception will raise on next timer"); } if (page.LogErr) { sb.AppendLine("\tDrive shall log informational exception conditions"); } if (page.IntervalTimer > 0) { if (page.IntervalTimer == 0xFFFFFFFF) { sb.AppendLine("\tTimer interval is vendor-specific"); } else { sb.AppendFormat("\tTimer interval is {0} ms", page.IntervalTimer * 100).AppendLine(); } } if (page.ReportCount > 0) { sb.AppendFormat("\tInformational exception conditions will be reported a maximum of {0} times", page.ReportCount); } } if (page.EWasc) { sb.AppendLine("\tWarning reporting is enabled"); } if (page.EBF) { sb.AppendLine("\tBackground functions are enabled"); } if (page.EBACKERR) { sb.AppendLine("\tDrive will report background self-test errors"); } return(sb.ToString()); }