Hardware/HDD/SSDIndilinx.cs
changeset 324 c6ee430d6995
child 325 4c31341a4800
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Hardware/HDD/SSDIndilinx.cs	Sat Dec 31 17:31:04 2011 +0000
     1.3 @@ -0,0 +1,77 @@
     1.4 +/*
     1.5 +  
     1.6 +  Version: MPL 1.1/GPL 2.0/LGPL 2.1
     1.7 +
     1.8 +  The contents of this file are subject to the Mozilla Public License Version
     1.9 +  1.1 (the "License"); you may not use this file except in compliance with
    1.10 +  the License. You may obtain a copy of the License at
    1.11 + 
    1.12 +  http://www.mozilla.org/MPL/
    1.13 +
    1.14 +  Software distributed under the License is distributed on an "AS IS" basis,
    1.15 +  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
    1.16 +  for the specific language governing rights and limitations under the License.
    1.17 +
    1.18 +  The Original Code is the Open Hardware Monitor code.
    1.19 +
    1.20 +  The Initial Developer of the Original Code is 
    1.21 +  Roland Reinl <roland-reinl@gmx.de>.
    1.22 +  Portions created by the Initial Developer are Copyright (C) 2009-2011
    1.23 +  the Initial Developer. All Rights Reserved.
    1.24 +
    1.25 +  Contributor(s):
    1.26 +    Paul Werelds
    1.27 +    Michael Möller <m.moeller@gmx.ch>
    1.28 + 
    1.29 +  Alternatively, the contents of this file may be used under the terms of
    1.30 +  either the GNU General Public License Version 2 or later (the "GPL"), or
    1.31 +  the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
    1.32 +  in which case the provisions of the GPL or the LGPL are applicable instead
    1.33 +  of those above. If you wish to allow use of your version of this file only
    1.34 +  under the terms of either the GPL or the LGPL, and not to allow others to
    1.35 +  use your version of this file under the terms of the MPL, indicate your
    1.36 +  decision by deleting the provisions above and replace them with the notice
    1.37 +  and other provisions required by the GPL or the LGPL. If you do not delete
    1.38 +  the provisions above, a recipient may use your version of this file under
    1.39 +  the terms of any one of the MPL, the GPL or the LGPL.
    1.40 + 
    1.41 +*/
    1.42 +
    1.43 +namespace OpenHardwareMonitor.Hardware.HDD {
    1.44 +  using System.Collections.Generic;
    1.45 +
    1.46 +  [NamePrefix(""), RequireSmart(0xD1)]
    1.47 +  internal class SSDIndilinx : AbstractHarddrive {
    1.48 +
    1.49 +    private static readonly IEnumerable<SmartAttribute> smartAttributes =
    1.50 +      new List<SmartAttribute> {
    1.51 +
    1.52 +     new SmartAttribute(0xB8, SmartAttributeNames.InitialBadBlockCount),
    1.53 +     new SmartAttribute(0xC3, SmartAttributeNames.ProgramFailure),
    1.54 +     new SmartAttribute(0xC4, SmartAttributeNames.EraseFailure),
    1.55 +     new SmartAttribute(0xC5, SmartAttributeNames.ReadFailure),
    1.56 +     new SmartAttribute(0xC6, SmartAttributeNames.SectorsRead),
    1.57 +     new SmartAttribute(0xC7, SmartAttributeNames.SectorsWritten),
    1.58 +     new SmartAttribute(0xC8, SmartAttributeNames.ReadCommands),
    1.59 +     new SmartAttribute(0xC9, SmartAttributeNames.WriteCommands),
    1.60 +     new SmartAttribute(0xCA, SmartAttributeNames.BitErrors),
    1.61 +     new SmartAttribute(0xCB, SmartAttributeNames.CorrectedErrors),
    1.62 +     new SmartAttribute(0xCC, SmartAttributeNames.BadBlockFullFlag),
    1.63 +     new SmartAttribute(0xCD, SmartAttributeNames.MaxCellCycles),
    1.64 +     new SmartAttribute(0xCE, SmartAttributeNames.MinErase),
    1.65 +     new SmartAttribute(0xCF, SmartAttributeNames.MaxErase),
    1.66 +     new SmartAttribute(0xD0, SmartAttributeNames.AverageEraseCount),
    1.67 +     new SmartAttribute(0xD1, SmartAttributeNames.RemainingLife,
    1.68 +       null, SensorType.Level, 0),
    1.69 +     new SmartAttribute(0xD2, SmartAttributeNames.UnknownUnique),
    1.70 +     new SmartAttribute(0xD3, SmartAttributeNames.SataErrorCountCrc),
    1.71 +     new SmartAttribute(0xD4, SmartAttributeNames.SataErrorCountHandshake),
    1.72 +    };
    1.73 +
    1.74 +    public SSDIndilinx(ISmart smart, string name, int index, ISettings settings)
    1.75 +      : base(smart, name, index, smartAttributes, settings) { }
    1.76 +  }
    1.77 +}
    1.78 +
    1.79 +
    1.80 +