120 lines
2.2 KiB
Plaintext
120 lines
2.2 KiB
Plaintext
@startuml
|
|
|
|
package sensor {
|
|
interface Sensor {
|
|
+ {abstract} int Value()
|
|
}
|
|
|
|
class LMSensor {
|
|
- string Label
|
|
|
|
+ int Value()
|
|
}
|
|
|
|
class GPUSensor {
|
|
+ int Value()
|
|
}
|
|
|
|
class LMSensorsFacade
|
|
{
|
|
+ List<Sensor> RPMSensors()
|
|
+ List<Sensor> TemperatureSensors()
|
|
}
|
|
|
|
class GPUSensorsFacade
|
|
{
|
|
+ List<Sensor> TemperatureSensors()
|
|
}
|
|
|
|
class SensorManager
|
|
{
|
|
- LMSensorsFacade
|
|
- GPUSensorsFacade
|
|
|
|
+ List<Sensor> RPMSensors()
|
|
+ List<Sensor> TemperatureSensors()
|
|
}
|
|
}
|
|
|
|
package fan
|
|
{
|
|
class HWMONFan {
|
|
- string Label
|
|
- Sensor RPMSensor
|
|
- PWMControl PWMControl
|
|
|
|
+ int RPM()
|
|
+ void PWMPercent(int value)
|
|
}
|
|
|
|
class FanGenerator
|
|
{
|
|
+ FanList FindFans(List<RPMSensor>, List<PWMControl>)
|
|
}
|
|
|
|
struct FanStep
|
|
{
|
|
int Temp
|
|
int Percent
|
|
}
|
|
|
|
class FanCurve
|
|
{
|
|
- List<FanStep> Steps
|
|
- List<Sensor> TempSensor
|
|
- List<HWMONFan> Fan
|
|
|
|
+ DoFanControl()
|
|
}
|
|
|
|
class FanController
|
|
{
|
|
- List<FanCurve>
|
|
|
|
+ void StartFanControlLoop()
|
|
}
|
|
}
|
|
|
|
package pwm
|
|
{
|
|
class PWMControl {
|
|
+ void PWMPercent(int value)
|
|
+ int PWM()
|
|
}
|
|
|
|
class PWMControlFacade {
|
|
+ List<PWMControl> PWMControls()
|
|
}
|
|
}
|
|
|
|
class ConfigManager
|
|
{
|
|
|
|
}
|
|
|
|
HWMONFan -- Sensor
|
|
HWMONFan -- PWMControl
|
|
HWMONFan -- FanCurve
|
|
|
|
PWMControlFacade -- PWMControl
|
|
|
|
Sensor <|-- LMSensor
|
|
Sensor <|-- GPUSensor
|
|
|
|
SensorManager - Sensor
|
|
|
|
LMSensor -- LMSensorsFacade
|
|
GPUSensor -- GPUSensorsFacade
|
|
LMSensorsFacade -- SensorManager
|
|
GPUSensorsFacade -- SensorManager
|
|
|
|
FanGenerator -- HWMONFan
|
|
FanGenerator -- SensorManager : uses >
|
|
FanGenerator -- PWMControlFacade : uses >
|
|
|
|
Sensor - FanCurve
|
|
FanCurve -- FanStep
|
|
|
|
FanCurve -- FanController
|
|
@enduml
|