artnet

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package artnet provides Art-Net protocol packet building and transmission.

Index

Constants

View Source
const (
	// OpCodeDMX is the Art-Net operation code for DMX data.
	OpCodeDMX uint16 = 0x5000
	// ProtocolVersion is the Art-Net protocol version.
	ProtocolVersion uint16 = 14
	// DMXDataLength is the number of DMX channels per universe.
	DMXDataLength uint16 = 512
	// PacketSize is the total size of an Art-Net DMX packet.
	PacketSize = 18 + DMXDataLength // Header (18) + Data (512)
	// DefaultPort is the standard Art-Net UDP port.
	DefaultPort = 6454
)

Variables

View Source
var ArtNetID = []byte{'A', 'r', 't', '-', 'N', 'e', 't', 0x00}

ArtNetID is the Art-Net packet identifier.

Functions

func BuildDMXPacket

func BuildDMXPacket(universe int, channels []byte, sequence byte) []byte

BuildDMXPacket creates an Art-Net DMX packet for the specified universe. Universe should be 1-based (1-4), as used in the application. Channels should be exactly 512 bytes. Sequence should increment for each packet (0-255, wraps around) to enable receivers to detect and handle out-of-order UDP packets.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL