moel@328: /* moel@328: moel@328: Version: MPL 1.1/GPL 2.0/LGPL 2.1 moel@328: moel@328: The contents of this file are subject to the Mozilla Public License Version moel@328: 1.1 (the "License"); you may not use this file except in compliance with moel@328: the License. You may obtain a copy of the License at moel@328: moel@328: http://www.mozilla.org/MPL/ moel@328: moel@328: Software distributed under the License is distributed on an "AS IS" basis, moel@328: WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License moel@328: for the specific language governing rights and limitations under the License. moel@328: moel@328: The Original Code is the Open Hardware Monitor code. moel@328: moel@328: The Initial Developer of the Original Code is moel@328: Michael Möller . moel@328: Portions created by the Initial Developer are Copyright (C) 2012 moel@328: the Initial Developer. All Rights Reserved. moel@328: moel@328: Contributor(s): moel@328: moel@328: Alternatively, the contents of this file may be used under the terms of moel@328: either the GNU General Public License Version 2 or later (the "GPL"), or moel@328: the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), moel@328: in which case the provisions of the GPL or the LGPL are applicable instead moel@328: of those above. If you wish to allow use of your version of this file only moel@328: under the terms of either the GPL or the LGPL, and not to allow others to moel@328: use your version of this file under the terms of the MPL, indicate your moel@328: decision by deleting the provisions above and replace them with the notice moel@328: and other provisions required by the GPL or the LGPL. If you do not delete moel@328: the provisions above, a recipient may use your version of this file under moel@328: the terms of any one of the MPL, the GPL or the LGPL. moel@328: 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 smartAttributes = moel@328: new List { 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: }