kramer

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

View Source
const (
	BuildDate       = "BUILD-DATE"
	Model           = "MODEL"
	SerialNumber    = "SN"
	FirmwareVersion = "VERSION"
	ProtocolVersion = "PROT-VER"
	Temperature     = "HW-TEMP"
	PowerSave       = "POWER-SAVE"
	IPAddress       = "NET-IP"
	Gateway         = "NET-GATE"
	MACAddress      = "NET-MAC"
	NetDNS          = "NET-DNS"
	Signal          = "SIGNAL"
)
View Source
const (
	CARRIAGE_RETURN           = 0x0D
	LINE_FEED                 = 0x0A
	SPACE                     = 0x20
	DELAY_BETWEEN_CONNECTIONS = time.Second * 10
)

Variables

This section is empty.

Functions

func LessThanZero

func LessThanZero(numString string) bool

Returns if a given number (in a string) is less than zero.

func ToIndexOne

func ToIndexOne(numString string) (string, error)

This function converts a number (in a string) to index-based 1.

func ToIndexZero

func ToIndexZero(numString string) (string, error)

This function converts a number (in a string) to index-base 0.

Types

type CommandInfo

type CommandInfo struct {
	ResponseChannel chan Response
	Address         string
	Command         string
	ReadWelcome     bool
}

type Kramer4x4 added in v0.1.2

type Kramer4x4 struct {
	Address string
	Log     Logger
	// contains filtered or unexported fields
}

func NewVideoSwitcher

func NewVideoSwitcher(addr string, opts ...Kramer4x4Option) *Kramer4x4

func (*Kramer4x4) GetActiveSignal added in v0.1.2

func (vs *Kramer4x4) GetActiveSignal(ctx context.Context, port string) (error, structs.ActiveSignal)

func (*Kramer4x4) GetActiveSignalByPort added in v0.1.2

func (vs *Kramer4x4) GetActiveSignalByPort(ctx context.Context, port string, readWelcome bool) (structs.ActiveSignal, error)

func (*Kramer4x4) GetHardwareInfo added in v0.1.2

func (vs *Kramer4x4) GetHardwareInfo(ctx context.Context) (structs.HardwareInfo, error)

func (*Kramer4x4) GetInfo added in v0.1.2

func (vs *Kramer4x4) GetInfo(ctx context.Context) (interface{}, error)

GetInfo .

func (*Kramer4x4) GetInputByOutput added in v0.1.2

func (vs *Kramer4x4) GetInputByOutput(ctx context.Context, output string) (string, error)

GetInput returns the current input

func (*Kramer4x4) SendCommand added in v0.1.2

func (vs *Kramer4x4) SendCommand(ctx context.Context, cmd []byte) ([]byte, error)

SendCommand sends the byte array to the desired address of projector

func (*Kramer4x4) SetFrontLock added in v0.1.2

func (vs *Kramer4x4) SetFrontLock(ctx context.Context, state bool) error

func (*Kramer4x4) SetInputByOutput added in v0.1.2

func (vs *Kramer4x4) SetInputByOutput(ctx context.Context, output, input string) error

SwitchInput changes the input on the given output to input

type Kramer4x4Option added in v0.1.2

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

type Kramer4x4optionFunc added in v0.1.2

type Kramer4x4optionFunc func(*Kramer4x4options)

type Kramer4x4options added in v0.1.2

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

type KramerAFM20DSP added in v0.1.2

type KramerAFM20DSP struct {
	Address string
	Log     Logger
	// contains filtered or unexported fields
}

func NewDsp added in v0.1.2

func NewDsp(addr string, opts ...KramerAFM20DSPOption) *KramerAFM20DSP

func (*KramerAFM20DSP) GetHardwareInfo added in v0.1.2

func (dsp *KramerAFM20DSP) GetHardwareInfo(ctx context.Context) (structs.HardwareInfo, error)

func (*KramerAFM20DSP) GetInfo added in v0.1.2

func (dsp *KramerAFM20DSP) GetInfo(ctx context.Context) (interface{}, error)

GetInfo .

func (*KramerAFM20DSP) GetMutedByBlock added in v0.1.2

func (dsp *KramerAFM20DSP) GetMutedByBlock(ctx context.Context, block string) (bool, error)

GetMuted returns the Mute Status current input The blocks are going to be a number between 1-20, determined by its configuration

func (*KramerAFM20DSP) GetVolumeByBlock added in v0.1.2

func (dsp *KramerAFM20DSP) GetVolumeByBlock(ctx context.Context, block string) (int, error)

GetVolume returns the volume Level for the given input The blocks are going to be a number between 1-20, determined by its configuration

func (*KramerAFM20DSP) SendCommand added in v0.1.2

func (dsp *KramerAFM20DSP) SendCommand(ctx context.Context, cmd []byte) ([]byte, error)

