save peripherals in project file

This commit is contained in:
2024-12-20 17:18:57 +01:00
parent 17b5d39fc4
commit 9964ccef7e
19 changed files with 316 additions and 228 deletions

View File

@@ -15,15 +15,16 @@ type Peripheral interface {
// PeripheralInfo represents a peripheral information
type PeripheralInfo struct {
Name string // Name of the peripheral
SerialNumber string // S/N of the peripheral
ProtocolName string // Protocol name of the peripheral
UniversesNumber int // Number of DMX universes handled by the peripheral
Name string `yaml:"name"` // Name of the peripheral
SerialNumber string `yaml:"sn"` // S/N of the peripheral
ProtocolName string `yaml:"protocol"` // Protocol name of the peripheral
Settings []interface{} `yaml:"settings"` // Number of DMX universes handled by the peripheral
}
// PeripheralFinder represents how compatible peripheral finders are implemented
type PeripheralFinder interface {
Initialize() error // Initializes the protocol
GetName() string // Get the name of the finder
Scan(context.Context) error // Scan for peripherals
Initialize() error // Initializes the protocol
GetName() string // Get the name of the finder
GetPeripheral(string) (Peripheral, bool) // Get the peripheral
Scan(context.Context) error // Scan for peripherals
}