Package heronarts.lx.output
Class KinetDatagram
java.lang.Object
heronarts.lx.LXComponent
heronarts.lx.output.LXOutput
heronarts.lx.output.LXBufferOutput
heronarts.lx.output.LXDatagram
heronarts.lx.output.KinetDatagram
- All Implemented Interfaces:
LXPath
,LXSerializable
,LXOutput.InetOutput
,LXParameterListener
A datagram implementing the Kinet protocol, used by Color Kinetics devices.
These datagrams have a header followed by 512 bytes of color data. A port
number on the output device is specified, distinct from the UDP port. For
instance, an sPDS-480 has 16 outputs.
-
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
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
ConstructorDescriptionKinetDatagram
(LX lx, int[] indexBuffer, int kinetPort) Constructs a datagram that sends on the given kinet supply output portKinetDatagram
(LX lx, int[] indexBuffer, LXBufferOutput.ByteOrder byteOrder, int kinetPort) Constructs a datagram that sends on the given kinet supply output portKinetDatagram
(LX lx, int[] indexBuffer, LXBufferOutput.ByteOrder byteOrder, int kinetPort, KinetDatagram.Version version) Constructs a datagram that sends on the given kinet supply output portKinetDatagram
(LX lx, LXModel model, int kinetPort) Constructs a datagram that sends on the given kinet supply output portKinetDatagram
(LX lx, LXModel model, int kinetPort, KinetDatagram.Version version) Constructs a datagram that sends on the given kinet supply output portKinetDatagram
(LX lx, IndexBuffer indexBuffer, int kinetPort) Constructs a datagram that sends on the given kinet supply output portKinetDatagram
(LX lx, IndexBuffer indexBuffer, int kinetPort, KinetDatagram.Version version) Constructs a datagram that sends on the given kinet supply output port -
Method Summary
Modifier and TypeMethodDescriptionprotected int
Offset into raw byte buffer where color data is writtensetKinetPort
(byte kinetPort) Methods inherited from class heronarts.lx.output.LXDatagram
dispose, getAddress, getDataBuffer, getErrorState, getPort, onSend, setAddress, setPort, setSocket, updateSequenceNumber, 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
-
MAX_DATA_LENGTH
public static final int MAX_DATA_LENGTH- See Also:
-
MAX_KINET_PORT
public static final int MAX_KINET_PORT- See Also:
-
KINET_PORT
public static final int KINET_PORT- See Also:
-
-
Constructor Details
-
KinetDatagram
Constructs a datagram that sends on the given kinet supply output port- Parameters:
lx
- LX instancemodel
- Model to output points forkinetPort
- Number of the output port on the kinet power supply
-
KinetDatagram
Constructs a datagram that sends on the given kinet supply output port- Parameters:
lx
- LX instancemodel
- Model that this datagram outputs points forkinetPort
- Number of the output port on the kinet power supplyversion
- Version of Kinet Protocol
-
KinetDatagram
Constructs a datagram that sends on the given kinet supply output port- Parameters:
lx
- LX instanceindexBuffer
- A list of the point indices that should be sent on this portkinetPort
- Number of the output port on the kinet power supply
-
KinetDatagram
Constructs a datagram that sends on the given kinet supply output port- Parameters:
lx
- LX instanceindexBuffer
- A list of the point indices that should be sent on this portbyteOrder
- Which byte ordering to use for the outputkinetPort
- Number of the output port on the kinet power supply
-
KinetDatagram
public KinetDatagram(LX lx, int[] indexBuffer, LXBufferOutput.ByteOrder byteOrder, int kinetPort, KinetDatagram.Version version) Constructs a datagram that sends on the given kinet supply output port- Parameters:
lx
- LX instanceindexBuffer
- Index buffer that this datagram outputs points forbyteOrder
- Which byte ordering to use for the outputkinetPort
- Number of the output port on the kinet power supplyversion
- Version of Kinet Protocol
-
KinetDatagram
Constructs a datagram that sends on the given kinet supply output port- Parameters:
lx
- LX instanceindexBuffer
- Index buffer that this datagram outputs points forkinetPort
- Number of the output port on the kinet power supply
-
KinetDatagram
Constructs a datagram that sends on the given kinet supply output port- Parameters:
lx
- LX instanceindexBuffer
- Index buffer that this datagram outputs points forkinetPort
- Number of the output port on the kinet power supplyversion
- Version of Kinet Protocol
-
-
Method Details
-
setKinetPort
-
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
-