// 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) Florian K. (Blacktempel) // All Rights Reserved. using System; using System.Runtime.InteropServices; namespace LibreHardwareMonitor.Hardware.Controller.MSI; public class MsiFan { /// /// Speed of Fan in RPM. /// public int Speed { get; set; } public int Duty { get; set; } /// /// Speed of Fan in percentage 0-100. This can e.g. be used to set fan curve when is . /// public MsiFanConfigure ConfigureDuty; /// /// Temperature of Fan in degrees Celsius. This can e.g. be used to set fan curve when is . /// public MsiFanConfigure ConfigureTemp; } public struct MsiFanConfigure { public MsiFanConfigure() { if (Marshal.SizeOf() != 8) { throw new InvalidOperationException($"{nameof(MsiFanConfigure)} struct size is invalid."); } } public MsiFanMode Mode = MsiFanMode.Unknown; public byte Item0; public byte Item1; public byte Item2; public byte Item3; public byte Item4; public byte Item5; public byte Item6; }