115 lines
1.7 KiB
Plaintext
115 lines
1.7 KiB
Plaintext
@startuml
|
|
interface Sensor {
|
|
+ {abstract} int Value()
|
|
}
|
|
|
|
class LMSensor {
|
|
- string Label
|
|
|
|
+ int Value()
|
|
}
|
|
|
|
class GPUSensor {
|
|
+ int Value()
|
|
}
|
|
|
|
class HWMONFan {
|
|
- string Label
|
|
- Sensor RPMSensor
|
|
- PWMControl PWMControl
|
|
|
|
+ int RPM()
|
|
+ void PWMPercent(int value)
|
|
}
|
|
|
|
class PWMControl {
|
|
+ void PWMPercent(int value)
|
|
+ int PWM()
|
|
}
|
|
|
|
class PWMControlFacade {
|
|
+ List<PWMControl> PWMControls()
|
|
}
|
|
|
|
class LMSensorsFacade
|
|
{
|
|
+ List<Sensor> RPMSensors()
|
|
+ List<Sensor> TemperatureSensors()
|
|
}
|
|
|
|
class GPUSensorsFacade
|
|
{
|
|
+ List<Sensor> TemperatureSensors()
|
|
}
|
|
|
|
class SensorManager
|
|
{
|
|
- LMSensorsFacade
|
|
- GPUSensorsFacade
|
|
|
|
+ List<Sensor> RPMSensors()
|
|
+ List<Sensor> TemperatureSensors()
|
|
}
|
|
|
|
class FanGenerator
|
|
{
|
|
+ FanList FindFans(List<RPMSensor>, List<PWMControl>)
|
|
}
|
|
|
|
struct Coordinate
|
|
{
|
|
int X
|
|
int Y
|
|
}
|
|
|
|
enum SensorAggregateFunction
|
|
{
|
|
MIN
|
|
MAX
|
|
AVG
|
|
}
|
|
|
|
class FanCurve
|
|
{
|
|
- List<Coordinate> Steps
|
|
- List<Sensor> TempSensor
|
|
- SensorAggregateFunction Fun
|
|
- HWMONFan Fan
|
|
|
|
+ int TargetPWMPercent()
|
|
}
|
|
|
|
class FanController
|
|
{
|
|
- List<HWMONFan>
|
|
|
|
+ void StartFanControlLoop()
|
|
}
|
|
|
|
HWMONFan -- Sensor
|
|
HWMONFan -- PWMControl
|
|
HWMONFan - FanCurve
|
|
|
|
PWMControl -- PWMControlFacade
|
|
|
|
Sensor <|-- LMSensor
|
|
Sensor <|-- GPUSensor
|
|
|
|
SensorManager - Sensor
|
|
|
|
LMSensor -- LMSensorsFacade
|
|
GPUSensor -- GPUSensorsFacade
|
|
LMSensorsFacade -- SensorManager
|
|
GPUSensorsFacade -- SensorManager
|
|
|
|
FanGenerator - HWMONFan
|
|
FanGenerator - SensorManager
|
|
FanGenerator - PWMControl
|
|
|
|
Sensor - FanCurve
|
|
FanCurve -- Coordinate
|
|
FanCurve -- SensorAggregateFunction
|
|
|
|
FanController -- FanCurve
|
|
@enduml
|