namespace OhmGraphite
{
public class ReportedValue
{
public ReportedValue(string identifier,
string sensor,
float value,
SensorType sensorType,
string hardware,
HardwareType hardwareType,
string hwInstance,
int sensorIndex)
{
Identifier = identifier;
Sensor = sensor;
Value = value;
SensorType = sensorType;
Hardware = hardware;
HardwareType = hardwareType;
SensorIndex = sensorIndex;
HardwareInstance = hwInstance;
}
///
/// A globally unique identifier for each metric. Eg: /amdcpu/0/power/5. This
/// identifier can be read as "The 6th power sensor on the 1st amd cpu"
///
public string Identifier { get; }
///
/// Descriptive name for sensor. Eg: CPU Core #10
///
public string Sensor { get; }
///
/// The reported sensor reading
///
public float Value { get; }
///
/// The type of sensor
///
public SensorType SensorType { get; }
///
/// Descriptive name for the hardware. Eg: AMD Ryzen 7 2700. Note
/// that this name does not need to be unique among hardware types such
/// as in multi-gpu or multi-hdd setups
///
public string Hardware { get; }
///
/// The type of hardware the sensor is monitoring
///
public HardwareType HardwareType { get; }
///
/// The index. The "5" in /amdcpu/0/power/5. There typically isn't
/// ambiguity for sensors as they have differing names
/// (else wouldn't they be measuring the same thing?)
///
public int SensorIndex { get; }
///
/// The disambiguation factor for same hardware (multi-gpu and multi-hdd).
/// This is typically the index of the hardware found in the identifier
/// (eg: the "0" in /amdcpu/0/power/5). It's not always the index, for
/// NIC sensors, the NIC's GUID is used.
///
public string HardwareInstance { get; }
}
}