-
Notifications
You must be signed in to change notification settings - Fork 1
Helper Objects
Fiercest edited this page Feb 29, 2020
·
1 revision
A lighting capable device from the SDK.
//Constructor
AuraSDkDevice(IAuraDevice rawDevice) // Creates an AuraSDKDevice, depicting a lighting capable device from the sdk from its raw COM4J object.
//Functional Methods
List<AuraRGBLight> getLightZones() // Gets all of the lighting zones of this device.
void setColor(AuraRGBLight light, Color color) // Sets the color of a lighting zone.
void setColor(List<AuraRGBLight> lights, Color color) // Sets the color of a list of lighting zones.
void setColor(Color color) // Sets the color of all this device's lighting zones.
void apply() // Manually applies the lighting effects to the lighting zones. All of the above setColor methods automatically invoke this method. The setColor inside of the AuraRGBLight object has an overload to avoid automatically invoking this method. Runs on a new Thread as this is an expensive IO function.
//Getter Methods
AuraDeviceType getAuraDeviceType() // Gets the device type of this device.
String getName() // Gets the name of the device.
long getWidth() // Gets the width of the device?
long getHeight() // Gets the height of the device?
A lighting zone belonging to an AuraSDKDevice.
//Constructor
AuraRGbLight(AuraSDKDevice parent, IAuraRgbLight rawLight) // Creates an AuraRGBLight based on the device it belongs to, as well as the raw COM4J lighting zone object.
//Functional Methods
void setColor(Color color) // Sets the color of this zone and automatically applies the effect. Overload of `setColor(color, true)`.
void setColor(Color color, boolean apply) // Sets the color of this zone and applies it based on the second argument.
Color getColor() // Gets the color of this zone.
//Getter Methods
String getName() // Gets the name of this lighting zone.
AuraSDKDevice get$parent() // Gets the parent device. The $ is so that lombok doesn't have a stack overflow for the equals and hash code.
A custom Color Object used to set the color of devices and zones.
//Constructor
Color(int r, int g, int b) // Creates a Color from r, g, b components (0-255).
Color(int hex) // Creates a color from a packed, hex int color.
//Functional Methods
int asIntBGR() // Returns this object as a packed hex int (to send it to the SDK), in the order b, g, r (because the SDK wants it in that order for some reason).
//Getter Methods
int getR() // Gets the Red component.
int getG() // Gets the Green component.
int getB() // Gets the Blue component.