Skip to content

Source: E131Packet.h

e131_packet

The one place the streaming-ACN layout lives, shared by the sender and the receiver.

A unit test round-trips build against parse, and the shape follows ArtNet's: constants plus two free functions.

Functions

Return Name Description
size_t buildE131Packet inline Build a data packet; priority and sync address stay at their defaults until a consumer needs them.
bool parseE131Packet inline Parse and validate a data packet, zero-copy; priority, sequence and sync are ignored, last write winning.

buildE131Packet

inline

inline size_t buildE131Packet(uint8_t * outBuf, uint16_t universe, uint8_t sequence, const uint8_t cid, const uint8_t * data, uint16_t dataLen)

Build a data packet; priority and sync address stay at their defaults until a consumer needs them.


parseE131Packet

inline

inline bool parseE131Packet(const uint8_t * pkt, size_t len, uint16_t & universeOut, const uint8_t *& dataOut, uint16_t & dataLenOut)

Parse and validate a data packet, zero-copy; priority, sequence and sync are ignored, last write winning.

Variables

Return Name Description
constexpr uint16_t E131_PORT constexpr
constexpr size_t E131_HEADER_SIZE constexpr
constexpr size_t E131_CID_LENGTH constexpr

E131_PORT

constexpr

constexpr uint16_t E131_PORT = 5568

E131_HEADER_SIZE

constexpr

constexpr size_t E131_HEADER_SIZE = 126

E131_CID_LENGTH

constexpr

constexpr size_t E131_CID_LENGTH = 16

More info

Three nested layers

A 126-byte header precedes the channel data, and every multi-byte field is big-endian. The root layer carries the packet identifier and the sender's stable component id. The framing layer carries the source name, the priority, the sequence and the universe. The DMP layer carries the property count and the start code, and the channel data follows it.