Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SignalConfigFile map[string]SignalConfig
SignalConfigFile maps signal names to their operations.
Functions ¶
func ParseConfig ¶
func ParseConfig() (map[string]SignalConfig, error)
ParseConfig gets the config file and reads it into the struct
Types ¶
type SignalConfig ¶
type SignalConfig struct {
SignalValueSequence []SignalValue `json:"signalValueSequence"`
}
SignalConfig represents the structure, along with SignalValue. JSON Format of the file is as follows:
{ "PowerStandby": { "signalValueSequence": [{ "signalName": "confirm_system_off", "isSignalUrlParameter": true, "value": "1", "isValueUrlParameter": false }, { "signalName": "confirm_system_off", "isSignalUrlParameter": true, "value": "1", "isValueUrlParameter": false }] }, "ChangeInput": { "signalName": "port", "isUrlParameter": true, "signalValueSequence": [{ "value": "1", "isUrlParameter": false }] }, "SetVolume": { "signalName": "system_volume_level", "isUrlParameter": false, "signalValueSequence": [{ "value": "level", "isUrlParameter": true }] } }
type SignalState ¶
SignalState represents a signal state.
func GetSignalConfigSequence ¶
func GetSignalConfigSequence(context echo.Context, command string) ([]SignalState, error)
GetSignalConfigSequence needs to handle if we need to paramterize the signal name, as well as the value. returns a map of signalName -> value
Click to show internal directories.
Click to hide internal directories.