Documentation ¶
Index ¶
- Constants
- func LessThanZero(numString string) bool
- func SendCommand(conn *net.TCPConn, address, command string) (resp string, err error)
- func ToIndexOne(numString string) (string, error)
- func ToIndexZero(numString string) (string, error)
- type CommandInfo
- type Logger
- type Option
- type Response
- type VideoSwitcher
- func (vs *VideoSwitcher) GetActiveSignal(ctx context.Context, port string) (error, structs.ActiveSignal)
- func (vs *VideoSwitcher) GetActiveSignalByPort(ctx context.Context, port string, readWelcome bool) (structs.ActiveSignal, error)
- func (vs *VideoSwitcher) GetHardwareInfo(ctx context.Context) (structs.HardwareInfo, error)
- func (vs *VideoSwitcher) GetInfo(ctx context.Context) (interface{}, error)
- func (vs *VideoSwitcher) GetInputByOutput(ctx context.Context, output string) (string, error)
- func (vs *VideoSwitcher) SendCommand(ctx context.Context, cmd []byte) ([]byte, error)
- func (vs *VideoSwitcher) SetFrontLock(ctx context.Context, state bool) error
- func (vs *VideoSwitcher) SetInputByOutput(ctx context.Context, output, input string) error
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 ¶
Returns if a given number (in a string) is less than zero.
func SendCommand ¶
Takes a command and sends it to the address, and returns the devices response to that command
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 CommandInfo ¶
type VideoSwitcher ¶
func NewVideoSwitcher ¶
func NewVideoSwitcher(addr string, opts ...Option) *VideoSwitcher
func (*VideoSwitcher) GetActiveSignal ¶
func (vs *VideoSwitcher) GetActiveSignal(ctx context.Context, port string) (error, structs.ActiveSignal)
func (*VideoSwitcher) GetActiveSignalByPort ¶
func (vs *VideoSwitcher) GetActiveSignalByPort(ctx context.Context, port string, readWelcome bool) (structs.ActiveSignal, error)
func (*VideoSwitcher) GetHardwareInfo ¶
func (vs *VideoSwitcher) GetHardwareInfo(ctx context.Context) (structs.HardwareInfo, error)
func (*VideoSwitcher) GetInfo ¶
func (vs *VideoSwitcher) GetInfo(ctx context.Context) (interface{}, error)
GetInfo .
func (*VideoSwitcher) GetInputByOutput ¶ added in v0.1.1
GetInput returns the current input
func (*VideoSwitcher) SendCommand ¶
SendCommand sends the byte array to the desired address of projector
func (*VideoSwitcher) SetFrontLock ¶
func (vs *VideoSwitcher) SetFrontLock(ctx context.Context, state bool) error
func (*VideoSwitcher) SetInputByOutput ¶ added in v0.1.1
func (vs *VideoSwitcher) SetInputByOutput(ctx context.Context, output, input string) error
SwitchInput changes the input on the given output to input
Click to show internal directories.
Click to hide internal directories.