* Added basic Aquastream Hardware Support using HidLibrary from mikeobrien (https://github.com/mikeobrien/HidLibrary) * * Using hidlibrary from Nuget and fixing ProductName. * Added missing string Format for Gadget. * Changed variable names to follow style. * Added new newlines. Make AquacomputerGroup public accessible. * Added aquacomputer Icon after they allowed me to use it ;-) * Corrected spelling Corrected Variable names * Removed External/HidLibrary * Aquastream - Remove Debug. * A - Clean up remains.
73 lines
1.6 KiB
C#
73 lines
1.6 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) 2009-2012 Michael Möller <mmoeller@openhardwaremonitor.org>
|
|
|
|
*/
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using OpenHardwareMonitor.Collections;
|
|
|
|
namespace OpenHardwareMonitor.Hardware {
|
|
|
|
public enum SensorType {
|
|
Voltage, // V
|
|
Clock, // MHz
|
|
Temperature, // °C
|
|
Load, // %
|
|
Frequency, // Hz
|
|
Fan, // RPM
|
|
Flow, // L/h
|
|
Control, // %
|
|
Level, // %
|
|
Factor, // 1
|
|
Power, // W
|
|
Data, // GB = 2^30 Bytes
|
|
SmallData, // MB = 2^20 Bytes
|
|
}
|
|
|
|
public struct SensorValue {
|
|
private readonly float value;
|
|
private readonly DateTime time;
|
|
|
|
public SensorValue(float value, DateTime time) {
|
|
this.value = value;
|
|
this.time = time;
|
|
}
|
|
|
|
public float Value { get { return value; } }
|
|
public DateTime Time { get { return time; } }
|
|
}
|
|
|
|
public interface ISensor : IElement {
|
|
|
|
IHardware Hardware { get; }
|
|
|
|
SensorType SensorType { get; }
|
|
Identifier Identifier { get; }
|
|
|
|
string Name { get; set; }
|
|
int Index { get; }
|
|
|
|
bool IsDefaultHidden { get; }
|
|
|
|
IReadOnlyArray<IParameter> Parameters { get; }
|
|
|
|
float? Value { get; }
|
|
float? Min { get; }
|
|
float? Max { get; }
|
|
|
|
void ResetMin();
|
|
void ResetMax();
|
|
|
|
IEnumerable<SensorValue> Values { get; }
|
|
|
|
IControl Control { get; }
|
|
}
|
|
|
|
}
|