Hardware/HDD/SSDSamsung.cs
author moel.mich
Mon, 02 Jul 2012 21:14:40 +0000
changeset 357 fb8dc26f65a4
parent 328 f837f9f0973e
child 406 3890d78140c2
permissions -rw-r--r--
Added mainboard specific configurations for the following Gigabyte mainboards: EX58-UD3R, G41M-Combo, G41MT-S2, G41MT-S2P, GA-MA770T-UD3P, GA-MA785GM-US2H, GA-MA78LM-S2H, GA-MA790X-UD3P, H55-USB3, H55N-USB3, H61M-DS2 REV 1.2, H61M-USB3-B3 REV 2.0, H67A-USB3-B3, P55A-UD3, P67A-UD3-B3, P67A-UD3R-B3, Z68A-D3H-B3, Z68AP-D3, Z68X-UD3H-B3.
moel@328
     1
/*
moel@328
     2
 
moel@344
     3
  This Source Code Form is subject to the terms of the Mozilla Public
moel@344
     4
  License, v. 2.0. If a copy of the MPL was not distributed with this
moel@344
     5
  file, You can obtain one at http://mozilla.org/MPL/2.0/.
moel@328
     6
 
moel@344
     7
  Copyright (C) 2012 Michael Möller <mmoeller@openhardwaremonitor.org>
moel@344
     8
	
moel@328
     9
*/
moel@328
    10
moel@328
    11
namespace OpenHardwareMonitor.Hardware.HDD {
moel@328
    12
  using System.Collections.Generic;
moel@328
    13
moel@328
    14
  [NamePrefix(""), RequireSmart(0xB0), RequireSmart(0xB1), RequireSmart(0xB2), 
moel@328
    15
    RequireSmart(0xB3), RequireSmart(0xB4), RequireSmart(0xB5), 
moel@328
    16
    RequireSmart(0xB6), RequireSmart(0xB7)]
moel@328
    17
  internal class SSDSamsung : AbstractHarddrive {
moel@328
    18
moel@328
    19
    private static readonly IEnumerable<SmartAttribute> smartAttributes =
moel@328
    20
      new List<SmartAttribute> {
moel@328
    21
      new SmartAttribute(0x09, SmartNames.PowerOnHours, RawToInt),
moel@328
    22
      new SmartAttribute(0x0C, SmartNames.PowerCycleCount, RawToInt),
moel@328
    23
      new SmartAttribute(0xAF, SmartNames.ProgramFailCountChip, RawToInt),
moel@328
    24
      new SmartAttribute(0xB0, SmartNames.EraseFailCountChip, RawToInt),
moel@328
    25
      new SmartAttribute(0xB1, SmartNames.WearLevelingCount, RawToInt),
moel@328
    26
      new SmartAttribute(0xB2, SmartNames.UsedReservedBlockCountChip, RawToInt),
moel@328
    27
      new SmartAttribute(0xB3, SmartNames.UsedReservedBlockCountTotal, RawToInt),
moel@328
    28
moel@328
    29
      // Unused Reserved Block Count (Total)
moel@328
    30
      new SmartAttribute(0xB4, SmartNames.RemainingLife,
moel@328
    31
        null, SensorType.Level, 0),
moel@328
    32
      
moel@328
    33
      new SmartAttribute(0xB5, SmartNames.ProgramFailCountTotal, RawToInt),
moel@328
    34
      new SmartAttribute(0xB6, SmartNames.EraseFailCountTotal, RawToInt),
moel@328
    35
      new SmartAttribute(0xB7, SmartNames.RuntimeBadBlockTotal, RawToInt),
moel@328
    36
      new SmartAttribute(0xBB, SmartNames.UncorrectableErrorCount, RawToInt),
moel@328
    37
      new SmartAttribute(0xBE, SmartNames.TemperatureExceedCount, RawToInt),
moel@328
    38
      new SmartAttribute(0xC2, SmartNames.AirflowTemperature),
moel@328
    39
      new SmartAttribute(0xC3, SmartNames.ECCRate),
moel@328
    40
      new SmartAttribute(0xC6, SmartNames.OffLineUncorrectableErrorCount, RawToInt),
moel@328
    41
      new SmartAttribute(0xC7, SmartNames.CRCErrorCount, RawToInt),
moel@328
    42
      new SmartAttribute(0xC9, SmartNames.SupercapStatus),
moel@328
    43
      new SmartAttribute(0xCA, SmartNames.ExceptionModeStatus)
moel@328
    44
    };
moel@328
    45
moel@328
    46
    public SSDSamsung(ISmart smart, string name, string firmwareRevision,
moel@328
    47
      int index, ISettings settings)
moel@328
    48
      : base(smart, name, firmwareRevision, index, smartAttributes, settings) { }
moel@328
    49
  }
moel@328
    50
}