Behringer

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2022 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCacheTimeout = time.Minute * 5
	DefaultPort         = "10023"
)
View Source
const CmdId = "/-prefs/??????"
View Source
const CmdInfo = "/info"
View Source
const CmdNode = "/node"
View Source
const CmdShowDump = "/showdump"
View Source
const CmdStatus = "/status"
View Source
const CmdXinfo = "/xinfo"

Variables

This section is empty.

Functions

func AnyToStringArray

func AnyToStringArray(array ...any) []string

func FixAny

func FixAny(args ...any) []any

func StringArrayToAny

func StringArrayToAny(array ...string) []any

Types

type ArgsX32

type ArgsX32 struct {
	Host         string
	Port         string
	ConfigDir    string
	CacheDir     string
	CacheTimeout time.Duration
}

type Aux

type Aux struct {
	Topic string `json:"-"`
	Data  ChData `json:"data"`
}

func (*Aux) Json

func (a *Aux) Json() string

func (Aux) String

func (a Aux) String() string

type Auxes

type Auxes []Aux

type Bus

type Bus struct {
	Topic string `json:"-"`
	Data  ChData `json:"data"`
}

func (*Bus) Json

func (a *Bus) Json() string

func (Bus) String

func (a Bus) String() string

type Buses

type Buses []Bus

type ChData

type ChData struct {
	Name     string  `json:"name"`
	Colour   string  `json:"colour"`
	Icon     string  `json:"icon"`
	Mute     bool    `json:"mute"`
	Solo     bool    `json:"solo"`
	Source   string  `json:"source"`
	Gain     float64 `json:"gain"`
	Trim     float64 `json:"trim"`
	Phantom  bool    `json:"phantom"`
	Phantom2 bool    `json:"phantom2"`
	Selected bool    `json:"selected"`
	Fader    float64 `json:"fader"`
}

func (*ChData) Json

func (c *ChData) Json() string

func (ChData) String

func (c ChData) String() string

type Channel

type Channel struct {
	Topic string `json:"-"`
	Data  ChData `json:"data"`
}

func (*Channel) GetInfo

func (c *Channel) GetInfo(i int) map[string]string

func (*Channel) Json

func (c *Channel) Json() string

func (Channel) String

func (c Channel) String() string

type Channels

type Channels []Channel // We're keeping a 1:1 mapping of array -> channel numbers.

type Info

type Info struct {
	HardwareVersion string
	Name            string
	Model           string
	FirmwareVersion string
}

func CreateInfo

func CreateInfo(args []any) Info

func (*Info) String

func (i *Info) String() string

type Matrices

type Matrices []Matrix

type Matrix

type Matrix struct {
	Topic string `json:"-"`
	Data  ChData `json:"data"`
}

func (*Matrix) Json

func (m *Matrix) Json() string

func (Matrix) String

func (m Matrix) String() string

type Message

type Message struct {
	Name       string    `json:"name"`
	SeenBefore bool      `json:"seen_before"`
	LastSeen   time.Time `json:"last_seen"`
	Counter    int       `json:"counter"`
	Type       string    `json:"type"`
	Error      error     `json:"-"`

	*gosc.Message `json:"Message"`

	UnitValueMap api.UnitValueMap
	X32Value     any
	Point        *api.Point
}

func (*Message) CacheStale

func (m *Message) CacheStale() bool

func (*Message) DetermineType

func (m *Message) DetermineType() string

func (*Message) GetIndexOptions

func (m *Message) GetIndexOptions() []string

func (*Message) GetType

func (m *Message) GetType() string

func (*Message) GetValueBool

func (m *Message) GetValueBool() bool

func (*Message) GetValueFloat

func (m *Message) GetValueFloat() float64

func (*Message) GetValueInt

func (m *Message) GetValueInt() int64

func (*Message) GetValueString

func (m *Message) GetValueString() string

func (*Message) IsBinary

func (m *Message) IsBinary() bool

func (*Message) IsBinaryMap

func (m *Message) IsBinaryMap() bool

func (*Message) IsIndex

func (m *Message) IsIndex() bool

func (*Message) IsMomentary

func (m *Message) IsMomentary() bool

func (*Message) IsSwitch

func (m *Message) IsSwitch() bool

func (*Message) Process

func (m *Message) Process() error

type MessageHandlerFunc

type MessageHandlerFunc func(msg *Message)

type MessageMap

type MessageMap map[string]*Message

func (*MessageMap) Exists

func (m *MessageMap) Exists(address string) bool

func (*MessageMap) Get

func (m *MessageMap) Get(address string) *Message

func (*MessageMap) SeenBefore

func (m *MessageMap) SeenBefore(address string) bool

type Messages

type Messages []*Message

type Scene

type Scene struct {
	Topic string `json:"-"`

	Data struct {
		HasData bool   `json:"has_data"`
		Name    string `json:"name"`
		Notes   string `json:"notes"`
		Safes   string `json:"safes"`
	}
}

func (*Scene) Json

func (s *Scene) Json() string

func (Scene) String

