Files
ReLibreHardwareMonitor/LibreHardwareMonitorLib/Interop/PowerMonitor/DeviceData.cs
T
BlacktempelandPhyxionNL df9e0a5131 Add support for Thermal Grizzly WireView Pro 2. (#2171)
* Add support for Thermal Grizzly WireView Pro 2.

* Process PR comments.

* PR comments.

* Add private keyword.

* PR comments.

* Replace WMI with SetupAPI.

Some first updates according to Thermal Grizzly code.

* Add report.

* Further improve implementation according to code of Thermal Grizzly (thanks !).

* No connection check for welcome message.

* Rename class + change SerialPort to SharedSerialPort for guard - fixing mutex issues.

* PR comments.

* Remove SP_DEVINFO_DATA from NativeMethods.txt

* Update WireViewPro2.cs

* Rename hasMutex to _hasMutex for consistency

* Formatting

* Fix build

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
2026-01-27 13:20:07 +01:00

44 lines
1.3 KiB
C#

// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Copyright (C) LibreHardwareMonitor and Contributors.
// Partial Copyright (C) Michael Möller <mmoeller@openhardwaremonitor.org> and Contributors.
// All Rights Reserved.
using System;
using System.Linq;
namespace LibreHardwareMonitor.Interop.PowerMonitor;
internal sealed class DeviceData
{
public DateTime Timestamp { get; set; } = DateTime.UtcNow;
public bool Connected { get; set; }
public string HardwareRevision { get; set; } = "A0";
public string FirmwareVersion { get; set; } = "0.0.0";
public double[] PinVoltage { get; set; } = new double[6];
public double[] PinCurrent { get; set; } = new double[6];
public double OnboardTempInC { get; set; }
public double OnboardTempOutC { get; set; }
public double ExternalTemp1C { get; set; }
public double ExternalTemp2C { get; set; }
public int PsuCapabilityW { get; set; }
public double SumCurrentA => PinCurrent.Sum();
public double SumPowerW => PinVoltage.Zip(PinCurrent, (v, i) => v * i).Sum();
public ushort FaultStatus { get; set; }
public ushort FaultLog { get; set; }
}