diff --git a/leigh-modcon-controller/src/mecha.c b/leigh-modcon-controller/src/mecha.c index 71a928915579bff6488c873cf30fc46ea1e14a76..55545f86324037697f099b6db8df85e88ce1b15c 100644 --- a/leigh-modcon-controller/src/mecha.c +++ b/leigh-modcon-controller/src/mecha.c @@ -16,6 +16,7 @@ static int netF_create_multicast_ipv4_socket(void); #define UDP_PORT 5568 +// sACN universe #1 #define MULTICAST_IPV4_ADDR "239.255.0.1" #define MULTICAST_TTL 255 @@ -125,10 +126,13 @@ err: } /** - * @brief sACN listen task. + * @brief sACN listener. + * + * This function will open an IPv4 multicast socket and when UDP packets are received, + * synchronously call a provided packet handler to process the packet. */ -void netFmc_listener(void (*pkt_handler)(const char *buf, size_t buf_len)) -{ +// TODO: Support setting IP/port via argumentation +void netFmc_listener(void (*pkt_handler)(const char *buf, size_t buf_len)) { while (1) { int sock;