Haukcode.sACN
3.0.119
dotnet add package Haukcode.sACN --version 3.0.119
NuGet\Install-Package Haukcode.sACN -Version 3.0.119
<PackageReference Include="Haukcode.sACN" Version="3.0.119" />
<PackageVersion Include="Haukcode.sACN" Version="3.0.119" />
<PackageReference Include="Haukcode.sACN" />
paket add Haukcode.sACN --version 3.0.119
#r "nuget: Haukcode.sACN, 3.0.119"
#:package Haukcode.sACN@3.0.119
#addin nuget:?package=Haukcode.sACN&version=3.0.119
#tool nuget:?package=Haukcode.sACN&version=3.0.119
Haukcode.sACN
A high-performance, cross-platform sACN (E1.31) library for .NET - enabling DMX512 lighting control over IP networks.
What is sACN?
sACN (Streaming ACN / ANSI E1.31) is a network protocol for transmitting DMX512 lighting control data over IP networks using UDP. It's the industry standard for modern entertainment and architectural lighting systems.
Features
- ✅ Send and receive DMX data via sACN/E1.31
- ✅ Multicast and unicast support
- ✅ Sync packet support for frame-accurate multi-universe synchronization
- ✅ Universe discovery, stream termination and priority
- ✅ High-performance with buffer pooling and async I/O
- ✅ Cross-platform (.NET 8.0, 9.0, 10.0)
- ✅ Reactive extensions support
Upgrading from 2.x
3.0 has breaking changes: received packets are reused once your callback returns (queue
p.Clone()), terminated streams are delivered, arguments are validated, and universe discovery
now interoperates. See the 3.0 release notes.
Quick Start
Receiving DMX Data
using Haukcode.sACN;
using Haukcode.sACN.Model;
using System.Net;
using System.Threading.Channels;
var channel = Channel.CreateUnbounded<ReceiveDataPacket>();
var client = new SACNClient(
senderId: Guid.NewGuid(),
senderName: "MyReceiver",
localAddress: IPAddress.Any,
// Received packets are reused once the writer returns, so queue a copy
channelWriter: async p => await channel.Writer.WriteAsync(p.Clone()),
channelWriterComplete: () => channel.Writer.Complete());
// Join Universe 1
client.JoinDMXUniverse(1);
// Process packets
await foreach (var packet in channel.Reader.ReadAllAsync())
{
// Sync and discovery packets arrive here too
if (packet.Packet.FramingLayer is not DataFramingLayer data)
continue;
if (data.Options.StreamTerminated)
{
Console.WriteLine($"Universe {data.UniverseId}: {data.SourceName} stopped");
continue;
}
Console.WriteLine($"Universe {data.UniverseId}: {data.DMPLayer.Data.Length} channels");
}
Sending DMX Data
using Haukcode.sACN;
using System.Net;
var client = new SACNClient(
senderId: Guid.NewGuid(),
senderName: "MyController",
localAddress: Haukcode.Network.Utils.GetFirstBindAddress().IPAddress);
byte[] dmxData = new byte[512];
dmxData[0] = 255; // Channel 1 at full intensity
// Send via multicast
await client.SendDmxData(null, universeId: 1, dmxData);
// Send via unicast to specific device
await client.SendDmxData(IPAddress.Parse("192.168.1.100"), universeId: 1, dmxData);
Key Methods
Sending:
SendDmxData()- Send DMX channel dataSendSync()- Send synchronization packetSendUniverseDiscovery()- Announce the universes you send (every 10 s)
Receiving:
JoinDMXUniverse()- Subscribe to a universeDropDMXUniverse()- Unsubscribe from a universeJoinDMXUniverseForTrigger()- Join a universe as a trigger (for sync addresses)JoinDiscoveryMulticastGroup()- Listen for universe discovery
Sequence checking, the 2.5 s data loss timeout, source merging and keep-alive are left to the application; the GitHub README lists what E1.31 expects.
Documentation
For comprehensive documentation, advanced features, API reference, and troubleshooting:
📖 Full Documentation on GitHub
Resources
License
MIT License - see LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Haukcode.HighPerfComm (>= 1.0.53)
- Haukcode.Network (>= 1.0.29)
- HdrHistogram (>= 2.5.0)
- System.Reactive (>= 7.0.0)
-
net8.0
- Haukcode.HighPerfComm (>= 1.0.53)
- Haukcode.Network (>= 1.0.29)
- HdrHistogram (>= 2.5.0)
- System.Reactive (>= 7.0.0)
-
net9.0
- Haukcode.HighPerfComm (>= 1.0.53)
- Haukcode.Network (>= 1.0.29)
- HdrHistogram (>= 2.5.0)
- System.Reactive (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.119 | 57 | 10/21/2026 |
| 3.0.118 | 45 | 10/21/2026 |
| 3.0.117 | 56 | 10/20/2026 |
| 3.0.116 | 49 | 10/20/2026 |
| 3.0.115 | 46 | 10/20/2026 |
| 3.0.114 | 42 | 10/20/2026 |
| 3.0.113 | 48 | 10/20/2026 |
| 2.0.112 | 420 | 9/10/2026 |
| 2.0.111 | 120 | 9/10/2026 |
| 2.0.110 | 122 | 9/10/2026 |
| 2.0.109 | 115 | 9/10/2026 |
| 2.0.108 | 148 | 9/5/2026 |
| 2.0.104 | 193 | 7/26/2026 |
| 2.0.103 | 170 | 7/17/2026 |
| 2.0.102 | 132 | 7/16/2026 |
| 2.0.101 | 143 | 7/15/2026 |
| 2.0.100 | 142 | 7/15/2026 |
| 2.0.99 | 137 | 7/15/2026 |
| 2.0.98 | 133 | 7/15/2026 |
| 2.0.97 | 148 | 7/15/2026 |
# Changelog
The package version is major.minor from version.json plus the CI run number, so
every push to main publishes a new patch version. Breaking changes bump the
major version.
## 3.0 (2026-10-20) - breaking
Standards compliance pass against ANSI E1.31-2018. See "Upgrading from 2.x" in
the README.
- Breaking: fields that E1.31 defines as uint16/uint32 are now ushort/uint
(RootLayer lengths and vectors, FramingLayer vectors, DMPLayer address,
increment and length). A property value count of 0x8000 or more is now
rejected instead of read as empty data.
- Fixed the Universe Discovery packet layout and multicast address.
- Packets that E1.31 says to discard are discarded, and PDU lengths are
validated.
- Sending validates the DMX length, source name, universe and priority ranges.
- Stream_Terminated packets are delivered, three are sent on termination, and
the option bits are exposed.
- Sync packets carry their SubscribeMode.
- Thread safety: SendDmxData can be called from several threads, the endpoint
caches and subscriptions are thread-safe, a failed constructor no longer
leaks, and joins are validated.
- ReceiveDataPacket.Clone, for queuing a received packet (the receive path
reuses the instance).
- The package embeds its PDB with SourceLink, so the debugger can step into
the library source (3.0.118 and later).
## 2.0 (2021-02-02)
Later 2.0.x releases:
- .NET 9 and .NET 10 support.
- Rewritten on the Haukcode.HighPerfComm library, with separate send and
receive sockets.
- Multicast TTL 20.
- Triggers, and the subscribe mode on received packets.
- Universe Discovery packet, with an option to join and drop the discovery
multicast group.
- A send-immediately method.
- Kernel receive timestamps on Linux, and IGMP memberships held on a separate
socket on Linux.
- Performance: sending sharded by universe, no per-packet allocations on the
send and receive paths, lock-free sequence numbers, sync packets routed
through the ordering barrier.
- 2.0.16 - Fix incorrect byte order of Acn Source Id
- 2.0.13 - Fix issue with ReceiveMessageFrom and reusing the socket events
- 2.0.0 - Allow for sync packets, breaking change
## 1.x
- 1.0.8 - Allow unknown operational status on network adapter
- 1.0.7 - Make it Linux-compatible
- 1.0.6 - Removed unused dependency
- 1.0.5 - Added method to list network adapters
- 1.0.4 - Changed API for GetAddressesFromInterfaceType
- 1.0.3 - Changed DMXData property
- 1.0.2 - Added method for multi-universe listener
- 1.0.1 - Added methods to find local IPAddress
- 1.0.0 - Refactored