Remove ArtNet RDM/TOD discovery support
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -92,7 +92,8 @@
|
|||||||
"Bash(tree:*)",
|
"Bash(tree:*)",
|
||||||
"Bash(go get:*)",
|
"Bash(go get:*)",
|
||||||
"Bash(go test:*)",
|
"Bash(go test:*)",
|
||||||
"Bash(git stash:*)"
|
"Bash(git stash:*)",
|
||||||
|
"Bash(git revert:*)"
|
||||||
],
|
],
|
||||||
"ask": [
|
"ask": [
|
||||||
"Bash(rm *)"
|
"Bash(rm *)"
|
||||||
|
|||||||
33
artnet.go
33
artnet.go
@@ -28,9 +28,6 @@ func (h *artnetHandler) HandlePollReply(src *net.UDPAddr, pkt *artnet.PollReplyP
|
|||||||
h.discovery.HandlePollReply(src, pkt)
|
h.discovery.HandlePollReply(src, pkt)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *artnetHandler) HandleTodData(src *net.UDPAddr, pkt *artnet.TodDataPacket) {
|
|
||||||
h.discovery.HandleTodData(src, pkt)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (t *Tendrils) startArtNet(ctx context.Context, iface net.Interface) {
|
func (t *Tendrils) startArtNet(ctx context.Context, iface net.Interface) {
|
||||||
srcIP, broadcast := getInterfaceIPv4(iface)
|
srcIP, broadcast := getInterfaceIPv4(iface)
|
||||||
@@ -83,19 +80,8 @@ func (t *Tendrils) handleArtNetNode(node *artnet.Node) {
|
|||||||
outputs = append(outputs, int(u))
|
outputs = append(outputs, int(u))
|
||||||
}
|
}
|
||||||
|
|
||||||
rdmUIDs := map[int][]string{}
|
|
||||||
for u, uids := range node.RDMUIDs {
|
|
||||||
var uidStrs []string
|
|
||||||
for _, uid := range uids {
|
|
||||||
uidStrs = append(uidStrs, uid.String())
|
|
||||||
}
|
|
||||||
if len(uidStrs) > 0 {
|
|
||||||
rdmUIDs[int(u)] = uidStrs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if t.DebugArtNet {
|
if t.DebugArtNet {
|
||||||
log.Printf("[artnet] %s %s short=%q long=%q in=%v out=%v rdm=%v", ip, mac, shortName, longName, inputs, outputs, rdmUIDs)
|
log.Printf("[artnet] %s %s short=%q long=%q in=%v out=%v", ip, mac, shortName, longName, inputs, outputs)
|
||||||
}
|
}
|
||||||
|
|
||||||
name := longName
|
name := longName
|
||||||
@@ -115,7 +101,6 @@ func (t *Tendrils) handleArtNetNode(node *artnet.Node) {
|
|||||||
}
|
}
|
||||||
if n != nil {
|
if n != nil {
|
||||||
t.nodes.UpdateArtNet(n, inputs, outputs)
|
t.nodes.UpdateArtNet(n, inputs, outputs)
|
||||||
t.nodes.UpdateArtNetRDM(n, rdmUIDs)
|
|
||||||
}
|
}
|
||||||
t.NotifyUpdate()
|
t.NotifyUpdate()
|
||||||
}
|
}
|
||||||
@@ -139,22 +124,6 @@ func (n *Nodes) UpdateArtNet(node *Node, inputs, outputs []int) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *Nodes) UpdateArtNetRDM(node *Node, rdmUIDs map[int][]string) {
|
|
||||||
n.mu.Lock()
|
|
||||||
defer n.mu.Unlock()
|
|
||||||
|
|
||||||
if len(rdmUIDs) == 0 {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if node.ArtNetRDMUIDs == nil {
|
|
||||||
node.ArtNetRDMUIDs = map[int][]string{}
|
|
||||||
}
|
|
||||||
|
|
||||||
for u, uids := range rdmUIDs {
|
|
||||||
node.ArtNetRDMUIDs[u] = uids
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (n *Nodes) expireArtNet() {
|
func (n *Nodes) expireArtNet() {
|
||||||
for _, node := range n.nodes {
|
for _, node := range n.nodes {
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -5,7 +5,7 @@ go 1.25.6
|
|||||||
require (
|
require (
|
||||||
github.com/fvbommel/sortorder v1.1.0
|
github.com/fvbommel/sortorder v1.1.0
|
||||||
github.com/google/gopacket v1.1.19
|
github.com/google/gopacket v1.1.19
|
||||||
github.com/gopatchy/artnet v0.0.0-20260131154723-a1431d527450
|
github.com/gopatchy/artnet v0.0.0-20260131185544-af1a9bceb150
|
||||||
github.com/gopatchy/multicast v0.0.0-20260130233915-4278628690a3
|
github.com/gopatchy/multicast v0.0.0-20260130233915-4278628690a3
|
||||||
github.com/gopatchy/sacn v0.0.0-20260130234631-9c2787a20064
|
github.com/gopatchy/sacn v0.0.0-20260130234631-9c2787a20064
|
||||||
github.com/gosnmp/gosnmp v1.43.2
|
github.com/gosnmp/gosnmp v1.43.2
|
||||||
|
|||||||
2
go.sum
2
go.sum
@@ -11,6 +11,8 @@ github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF
|
|||||||
github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo=
|
github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo=
|
||||||
github.com/gopatchy/artnet v0.0.0-20260131154723-a1431d527450 h1:td8AQuJYeRey+trV9fLWShoriSrWkYFWYC5mruYWyCE=
|
github.com/gopatchy/artnet v0.0.0-20260131154723-a1431d527450 h1:td8AQuJYeRey+trV9fLWShoriSrWkYFWYC5mruYWyCE=
|
||||||
github.com/gopatchy/artnet v0.0.0-20260131154723-a1431d527450/go.mod h1:V/D32mh1xfK/llCKbrqI2jxw4xL4hf6Ge2yLiIrp9/4=
|
github.com/gopatchy/artnet v0.0.0-20260131154723-a1431d527450/go.mod h1:V/D32mh1xfK/llCKbrqI2jxw4xL4hf6Ge2yLiIrp9/4=
|
||||||
|
github.com/gopatchy/artnet v0.0.0-20260131185544-af1a9bceb150 h1:yVFjirYaAtMahxqjQsame5fVr0U/9tp4rdNSLNBd2nQ=
|
||||||
|
github.com/gopatchy/artnet v0.0.0-20260131185544-af1a9bceb150/go.mod h1:V/D32mh1xfK/llCKbrqI2jxw4xL4hf6Ge2yLiIrp9/4=
|
||||||
github.com/gopatchy/multicast v0.0.0-20260130233915-4278628690a3 h1:JVyjjl5wWP0NaC6b4QL7uvQ7I3G0a4bCDNFVtUoiYvU=
|
github.com/gopatchy/multicast v0.0.0-20260130233915-4278628690a3 h1:JVyjjl5wWP0NaC6b4QL7uvQ7I3G0a4bCDNFVtUoiYvU=
|
||||||
github.com/gopatchy/multicast v0.0.0-20260130233915-4278628690a3/go.mod h1:mSeh6GX+fL6SWZYqxYHTdnddvzDx4qsGSBnlGwY5ZsA=
|
github.com/gopatchy/multicast v0.0.0-20260130233915-4278628690a3/go.mod h1:mSeh6GX+fL6SWZYqxYHTdnddvzDx4qsGSBnlGwY5ZsA=
|
||||||
github.com/gopatchy/sacn v0.0.0-20260130234631-9c2787a20064 h1:gyNOXY+87MjFlk1IU8QQTPhqvBaRTha4+8HjXwm4ZN4=
|
github.com/gopatchy/sacn v0.0.0-20260130234631-9c2787a20064 h1:gyNOXY+87MjFlk1IU8QQTPhqvBaRTha4+8HjXwm4ZN4=
|
||||||
|
|||||||
1
types.go
1
types.go
@@ -455,7 +455,6 @@ type Node struct {
|
|||||||
MulticastGroups MulticastMembershipSet `json:"multicast_groups,omitempty"`
|
MulticastGroups MulticastMembershipSet `json:"multicast_groups,omitempty"`
|
||||||
ArtNetInputs ArtNetUniverseSet `json:"artnet_inputs,omitempty"`
|
ArtNetInputs ArtNetUniverseSet `json:"artnet_inputs,omitempty"`
|
||||||
ArtNetOutputs ArtNetUniverseSet `json:"artnet_outputs,omitempty"`
|
ArtNetOutputs ArtNetUniverseSet `json:"artnet_outputs,omitempty"`
|
||||||
ArtNetRDMUIDs map[int][]string `json:"artnet_rdm_uids,omitempty"`
|
|
||||||
SACNUnicastInputs SACNUniverseSet `json:"sacn_unicast_inputs,omitempty"`
|
SACNUnicastInputs SACNUniverseSet `json:"sacn_unicast_inputs,omitempty"`
|
||||||
SACNOutputs SACNUniverseSet `json:"sacn_outputs,omitempty"`
|
SACNOutputs SACNUniverseSet `json:"sacn_outputs,omitempty"`
|
||||||
ArtmapMappings []ArtmapMapping `json:"artmap_mappings,omitempty"`
|
ArtmapMappings []ArtmapMapping `json:"artmap_mappings,omitempty"`
|
||||||
|
|||||||
Reference in New Issue
Block a user