add resubscribe (in progress)

fix crash when no bus found in map
This commit is contained in:
Adrian Zürcher
2025-05-28 22:00:04 +02:00
parent dc64d08e9d
commit b5d9d96c52
8 changed files with 72 additions and 17 deletions

View File

@@ -11,6 +11,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/tatsushid/go-fastping"
json_data "github.com/tecamino/tecamino-json_data"
json_dataModels "github.com/tecamino/tecamino-json_data/models"
"github.com/tecamino/tecamino-logger/logging"
)
@@ -21,12 +22,13 @@ const (
// Art-Net Interface
type Bus struct {
Name string `yaml:"name" json:"name"`
Ip string `yaml:"ip" json:"ip"`
Port *int `yaml:"port" json:"port,omitempty"`
Data *DMX `yaml:"-" json:"-"`
Watchdog context.CancelFunc `yaml:"-" json:"-"`
Reachable bool `yaml:"-" json:"-"`
Name string `yaml:"name" json:"name"`
Ip string `yaml:"ip" json:"ip"`
Port *int `yaml:"port" json:"port,omitempty"`
Data *DMX `yaml:"-" json:"-"`
Resubscribe *[]json_dataModels.Subscription `yaml:"-" json:"resubscribe"`
Watchdog context.CancelFunc `yaml:"-" json:"-"`
Reachable bool `yaml:"-" json:"-"`
}
// adds new Art-Net interface to driver port 0 = 6454 (default art-net)