public abstract class Controller
extends java.lang.Object
Constructor and Description |
---|
Controller(LEDStrip strip) |
Modifier and Type | Method and Description |
---|---|
LEDStrip |
getStrip()
Gets the reference to the strip this controller is for.
|
boolean |
isMultiColor()
Checks if this controller uses multicolor.
|
void |
load(byte[] data)
Loads the values of this controller using the data saved on the
microcontroller for this controller.
|
void |
populateInterface(java.util.Collection<javafx.scene.Node[]> storage)
Populates the given collection with all interface elements required for
the user to control the settings of this strip controller.
|
void |
save(byte[] data)
Generates the data of this controller which should be stored on the
microcontroller.
|
abstract void |
update(double dms)
Update the logic of the controller.
|
public Controller(LEDStrip strip)
public abstract void update(double dms)
dms
- The amount of milliseconds that have passed since the last
update.public void load(byte[] data)
data
- An array of
SharedConstants.CONTROLLER_DATA
bytes containing the data stored in the microcontroller.public void save(byte[] data)
data
- An array of
SharedConstants.CONTROLLER_DATA
bytes in which the data should be stored for the
microcontroller.public boolean isMultiColor()
public LEDStrip getStrip()
public void populateInterface(java.util.Collection<javafx.scene.Node[]> storage)
storage
- The collection in which the interface has to be stored.