add yamaha speaker discovery via tcp:50000 and move pollNode to tendrils.go

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ian Gulliver
2026-01-23 22:21:35 -08:00
parent a374b34b18
commit 528f58dca1
4 changed files with 80 additions and 32 deletions

View File

@@ -26,6 +26,7 @@ type Tendrils struct {
DisableDante bool
DisableBMD bool
DisableShure bool
DisableYamaha bool
LogEvents bool
LogNodes bool
DebugARP bool
@@ -37,6 +38,7 @@ type Tendrils struct {
DebugDante bool
DebugBMD bool
DebugShure bool
DebugYamaha bool
}
func New() *Tendrils {
@@ -213,3 +215,41 @@ func (t *Tendrils) startInterface(ctx context.Context, iface net.Interface) {
go t.listenShure(ctx, iface)
}
}
func (t *Tendrils) pollNode(node *Node) {
t.nodes.mu.RLock()
var ips []net.IP
for _, iface := range node.Interfaces {
for _, ip := range iface.IPs {
if ip.To4() != nil {
ips = append(ips, ip)
}
}
}
nodeName := node.DisplayName()
t.nodes.mu.RUnlock()
if !t.DisableSNMP {
for _, ip := range ips {
t.querySNMPDevice(node, ip)
}
}
if !t.DisableBMD && nodeName == "" {
for _, ip := range ips {
t.probeBMDDevice(ip)
}
}
if !t.DisableYamaha && nodeName == "" {
for _, ip := range ips {
t.probeYamahaDevice(ip)
}
}
if !t.DisableDante {
for _, ip := range ips {
t.probeDanteDevice(ip)
}
}
}