public abstract class LXDatagram extends LXBufferOutput implements LXOutput.InetOutput
Modifier and Type | Class and Description |
---|---|
protected static class |
LXDatagram.ErrorState |
LXBufferOutput.ByteOrder
LXOutput.GammaMode, LXOutput.InetOutput
LXComponent.Placeholder, LXComponent.Renamable
LXSerializable.Utils
Modifier and Type | Field and Description |
---|---|
protected byte[] |
buffer |
BooleanParameter |
error
Whether this datagram is in an error state
|
byteOrder, byteOrderBuffer, indexBuffer
brightness, enabled, framesPerSecond, gamma, gammaMode
controlSurfaceSemaphore, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_PARAMETER_PATH, KEY_PATH, label, lx, modulationColor
NO_PORT
Modifier | Constructor and Description |
---|---|
protected |
LXDatagram(LX lx,
int[] indexBuffer,
int datagramSize) |
protected |
LXDatagram(LX lx,
int[] indexBuffer,
LXBufferOutput.ByteOrder byteOrder,
int datagramSize) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Invoked when the datagram is no longer needed.
|
InetAddress |
getAddress()
Gets the address this datagram sends to
|
byte[] |
getDataBuffer()
Returns the data buffer
|
protected LXDatagram.ErrorState |
getErrorState() |
int |
getPort()
Gets the destination port number this datagram is sent to
|
protected void |
onSend(int[] colors,
byte[] glut)
Invoked by engine to send this packet when new color data is available.
|
LXDatagram |
setAddress(InetAddress address)
Sets the destination address of this datagram
|
LXDatagram |
setPort(int port)
Sets the destination port number to send this datagram to
|
LXDatagram |
setSocket(DatagramSocket socket) |
protected void |
updateSequenceNumber()
Subclasses may override to update a sequence number in the packet when
appropriate as part of the protocol.
|
protected void |
validateBufferSize() |
getDataBufferOffset, setByteOrder, setByteOrder, updateDataBuffer, updateIndexBuffer
error, error, getGammaLut, log, onParameterChanged, onSend, send, send, setGammaDelegate, setGroup
addArray, addChild, addInternalParameter, addParameter, addParameter, contains, copyParameters, getChild, getComponentName, getComponentName, getComponentName, getId, getLabel, getLX, getOscAddress, getOscLabel, getOscPath, getParameter, getParameters, getParent, getPath, handleOscMessage, load, loadParameters, removeParameter, removeParameter, save, saveParameters, setParent, toString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
get, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameter
protected final byte[] buffer
public final BooleanParameter error
protected LXDatagram(LX lx, int[] indexBuffer, int datagramSize)
protected LXDatagram(LX lx, int[] indexBuffer, LXBufferOutput.ByteOrder byteOrder, int datagramSize)
protected void validateBufferSize()
public LXDatagram setSocket(DatagramSocket socket)
protected LXDatagram.ErrorState getErrorState()
public LXDatagram setAddress(InetAddress address)
setAddress
in interface LXOutput.InetOutput
address
- Destination addresspublic InetAddress getAddress()
getAddress
in interface LXOutput.InetOutput
public LXDatagram setPort(int port)
setPort
in interface LXOutput.InetOutput
port
- Port numberpublic int getPort()
getPort
in interface LXOutput.InetOutput
public byte[] getDataBuffer()
getDataBuffer
in class LXBufferOutput
protected void updateSequenceNumber()
protected void onSend(int[] colors, byte[] glut)
public void dispose()
dispose
in class LXComponent
LX library by Mark C. Slee. © 2012-2020