Documentation ¶
Index ¶
- Constants
- Variables
- func GetActiveSignalByPort(address, port string, readWelcome bool) (structs.ActiveSignal, *nerr.E)
- func GetCurrentInputByOutputPort(address, port string, readWelcome bool) (status.Input, error)
- func GetHardwareInformation(address string, readWelcome bool) (structs.HardwareInfo, *nerr.E)
- func LessThanZero(numString string) bool
- func SendCommand(conn *net.TCPConn, address, command string) (resp string, err error)
- func SetFrontLock(address string, state, readWelcome bool) error
- func StartRouter()
- func SwitchInput(address, input, output string, readWelcome bool) (status.Input, error)
- func ToIndexOne(numString string) (string, error)
- func ToIndexZero(numString string) (string, error)
- type CommandInfo
- type Response
Constants ¶
View Source
const ( CARRIAGE_RETURN = 0x0D LINE_FEED = 0x0A SPACE = 0x20 DELAY_BETWEEN_CONNECTIONS = time.Second * 10 )
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" )
Command constants
Variables ¶
View Source
var StartChannel = make(chan CommandInfo, 1000)
Functions ¶
func GetActiveSignalByPort ¶
GetActiveSignalByPort checks if the signal on a given port is active or not
func GetCurrentInputByOutputPort ¶
GetCurrentInputByOutputPort gets the current input that is set to the given output port
func GetHardwareInformation ¶
GetHardwareInformation builds the list of hardware information for this device and returns it
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 SetFrontLock ¶
func StartRouter ¶
func StartRouter()
func SwitchInput ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.