func (s Scene) String() string

type Scenes

type Scenes []Scene

type X32

type X32 struct {
	Address   string
	Prefix    string
	Client    *gosc.Client
	Error     error
	NeedLogin bool
	Debug     bool

	OutputType output.OutputType

	Info Info

	Points api.PointsMap
	// contains filtered or unexported fields
}

func NewX32

func NewX32(args ArgsX32) *X32

func (*X32) AuxCount

func (x *X32) AuxCount() []int

func (*X32) BusCount

func (x *X32) BusCount() []int

func (*X32) CacheRead

func (x *X32) CacheRead() error

CacheRead Retrieves cache data from a local file.

func (*X32) CacheRemove

func (x *X32) CacheRemove() error

CacheRemove Removes a cache file.

func (*X32) CacheWrite

func (x *X32) CacheWrite() error

CacheWrite Saves cache data to a file path.

func (*X32) Call

func (x *X32) Call(address string, args ...any) *Message

func (*X32) ChannelCount

func (x *X32) ChannelCount() []int

func (*X32) CheckCache

func (x *X32) CheckCache() bool

CheckCache Retrieves cache data from a local file.

func (*X32) Connect

func (x *X32) Connect() error

func (*X32) Emit

func (x *X32) Emit(address string, args ...any) error

func (*X32) EmitId

func (x *X32) EmitId() error

func (*X32) EmitInfo

func (x *X32) EmitInfo() error

func (*X32) EmitNode

func (x *X32) EmitNode() error

func (*X32) EmitShowDump

func (x *X32) EmitShowDump() error

func (*X32) EmitStatus

func (x *X32) EmitStatus() error

func (*X32) EmitXinfo

func (x *X32) EmitXinfo() error

func (*X32) Get

func (x *X32) Get(address string, wait bool) *Message

func (*X32) GetAllInfo

func (x *X32) GetAllInfo() error

func (*X32) GetAux

func (x *X32) GetAux(i int) MessageMap

func (*X32) GetBus

func (x *X32) GetBus(i int) MessageMap

func (*X32) GetCacheDir

func (x *X32) GetCacheDir() string

func (*X32) GetCacheTimeout

func (x *X32) GetCacheTimeout() time.Duration

func (*X32) GetChannel

func (x *X32) GetChannel(i int) MessageMap

func (*X32) GetDeskName

func (x *X32) GetDeskName() *Message

func (*X32) GetId

func (x *X32) GetId() *Message

func (*X32) GetInfo

func (x *X32) GetInfo() *Message

func (*X32) GetMatrix

func (x *X32) GetMatrix(i int) MessageMap

func (*X32) GetMessage

func (x *X32) GetMessage(address string) *Message

func (*X32) GetNode

func (x *X32) GetNode() *Message

func (*X32) GetScene

func (x *X32) GetScene(i int) Scene

func (*X32) GetScenes

func (x *X32) GetScenes() Scenes

func (*X32) GetShowDump

func (x *X32) GetShowDump() *Message

func (*X32) GetStatus

func (x *X32) GetStatus() *Message

func (*X32) GetTopic

func (x *X32) GetTopic(msg *gosc.Message) string

func (*X32) GetXinfo

func (x *X32) GetXinfo() *Message

func (*X32) ListEndpoints

func (x *X32) ListEndpoints() error

func (*X32) MatrixCount

func (x *X32) MatrixCount() []int

func (*X32) MessageExists

func (x *X32) MessageExists(address string) bool

func (*X32) MessageSeenBefore

func (x *X32) MessageSeenBefore(address string) bool

func (*X32) Output

func (x *X32) Output(endpoint api.EndPoint, table *output.Table, graphFilter string) error

func (*X32) OutputTable

func (x *X32) OutputTable(table *output.Table) error

func (*X32) Process

func (x *X32) Process(msg *gosc.Message, toX32 bool) *Message

func (*X32) Set

func (x *X32) Set(address string, value any) error

func (*X32) SetCacheDir

func (x *X32) SetCacheDir(basedir string) error

func (*X32) SetCacheTimeout

func (x *X32) SetCacheTimeout(duration time.Duration)

func (*X32) SetConfigDir

func (x *X32) SetConfigDir(basedir string) error

func (*X32) SetMessageHandler

func (x *X32) SetMessageHandler(fn MessageHandlerFunc) error

func (*X32) StartMeters

func (x *X32) StartMeters(meters ...string) error

func (*X32) StopMeters

func (x *X32) StopMeters(meters ...string) error

func (*X32) UpdateCache

func (x *X32) UpdateCache(msg *Message) *Message

func (*X32) XremoteSender

func (x *X32) XremoteSender()

Directories

Path Synopsis
api
apiReflect
Package apiReflect - Snaffooed from https://github.com/fatih/structs
Package apiReflect - Snaffooed from https://github.com/fatih/structs
nullEndPoint
Package nullEndPoint - This file is auto-generated from the update_all.sh script.
Package nullEndPoint - This file is auto-generated from the update_all.sh script.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL