Skip to main content

Module udp_client

Module udp_client 

Source
Expand description

Module implementing high-speed UDP reception for DMX universe streams.

Β§UDP Client / Listener Module

This module handles high-speed, un-acknowledged UDP network reception. It specifically listens for incoming Art-Net DMX protocol packets (OpOutput / OpDmx) on the default port (6454), extracts DMX channel values for target universes, and dispatches universe data frames to the UI for live rendering.

ConstantsΒ§

ARTNET_HEADER πŸ”’
Art-Net protocol magic header string bytes (β€œArt-Net\0”).
ARTNET_PORT πŸ”’
Default UDP port defined by the Art-Net protocol specification.
MAX_CHANNEL
Maximum number of DMX channels per universe according to DMX512 standard.

FunctionsΒ§

handle_generic_packet πŸ”’
Fallback handler for non-Art-Net UDP datagrams received on the socket.
is_artnet_packet πŸ”’
Helper function to check if a received byte slice begins with the standard Art-Net header.
start_udp_listener
Binds a UDP socket and spawns a background thread to listen for incoming Art-Net DMX packets.