Files
led-controller/desktop/port/include/mdns.h
T
jimmyandClaude Opus 5.5 581b751904 feat: browser simulator served by the controller, desktop build, browser bridge
- led-simulator: the rig runs the C++ led-driver as WebAssembly (sim-driver/),
  one single-threaded worker per bar, no cross-origin isolation needed. Rooms
  (one JSON per room) with an on-page editor, and a pattern gallery. The
  Python server, Pyodide boot and ring buffer are removed.
- sim-controller sim_rig.c: serves /sim/ from an embedded pack, the page's
  WebSocket and the rooms/flash API. The desktop build embeds it too.
- bridge.c: a "browser" bridge kind that carries ESP-NOW frames to the page;
  devices announced through it are marked sim.
- UI: Simulator in the Menu, split view with resize and pop-out, swipe
  between controller and rig on phones; SIM/REAL badges in Devices.
- Fades: preset pushes and Wi-Fi driver bodies always carry fade and
  beat_time, so "off" no longer inherits an earlier fade.
- Also the sequences-v2 work in progress: desktop port, bridge firmware,
  serial bridge, Wi-Fi drivers, sequence timeline, audio and API changes.
- led-driver: ESP-NOW link, beat sync, control messages, sim hooks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 19:32:46 +13:00

35 lines
1.1 KiB
C

/* Desktop stand-in for ESP-IDF's mdns component: the query API the controller uses (wifi_drv.c).
* The browser is in port/src/mdns_host.c. */
#pragma once
#include <stddef.h>
#include <stdint.h>
#include "esp_err.h"
#include "esp_netif_ip_addr.h"
typedef struct {
char *key;
char *value;
} mdns_txt_item_t;
typedef struct mdns_ip_addr_s {
esp_ip_addr_t addr;
struct mdns_ip_addr_s *next;
} mdns_ip_addr_t;
typedef struct mdns_result_s {
struct mdns_result_s *next;
char *instance_name;
char *hostname; /* without the .local suffix */
mdns_txt_item_t *txt;
size_t txt_count;
mdns_ip_addr_t *addr;
} mdns_result_t;
/* Browse for service._proto.local (for example "_http", "_tcp") for timeout_ms. Results are IN_ADDR answers
* with their TXT items; free them with mdns_query_results_free. ESP_ERR_NOT_FOUND when nothing answered. */
esp_err_t mdns_query_ptr(const char *service, const char *proto, uint32_t timeout_ms, size_t max_results,
mdns_result_t **results);
void mdns_query_results_free(mdns_result_t *results);