Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type Event
- type Flag
- func SetBalance(this *state, args []string) (Flag, error)
- func SetBass(this *state, args []string) (Flag, error)
- func SetBypass(this *state, args []string) (Flag, error)
- func SetDimmer(this *state, args []string) (Flag, error)
- func SetFreq(this *state, args []string) (Flag, error)
- func SetModel(this *state, args []string) (Flag, error)
- func SetMute(this *state, args []string) (Flag, error)
- func SetPower(this *state, args []string) (Flag, error)
- func SetSource(this *state, args []string) (Flag, error)
- func SetSpeaker(this *state, args []string) (Flag, error)
- func SetTreble(this *state, args []string) (Flag, error)
- func SetUpdateMode(this *state, args []string) (Flag, error)
- func SetVolume(this *state, args []string) (Flag, error)
- type Rotel
- func (this *Rotel) Balance() (string, uint)
- func (this *Rotel) Bass() int
- func (this *Rotel) Bypass() bool
- func (this *Rotel) Dimmer() uint
- func (this *Rotel) Freq() string
- func (this *Rotel) Model() string
- func (this *Rotel) Muted() bool
- func (this *Rotel) Power() bool
- func (self *Rotel) Run(ctx context.Context, ch chan<- Event) error
- func (this *Rotel) Set(param string) (Flag, error)
- func (self *Rotel) SetPower(state bool) error
- func (self *Rotel) SetSource(value string) error
- func (self *Rotel) SetVolume(value uint) error
- func (this *Rotel) Source() string
- func (this *Rotel) Speakers() []string
- func (self *Rotel) String() string
- func (this *Rotel) Treble() int
- func (this *Rotel) Update() string
- func (this *Rotel) Volume() uint
Constants ¶
View Source
const ( DEFAULT_TTY = "/dev/ttyUSB0" DEFAULT_TTY_BAUD = 115200 DEFAULT_TTY_TIMEOUT = 100 * time.Millisecond VOLUME_MIN = 1 VOLUME_MAX = 96 )
Variables ¶
View Source
var (
SOURCES = []string{
"pc_usb", "cd", "coax1", "coax2", "opt1", "opt2", "aux1", "aux2", "tuner", "phono", "usb", "bluetooth",
}
)
Functions ¶
This section is empty.
Types ¶
type Flag ¶
type Flag uint16
Flag provides flags on state changes
const ( ROTEL_FLAG_POWER Flag = (1 << iota) ROTEL_FLAG_VOLUME ROTEL_FLAG_MUTE ROTEL_FLAG_BASS ROTEL_FLAG_TREBLE ROTEL_FLAG_BALANCE ROTEL_FLAG_SOURCE ROTEL_FLAG_FREQ ROTEL_FLAG_BYPASS ROTEL_FLAG_SPEAKER ROTEL_FLAG_DIMMER ROTEL_FLAG_MODEL ROTEL_FLAG_NONE Flag = 0 ROTEL_FLAG_MIN = ROTEL_FLAG_POWER ROTEL_FLAG_MAX = ROTEL_FLAG_DIMMER )
func SetBalance ¶
func SetSpeaker ¶
func SetUpdateMode ¶
func (Flag) FlagString ¶
Click to show internal directories.
Click to hide internal directories.