Class StreamingACNDatagram

All Implemented Interfaces:
LXPath, LXSerializable, LXOutput.InetOutput, LXParameterListener

public class StreamingACNDatagram extends LXDatagram
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
  • Field Details

  • Constructor Details

    • StreamingACNDatagram

      public StreamingACNDatagram(LX lx, LXModel model)
      Creates a StreamingACNDatagram for the given model
      Parameters:
      lx - LX instance
      model - Model of points
    • StreamingACNDatagram

      public StreamingACNDatagram(LX lx, int[] indexBuffer)
      Constructs a StreamingACNDatagram on default universe
      Parameters:
      lx - LX instance
      indexBuffer - Points to send on this universe
    • StreamingACNDatagram

      public StreamingACNDatagram(LX lx, LXModel model, int universeNumber)
      Creates a StreamingACNDatagram for the model on given universe
      Parameters:
      lx - LX instance
      model - Model of points
      universeNumber - Universe number
    • StreamingACNDatagram

      public StreamingACNDatagram(LX lx, int[] indexBuffer, int universeNumber)
      Constructs a datagram, sends the list of point indices on the given universe number.
      Parameters:
      lx - LX instance
      indexBuffer - List of point indices to encode in packet
      universeNumber - 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 instance
      indexBuffer - Index buffer
      universeNumber - Universe number
      byteOrder - Byte order
    • StreamingACNDatagram

      protected StreamingACNDatagram(LX lx, int dataSize, int universeNumber)
      Subclasses may use this constructor for datagrams with custom DMX data of a fixed length.
      Parameters:
      lx - LX instance
      dataSize - Data size
      universeNumber - Universe number
    • StreamingACNDatagram

      public StreamingACNDatagram(LX lx, int[] indexBuffer, int dataSize, int universeNumber)
      Creates a StreamingACNDatagram for a given index buffer with fixed data size and universe number
      Parameters:
      lx - LX instance
      indexBuffer - Index buffer
      dataSize - Fixed DMX data size
      universeNumber - 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 instance
      indexBuffer - Index buffer
      byteOrder - Byte order
      dataSize - Fixed DMX data size
      universeNumber - Universe number
    • StreamingACNDatagram

      public StreamingACNDatagram(LX lx, IndexBuffer indexBuffer, int universeNumber)
      Creates a StreamingACNDatagram for a given index buffer with fixed data size and universe number
      Parameters:
      lx - LX instance
      indexBuffer - Index buffer
      universeNumber - Universe number
    • StreamingACNDatagram

      public StreamingACNDatagram(LX lx, IndexBuffer indexBuffer, int dataSize, int universeNumber)
      Creates a StreamingACNDatagram for a given index buffer with fixed data size and universe number
      Parameters:
      lx - LX instance
      indexBuffer - Index buffer
      dataSize - Fixed DMX data size
      universeNumber - Universe number
  • Method Details

    • setPriority

      public StreamingACNDatagram setPriority(int priority)
      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

      public StreamingACNDatagram setUniverseNumber(int universeNumber)
      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: LXBufferOutput
      Offset into raw byte buffer where color data is written
      Specified by:
      getDataBufferOffset in class LXBufferOutput
      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 class LXDatagram