moel@328: /*
moel@328:  
moel@344:   This Source Code Form is subject to the terms of the Mozilla Public
moel@344:   License, v. 2.0. If a copy of the MPL was not distributed with this
moel@344:   file, You can obtain one at http://mozilla.org/MPL/2.0/.
moel@328:  
moel@344:   Copyright (C) 2012 Michael Möller <mmoeller@openhardwaremonitor.org>
moel@344: 	
moel@328: */
moel@328: 
moel@328: namespace OpenHardwareMonitor.Hardware.HDD {
moel@328:   using System.Collections.Generic;
moel@328: 
moel@328:   [NamePrefix(""), RequireSmart(0xB0), RequireSmart(0xB1), RequireSmart(0xB2), 
moel@328:     RequireSmart(0xB3), RequireSmart(0xB4), RequireSmart(0xB5), 
moel@328:     RequireSmart(0xB6), RequireSmart(0xB7)]
moel@328:   internal class SSDSamsung : AbstractHarddrive {
moel@328: 
moel@328:     private static readonly IEnumerable<SmartAttribute> smartAttributes =
moel@328:       new List<SmartAttribute> {
moel@328:       new SmartAttribute(0x09, SmartNames.PowerOnHours, RawToInt),
moel@328:       new SmartAttribute(0x0C, SmartNames.PowerCycleCount, RawToInt),
moel@328:       new SmartAttribute(0xAF, SmartNames.ProgramFailCountChip, RawToInt),
moel@328:       new SmartAttribute(0xB0, SmartNames.EraseFailCountChip, RawToInt),
moel@328:       new SmartAttribute(0xB1, SmartNames.WearLevelingCount, RawToInt),
moel@328:       new SmartAttribute(0xB2, SmartNames.UsedReservedBlockCountChip, RawToInt),
moel@328:       new SmartAttribute(0xB3, SmartNames.UsedReservedBlockCountTotal, RawToInt),
moel@328: 
moel@328:       // Unused Reserved Block Count (Total)
moel@328:       new SmartAttribute(0xB4, SmartNames.RemainingLife,
moel@328:         null, SensorType.Level, 0),
moel@328:       
moel@328:       new SmartAttribute(0xB5, SmartNames.ProgramFailCountTotal, RawToInt),
moel@328:       new SmartAttribute(0xB6, SmartNames.EraseFailCountTotal, RawToInt),
moel@328:       new SmartAttribute(0xB7, SmartNames.RuntimeBadBlockTotal, RawToInt),
moel@328:       new SmartAttribute(0xBB, SmartNames.UncorrectableErrorCount, RawToInt),
moel@328:       new SmartAttribute(0xBE, SmartNames.TemperatureExceedCount, RawToInt),
moel@328:       new SmartAttribute(0xC2, SmartNames.AirflowTemperature),
moel@328:       new SmartAttribute(0xC3, SmartNames.ECCRate),
moel@328:       new SmartAttribute(0xC6, SmartNames.OffLineUncorrectableErrorCount, RawToInt),
moel@328:       new SmartAttribute(0xC7, SmartNames.CRCErrorCount, RawToInt),
moel@328:       new SmartAttribute(0xC9, SmartNames.SupercapStatus),
moel@328:       new SmartAttribute(0xCA, SmartNames.ExceptionModeStatus)
moel@328:     };
moel@328: 
moel@328:     public SSDSamsung(ISmart smart, string name, string firmwareRevision,
moel@328:       int index, ISettings settings)
moel@328:       : base(smart, name, firmwareRevision, index, smartAttributes, settings) { }
moel@328:   }
moel@328: }