Package heronarts.lx.output
Class ArtNetDatagram
java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.output.LXOutput
heronarts.lx.output.LXBufferOutput
heronarts.lx.output.LXDatagram
heronarts.lx.output.ArtNetDatagram
- All Implemented Interfaces:
LXPath
,LXSerializable
,LXOutput.InetOutput
,LXParameterListener
-
Nested Class Summary
Nested classes/interfaces inherited from class heronarts.lx.output.LXDatagram
LXDatagram.BufferException, LXDatagram.ErrorState
Nested classes/interfaces inherited from class heronarts.lx.output.LXBufferOutput
LXBufferOutput.ByteEncoder, LXBufferOutput.ByteOrder
Nested classes/interfaces inherited from class heronarts.lx.output.LXOutput
LXOutput.GammaMode, LXOutput.GammaTable, LXOutput.InetOutput
Nested classes/interfaces inherited from class heronarts.lx.LXComponent
LXComponent.Hidden, LXComponent.Placeholder, LXComponent.Renamable
Nested classes/interfaces inherited from interface heronarts.lx.LXSerializable
LXSerializable.Utils
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final byte[]
static final int
static final int
static final int
static final int
static final int
Fields inherited from class heronarts.lx.output.LXDatagram
buffer, error
Fields inherited from class heronarts.lx.output.LXBufferOutput
indexBuffer
Fields inherited from class heronarts.lx.output.LXOutput
brightness, enabled, framesPerSecond, gamma, gammaMode, MAX_FRAMES_PER_SECOND, whitePointBlue, whitePointGreen, whitePointRed, whitePointWhite
Fields inherited from class heronarts.lx.LXComponent
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, presetFile
Fields inherited from interface heronarts.lx.output.LXOutput.InetOutput
NO_PORT
Fields inherited from interface heronarts.lx.LXPath
ROOT, ROOT_PREFIX, ROOT_SLASH
-
Constructor Summary
ConstructorDescriptionArtNetDatagram
(LX lx, int[] indexBuffer) Creates an ArtNetDatagram for the given index bufferArtNetDatagram
(LX lx, int[] indexBuffer, int universeNumber) Creates an ArtNetDatagram for the given index buffer and universe numberArtNetDatagram
(LX lx, int[] indexBuffer, int dataLength, int universeNumber) Creates an ArtNetDatagram with fixed data length for given index buffer and universeArtNetDatagram
(LX lx, int[] indexBuffer, LXBufferOutput.ByteOrder byteOrder) Creates an ArtNetDatagram for the given index buffer and byte orderingArtNetDatagram
(LX lx, int[] indexBuffer, LXBufferOutput.ByteOrder byteOrder, int universeNumber) Creates an ArtNetDatagram for the given index buffer, universe and byte orderingArtNetDatagram
(LX lx, int[] indexBuffer, LXBufferOutput.ByteOrder byteOrder, int dataLength, int universeNumber) Creates an ArtNetDatagram with fixed data length for given index buffer, universe, and byte orderArtNetDatagram
(LX lx, LXModel model) Creates an ArtNetDatagram for the given modelArtNetDatagram
(LX lx, LXModel model, int universeNumber) Creates an ArtNetDatagram for the given model and universe numberArtNetDatagram
(LX lx, LXModel model, int dataLength, int universeNumber) Creates an ArtNetDatagram for the given model, with fixed data length and universeArtNetDatagram
(LX lx, LXModel model, LXBufferOutput.ByteOrder byteOrder, int universeNumber) Creates an ArtNetDatagram for the given model, universe, and byte orderArtNetDatagram
(LX lx, LXModel model, LXBufferOutput.ByteOrder byteOrder, int dataLength, int universeNumber) Creates an ArtNetDatagram with fixed data length for given model, universe, and byte orderingArtNetDatagram
(LX lx, IndexBuffer indexBuffer, int universeNumber) Creates an ArtNetDatagram with fixed data length for given index buffer, universe, and byte orderArtNetDatagram
(LX lx, IndexBuffer indexBuffer, int dataLength, int universeNumber) Creates an ArtNetDatagram with fixed data length for given index buffer, universe, and byte order -
Method Summary
Modifier and TypeMethodDescriptionprotected int
Offset into raw byte buffer where color data is writtenint
int
setSequenceEnabled
(boolean sequenceEnabled) Set whether to increment and send sequence numberssetUniverseNumber
(int universeNumber) protected void
Subclasses 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
dispose, getAddress, getDataBuffer, getErrorState, getPort, onSend, setAddress, setPort, setSocket, validateBufferSize
Methods inherited from class heronarts.lx.output.LXBufferOutput
updateDataBuffer
Methods inherited from class heronarts.lx.output.LXOutput
error, error, load, log, onParameterChanged, send, send, setGammaDelegate, setGammaTable, setGammaTable, setGroup
Methods inherited from class heronarts.lx.LXComponent
addArray, addChild, addInternalParameter, addLegacyInternalParameter, addLegacyParameter, addParameter, addParameter, addParameters, contains, copyParameters, getCategory, getChild, 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, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface heronarts.lx.LXPath
getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, isDescendant
-
Field Details
-
ARTNET_PORT
public static final int ARTNET_PORT- See Also:
-
MAX_DATA_LENGTH
public static final int MAX_DATA_LENGTH- See Also:
-
MAX_UNIVERSE
public static final int MAX_UNIVERSE- See Also:
-
ARTNET_HEADER_LENGTH
public static final int ARTNET_HEADER_LENGTH- See Also:
-
SEQUENCE_INDEX
public static final int SEQUENCE_INDEX- See Also:
-
UNIVERSE_LSB
public static final int UNIVERSE_LSB- See Also:
-
UNIVERSE_MSB
public static final int UNIVERSE_MSB- See Also:
-
DATA_LENGTH_MSB
public static final int DATA_LENGTH_MSB- See Also:
-
DATA_LENGTH_LSB
public static final int DATA_LENGTH_LSB- See Also:
-
HEADER
public static final byte[] HEADER
-
-
Constructor Details
-
ArtNetDatagram
Creates an ArtNetDatagram for the given model- Parameters:
lx
- LX instancemodel
- Model of points
-
ArtNetDatagram
Creates an ArtNetDatagram for the given index buffer- Parameters:
lx
- LX instanceindexBuffer
- Index buffer
-
ArtNetDatagram
Creates an ArtNetDatagram for the given index buffer and byte ordering- Parameters:
lx
- LX instanceindexBuffer
- Index bufferbyteOrder
- Byte ordering for points
-
ArtNetDatagram
Creates an ArtNetDatagram for the given model and universe number- Parameters:
lx
- LX instancemodel
- Model of pointsuniverseNumber
- universe number
-
ArtNetDatagram
Creates an ArtNetDatagram for the given model, universe, and byte order- Parameters:
lx
- LX instancemodel
- Model of pointsbyteOrder
- Byte orderinguniverseNumber
- Universe number
-
ArtNetDatagram
Creates an ArtNetDatagram for the given index buffer and universe number- Parameters:
lx
- LX instanceindexBuffer
- Index bufferuniverseNumber
- Universe number
-
ArtNetDatagram
public ArtNetDatagram(LX lx, int[] indexBuffer, LXBufferOutput.ByteOrder byteOrder, int universeNumber) Creates an ArtNetDatagram for the given index buffer, universe and byte ordering- Parameters:
lx
- LX instanceindexBuffer
- Index bufferbyteOrder
- Byte orderinguniverseNumber
- Universe number
-
ArtNetDatagram
Creates an ArtNetDatagram for the given model, with fixed data length and universe- Parameters:
lx
- LX instancemodel
- ModeldataLength
- Fixed data payload lengthuniverseNumber
- Universe number
-
ArtNetDatagram
public ArtNetDatagram(LX lx, LXModel model, LXBufferOutput.ByteOrder byteOrder, int dataLength, int universeNumber) Creates an ArtNetDatagram with fixed data length for given model, universe, and byte ordering- Parameters:
lx
- LX instancemodel
- Model of pointsbyteOrder
- Byte orderingdataLength
- Fixed data payload lengthuniverseNumber
- Universe number
-
ArtNetDatagram
Creates an ArtNetDatagram with fixed data length for given index buffer and universe- Parameters:
lx
- LX instanceindexBuffer
- Index bufferdataLength
- Fixed data payload lengthuniverseNumber
- Universe number
-
ArtNetDatagram
public ArtNetDatagram(LX lx, int[] indexBuffer, LXBufferOutput.ByteOrder byteOrder, int dataLength, int universeNumber) Creates an ArtNetDatagram with fixed data length for given index buffer, universe, and byte order- Parameters:
lx
- LX instanceindexBuffer
- Index bufferbyteOrder
- Byte orderdataLength
- Fixed data payload lengthuniverseNumber
- Universe number
-
ArtNetDatagram
Creates an ArtNetDatagram with fixed data length for given index buffer, universe, and byte order- Parameters:
lx
- LX instanceindexBuffer
- Index bufferuniverseNumber
- Universe number
-
ArtNetDatagram
Creates an ArtNetDatagram with fixed data length for given index buffer, universe, and byte order- Parameters:
lx
- LX instanceindexBuffer
- Index bufferdataLength
- Fixed data payload lengthuniverseNumber
- Universe number
-
-
Method Details
-
setUniverseNumber
-
getUniverseNumber
public int getUniverseNumber() -
getDataLength
public int getDataLength() -
setSequenceEnabled
Set whether to increment and send sequence numbers- Parameters:
sequenceEnabled
- true if sequence should be incremented and transmitted- Returns:
- this
-
getDataBufferOffset
protected int getDataBufferOffset()Description copied from class:LXBufferOutput
Offset into raw byte buffer where color data is written- Specified by:
getDataBufferOffset
in classLXBufferOutput
- Returns:
- Offset into raw byte buffer for color data
-
updateSequenceNumber
protected void updateSequenceNumber()Description copied from class:LXDatagram
Subclasses may override to update a sequence number in the packet when appropriate as part of the protocol.- Overrides:
updateSequenceNumber
in classLXDatagram
-