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, this method also sets the client name and retrieves the server protocol version
|
void |
deleteProfile(String profileName)
Deletes the given profile name
|
void |
disconnect()
Disconnect the socket
|
int |
getControllerCount()
Retrieve the count of controllers discovered by OpenRGBServer
|
OpenRGBDevice |
getDeviceController(int deviceIndex)
Returns all controller information for a given deviceIndex
|
String[] |
getProfileList()
Retrieves the list of profile names
|
void |
loadProfile(String profileName)
Loads a given profile
|
void |
resizeZone(int deviceIndex,
int zoneIndex,
int size)
Resizes a given zone
|
void |
saveProfile(String profileName)
Saves the current configuration as a new profile
|
void |
setClientName()
Send the client name to the OpenRGBServer
|
void |
updateLed(int deviceIndex,
int ledIndex,
OpenRGBColor color)
Update a given Led color
|
void |
updateLeds(int deviceIndex,
OpenRGBColor[] colors)
Update all leds for a given device
|
void |
updateMode(int deviceIndex,
int modeIndex,
OpenRGBMode mode)
Change the mode for a controller
|
void |
updateZoneLeds(int deviceIndex,
int zoneIndex,
OpenRGBColor[] colors)
Update leds in a given zone for a given device
|
public void connect()
throws IOException
IOExceptionpublic void disconnect()
throws IOException
IOExceptionpublic void setClientName()
throws IOException
IOExceptionpublic int getControllerCount()
throws IOException
IOExceptionpublic OpenRGBDevice getDeviceController(int deviceIndex) throws IOException
deviceIndex - the device id sent by OpenRGBServerIOExceptionpublic void updateLed(int deviceIndex,
int ledIndex,
OpenRGBColor color)
throws IOException
deviceIndex - the device to updateledIndex - the led index to updatecolor - the color to setIOExceptionpublic void updateLeds(int deviceIndex,
OpenRGBColor[] colors)
throws IOException
deviceIndex - the device to updatecolors - the colors to setIOExceptionpublic void updateZoneLeds(int deviceIndex,
int zoneIndex,
OpenRGBColor[] colors)
throws IOException
deviceIndex - the device to updatezoneIndex - the zone to updatecolors - the colors to setIOExceptionpublic void updateMode(int deviceIndex,
int modeIndex,
OpenRGBMode mode)
throws IOException
deviceIndex - the device id sent by OpenRGBServermodeIndex - the mode index to setmode - the updated modeIOExceptionpublic void resizeZone(int deviceIndex,
int zoneIndex,
int size)
throws IOException
deviceIndex - device index to resizezoneIndex - zone index to resizesize - the size to setIOExceptionpublic String[] getProfileList() throws IOException
IOExceptionpublic void saveProfile(String profileName) throws IOException
profileName - the new profile nameIOExceptionpublic void loadProfile(String profileName) throws IOException
profileName - the profile name to loadIOExceptionpublic void deleteProfile(String profileName) throws IOException
profileName - the profile name to deleteIOExceptionCopyright © 2021. All rights reserved.