Files
OpenRGB/FanController/FanController.h
Scott Wilde 7266e4131a Initial commit for KrakenX fan controller
Commits squashed and amended for code style by Adam Honse <calcprogrammer1@gmail.com>
2024-10-05 16:03:50 -05:00

53 lines
2.3 KiB
C++

/*-----------------------------------------*\
| FanController.h |
| |
| Definitions and types for generic fan |
| and pump controller interface |
| |
| Adam Honse (CalcProgrammer1) 6/5/2020 |
\*-----------------------------------------*/
#pragma once
#include <vector>
#include <string>
/*------------------------------------------------------------------*\
| Fan Type |
\*------------------------------------------------------------------*/
typedef struct
{
/*--------------------------------------------------------------*\
| Fan Information |
\*--------------------------------------------------------------*/
std::string name; /* Fan name */
unsigned int speed_cmd; /* Speed command */
unsigned int prev_speed_cmd; /* Last speed command */
unsigned int speed_min; /* Minimum speed command */
unsigned int speed_max; /* Maximum speed command */
unsigned int rpm_rdg; /* RPM reading */
} fan;
class FanController
{
public:
std::string name; /* controller name */
std::string description; /* controller description */
std::string version; /* controller version */
std::string serial; /* controller serial number */
std::string location; /* controller location */
std::vector<fan> fans; /* Fans */
/*---------------------------------------------------------*\
| FanController base class constructor |
\*---------------------------------------------------------*/
//FanController();
//~FanController();
/*---------------------------------------------------------*\
| Functions to be implemented in device implementation |
\*---------------------------------------------------------*/
virtual void UpdateControl() = 0;
virtual void UpdateReading() = 0;
};