ISensor
supports a property
SensorType SensorType
which is defined in
ISensor
like this:
public enum SensorType
{
Voltage,
Current,
Power,
Clock,
Temperature,
Load,
Frequency,
Fan,
Flow,
Control,
Level,
Factor,
Data,
SmallData,
Throughput,
TimeSpan,
}
This makes it easy to filter out your desired values e.g. here
foreach (ISensor sensor in hardware.Sensors)
{
if (sensor.SensorType == TODO By You: thisorthat)
{
Console.WriteLine("\tSensor: {0}, value: {1}", sensor.Name, sensor.Value);
}
}
*1) Either by an ugly "if ((sensor.SensorType == isThis) || (sensor.SensorType == isThat) || ...) or you put your desired values in a e.g. HashSet to make it more elegant ;)
I hope it helps.