Package heronarts.lx.output
Class LXDatagram
java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.output.LXOutput
heronarts.lx.output.LXBufferOutput
heronarts.lx.output.LXDatagram
- All Implemented Interfaces:
LXPath,LXSerializable,LXOutput.InetOutput,LXParameterListener
- Direct Known Subclasses:
ArtNetDatagram,ArtSyncDatagram,DDPDatagram,KinetDatagram,OPCDatagram,StreamingACNDatagram
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprotected static classNested classes/interfaces inherited from class heronarts.lx.output.LXBufferOutput
LXBufferOutput.ByteEncoder, LXBufferOutput.ByteOrderNested classes/interfaces inherited from class heronarts.lx.output.LXOutput
LXOutput.GammaMode, LXOutput.GammaTable, LXOutput.InetOutputNested classes/interfaces inherited from class heronarts.lx.LXComponent
LXComponent.Description, LXComponent.Hidden, LXComponent.Name, LXComponent.Placeholder, LXComponent.PluginRequired, LXComponent.RenamableNested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final byte[]final BooleanParameterWhether this datagram is in an error stateFields inherited from class heronarts.lx.output.LXBufferOutput
indexBufferFields inherited from class heronarts.lx.output.LXOutput
brightness, enabled, framesPerSecond, gamma, gammaMode, MAX_FRAMES_PER_SECOND, whitePointBlue, whitePointGreen, whitePointRed, whitePointWhiteFields inherited from class heronarts.lx.LXComponent
childArrays, children, internalParameters, KEY_CHILDREN, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_INTERNAL, KEY_PARAMETER_PATH, KEY_PARAMETERS, KEY_PATH, KEY_RESET, label, legacyInternalParameters, legacyParameters, lx, modulationColor, modulationControlsExpanded, modulationsExpanded, parameters, presetFileFields inherited from interface heronarts.lx.output.LXOutput.InetOutput
NO_PORTFields inherited from interface heronarts.lx.LXPath
DEFAULT_SEPARATOR, ROOT, ROOT_PREFIX, ROOT_SLASH -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLXDatagram(LX lx, IndexBuffer indexBuffer, int datagramSize) -
Method Summary
Modifier and TypeMethodDescriptionGets the address this datagram sends tobyte[]Returns the data bufferprotected LXDatagram.ErrorStateintgetPort()Gets the destination port number this datagram is sent toprotected voidonSend(int[] colors, LXOutput.GammaTable glut, double brightness) Invoked by engine to send this packet when new color data is available.setAddress(InetAddress address) Sets the destination address of this datagramsetPort(int port) Sets the destination port number to send this datagram tosetSocket(DatagramSocket socket) protected voidSubclasses may override to update a sequence number in the packet when appropriate as part of the protocol.protected voidMethods inherited from class heronarts.lx.output.LXBufferOutput
getDataBufferOffset, updateDataBufferMethods inherited from class heronarts.lx.output.LXOutput
error, error, load, log, onParameterChanged, send, send, setGammaDelegate, setGammaTable, setGammaTable, setGroupMethods inherited from class heronarts.lx.LXComponent
addArray, addChild, addInternalParameter, addLegacyInternalParameter, addLegacyParameter, addParameter, addParameter, addParameters, assertDisposed, contains, copyParameters, dispose, getCategory, getChild, getComponentDescription, getComponentName, getComponentName, getComponentName, getDescription, getId, getLabel, getLX, getOscAddress, getOscLabel, getOscPath, getParameter, getParameters, getParent, getPath, handleOscMessage, hasParameter, isValidOscParameter, loadParameters, loadPreset, removeParameter, removeParameter, removeParameter, removeParameter, save, savePreset, setDescription, setParent, toOscQuery, toOscQuery, toOscQuery, toString, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, isDescendant
-
Field Details
-
buffer
protected final byte[] buffer -
error
Whether this datagram is in an error state
-
-
Constructor Details
-
LXDatagram
-
-
Method Details
-
validateBufferSize
protected void validateBufferSize() -
setSocket
-
getErrorState
-
setAddress
Sets the destination address of this datagram- Specified by:
setAddressin interfaceLXOutput.InetOutput- Parameters:
address- Destination address- Returns:
- this
-
getAddress
Gets the address this datagram sends to- Specified by:
getAddressin interfaceLXOutput.InetOutput- Returns:
- Destination address
-
setPort
Sets the destination port number to send this datagram to- Specified by:
setPortin interfaceLXOutput.InetOutput- Parameters:
port- Port number- Returns:
- this
-
getPort
public int getPort()Gets the destination port number this datagram is sent to- Specified by:
getPortin interfaceLXOutput.InetOutput- Returns:
- Destination port number
-
getDataBuffer
public byte[] getDataBuffer()Returns the data buffer- Specified by:
getDataBufferin classLXBufferOutput- Returns:
- Raw byte buffer for output data
-
updateSequenceNumber
protected void updateSequenceNumber()Subclasses may override to update a sequence number in the packet when appropriate as part of the protocol. -
onSend
Invoked by engine to send this packet when new color data is available. The LXDatagram should update the packet object accordingly to contain the appropriate buffer.
-