epson

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 10 Imported by: 2

README

epson-projector-driver

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger added in v0.1.0

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 Projector.

type Option

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

Option configures how to create the Projector.

func WithDelay

func WithDelay(t time.Duration) Option

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

func WithLogger added in v0.1.0

func WithLogger(l Logger) Option

WithLogger adds a logger to Projector. Projector 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 Projector. The default value is 30 seconds. See more details about TTL in https://github.com/byuoitav/connpool.

type Projector

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

func NewProjector

func NewProjector(addr string, opts ...Option) *Projector

func (*Projector) GetActiveSignal added in v0.0.2

func (p *Projector) GetActiveSignal(ctx context.Context, port string) (bool, error)

func (*Projector) GetBlanked

func (p *Projector) GetBlanked(ctx context.Context) (bool, error)

func (*Projector) GetInfo

func (p *Projector) GetInfo(ctx context.Context) (interface{}, error)

func (*Projector) GetInput

func (p *Projector) GetInput(ctx context.Context) (string, error)

func (*Projector) GetMutedByBlock

func (p *Projector) GetMutedByBlock(ctx context.Context, block string) (bool, error)

func (*Projector) GetPower

func (p *Projector) GetPower(ctx context.Context) (string, error)

func (*Projector) GetVolumeByBlock

func (p *Projector) GetVolumeByBlock(ctx context.Context, block string) (int, error)

func (*Projector) SetBlanked

func (p *Projector) SetBlanked(ctx context.Context, blanked bool) error

func (*Projector) SetInput

func (p *Projector) SetInput(ctx context.Context, input string) error

func (*Projector) SetMutedByBlock

func (p *Projector) SetMutedByBlock(ctx context.Context, block string, muted bool) error

func (*Projector) SetPower

func (p *Projector) SetPower(ctx context.Context, power string) error

func (*Projector) SetVolumeByBlock

func (p *Projector) SetVolumeByBlock(ctx context.Context, block string, volume int) error

Jump to

Keyboard shortcuts

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