SendCommand sends the byte array to the desired address of projector

func (*KramerAFM20DSP) SetMutedByBlock added in v0.1.2

func (dsp *KramerAFM20DSP) SetMutedByBlock(ctx context.Context, block string, muted bool) error

SetMuted changes the input on the given output to input The blocks are going to be a number between 1-20, determined by its configuration

func (*KramerAFM20DSP) SetVolumeByBlock added in v0.1.2

func (dsp *KramerAFM20DSP) SetVolumeByBlock(ctx context.Context, block string, level int) error

SetVolume changes the volume level on the given block to the level parameter The blocks are going to be a number between 1-20, determined by its configuration

type KramerAFM20DSPOption added in v0.1.2

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

TODO add specific options for each model

type KramerAFM20DSPoptionFunc added in v0.1.2

type KramerAFM20DSPoptionFunc func(*KramerAFM20DSPoptions)

type KramerAFM20DSPoptions added in v0.1.2

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

type KramerVP558 added in v0.1.2

type KramerVP558 struct {
	Address string
	Log     Logger
	// contains filtered or unexported fields
}

func NewVideoSwitcherDsp added in v0.1.2

func NewVideoSwitcherDsp(addr string, opts ...KramerVP558Option) *KramerVP558

func (*KramerVP558) GetHardwareInfo added in v0.1.2

func (dsp *KramerVP558) GetHardwareInfo(ctx context.Context) (structs.HardwareInfo, error)

func (*KramerVP558) GetInfo added in v0.1.2

func (vsdsp *KramerVP558) GetInfo(ctx context.Context) (interface{}, error)

GetInfo .

func (*KramerVP558) GetInputByOutput added in v0.1.2

func (vsdsp *KramerVP558) GetInputByOutput(ctx context.Context, output string) (string, error)

GetInput returns the current input The API is zero indexed, so outputs 0-3 correspond with outputs 1-4 on device inputs 0-10 correspond with outputs 1-11 see https://cdn.kramerav.com/web/downloads/manuals/vp-558_rev_4.pdf (page 66)

func (*KramerVP558) GetMutedByBlock added in v0.1.2

func (vsdsp *KramerVP558) GetMutedByBlock(ctx context.Context, block string) (bool, error)

GetMuted returns the Mute Status current input Audio inputs are formatted 0:0 - 4:2, and audio level is between 0-100. for more information on Audio Inputs reference https://cdn.kramerav.com/web/downloads/manuals/vp-558_rev_4.pdf (pg. 64)

func (*KramerVP558) GetVolumeByBlock added in v0.1.2

func (vsdsp *KramerVP558) GetVolumeByBlock(ctx context.Context, block string) (int, error)

GetVolume returns the volume Level for the given input Audio inputs are formatted 0:0 - 4:2, and audio level is between 0-100. for more information on Audio Inputs reference https://cdn.kramerav.com/web/downloads/manuals/vp-558_rev_4.pdf (pg. 64)

func (*KramerVP558) SendCommand added in v0.1.2

func (vsdsp *KramerVP558) SendCommand(ctx context.Context, cmd []byte) ([]byte, error)

SendCommand sends the byte array to the desired address of projector

func (*KramerVP558) SetInputByOutput added in v0.1.2

func (vsdsp *KramerVP558) SetInputByOutput(ctx context.Context, output, input string) error

SwitchInput changes the input on the given output to input The API is zero indexed, so outputs 0-3 correspond with outputs 1-4 on device inputs 0-10 correspond with outputs 1-11 see https://cdn.kramerav.com/web/downloads/manuals/vp-558_rev_4.pdf (page 66)

func (*KramerVP558) SetMutedByBlock added in v0.1.2

func (vsdsp *KramerVP558) SetMutedByBlock(ctx context.Context, block string, muted bool) error

setMuted changes the input on the given output to input Audio inputs are formatted 0:0 - 4:2, and audio level is between 0-100. for more information on Audio Inputs reference https://cdn.kramerav.com/web/downloads/manuals/vp-558_rev_4.pdf (pg. 64)

func (*KramerVP558) SetVolumeByBlock added in v0.1.2

func (vsdsp *KramerVP558) SetVolumeByBlock(ctx context.Context, block string, level int) error

SetVolume changes the volume level on the given block to the level parameter Audio inputs are formatted 0:0 - 4:2, and audio level is between 0-100. for more information on Audio Inputs reference https://cdn.kramerav.com/web/downloads/manuals/vp-558_rev_4.pdf (pg. 64)

type KramerVP558Option added in v0.1.2

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

type KramerVP558optionFunc added in v0.1.2

type KramerVP558optionFunc func(*KramerVP558options)

type KramerVP558options added in v0.1.2

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

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{})
}

type Response

type Response struct {
	Response string
	Err      error
}

Jump to

Keyboard shortcuts

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