Documentation ¶
Index ¶
- Constants
- type AliveListener
- type Client
- func (c *Client) AddPath(path string)
- func (c *Client) Connected() bool
- func (c *Client) Disconnect()
- func (c *Client) Notify(listener interface{})
- func (c *Client) Publish(topic string, payload string)
- func (c *Client) SetAlive(path string, alive bool)
- func (c *Client) SetSWR(path string, swr float64)
- func (c *Client) SetTX(path string, tx bool)
- func (c *Client) SetTune(path string, tuning bool)
- func (c *Client) Subscribe(s Subscriber, topics ...string)
- func (c *Client) Tune(path string)
- type Factory
- type SWRListener
- type Subscriber
- type SwitchButton
- type SwitchMode
- type TXListener
- type TuneButton
- func (b *TuneButton) Enable(enabled bool)
- func (b *TuneButton) Image(gc hamdeck.GraphicContext, redrawImages bool) image.Image
- func (b *TuneButton) Pressed()
- func (b *TuneButton) Released()
- func (b *TuneButton) SetAlive(path string, alive bool)
- func (b *TuneButton) SetSWR(path string, swr float64)
- func (b *TuneButton) SetTX(path string, tx bool)
- func (b *TuneButton) SetTune(path string, tuning bool)
- type TuneListener
Constants ¶
View Source
const ( ConfigAddress = "address" ConfigUsername = "username" ConfigPassword = "password" ConfigLabel = "label" ConfigPath = "path" ConfigInputTopic = "inputTopic" ConfigOutputTopic = "outputTopic" ConfigOnPayload = "onPayload" ConfigOffPayload = "offPayload" ConfigMode = "mode" )
View Source
const ( ConnectionType = "mqtt" TuneButtonType = "mqtt.AT100Tune" SwitchButtonType = "mqtt.Switch" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliveListener ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Disconnect ¶
func (c *Client) Disconnect()
func (*Client) Subscribe ¶
func (c *Client) Subscribe(s Subscriber, topics ...string)
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
func NewButtonFactory ¶
type SWRListener ¶
type Subscriber ¶
type SwitchButton ¶
type SwitchButton struct { hamdeck.BaseButton // contains filtered or unexported fields }
func NewSwitchButton ¶
func NewSwitchButton(client *Client, label string, inputTopic, outputTopic, onPayload, offPayload string, mode SwitchMode) *SwitchButton
func (*SwitchButton) Enable ¶
func (b *SwitchButton) Enable(enabled bool)
func (*SwitchButton) Image ¶
func (b *SwitchButton) Image(gc hamdeck.GraphicContext, redrawImages bool) image.Image
func (*SwitchButton) Pressed ¶
func (b *SwitchButton) Pressed()
func (*SwitchButton) Released ¶
func (b *SwitchButton) Released()
func (*SwitchButton) SetInput ¶
func (b *SwitchButton) SetInput(topic string, payload string)
type SwitchMode ¶
type SwitchMode string
const ( SwitchModeOn SwitchMode = "ON" SwitchModeOff SwitchMode = "OFF" SwitchModeToggle SwitchMode = "TOGGLE" )
type TXListener ¶
type TuneButton ¶
type TuneButton struct { hamdeck.BaseButton // contains filtered or unexported fields }
func NewTuneButton ¶
func NewTuneButton(atu100Client *Client, label string, path string) *TuneButton
func (*TuneButton) Enable ¶
func (b *TuneButton) Enable(enabled bool)
func (*TuneButton) Image ¶
func (b *TuneButton) Image(gc hamdeck.GraphicContext, redrawImages bool) image.Image
func (*TuneButton) Pressed ¶
func (b *TuneButton) Pressed()
func (*TuneButton) Released ¶
func (b *TuneButton) Released()
func (*TuneButton) SetAlive ¶
func (b *TuneButton) SetAlive(path string, alive bool)
func (*TuneButton) SetSWR ¶
func (b *TuneButton) SetSWR(path string, swr float64)
func (*TuneButton) SetTX ¶
func (b *TuneButton) SetTX(path string, tx bool)
func (*TuneButton) SetTune ¶
func (b *TuneButton) SetTune(path string, tuning bool)
type TuneListener ¶
Click to show internal directories.
Click to hide internal directories.