Added a missing default case in the mainboard specific configuration selection. The missing default case prevented sensor data from getting displayed on unknown Asus mainboards with NCT6779D super I/O.
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) 2011-2012 Michael Möller <mmoeller@openhardwaremonitor.org>
8 Copyright (C) 2010 Paul Werelds
9 Copyright (C) 2011 Roland Reinl <roland-reinl@gmx.de>
14 using System.Collections.Generic;
17 namespace OpenHardwareMonitor.Hardware.HDD {
20 internal class GenericHarddisk : AbstractHarddrive {
22 private static readonly List<SmartAttribute> smartAttributes =
23 new List<SmartAttribute> {
24 new SmartAttribute(0x01, SmartNames.ReadErrorRate),
25 new SmartAttribute(0x02, SmartNames.ThroughputPerformance),
26 new SmartAttribute(0x03, SmartNames.SpinUpTime),
27 new SmartAttribute(0x04, SmartNames.StartStopCount, RawToInt),
28 new SmartAttribute(0x05, SmartNames.ReallocatedSectorsCount),
29 new SmartAttribute(0x06, SmartNames.ReadChannelMargin),
30 new SmartAttribute(0x07, SmartNames.SeekErrorRate),
31 new SmartAttribute(0x08, SmartNames.SeekTimePerformance),
32 new SmartAttribute(0x09, SmartNames.PowerOnHours, RawToInt),
33 new SmartAttribute(0x0A, SmartNames.SpinRetryCount),
34 new SmartAttribute(0x0B, SmartNames.RecalibrationRetries),
35 new SmartAttribute(0x0C, SmartNames.PowerCycleCount, RawToInt),
36 new SmartAttribute(0x0D, SmartNames.SoftReadErrorRate),
37 new SmartAttribute(0xAA, SmartNames.Unknown),
38 new SmartAttribute(0xAB, SmartNames.Unknown),
39 new SmartAttribute(0xAC, SmartNames.Unknown),
40 new SmartAttribute(0xB7, SmartNames.SataDownshiftErrorCount, RawToInt),
41 new SmartAttribute(0xB8, SmartNames.EndToEndError),
42 new SmartAttribute(0xB9, SmartNames.HeadStability),
43 new SmartAttribute(0xBA, SmartNames.InducedOpVibrationDetection),
44 new SmartAttribute(0xBB, SmartNames.ReportedUncorrectableErrors, RawToInt),
45 new SmartAttribute(0xBC, SmartNames.CommandTimeout, RawToInt),
46 new SmartAttribute(0xBD, SmartNames.HighFlyWrites),
47 new SmartAttribute(0xBF, SmartNames.GSenseErrorRate),
48 new SmartAttribute(0xC0, SmartNames.EmergencyRetractCycleCount),
49 new SmartAttribute(0xC1, SmartNames.LoadCycleCount),
50 new SmartAttribute(0xC3, SmartNames.HardwareEccRecovered),
51 new SmartAttribute(0xC4, SmartNames.ReallocationEventCount),
52 new SmartAttribute(0xC5, SmartNames.CurrentPendingSectorCount),
53 new SmartAttribute(0xC6, SmartNames.UncorrectableSectorCount),
54 new SmartAttribute(0xC7, SmartNames.UltraDmaCrcErrorCount),
55 new SmartAttribute(0xC8, SmartNames.WriteErrorRate),
56 new SmartAttribute(0xCA, SmartNames.DataAddressMarkErrors),
57 new SmartAttribute(0xCB, SmartNames.RunOutCancel),
58 new SmartAttribute(0xCC, SmartNames.SoftEccCorrection),
59 new SmartAttribute(0xCD, SmartNames.ThermalAsperityRate),
60 new SmartAttribute(0xCE, SmartNames.FlyingHeight),
61 new SmartAttribute(0xCF, SmartNames.SpinHighCurrent),
62 new SmartAttribute(0xD0, SmartNames.SpinBuzz),
63 new SmartAttribute(0xD1, SmartNames.OfflineSeekPerformance),
64 new SmartAttribute(0xD3, SmartNames.VibrationDuringWrite),
65 new SmartAttribute(0xD4, SmartNames.ShockDuringWrite),
66 new SmartAttribute(0xDC, SmartNames.DiskShift),
67 new SmartAttribute(0xDD, SmartNames.AlternativeGSenseErrorRate),
68 new SmartAttribute(0xDE, SmartNames.LoadedHours),
69 new SmartAttribute(0xDF, SmartNames.LoadUnloadRetryCount),
70 new SmartAttribute(0xE0, SmartNames.LoadFriction),
71 new SmartAttribute(0xE1, SmartNames.LoadUnloadCycleCount),
72 new SmartAttribute(0xE2, SmartNames.LoadInTime),
73 new SmartAttribute(0xE3, SmartNames.TorqueAmplificationCount),
74 new SmartAttribute(0xE4, SmartNames.PowerOffRetractCycle),
75 new SmartAttribute(0xE6, SmartNames.GmrHeadAmplitude),
76 new SmartAttribute(0xE8, SmartNames.EnduranceRemaining),
77 new SmartAttribute(0xE9, SmartNames.PowerOnHours),
78 new SmartAttribute(0xF0, SmartNames.HeadFlyingHours),
79 new SmartAttribute(0xF1, SmartNames.TotalLbasWritten),
80 new SmartAttribute(0xF2, SmartNames.TotalLbasRead),
81 new SmartAttribute(0xFA, SmartNames.ReadErrorRetryRate),
82 new SmartAttribute(0xFE, SmartNames.FreeFallProtection),
84 new SmartAttribute(0xC2, SmartNames.Temperature,
85 (byte[] r, byte v) => { return r[0]; }, SensorType.Temperature, 0),
86 new SmartAttribute(0xE7, SmartNames.Temperature,
87 (byte[] r, byte v) => { return r[0]; }, SensorType.Temperature, 0),
88 new SmartAttribute(0xBE, SmartNames.TemperatureDifferenceFrom100,
89 null, SensorType.Temperature, 0)
92 public GenericHarddisk(ISmart smart, string name, string firmwareRevision,
93 int index, ISettings settings)
94 : base(smart, name, firmwareRevision, index, smartAttributes, settings) {}