using System.Collections.Generic; using System.Linq; using NvAPIWrapper.Native; namespace NvAPIWrapper.GPU { /// /// Holds information regarding the available thermal sensors and current thermal level of a GPU /// public class GPUThermalInformation { internal GPUThermalInformation(PhysicalGPU physicalGPU) { PhysicalGPU = physicalGPU; } /// /// Gets the current thermal level of the GPU /// public int CurrentThermalLevel { get => (int) GPUApi.GetCurrentThermalLevel(PhysicalGPU.Handle); } /// /// Gets the physical GPU that this instance describes /// public PhysicalGPU PhysicalGPU { get; } /// /// Gets the list of available thermal sensors /// public IEnumerable ThermalSensors { get { return GPUApi.GetThermalSettings(PhysicalGPU.Handle).Sensors .Select((sensor, i) => new GPUThermalSensor(i, sensor)); } } } }