From 5d648df542afa50c068600e394dda86a91c80b8c Mon Sep 17 00:00:00 2001 From: aleigh Date: Tue, 26 Apr 2022 15:16:22 -0700 Subject: [PATCH] leigh-modcon-controller: Docs --- leigh-modcon-controller/src/mecha.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/leigh-modcon-controller/src/mecha.c b/leigh-modcon-controller/src/mecha.c index 71a928915..55545f863 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; -- GitLab