qsc

package module
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: Apache-2.0 Imports: 12 Imported by: 1

README

qsc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRequest

type BaseRequest struct {
	JSONRPC string `json:"jsonrpc"`
	ID      int    `json:"id"`
	Method  string `json:"method"`
}

BaseRequest are the common parts of every qsc jsonrpc request

type DSP

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

func New added in v0.1.3

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

func (*DSP) Control added in v0.1.4

func (d *DSP) Control(ctx context.Context, name string) (float64, error)

func (*DSP) DbToVolumeLevel

func (d *DSP) DbToVolumeLevel(ctx context.Context, level float64) int

func (*DSP) GetGenericGetStatusRequest

func (d *DSP) GetGenericGetStatusRequest(ctx context.Context) QSCGetStatusRequest

func (*DSP) GetGenericSetStatusRequest

func (d *DSP) GetGenericSetStatusRequest(ctx context.Context) QSCSetStatusRequest

func (*DSP) GetGenericStatusGetRequest

func (d *DSP) GetGenericStatusGetRequest(ctx context.Context) QSCStatusGetRequest

GetGenericStatusGetRequest is used for retreiving EngineStatus and other information about the QSC

func (*DSP) GetStatus

func (d *DSP) GetStatus(ctx context.Context) (QSCStatusGetResponse, error)

GetStatus will be getting responses for us I hope...

func (*DSP) Healthy added in v0.1.2

func (d *DSP) Healthy(ctx context.Context) error

Healthy .

func (*DSP) Info added in v0.1.1

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

Info is all the juicy details about the QSC that everyone is DYING to know about

func (*DSP) Mutes added in v0.1.1

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

func (*DSP) SetControl added in v0.1.4

func (d *DSP) SetControl(ctx context.Context, name string, value float64) error

func (*DSP) SetMute

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

func (*DSP) SetVolume

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

func (*DSP) VolToDb

func (d *DSP) VolToDb(ctx context.Context, level int) float64

func (*DSP) Volumes added in v0.1.1

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

type Info

type Info struct {
	Hostname   string
	ModelName  string
	IPAddress  string
	State      string
	StatusCode string
	RawState   string
}

type Option added in v0.1.3

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

Option configures how we create the DSP.

func WithDelay added in v0.1.3

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 added in v0.1.3

func WithLogger(l *zap.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 added in v0.1.3

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.

type QSCGetStatusRequest

type QSCGetStatusRequest struct {
	BaseRequest
	Params []string `json:"params"`
}

type QSCGetStatusResponse

type QSCGetStatusResponse struct {
	BaseRequest
	Result []QSCGetStatusResult `json:"result"`
}

type QSCGetStatusResult

type QSCGetStatusResult struct {
	Name     string
	Value    float64
	String   string
	Position float64
}

type QSCSetStatusParams

type QSCSetStatusParams struct {
	Name  string
	Value float64
}

QSCSetStatusParams is the parameters for the Control.Set method

type QSCSetStatusRequest

type QSCSetStatusRequest struct {
	BaseRequest
	Params QSCSetStatusParams `json:"params"`
}

type QSCSetStatusResponse

type QSCSetStatusResponse struct {
	BaseRequest
	Result QSCGetStatusResult `json:"result"`
}

type QSCStatusGetRequest

type QSCStatusGetRequest struct {
	BaseRequest
	Params int `json:"params"`
}

QSCStatusGetRequest is for the StatusGet method

type QSCStatusGetResponse

type QSCStatusGetResponse struct {
	BaseRequest
	Result QSCStatusGetResult `json:"result"`
}

QSCStatusGetResponse gets the JSON response after calling the StatusGet method

type QSCStatusGetResult

type QSCStatusGetResult struct {
	Platform    string `json:"Platform"`
	State       string `json:"State"`
	DesignName  string `json:"DesignName"`
	DesignCode  string `json:"DesignCode"`
	IsRedundant bool   `json:"IsRedundant"`
	IsEmulator  bool   `json:"IsEmulator"`
	Status      struct {
		Code   int    `json:"Code"`
		String string `json:"String"`
	} `json:"Status"`
}

QSCStatusGetResponse is the values that we are getting back from the StatusGet method

type QSCStatusReport

type QSCStatusReport struct {
	JSONRPC string `json:"jsonrpc"`
	Method  string `json:"method"`
	Params  struct {
		Platform    string `json:"Platform"`
		State       string `json:"State"`
		DesignName  string `json:"DesignName"`
		DesignCode  string `json:"DesignCode"`
		IsRedundant bool   `json:"IsRedundant"`
		IsEmulator  bool   `json:"IsEmulator"`
		Status      struct {
			Code   int    `json:"Code"`
			String string `json:"String"`
		} `json:"Status"`
	} `json:"params"`
}

Jump to

Keyboard shortcuts

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