Documentation ¶
Index ¶
- Constants
- func LessThanZero(numString string) bool
- func ToIndexOne(numString string) (string, error)
- func ToIndexZero(numString string) (string, error)
- type ActiveSignal
- type CommandInfo
- type HardwareInfo
- type Kramer4x4
- func (vs *Kramer4x4) GetActiveSignal(ctx context.Context, port string) (error, structs.ActiveSignal)
- func (vs *Kramer4x4) GetActiveSignalByPort(ctx context.Context, port string, readWelcome bool) (structs.ActiveSignal, error)
- func (vs *Kramer4x4) GetAudioVideoInputs(ctx context.Context) (map[string]string, error)
- func (vs *Kramer4x4) GetHardwareInfo(ctx context.Context) (structs.HardwareInfo, error)
- func (vs *Kramer4x4) GetInfo(ctx context.Context) (interface{}, error)
- func (vs *Kramer4x4) SendCommand(ctx context.Context, cmd []byte) ([]byte, error)
- func (vs *Kramer4x4) SetAudioVideoInput(ctx context.Context, output, input string) error
- func (vs *Kramer4x4) SetFrontLock(ctx context.Context, state bool) error
- type Kramer4x4Option
- type Kramer4x4optionFunc
- type Kramer4x4options
- type KramerAFM20DSP
- func (dsp *KramerAFM20DSP) GetHardwareInfo(ctx context.Context) (structs.HardwareInfo, error)
- func (dsp *KramerAFM20DSP) GetInfo(ctx context.Context) (interface{}, error)
- func (dsp *KramerAFM20DSP) Mutes(ctx context.Context, blocks []string) (map[string]bool, error)
- func (dsp *KramerAFM20DSP) SendCommand(ctx context.Context, cmd []byte) ([]byte, error)
- func (dsp *KramerAFM20DSP) SetMute(ctx context.Context, block string, mute bool) error
- func (dsp *KramerAFM20DSP) SetVolume(ctx context.Context, block string, level int) error
- func (dsp *KramerAFM20DSP) Volumes(ctx context.Context, blocks []string) (map[string]int, error)
- type KramerAFM20DSPOption
- type KramerAFM20DSPoptionFunc
- type KramerAFM20DSPoptions
- type KramerVP558
- func (vsdsp *KramerVP558) GetAudioVideoInputs(ctx context.Context) (map[string]string, error)
- func (vsdsp *KramerVP558) GetHardwareInfo(ctx context.Context) (structs.HardwareInfo, error)
- func (vsdsp *KramerVP558) GetInfo(ctx context.Context) (interface{}, error)
- func (vsdsp *KramerVP558) Mutes(ctx context.Context, blocks []string) (map[string]bool, error)
- func (vsdsp *KramerVP558) SendCommand(ctx context.Context, cmd []byte, readAgain bool) ([]byte, error)
- func (vsdsp *KramerVP558) SetAudioVideoInput(ctx context.Context, output, input string) error
- func (vsdsp *KramerVP558) SetMute(ctx context.Context, block string, muted bool) error
- func (vsdsp *KramerVP558) SetVolume(ctx context.Context, block string, level int) error
- func (vsdsp *KramerVP558) Volumes(ctx context.Context, blocks []string) (map[string]int, error)
- type KramerVP558Option
- type KramerVP558optionFunc
- type KramerVP558options
- type Logger
- type Message
- type NetworkInfo
- type PersistentViaConnection
- type Response
- type VIAUsers
- type Via
- func (v *Via) Debugf(format string, a ...interface{})
- func (v *Via) Errorf(format string, a ...interface{})
- func (v *Via) GetActiveSignal(ctx context.Context) (ActiveSignal, error)
- func (v *Via) GetHardwareInfo(ctx context.Context) (HardwareInfo, error)
- func (v *Via) GetInfo(ctx context.Context) (interface{}, error)
- func (v *Via) GetPresenterCount(ctx context.Context) (int, error)
- func (v *Via) GetRoomCode(ctx context.Context) (string, error)
- func (v *Via) GetStatusOfUsers(ctx context.Context) (VIAUsers, error)
- func (v *Via) GetVolume(ctx context.Context) (int, error)
- func (v *Via) Infof(format string, a ...interface{})
- func (v *Via) PersistConnection(ctx context.Context) (*PersistentViaConnection, error)
- func (v *Via) Ping(conn *PersistentViaConnection) error
- func (v *Via) Reboot(ctx context.Context) error
- func (v *Via) Reset(ctx context.Context) error
- func (v *Via) RoomCode(ctx context.Context) (string, error)
- func (v *Via) SetAlert(ctx context.Context, AlertMessage string) error
- func (v *Via) SetViaVolume(ctx context.Context, volume int) (string, error)
- func (v *Via) SetVolume(ctx context.Context, block string, volume int) error
- func (v *Via) Volumes(ctx context.Context, block []string) (map[string]int, error)
- func (v *Via) Warnf(format string, a ...interface{})
Constants ¶
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" )
const ( CARRIAGE_RETURN = 0x0D LINE_FEED = 0x0A SPACE = 0x20 DELAY_BETWEEN_CONNECTIONS = time.Second * 10 )
const ( Inactive = "0" Active = "1" Waiting = "2" )
User status constants
Variables ¶
This section is empty.
Functions ¶
func LessThanZero ¶
Returns if a given number (in a string) is less than zero.
func ToIndexOne ¶
This function converts a number (in a string) to index-based 1.
func ToIndexZero ¶
This function converts a number (in a string) to index-base 0.
Types ¶
type ActiveSignal ¶ added in v0.1.9
type ActiveSignal struct {
Active bool `json:"active"`
}
type CommandInfo ¶
type HardwareInfo ¶ added in v0.1.9
type HardwareInfo struct { Hostname string `json:"hostname,omitempty"` ModelName string `json:"model_name,omitempty"` SerialNumber string `json:"serial_number,omitempty"` BuildDate string `json:"build_date,omitempty"` FirmwareVersion string `json:"firmware_version,omitempty"` ProtocolVersion string `json:"protocol_version,omitempty"` NetworkInfo NetworkInfo `json:"network_information,omitempty"` FilterStatus string `json:"filter_status,omitempty"` WarningStatus []string `json:"warning_status,omitempty"` ErrorStatus []string `json:"error_status,omitempty"` PowerStatus string `json:"power_status,omitempty"` PowerSavingModeStatus string `json:"power_saving_mode_status,omitempty"` TimerInfo []map[string]int `json:"timer_info,omitempty"` Temperature string `json:"temperature,omitempty"` }
HardwareInfo contains the common information for device hardware information
type Kramer4x4 ¶ added in v0.1.2
func NewVideoSwitcher ¶
func NewVideoSwitcher(addr string, opts ...Kramer4x4Option) *Kramer4x4
func (*Kramer4x4) GetActiveSignal ¶ added in v0.1.2
func (*Kramer4x4) GetActiveSignalByPort ¶ added in v0.1.2
func (*Kramer4x4) GetAudioVideoInputs ¶ added in v0.1.12
GetInput returns the current input
func (*Kramer4x4) GetHardwareInfo ¶ added in v0.1.2
func (*Kramer4x4) SendCommand ¶ added in v0.1.2
SendCommand sends the byte array to the desired address of projector
func (*Kramer4x4) SetAudioVideoInput ¶ added in v0.1.12
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
}
func WithLogger4x4 ¶ added in v0.1.13
func WithLogger4x4(l Logger) Kramer4x4Option
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
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) Mutes ¶ added in v0.1.15
GetMuted returns the Mute Status current input The blocks are going to be a number between 1-20, determined by its configuration
func (*KramerAFM20DSP) SendCommand ¶ added in v0.1.2
SendCommand sends the byte array to the desired address of projector
func (*KramerAFM20DSP) SetMute ¶ added in v0.1.12
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
type KramerAFM20DSPOption ¶ added in v0.1.2
type KramerAFM20DSPOption interface {
// contains filtered or unexported methods
}
TODO add specific options for each model
func WithLoggerDSP ¶ added in v0.1.13
func WithLoggerDSP(l Logger) KramerAFM20DSPOption
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
func NewVideoSwitcherDsp ¶ added in v0.1.2
func NewVideoSwitcherDsp(addr string, opts ...KramerVP558Option) *KramerVP558
func (*KramerVP558) GetAudioVideoInputs ¶ added in v0.1.12
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) GetHardwareInfo ¶ added in v0.1.2
func (vsdsp *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) Mutes ¶ added in v0.1.15
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) SendCommand ¶ added in v0.1.2
func (vsdsp *KramerVP558) SendCommand(ctx context.Context, cmd []byte, readAgain bool) ([]byte, error)
SendCommand sends the byte array to the desired address of projector
func (*KramerVP558) SetAudioVideoInput ¶ added in v0.1.12
func (vsdsp *KramerVP558) SetAudioVideoInput(ctx context.Context, output, input string) error
SwitchInput changes the input on the given output to input outputs 1-4 on device inputs 1-11 see https://cdn.kramerav.com/web/downloads/manuals/vp-558_rev_4.pdf (page 66)
func (*KramerVP558) SetMute ¶ added in v0.1.13
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) SetVolume ¶ added in v0.1.12
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)
func (*KramerVP558) Volumes ¶ added in v0.1.15
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)
type KramerVP558Option ¶ added in v0.1.2
type KramerVP558Option interface {
// contains filtered or unexported methods
}
func WithLoggerVSDSP ¶ added in v0.1.13
func WithLoggerVSDSP(l Logger) KramerVP558Option
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 NetworkInfo ¶ added in v0.1.9
type NetworkInfo struct { IPAddress string `json:"ip_address,omitempty"` MACAddress string `json:"mac_address,omitempty"` Gateway string `json:"gateway,omitempty"` DNS []string `json:"dns,omitempty"` }
NetworkInfo contains the network information for the device
type PersistentViaConnection ¶ added in v0.1.9
type VIAUsers ¶ added in v0.1.9
type VIAUsers struct { InactiveUsers []string `json:"inactive_users"` ActiveUsers []string `json:"active_users"` UsersWaiting []string `json:"users_waiting"` }
VIAUsers contains the counts of the users logged in to the VIA and their status
type Via ¶ added in v0.1.9
VIA Struct that defines general parameters needed for any VIA
func (*Via) GetActiveSignal ¶ added in v0.1.9
func (v *Via) GetActiveSignal(ctx context.Context) (ActiveSignal, error)
GetActiveSignal determines the active signal of the VIA by getting the user count
func (*Via) GetHardwareInfo ¶ added in v0.1.9
func (v *Via) GetHardwareInfo(ctx context.Context) (HardwareInfo, error)
GetHardwareInfo for a VIA device
func (*Via) GetInfo ¶ added in v0.1.9
GetInfo: needed by the DSP drivers implementation. Will get hardware information
func (*Via) GetPresenterCount ¶ added in v0.1.9
GetPresenterCount .
func (*Via) GetRoomCode ¶ added in v0.1.9
Get the Room Code and return the current room code as a string
func (*Via) GetStatusOfUsers ¶ added in v0.1.9
getStatusOfUsers returns the status of users that are logged in to the VIA
func (*Via) PersistConnection ¶ added in v0.1.9
func (v *Via) PersistConnection(ctx context.Context) (*PersistentViaConnection, error)
Create a persistent connection in order to catch actions and events that are printed out on console. This includes login, logoff, media presentation, and sharing events
func (*Via) Ping ¶ added in v0.1.9
func (v *Via) Ping(conn *PersistentViaConnection) error
Implementing ping functionality here for via-control Do I really need to gather the output of this considering I am using this to just keep the connection alive -- you decide!
func (*Via) Reset ¶ added in v0.1.9
Reset: Reset a VIA sessions - Causes VIAAdmin to log out and log back in which can help with some lock up issues.
func (*Via) RoomCode ¶ added in v0.1.9
Get the Room Code and return the current room code as a string
func (*Via) SetViaVolume ¶ added in v0.1.15
Set the Volume for a VIA