Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AVMuteQueryResponses = map[string]string{
"11": "video mute on, audio mute off",
"21": "audio mute on, video mute off",
"31": "video and audio mute on",
"30": "video and audio mute off",
"ERR3": "unavailable time",
"ERR4": "device failure",
}
View Source
var AVMuteRequests = map[string]string{
"query": "?",
"video-mute-on": "11",
"video-mute-off": "10",
"audio-mute-on": "21",
"audio-mute-off": "20",
"av-mute-on": "31",
"av-mute-off": "30",
}
View Source
var AVMuteResponses = map[string]string{
"OK": "successful execution, or state already current",
"ERR2": "out of parameter",
"ERR3": "unavailable time",
"ERR4": "device failure",
}
View Source
var ErrorStatusQueryResponses = map[string]string{
"ERR3": "unavailable time",
"ERR4": "device failure",
}
View Source
var ErrorStatusRequests = map[string]string{
"query": "?",
}
View Source
var HumanToRawCommands = map[string]string{
"power": "POWR",
"input-list": "INST",
"input": "INPT",
"av-mute": "AVMT",
"error-status": "ERST",
"lamp": "LAMP",
"name": "NAME",
"manufacturer": "INF1",
"model": "INF2",
"version": "INFO",
}
View Source
var InputListQueryResponses = map[string]string{
"ERR3": "unavailable time",
"ERR4": "device failure",
}
View Source
var InputListRequests = map[string]string{
"query": "?",
}
View Source
var InputQueryResponses = map[string]string{
"ERR3": "unavailable time",
"ERR4": "device failure",
}
View Source
var InputRequests = map[string]string{
"query": "?",
"rgb1": "11",
"rgb2": "12",
"rgb3": "13",
"rgb4": "14",
"rgb5": "15",
"rgb6": "16",
"rgb7": "17",
"rgb8": "18",
"rgb9": "19",
"video1": "21",
"video2": "22",
"video3": "23",
"video4": "24",
"video5": "25",
"video6": "26",
"video7": "27",
"video8": "28",
"video9": "29",
"digital1": "31",
"digital2": "32",
"digital3": "33",
"digital4": "34",
"digital5": "35",
"digital6": "36",
"digital7": "37",
"digital8": "38",
"digital9": "39",
"storage1": "41",
"storage2": "42",
"storage3": "43",
"storage4": "44",
"storage5": "45",
"storage6": "46",
"storage7": "47",
"storage8": "48",
"storage9": "49",
"network1": "51",
"network2": "52",
"network3": "53",
"network4": "54",
"network5": "55",
"network6": "56",
"network7": "57",
"network8": "58",
"network9": "59",
}
View Source
var InputResponses = map[string]string{
"OK": "OK",
"ERR2": "nonexistent input source",
"ERR3": "unavailable time",
"ERR4": "device failure",
}
View Source
var LampQueryResponses = map[string]string{
"ERR3": "unavailable time",
"ERR4": "device failure",
}
View Source
var LampRequests = map[string]string{
"query": "?",
}
View Source
var LampStateResponses = map[string]string{
"0": "off",
"1": "on",
}
View Source
var ManufacturerQueryResponses = map[string]string{
"ERR3": "unavailable time",
"ERR4": "device failure",
}
View Source
var ManufacturerRequests = map[string]string{
"query": "?",
}
View Source
var ModelQueryResponses = map[string]string{
"ERR3": "unavailable time",
"ERR4": "device failure",
}
View Source
var ModelRequests = map[string]string{
"query": "?",
}
View Source
var NameQueryResponses = map[string]string{
"ERR3": "unavailable time",
"ERR4": "device failure",
}
View Source
var NameRequests = map[string]string{
"query": "?",
}
View Source
var PowerQueryResponses = map[string]string{
"0": "power-off (standby)",
"1": "power-on (lamp on)",
"2": "cooling",
"3": "warm-up",
"ERR3": "unavailable time",
"ERR4": "device failure",
}
View Source
var PowerRequests = map[string]string{
"query": "?",
"power-on": "1",
"power-off": "0",
}
View Source
var PowerResponses = map[string]string{
"OK": "success, or already current state",
"ERR2": "out of parameter",
"ERR3": "unavailable time",
"ERR4": "device failure",
}
View Source
var RawToHumanCommands = map[string]string{
"POWR": "power",
"INST": "input-list",
"INPT": "input",
"AVMT": "av-mute",
"ERST": "error-status",
"LAMP": "lamp",
"NAME": "name",
"INF1": "manufacturer",
"INF2": "model",
"INFO": "version",
}
View Source
var RawToHumanInputs = map[string]string{
"11": "rgb 1",
"12": "rgb 2",
"13": "rgb 3",
"14": "rgb 4",
"15": "rgb 5",
"16": "rgb 6",
"17": "rgb 7",
"18": "rgb 8",
"19": "rgb 9",
"21": "video 1",
"22": "video 2",
"23": "video 3",
"24": "video 4",
"25": "video 5",
"26": "video 6",
"27": "video 7",
"28": "video 8",
"29": "video 9",
"31": "digital 1",
"32": "digital 2",
"33": "digital 3",
"34": "digital 4",
"35": "digital 5",
"36": "digital 6",
"37": "digital 7",
"38": "digital 8",
"39": "digital 9",
"41": "storage 1",
"42": "storage 2",
"43": "storage 3",
"44": "storage 4",
"45": "storage 5",
"46": "storage 6",
"47": "storage 7",
"48": "storage 8",
"49": "storage 9",
"51": "network 1",
"52": "network 2",
"53": "network 3",
"54": "network 4",
"55": "network 5",
"56": "network 6",
"57": "network 7",
"58": "network 8",
"59": "network 9",
}
View Source
var VersionQueryResponses = map[string]string{
"ERR3": "unavailable time",
"ERR4": "device failure",
}
View Source
var VersionRequests = map[string]string{
"query": "?",
}
Functions ¶
This section is empty.
Types ¶
type PJRequest ¶
type PJRequest struct { Address string `json:"address"` Port string `json:"port"` Class string `json:"class"` Password string `json:"password"` Command string `json:"command"` Parameter string `json:"parameter"` }
Note that both human readable and raw requests use this struct
type PJResponse ¶
type PJResponse struct { Class string `json:"class"` Command string `json:"command"` Response []string `json:"response"` }
func HandleRawRequest ¶
func HandleRawRequest(request PJRequest) (PJResponse, error)
HandleRawRequest is a wrapper function for all handling activity success: returns a populated PjResponse struct, nil error failure: returns empty PjResponse struct, error
func HandleRequest ¶
func HandleRequest(request PJRequest) (PJResponse, error)
HandleRequest takes a PJRequest in human readable format success: returns a human readable PJResponse fail: returns an empty PJResponse, and accompanying error message
Click to show internal directories.
Click to hide internal directories.