mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-08-29 05:18:14 +00:00
Corrected the source code format.
This commit is contained in:
parent
5b69dc2a43
commit
a7d45d22b1
@ -8,30 +8,31 @@
|
||||
|
||||
*/
|
||||
|
||||
using OpenHardwareMonitor.Collections;
|
||||
namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
using System.Collections.Generic;
|
||||
using OpenHardwareMonitor.Collections;
|
||||
|
||||
namespace OpenHardwareMonitor.Hardware.HDD
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
|
||||
[NamePrefix("PLEXTOR")]
|
||||
[NamePrefix("PLEXTOR")]
|
||||
internal class SSDPlextor : AbstractHarddrive {
|
||||
|
||||
private static readonly IEnumerable<SmartAttribute> smartAttributes =
|
||||
new List<SmartAttribute> {
|
||||
new SmartAttribute(0x09, SmartNames.PowerOnHours, RawToInt),
|
||||
new SmartAttribute(0x0C, SmartNames.PowerCycleCount, RawToInt),
|
||||
new SmartAttribute(0xF1, SmartNames.HostWrites, RawToGb, SensorType.Data, 0, SmartNames.HostWrites),
|
||||
new SmartAttribute(0xF2, SmartNames.HostReads, RawToGb, SensorType.Data, 1, SmartNames.HostReads),
|
||||
new SmartAttribute(0xF1, SmartNames.HostWrites, RawToGb, SensorType.Data,
|
||||
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)
|
||||
: base(smart, name, firmwareRevision, index, smartAttributes, settings) {}
|
||||
|
||||
private static float RawToGb(byte[] rawvalue, byte value, IReadOnlyArray<IParameter> parameters)
|
||||
{
|
||||
return RawToInt(rawvalue, value, parameters) / 32;
|
||||
}
|
||||
private static float RawToGb(byte[] rawvalue, byte value,
|
||||
IReadOnlyArray<IParameter> parameters)
|
||||
{
|
||||
return RawToInt(rawvalue, value, parameters) / 32;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -50,9 +50,11 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
new SmartAttribute(0xC9, SmartNames.SupercapStatus),
|
||||
new SmartAttribute(0xCA, SmartNames.ExceptionModeStatus),
|
||||
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; },
|
||||
SensorType.Data, 0, SmartNames.TotalLBAWritten) };
|
||||
SensorType.Data, 0, SmartNames.TotalLBAWritten)
|
||||
};
|
||||
|
||||
public SSDSamsung(ISmart smart, string name, string firmwareRevision,
|
||||
int index, ISettings settings)
|
||||
|
Loading…
x
Reference in New Issue
Block a user