Package heronarts.lx.output
Class StreamingACNDatagram
java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.output.LXOutput
heronarts.lx.output.LXBufferOutput
heronarts.lx.output.LXDatagram
heronarts.lx.output.StreamingACNDatagram
- All Implemented Interfaces:
LXPath,LXSerializable,LXOutput.InetOutput,LXParameterListener
Streaming ACN, also referred to as E1.31, is a standardized protocol for
streaming DMX data over ACN protocol. It's a fairly simple UDP-based wrapper
on 512 bytes of data with a 16-bit universe number.
See: https://tsp.esta.org/tsp/documents/docs/ANSI_E1-31-2018.pdf
-
Nested Class Summary
Nested classes/interfaces inherited from class heronarts.lx.output.LXDatagram
LXDatagram.BufferException, LXDatagram.ErrorStateNested 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 TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class heronarts.lx.output.LXDatagram
buffer, errorFields 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
ConstructorsModifierConstructorDescriptionStreamingACNDatagram(LX lx, int[] indexBuffer) Constructs a StreamingACNDatagram on default universeStreamingACNDatagram(LX lx, int[] indexBuffer, int universeNumber) Constructs a datagram, sends the list of point indices on the given universe number.StreamingACNDatagram(LX lx, int[] indexBuffer, int dataSize, int universeNumber) Creates a StreamingACNDatagram for a given index buffer with fixed data size and universe numberStreamingACNDatagram(LX lx, int[] indexBuffer, LXBufferOutput.ByteOrder byteOrder, int universeNumber) Creates a StreamingACNDatagrm for given index buffer on universe and byte orderStreamingACNDatagram(LX lx, int[] indexBuffer, LXBufferOutput.ByteOrder byteOrder, int dataSize, int universeNumber) Creates a StreamingACNDatagram for a given index buffer with fixed data size and universe numberprotectedStreamingACNDatagram(LX lx, int dataSize, int universeNumber) Subclasses may use this constructor for datagrams with custom DMX data of a fixed length.StreamingACNDatagram(LX lx, LXModel model) Creates a StreamingACNDatagram for the given modelStreamingACNDatagram(LX lx, LXModel model, int universeNumber) Creates a StreamingACNDatagram for the model on given universeStreamingACNDatagram(LX lx, IndexBuffer indexBuffer, int universeNumber) Creates a StreamingACNDatagram for a given index buffer with fixed data size and universe numberStreamingACNDatagram(LX lx, IndexBuffer indexBuffer, int dataSize, int universeNumber) Creates a StreamingACNDatagram for a given index buffer with fixed data size and universe number -
Method Summary
Modifier and TypeMethodDescriptionprotected intOffset into raw byte buffer where color data is writtenintPriority for this sACN datagramintUniverse number for datagram.voidsetDmxData(byte[] data, int channel) voidsetDmxData(byte data, int channel) setPriority(int priority) Sets the priority for this datagramsetUniverseNumber(int universeNumber) Sets the universe for this datagramprotected voidSubclasses may override to update a sequence number in the packet when appropriate as part of the protocol.Methods inherited from class heronarts.lx.output.LXDatagram
getAddress, getDataBuffer, getErrorState, getPort, onSend, setAddress, setPort, setSocket, validateBufferSizeMethods inherited from class heronarts.lx.output.LXBufferOutput
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
-
OFFSET_PRIORITY
public static final int OFFSET_PRIORITY- See Also:
-
OFFSET_SEQUENCE_NUMBER
public static final int OFFSET_SEQUENCE_NUMBER- See Also:
-
OFFSET_UNIVERSE_NUMBER
public static final int OFFSET_UNIVERSE_NUMBER- See Also:
-
OFFSET_DMX_DATA
public static final int OFFSET_DMX_DATA- See Also:
-
MAX_DATA_LENGTH
public static final int MAX_DATA_LENGTH- See Also:
-
DEFAULT_PORT
public static final int DEFAULT_PORT- See Also:
-
DEFAULT_PRIORITY
public static final int DEFAULT_PRIORITY- See Also:
-
MAX_PRIORITY
public static final int MAX_PRIORITY- See Also:
-
-
Constructor Details
-
StreamingACNDatagram
Creates a StreamingACNDatagram for the given model- Parameters:
lx- LX instancemodel- Model of points
-
StreamingACNDatagram
Constructs a StreamingACNDatagram on default universe- Parameters:
lx- LX instanceindexBuffer- Points to send on this universe
-
StreamingACNDatagram
Creates a StreamingACNDatagram for the model on given universe- Parameters:
lx- LX instancemodel- Model of pointsuniverseNumber- Universe number
-
StreamingACNDatagram
Constructs a datagram, sends the list of point indices on the given universe number.- Parameters:
lx- LX instanceindexBuffer- List of point indices to encode in packetuniverseNumber- Universe number
-
StreamingACNDatagram
public StreamingACNDatagram(LX lx, int[] indexBuffer, LXBufferOutput.ByteOrder byteOrder, int universeNumber) Creates a StreamingACNDatagrm for given index buffer on universe and byte order- Parameters:
lx- LX instanceindexBuffer- Index bufferbyteOrder- Byte orderuniverseNumber- Universe number
-
StreamingACNDatagram
Subclasses may use this constructor for datagrams with custom DMX data of a fixed length.- Parameters:
lx- LX instancedataSize- Data sizeuniverseNumber- Universe number
-
StreamingACNDatagram
Creates a StreamingACNDatagram for a given index buffer with fixed data size and universe number- Parameters:
lx- LX instanceindexBuffer- Index bufferdataSize- Fixed DMX data sizeuniverseNumber- Universe number
-
StreamingACNDatagram
public StreamingACNDatagram(LX lx, int[] indexBuffer, LXBufferOutput.ByteOrder byteOrder, int dataSize, int universeNumber) Creates a StreamingACNDatagram for a given index buffer with fixed data size and universe number- Parameters:
lx- LX instanceindexBuffer- Index bufferbyteOrder- Byte orderdataSize- Fixed DMX data sizeuniverseNumber- Universe number
-
StreamingACNDatagram
Creates a StreamingACNDatagram for a given index buffer with fixed data size and universe number- Parameters:
lx- LX instanceindexBuffer- Index bufferuniverseNumber- Universe number
-
StreamingACNDatagram
Creates a StreamingACNDatagram for a given index buffer with fixed data size and universe number- Parameters:
lx- LX instanceindexBuffer- Index bufferdataSize- Fixed DMX data sizeuniverseNumber- Universe number
-
-
Method Details
-
setPriority
Sets the priority for this datagram- Parameters:
priority- sACN priority level, 0-200- Returns:
- this
-
getPriority
public int getPriority()Priority for this sACN datagram- Returns:
- Priority level
-
setUniverseNumber
Sets the universe for this datagram- Parameters:
universeNumber- DMX universe- Returns:
- this
-
getUniverseNumber
public int getUniverseNumber()Universe number for datagram.- Returns:
- Universe number
-
setDmxData
public void setDmxData(byte data, int channel) -
setDmxData
public void setDmxData(byte[] data, int channel) -
getDataBufferOffset
protected int getDataBufferOffset()Description copied from class:LXBufferOutputOffset into raw byte buffer where color data is written- Specified by:
getDataBufferOffsetin classLXBufferOutput- Returns:
- Offset into raw byte buffer for color data
-
updateSequenceNumber
protected void updateSequenceNumber()Description copied from class:LXDatagramSubclasses may override to update a sequence number in the packet when appropriate as part of the protocol.- Overrides:
updateSequenceNumberin classLXDatagram
-