Corrected the source code format.

This commit is contained in:
Michael Möller 2016-05-26 15:45:10 +02:00
parent 5b69dc2a43
commit a7d45d22b1
2 changed files with 18 additions and 15 deletions

View File

@ -8,30 +8,31 @@
*/ */
using OpenHardwareMonitor.Collections; namespace OpenHardwareMonitor.Hardware.HDD {
using System.Collections.Generic;
using OpenHardwareMonitor.Collections;
namespace OpenHardwareMonitor.Hardware.HDD [NamePrefix("PLEXTOR")]
{
using System.Collections.Generic;
[NamePrefix("PLEXTOR")]
internal class SSDPlextor : AbstractHarddrive { internal class SSDPlextor : AbstractHarddrive {
private static readonly IEnumerable<SmartAttribute> smartAttributes = private static readonly IEnumerable<SmartAttribute> smartAttributes =
new List<SmartAttribute> { new List<SmartAttribute> {
new SmartAttribute(0x09, SmartNames.PowerOnHours, RawToInt), new SmartAttribute(0x09, SmartNames.PowerOnHours, RawToInt),
new SmartAttribute(0x0C, SmartNames.PowerCycleCount, RawToInt), new SmartAttribute(0x0C, SmartNames.PowerCycleCount, RawToInt),
new SmartAttribute(0xF1, SmartNames.HostWrites, RawToGb, SensorType.Data, 0, SmartNames.HostWrites), new SmartAttribute(0xF1, SmartNames.HostWrites, RawToGb, SensorType.Data,
new SmartAttribute(0xF2, SmartNames.HostReads, RawToGb, SensorType.Data, 1, SmartNames.HostReads), 0, SmartNames.HostWrites),
new SmartAttribute(0xF2, SmartNames.HostReads, RawToGb, SensorType.Data,
1, SmartNames.HostReads),
}; };
public SSDPlextor(ISmart smart, string name, string firmwareRevision, public SSDPlextor(ISmart smart, string name, string firmwareRevision,
int index, ISettings settings) int index, ISettings settings)
: base(smart, name, firmwareRevision, index, smartAttributes, settings) {} : base(smart, name, firmwareRevision, index, smartAttributes, settings) {}
private static float RawToGb(byte[] rawvalue, byte value, IReadOnlyArray<IParameter> parameters) private static float RawToGb(byte[] rawvalue, byte value,
{ IReadOnlyArray<IParameter> parameters)
return RawToInt(rawvalue, value, parameters) / 32; {
} return RawToInt(rawvalue, value, parameters) / 32;
} }
}
} }

View File

@ -50,9 +50,11 @@ namespace OpenHardwareMonitor.Hardware.HDD {
new SmartAttribute(0xC9, SmartNames.SupercapStatus), new SmartAttribute(0xC9, SmartNames.SupercapStatus),
new SmartAttribute(0xCA, SmartNames.ExceptionModeStatus), new SmartAttribute(0xCA, SmartNames.ExceptionModeStatus),
new SmartAttribute(0xEB, SmartNames.PowerRecoveryCount), new SmartAttribute(0xEB, SmartNames.PowerRecoveryCount),
new SmartAttribute(0xF1, SmartNames.TotalLBAWritten, (byte[] r, byte v, IReadOnlyArray<IParameter> p) new SmartAttribute(0xF1, SmartNames.TotalLBAWritten,
(byte[] r, byte v, IReadOnlyArray<IParameter> p)
=> { return RawToInt(r, v, p) * 512 / 1024 / 1024 / 1024; }, => { return RawToInt(r, v, p) * 512 / 1024 / 1024 / 1024; },
SensorType.Data, 0, SmartNames.TotalLBAWritten) }; SensorType.Data, 0, SmartNames.TotalLBAWritten)
};
public SSDSamsung(ISmart smart, string name, string firmwareRevision, public SSDSamsung(ISmart smart, string name, string firmwareRevision,
int index, ISettings settings) int index, ISettings settings)