Corsair Lighting Protocol  0.15.0
Control LEDs connected to an Arduino with iCUE
FanController Class Referenceabstract

#include <FanController.h>

+ Inheritance diagram for FanController:
+ Collaboration diagram for FanController:

Public Member Functions

virtual void handleFanControl (const Command &command, const CorsairLightingProtocolResponse *response) override
 

Protected Member Functions

virtual uint16_t getFanSpeed (uint8_t fan)=0
 
virtual void setFanSpeed (uint8_t fan, uint16_t speed)=0
 
virtual uint8_t getFanPower (uint8_t fan)=0
 
virtual void setFanPower (uint8_t fan, uint8_t percentage)=0
 
virtual void setFanCurve (uint8_t fan, uint8_t group, FanCurve &fanCurve)=0
 
virtual void setFanExternalTemperature (uint8_t fan, uint16_t temp)=0
 
virtual void setFanForce3PinMode (bool flag)=0
 
virtual FanDetectionType getFanDetectionType (uint8_t fan)=0
 
virtual void setFanDetectionType (uint8_t fan, FanDetectionType type)=0
 

Detailed Description

The abstract implementation of IFanController. This implementation handles the parsing and interpretation of incoming commands.

Member Function Documentation

◆ getFanDetectionType()

virtual FanDetectionType FanController::getFanDetectionType ( uint8_t  fan)
protectedpure virtual

Get the fan DetectionType for a fan.

Parameters
fanindex of the fan
Returns
the FanDetectionType

Implemented in SimpleFanController.

◆ getFanPower()

virtual uint8_t FanController::getFanPower ( uint8_t  fan)
protectedpure virtual

Get the power percentage of a fan.

Parameters
fanindex of the fan
Returns
power percentage, in range 0-255 with 255 mean 100%.

Implemented in SimpleFanController.

◆ getFanSpeed()

virtual uint16_t FanController::getFanSpeed ( uint8_t  fan)
protectedpure virtual

Get the fan speed.

Parameters
fanindex of the fan
Returns
fan speed in RPM.

Implemented in SimpleFanController.

◆ handleFanControl()

void FanController::handleFanControl ( const Command command,
const CorsairLightingProtocolResponse response 
)
overridevirtual

Handle a command and send back a response. This method is called if a new command for the FanController is received.

Parameters
commandthe command which must be handled
responsethe callback used for the response

Implements IFanController.

◆ setFanCurve()

virtual void FanController::setFanCurve ( uint8_t  fan,
uint8_t  group,
FanCurve fanCurve 
)
protectedpure virtual

Set a FanCure for a fan.

Parameters
fanindex of the fan
groupthe temperature group used for getting the temperature for this fan
fanCurvethe fan curve data

Implemented in SimpleFanController.

◆ setFanDetectionType()

virtual void FanController::setFanDetectionType ( uint8_t  fan,
FanDetectionType  type 
)
protectedpure virtual

Set the fan DetectionType for a fan.

Parameters
fanindex of the fan
typethe FanDetectionType

Implemented in SimpleFanController.

◆ setFanExternalTemperature()

virtual void FanController::setFanExternalTemperature ( uint8_t  fan,
uint16_t  temp 
)
protectedpure virtual

Set the external temperature for a fan. The external temperature is provied by the iCUE.

Parameters
fanindex of the fan
tempThe temperature in hundredths of a degree Celsius.

Implemented in SimpleFanController.

◆ setFanForce3PinMode()

virtual void FanController::setFanForce3PinMode ( bool  flag)
protectedpure virtual

TODO not sure what this does, currently unused

Parameters
flagthe value

Implemented in SimpleFanController.

◆ setFanPower()

virtual void FanController::setFanPower ( uint8_t  fan,
uint8_t  percentage 
)
protectedpure virtual
Parameters
fanindex of the fan
percentage255 mean 100%.

Implemented in SimpleFanController.

◆ setFanSpeed()

virtual void FanController::setFanSpeed ( uint8_t  fan,
uint16_t  speed 
)
protectedpure virtual

Set the fan speed to a fixed value.

Parameters
fanindex of the fan
speedfan speed in RPM.

Implemented in SimpleFanController.


The documentation for this class was generated from the following files: