venue

package
v0.0.0-...-77bde16 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

The console represents the full known state of the console, including all signals that are not currently exposed by the UI.

Package venue the Avid™ VENUE console as a Venue endpoint.

This package enables programmatic access to an Avid™ VENUE console via the VNC interface.

The code is broken into multiple parts:

  • Endpoint (venue.go) -- standard API with the rest of the Venue program. This module contains all programming logic for driving the UI.
  • UI (ui*.go) -- interaction with the VENUE interface via VNC. This module has the ability to interact with the console via VNC, but has no knowledge or understanding past enabling standardized interactions (e.g. pressing a button).
  • Console (console.go) -- in-memory representation of the console. This module maintains the state of the system, but has no ability to influence the state of the system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InputGain

func InputGain(ep router.Endpoint, pkt *router.Packet) error

InputGain adjustment.

func InputGuess

func InputGuess(ep router.Endpoint, pkt *router.Packet) error

InputGuess button push.

func InputMute

func InputMute(ep router.Endpoint, pkt *router.Packet) error

InputMute button push.

func InputPad

func InputPad(ep router.Endpoint, pkt *router.Packet) error

InputPad toggles the state of the input pad button.

func InputPhantom

func InputPhantom(ep router.Endpoint, pkt *router.Packet) error

InputPhantom toggles the state of the input phantom button.

func InputSolo

func InputSolo(ep router.Endpoint, pkt *router.Packet) error

InputSolo toggles the state of the input solo button.

func Inputs

func Inputs(v uint) func(*options) error

Inputs is an option for New() that sets the number of inputs.

func Noop

func Noop(_ router.Endpoint, _ *router.Packet) error

Noop is a noop packet.

func OutputLevel

func OutputLevel(ep router.Endpoint, pkt *router.Packet) error

OutputLevel for the specified output. This handler operates on the currently selected input.

func Ping

func Ping(ep router.Endpoint, _ *router.Packet) error

Ping is deprecated. This should move to the OSC module, passed on a channel.

func Refresh

func Refresh(v time.Duration) func(*options) error

Refresh is an option for New() that sets the VNC framebuffer refresh period.

func SelectInput

func SelectInput(ep router.Endpoint, pkt *router.Packet) error

SelectInput for adjustment.

func SelectOutput

func SelectOutput(ep router.Endpoint, pkt *router.Packet) error

SelectOutput for adjustment.

Types

type Encoder

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

func (*Encoder) Adjust

func (w *Encoder) Adjust(wf *vnc.Workflow, val int) error

Adjust the value of an encoder with cursor keys.

func (*Encoder) Decrement

func (w *Encoder) Decrement(wf *vnc.Workflow) error

Decrement the value of an encoder.

func (*Encoder) Increment

func (w *Encoder) Increment(wf *vnc.Workflow) error

Increment the value of an encoder.

func (*Encoder) Press

func (w *Encoder) Press(wf *vnc.Workflow) error

Press implements the Widget interface.

func (*Encoder) Read

func (w *Encoder) Read(wf *vnc.Workflow) (interface{}, error)

Read implements the Widget interface.

func (*Encoder) Update

func (w *Encoder) Update(wf *vnc.Workflow, val interface{}) error

Update implements the Widget interface.

type Input

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

Input represents an input signal.

func NewInput

func NewInput(sig signals.Signal, sigNo signals.SignalNo) *Input

func (*Input) Reset

func (i *Input) Reset()

type Meter

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

func (*Meter) IsMono

func (w *Meter) IsMono() bool

IsMono returns true if this a mono meter.

func (*Meter) IsStereo

func (w *Meter) IsStereo() bool

IsMono returns true if this a stereo meter.

func (*Meter) Press

func (w *Meter) Press(wf *vnc.Workflow) error

Press implements the Widget interface.

func (*Meter) Read

func (w *Meter) Read(wf *vnc.Workflow) (interface{}, error)

Read implements the Widget interface.

func (*Meter) Update

func (w *Meter) Update(wf *vnc.Workflow, val interface{}) error

Update implements the Widget interface.

type Output

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

Output represents an input signal.

type Page

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

Page holds references to the UI elements on a VENUE page.

func NewInputsPage

func NewInputsPage() *Page

