Corsair Lighting Protocol  0.15.0
Control LEDs connected to an Arduino with iCUE
CorsairLightingProtocolController Class Reference

#include <CorsairLightingProtocolController.h>

Public Member Functions

 CorsairLightingProtocolController (ILEDController *l, CorsairLightingFirmware *c)
 
 CorsairLightingProtocolController (ILEDController *l, ITemperatureController *t, IFanController *f, CorsairLightingFirmware *c)
 
void handleCommand (const Command &command, CorsairLightingProtocolResponse *response)
 
CorsairLightingFirmwaregetFirmware (void)
 

Detailed Description

The central Controller which integrates all components. The main components of the CorsairLightingProtocolController are the CorsairLightingFirmware and the LEDController. There can also be an optional TemperatureController and FanController which are required if the device should be an Commander PRO.

Constructor & Destructor Documentation

◆ CorsairLightingProtocolController() [1/2]

CorsairLightingProtocolController::CorsairLightingProtocolController ( ILEDController l,
CorsairLightingFirmware c 
)

The constructor used to create a Lighting only device.

Parameters
lThe LEDController which should be used to control the LEDs of the created Lighting Node PRO
cThe CorsairLightingFirmware used to handle Firmware related commands

◆ CorsairLightingProtocolController() [2/2]

CorsairLightingProtocolController::CorsairLightingProtocolController ( ILEDController l,
ITemperatureController t,
IFanController f,
CorsairLightingFirmware c 
)

The constructor used to create a device with lighting, temperature and fan controller functionality (Commander PRO).

Parameters
lThe LEDController which should be used to control the LEDs of the created Commander PRO
tThe TemperatureController which used to messure the temperature of the created Commander PRO
fThe FanController used to control the fans of the created Commander PRO
cThe CorsairLightingFirmware used to handle Firmware related commands

Member Function Documentation

◆ handleCommand()

void CorsairLightingProtocolController::handleCommand ( const Command command,
CorsairLightingProtocolResponse response 
)

The only public function of the CorsairLightingProtocolController. It must be called to process a command which was received from iCUE. This function is normally called by CorsairLightingProtocolHID and CorsairLightingProtocolSerial adapters.

Parameters
commandThe command received from iCUE
responseThe response callback which can be called to response to the command

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