qsc

package module
Version: v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

README

qsc-driver

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 {
	Address string
}

func (*DSP) DbToVolumeLevel

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

func (*DSP) GetControlStatus

func (d *DSP) GetControlStatus(ctx context.Context, name string) (QSCGetStatusResponse, error)

func (*DSP) GetDetails

func (d *DSP) GetDetails(ctx context.Context) (structs.HardwareInfo, *nerr.E)

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

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) GetInfo added in v0.1.2

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

func (*DSP) GetMutes added in v0.1.5

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

func (*DSP) GetStatus

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

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

func (*DSP) GetVolumes added in v0.1.5

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

func (*DSP) SendCommand

func (d *DSP) SendCommand(ctx context.Context, request interface{}) ([]byte, error)

func (*DSP) SetControlStatus

func (d *DSP) SetControlStatus(ctx context.Context, name, value string) (QSCSetStatusResponse, error)

func (*DSP) SetMute added in v0.1.5

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

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
	State      string
	DesignName string
	DesignCode string
}

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
t or T : Toggle theme light dark auto
y or Y : Canonical URL