NewInputsPage returns a populated Inputs page.

func NewOutputsPage

func NewOutputsPage() *Page

NewOutputsPage returns a populated Outputs page.

func (*Page) Press

func (w *Page) Press(wf *vnc.Workflow) error

Press implements the Widget interface.

func (*Page) Read

func (w *Page) Read(wf *vnc.Workflow) (interface{}, error)

Read implements the Widget interface.

func (*Page) Update

func (w *Page) Update(wf *vnc.Workflow, val interface{}) error

Update implements the Widget interface.

func (*Page) Widget

func (w *Page) Widget(n string) (Widget, error)

Widget returns the named widget.

type Pages

type Pages map[pages.Page]*Page

type Signal

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

func NewSignal

func NewSignal(defVal, min, max float64, prec int, unit string, defEna bool) *Signal

func (*Signal) Enabled

func (sig *Signal) Enabled() bool

func (*Signal) Reset

func (sig *Signal) Reset()

func (*Signal) Value

func (sig *Signal) Value() float64

type Signals

type Signals map[string]*Signal

type Switch

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

Switch is a UIElement representing a switch.

func NewPushButton

func NewPushButton(x, y int, size switches.Size) *Switch

NewPushButton returns a new push-button switch. x and y refer to the top-left corner of the switch.

func NewToggle

func NewToggle(x, y int, size switches.Size, def bool) *Switch

NewToggle returns a new toggle switch. x and y refer to the top-left corner of the switch.

func (*Switch) IsEnabled

func (w *Switch) IsEnabled() bool

IsEnabled returns true if the switch is enabled.

func (*Switch) IsPushButton

func (w *Switch) IsPushButton() bool

IsPushButton returns true if this is a push-button switch.

func (*Switch) IsToggle

func (w *Switch) IsToggle() bool

IsToggle returns true if this is a toggle switch.

func (*Switch) Press

func (w *Switch) Press(wf *vnc.Workflow) error

Press implements the Widget interface.

func (*Switch) Read

func (w *Switch) Read(wf *vnc.Workflow) (interface{}, error)

Read implements the Widget interface.

func (*Switch) Update

func (w *Switch) Update(wf *vnc.Workflow, val interface{}) error

Update implements the Widget interface.

type UI

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

UI holds references to the Venue UI pages. TODO(kward:20170201) Can I get rid of the UI struct?

func NewUI

func NewUI() *UI

NewUI returns a populated UI struct.

type Venue

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

Venue holds information representing the state of the VENUE backend.

func New

func New(opts ...func(*options) error) (*Venue, error)

New returns a populated Venue struct.

func (*Venue) Close

func (v *Venue) Close() error

Close a Venue session.

func (*Venue) Connect

func (v *Venue) Connect(ctx context.Context, h string, p uint, pw string) error

Connect to a VENUE VNC server.

func (*Venue) EndpointName

func (v *Venue) EndpointName() string

EndpointName implements router.Endpoint.

func (*Venue) Handle

func (v *Venue) Handle(pkt *router.Packet)

Handle implements router.Endpoint.

func (*Venue) Initialize

func (v *Venue) Initialize() error

Initialize the in-memory state representation of a VENUE console.

func (*Venue) ListenAndHandle

func (v *Venue) ListenAndHandle()

ListenAndHandle connections and incoming requests.

type Widget

type Widget interface {
	// Press the widget (if possible).
	Press(wf *vnc.Workflow) error
	// Read the value of a widget.
	Read(wf *vnc.Workflow) (interface{}, error)
	// Update the value of a widget.
	Update(wf *vnc.Workflow, val interface{}) error
}

The Widget interface provides functionality for interacting with VNC widgets.

type Widgets

type Widgets map[string]Widget

Widgets holds references to a grouping of UI widgets.

Directories

Path Synopsis
Package encoders defines the supported types of encoders.
Package encoders defines the supported types of encoders.
Package meters defines the supported types of meters.
Package meters defines the supported types of meters.
Package pages defines the supported types of pages.
Package pages defines the supported types of pages.
Packages switches defines different sizes, kinds, and states of switches.
Packages switches defines different sizes, kinds, and states of switches.

Jump to

Keyboard shortcuts

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