public abstract class LXBufferDatagram extends LXDatagram
Modifier and Type | Class and Description |
---|---|
static class |
LXBufferDatagram.ByteOrder
Various orderings for RGB buffer data
|
LXDatagram.ErrorState
Modifier and Type | Field and Description |
---|---|
protected LXBufferDatagram.ByteOrder |
byteOrder |
protected int[] |
indexBuffer |
brightness, buffer, enabled, error
Modifier | Constructor and Description |
---|---|
protected |
LXBufferDatagram(int[] indexBuffer,
int datagramSize) |
protected |
LXBufferDatagram(int[] indexBuffer,
int datagramSize,
LXBufferDatagram.ByteOrder byteOrder) |
Modifier and Type | Method and Description |
---|---|
protected LXBufferDatagram |
copyPoints(int[] colors,
byte[] glut,
int[] indexBuffer,
int offset)
Helper for subclasses to copy a list of points into the data buffer at a
specified offset.
|
protected abstract int |
getColorBufferPosition()
Subclasses must implement, indicates where the data offset is to write the color
data into the buffer
|
void |
onSend(int[] colors,
byte[] glut)
Invoked by engine to send this packet when new color data is available.
|
LXBufferDatagram |
setByteOrder(LXBufferDatagram.ByteOrder byteOrder)
Sets the byte ordering of data in this datagram buffer
|
LXBufferDatagram |
updateIndexBuffer(int[] indexBuffer)
Updates the values in the index buffer for this datagram.
|
protected void |
updateSequenceNumber()
Subclasses may override to update the sequence number, if one is being used.
|
dispose, getAddress, getErrorState, getPort, setAddress, setPort
protected LXBufferDatagram.ByteOrder byteOrder
protected final int[] indexBuffer
protected LXBufferDatagram(int[] indexBuffer, int datagramSize)
protected LXBufferDatagram(int[] indexBuffer, int datagramSize, LXBufferDatagram.ByteOrder byteOrder)
public LXBufferDatagram updateIndexBuffer(int[] indexBuffer)
indexBuffer
- New index buffer values, must have same length as existingpublic LXBufferDatagram setByteOrder(LXBufferDatagram.ByteOrder byteOrder)
byteOrder
- Byte orderingprotected LXBufferDatagram copyPoints(int[] colors, byte[] glut, int[] indexBuffer, int offset)
colors
- Array of color valuesglut
- Look-up table of gamma-corrected brightness valuesindexBuffer
- Array of point indicesoffset
- Offset in buffer to writeprotected abstract int getColorBufferPosition()
protected void updateSequenceNumber()
public final void onSend(int[] colors, byte[] glut)
LXDatagram
onSend
in class LXDatagram
colors
- Color bufferglut
- Look-up table with gamma-adjusted brightness valuesLX library by Mark C. Slee. © 2012-2020