london

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: Apache-2.0 Imports: 9 Imported by: 1

README

london

Documentation

Overview

Package london provides a struct for controlling BSS London DSPs. Supported Devices This is a list of devices that BYU currently uses in production, controlled with this driver.

BSS BLU-50 https://bssaudio.com/en/products/blu-50
BSS BLU-100 https://bssaudio.com/en/products/blu-100

This list is not comprehensive.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DSP

type DSP struct {
	// contains filtered or unexported fields
}

DSP represents a DSP being controlled.

func New

func New(addr string, opts ...Option) *DSP

New returns a new DSP with the given address.

func (*DSP) GetInfo

func (d *DSP) GetInfo(ctx context.Context) (interface{}, error)

GetInfo is not implemented.

func (*DSP) Mutes added in v0.1.1

func (d *DSP) Mutes(ctx context.Context, blocks []string) (map[string]bool, error)

Mutes returns a map of block to mute.

func (*DSP) SetMute

func (d *DSP) SetMute(ctx context.Context, block string, mute bool) error

SetMute sets the mute state on the given block.

func (*DSP) SetVolume

func (d *DSP) SetVolume(ctx context.Context, block string, volume int) error

SetVolume sets the volume on the given block. Volume must be in the range [0, 100].

func (*DSP) Volumes added in v0.1.1

func (d *DSP) Volumes(ctx context.Context, blocks []string) (map[string]int, error)

Volumes returns the volume [0, 100] of the given block.

type Logger

type Logger interface {
	Debugf(format string, a ...interface{})
	Infof(format string, a ...interface{})
	Warnf(format string, a ...interface{})
	Errorf(format string, a ...interface{})
}

Logger is a logger usable by DSP.

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option configures how we create the DSP.

func WithDelay

func WithDelay(t time.Duration) Option

WithDelay changes the delay between sending commands to the DSP. The default value is 250 milliseconds. See more details about delay in https://github.com/byuoitav/connpool.

func WithLogger

func WithLogger(l Logger) Option

WithLogger adds a logger to DSP. DSP will log appropriate information about the underlying connection and the commands being sent. The default value is nil, meaning that no logs are written.

func WithTTL

func WithTTL(t time.Duration) Option

WithTTL changes the TTL for the underlying TCP connection to the DSP. The default value is 30 seconds. See more details about TTL in https://github.com/byuoitav/connpool.

Jump to

Keyboard shortcuts

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