Added a mainboard specific configuration for the Asus P8Z77-V (Issue 347) and added an additional temperature for the Gigabyte GA-MA78LM-S2H (Issue 358).
3 This Source Code Form is subject to the terms of the Mozilla Public
4 License, v. 2.0. If a copy of the MPL was not distributed with this
5 file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 Copyright (C) 2012 Michael Möller <mmoeller@openhardwaremonitor.org>
11 namespace OpenHardwareMonitor.Hardware.HDD {
12 using System.Collections.Generic;
14 [NamePrefix(""), RequireSmart(0xAA), RequireSmart(0xAB), RequireSmart(0xAC),
15 RequireSmart(0xAD), RequireSmart(0xAE), RequireSmart(0xCA)]
16 internal class SSDMicron : AbstractHarddrive {
18 private static readonly IEnumerable<SmartAttribute> smartAttributes =
19 new List<SmartAttribute> {
21 new SmartAttribute(0x01, SmartNames.ReadErrorRate, RawToInt),
22 new SmartAttribute(0x05, SmartNames.ReallocatedSectorsCount, RawToInt),
23 new SmartAttribute(0x09, SmartNames.PowerOnHours, RawToInt),
24 new SmartAttribute(0x0C, SmartNames.PowerCycleCount, RawToInt),
25 new SmartAttribute(0xAA, SmartNames.NewFailingBlockCount, RawToInt),
26 new SmartAttribute(0xAB, SmartNames.ProgramFailCount, RawToInt),
27 new SmartAttribute(0xAC, SmartNames.EraseFailCount, RawToInt),
28 new SmartAttribute(0xAD, SmartNames.WearLevelingCount, RawToInt),
29 new SmartAttribute(0xAE, SmartNames.UnexpectedPowerLossCount, RawToInt),
30 new SmartAttribute(0xB5, SmartNames.Non4kAlignedAccess,
31 (byte[] raw, byte value) => { return 6e4f * ((raw[5] << 8) | raw[4]); }),
32 new SmartAttribute(0xB7, SmartNames.SataDownshiftErrorCount, RawToInt),
33 new SmartAttribute(0xBB, SmartNames.ReportedUncorrectableErrors, RawToInt),
34 new SmartAttribute(0xBC, SmartNames.CommandTimeout, RawToInt),
35 new SmartAttribute(0xBD, SmartNames.FactoryBadBlockCount, RawToInt),
36 new SmartAttribute(0xC4, SmartNames.ReallocationEventCount, RawToInt),
37 new SmartAttribute(0xC5, SmartNames.CurrentPendingSectorCount),
38 new SmartAttribute(0xC6, SmartNames.OffLineUncorrectableErrorCount, RawToInt),
39 new SmartAttribute(0xC7, SmartNames.UltraDmaCrcErrorCount, RawToInt),
40 new SmartAttribute(0xCA, SmartNames.RemainingLife,
41 (byte[] raw, byte value) => { return 100 - RawToInt(raw, value); },
43 new SmartAttribute(0xCE, SmartNames.WriteErrorRate,
44 (byte[] raw, byte value) => { return 6e4f * ((raw[1] << 8) | raw[0]); }),
47 public SSDMicron(ISmart smart, string name, string firmwareRevision,
48 int index, ISettings settings)
49 : base(smart, name, firmwareRevision, index, smartAttributes, settings) {}