public class OpenRGBClient extends Object
| Constructor and Description |
|---|
OpenRGBClient(String host,
int port,
String name)
Returns an instance of OpenRGBClient
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Connect to the OpenRGBServer
|
void |
disconnect()
Disconnect the socket
|
int |
getControllerCount()
Retrieve the count of controllers discovered by OpenRGBServer
|
OpenRGBDevice |
getDeviceController(int deviceId)
Returns all controller information for a given deviceId
|
int |
getProtocolVersion() |
void |
setClientName()
Send the client name to the OpenRGBServer
|
void |
updateLed(int deviceId,
int ledIndex,
OpenRGBColor color)
Update a given Led color
|
void |
updateLeds(int deviceId,
OpenRGBColor[] colors)
Update all leds for a given device
|
void |
updateMode(int deviceId,
int modeIndex,
OpenRGBMode mode)
Change the mode for a controller
|
void |
updateZoneLeds(int deviceId,
int zoneId,
OpenRGBColor[] colors)
Update leds in a given zone for a given device
|
public void connect()
throws IOException
IOExceptionpublic void disconnect()
throws IOException
IOExceptionpublic int getProtocolVersion()
throws IOException
IOExceptionpublic void setClientName()
throws IOException
IOExceptionpublic int getControllerCount()
throws IOException
IOExceptionpublic OpenRGBDevice getDeviceController(int deviceId) throws IOException
deviceId - the device id sent by OpenRGBServerIOExceptionpublic void updateLed(int deviceId,
int ledIndex,
OpenRGBColor color)
throws IOException
deviceId - the device to updateledIndex - the led index to updatecolor - the color to setIOExceptionpublic void updateLeds(int deviceId,
OpenRGBColor[] colors)
throws IOException
deviceId - the device to updatecolors - the colors to setIOExceptionpublic void updateZoneLeds(int deviceId,
int zoneId,
OpenRGBColor[] colors)
throws IOException
deviceId - the device to updatezoneId - the zone to updatecolors - the colors to setIOExceptionpublic void updateMode(int deviceId,
int modeIndex,
OpenRGBMode mode)
throws IOException
deviceId - the device id sent by OpenRGBServermodeIndex - the mode index to setmode - the updated modeIOExceptionCopyright © 2021. All rights reserved.