Documentation ¶
Index ¶
- Constants
- func NotifyFrequencyListeners(listeners []interface{}, frequency client.Frequency)
- func NotifyModeListeners(listeners []interface{}, mode client.Mode)
- func NotifyPTTListeners(listeners []interface{}, ptt client.PTT)
- func NotifyPowerLevelListeners(listeners []interface{}, powerLevel float64)
- func NotifyReconnectListeners(listeners []interface{})
- func NotifyVFOListeners(listeners []interface{}, vfo client.VFO)
- type Factory
- type FrequencyListener
- type FrequencyListenerFunc
- type HamlibClient
- type MOXButton
- type ModeListener
- type ModeListenerFunc
- type PTTListener
- type PTTListenerFunc
- type PowerLevelListener
- type PowerLevelListenerFunc
- type ReconnectListener
- type ReconnectListenerFunc
- type SetButton
- type SetModeButton
- func (b *SetModeButton) Enable(enabled bool)
- func (b *SetModeButton) Image(gc hamdeck.GraphicContext, redrawImages bool) image.Image
- func (b *SetModeButton) OnLongpress()
- func (b *SetModeButton) Pressed()
- func (b *SetModeButton) Released()
- func (b *SetModeButton) SetFrequency(frequency client.Frequency)
- func (b *SetModeButton) SetMode(mode client.Mode)
- type SetPowerLevelButton
- type SetVFOButton
- type SwitchToBandButton
- func (b *SwitchToBandButton) Enable(enabled bool)
- func (b *SwitchToBandButton) Image(gc hamdeck.GraphicContext, redrawImages bool) image.Image
- func (b *SwitchToBandButton) Pressed()
- func (b *SwitchToBandButton) Released()
- func (b *SwitchToBandButton) SetFrequency(frequency client.Frequency)
- func (b *SwitchToBandButton) SetMode(mode client.Mode)
- type ToggleModeButton
- func (b *ToggleModeButton) Enable(enabled bool)
- func (b *ToggleModeButton) Image(gc hamdeck.GraphicContext, redrawImages bool) image.Image
- func (b *ToggleModeButton) OnLongpress()
- func (b *ToggleModeButton) Pressed()
- func (b *ToggleModeButton) Released()
- func (b *ToggleModeButton) SetFrequency(frequency client.Frequency)
- func (b *ToggleModeButton) SetMode(mode client.Mode)
- type VFOListener
- type VFOListenerFunc
Constants ¶
View Source
const ( ConfigAddress = "address" ConfigCommand = "command" ConfigArgs = "args" ConfigMode = "mode" ConfigLabel = "label" ConfigMode1 = "mode1" ConfigLabel1 = "label1" ConfigMode2 = "mode2" ConfigLabel2 = "label2" ConfigBand = "band" ConfigValue = "value" ConfigVFO = "vfo" ConfigUseUpDown = "use_up_down" )
View Source
const ( ConnectionType = "hamlib" SetModeButtonType = "hamlib.SetMode" ToggleModeButtonType = "hamlib.ToggleMode" SetButtonType = "hamlib.Set" SwitchToBandButtonType = "hamlib.SwitchToBand" SetPowerLevelButtonType = "hamlib.SetPowerLevel" MOXButtonType = "hamlib.MOX" SetVFOButtonType = "hamlib.SetVFO" )
Variables ¶
This section is empty.
Functions ¶
func NotifyModeListeners ¶
func NotifyPTTListeners ¶
func NotifyPowerLevelListeners ¶
func NotifyPowerLevelListeners(listeners []interface{}, powerLevel float64)
func NotifyReconnectListeners ¶
func NotifyReconnectListeners(listeners []interface{})
func NotifyVFOListeners ¶
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
func NewButtonFactory ¶
func NewButtonFactory(provider hamdeck.ConnectionConfigProvider, legacyAddress string) *Factory
type FrequencyListener ¶
type FrequencyListenerFunc ¶
func (FrequencyListenerFunc) SetFrequency ¶
func (f FrequencyListenerFunc) SetFrequency(frequency client.Frequency)
type HamlibClient ¶
func NewClient ¶
func NewClient(address string) *HamlibClient
func (*HamlibClient) Close ¶
func (c *HamlibClient) Close()
func (*HamlibClient) Connect ¶
func (c *HamlibClient) Connect() error
func (*HamlibClient) Connected ¶
func (c *HamlibClient) Connected() bool
func (*HamlibClient) KeepOpen ¶
func (c *HamlibClient) KeepOpen()
func (*HamlibClient) Listen ¶
func (c *HamlibClient) Listen(listener interface{})
func (*HamlibClient) WithRequestTimeout ¶
func (c *HamlibClient) WithRequestTimeout() context.Context
type MOXButton ¶
type MOXButton struct { hamdeck.BaseButton // contains filtered or unexported fields }
func NewMOXButton ¶
func NewMOXButton(hamlibClient *HamlibClient, label string) *MOXButton
type ModeListener ¶
type ModeListenerFunc ¶
func (ModeListenerFunc) SetMode ¶
func (f ModeListenerFunc) SetMode(mode client.Mode)
type PTTListener ¶
type PTTListenerFunc ¶
func (PTTListenerFunc) SetPTT ¶
func (f PTTListenerFunc) SetPTT(ptt client.PTT)
type PowerLevelListener ¶
type PowerLevelListener interface {
SetPowerLevel(powerLevel float64)
}
type PowerLevelListenerFunc ¶
type PowerLevelListenerFunc func(float64)
func (PowerLevelListenerFunc) SetPowerLevel ¶
func (f PowerLevelListenerFunc) SetPowerLevel(powerLevel float64)
type ReconnectListener ¶
type ReconnectListener interface {
Reconnected()
}
type ReconnectListenerFunc ¶
type ReconnectListenerFunc func()
func (ReconnectListenerFunc) Reconnect ¶
func (f ReconnectListenerFunc) Reconnect()
type SetButton ¶
type SetButton struct { hamdeck.BaseButton // contains filtered or unexported fields }
func NewSetButton ¶
func NewSetButton(hamlibClient *HamlibClient, label string, command string, args ...string) *SetButton
type SetModeButton ¶
type SetModeButton struct { hamdeck.BaseButton // contains filtered or unexported fields }
func NewSetModeButton ¶
func NewSetModeButton(hamlibClient *HamlibClient, mode client.Mode, label string) *SetModeButton
func (*SetModeButton) Enable ¶
func (b *SetModeButton) Enable(enabled bool)
func (*SetModeButton) Image ¶
func (b *SetModeButton) Image(gc hamdeck.GraphicContext, redrawImages bool) image.Image
func (*SetModeButton) OnLongpress ¶
func (b *SetModeButton) OnLongpress()
func (*SetModeButton) Pressed ¶
func (b *SetModeButton) Pressed()
func (*SetModeButton) Released ¶
func (b *SetModeButton) Released()
func (*SetModeButton) SetFrequency ¶
func (b *SetModeButton) SetFrequency(frequency client.Frequency)
func (*SetModeButton) SetMode ¶
func (b *SetModeButton) SetMode(mode client.Mode)
type SetPowerLevelButton ¶
type SetPowerLevelButton struct { hamdeck.BaseButton // contains filtered or unexported fields }
func NewSetPowerLevelButton ¶
func NewSetPowerLevelButton(hamlibClient *HamlibClient, label string, value float64) *SetPowerLevelButton
func (*SetPowerLevelButton) Enable ¶
func (b *SetPowerLevelButton) Enable(enabled bool)
func (*SetPowerLevelButton) Image ¶
func (b *SetPowerLevelButton) Image(gc hamdeck.GraphicContext, redrawImages bool) image.Image
func (*SetPowerLevelButton) Pressed ¶
func (b *SetPowerLevelButton) Pressed()
func (*SetPowerLevelButton) Released ¶
func (b *SetPowerLevelButton) Released()
func (*SetPowerLevelButton) SetPowerLevel ¶
func (b *SetPowerLevelButton) SetPowerLevel(powerLevel float64)
type SetVFOButton ¶
type SetVFOButton struct { hamdeck.BaseButton // contains filtered or unexported fields }
func NewSetVFOButton ¶
func NewSetVFOButton(hamlibClient *HamlibClient, label string, vfo client.VFO) *SetVFOButton
func (*SetVFOButton) Enable ¶
func (b *SetVFOButton) Enable(enabled bool)
func (*SetVFOButton) Image ¶
func (b *SetVFOButton) Image(gc hamdeck.GraphicContext, redrawImages bool) image.Image
func (*SetVFOButton) Pressed ¶
func (b *SetVFOButton) Pressed()
func (*SetVFOButton) Released ¶
func (b *SetVFOButton) Released()
func (*SetVFOButton) SetVFO ¶
func (b *SetVFOButton) SetVFO(vfo client.VFO)
type SwitchToBandButton ¶
type SwitchToBandButton struct { hamdeck.BaseButton // contains filtered or unexported fields }
func NewSwitchToBandButton ¶
func NewSwitchToBandButton(hamlibClient *HamlibClient, label string, bandName string, useUpDown bool) *SwitchToBandButton
func (*SwitchToBandButton) Enable ¶
func (b *SwitchToBandButton) Enable(enabled bool)
func (*SwitchToBandButton) Image ¶
func (b *SwitchToBandButton) Image(gc hamdeck.GraphicContext, redrawImages bool) image.Image
func (*SwitchToBandButton) Pressed ¶
func (b *SwitchToBandButton) Pressed()
func (*SwitchToBandButton) Released ¶
func (b *SwitchToBandButton) Released()
func (*SwitchToBandButton) SetFrequency ¶
func (b *SwitchToBandButton) SetFrequency(frequency client.Frequency)
func (*SwitchToBandButton) SetMode ¶
func (b *SwitchToBandButton) SetMode(mode client.Mode)
type ToggleModeButton ¶
type ToggleModeButton struct { hamdeck.BaseButton // contains filtered or unexported fields }
func NewToggleModeButton ¶
func NewToggleModeButton(hamlibClient *HamlibClient, mode1 client.Mode, label1 string, mode2 client.Mode, label2 string) *ToggleModeButton
func (*ToggleModeButton) Enable ¶
func (b *ToggleModeButton) Enable(enabled bool)
func (*ToggleModeButton) Image ¶
func (b *ToggleModeButton) Image(gc hamdeck.GraphicContext, redrawImages bool) image.Image
func (*ToggleModeButton) OnLongpress ¶
func (b *ToggleModeButton) OnLongpress()
func (*ToggleModeButton) Pressed ¶
func (b *ToggleModeButton) Pressed()
func (*ToggleModeButton) Released ¶
func (b *ToggleModeButton) Released()
func (*ToggleModeButton) SetFrequency ¶
func (b *ToggleModeButton) SetFrequency(frequency client.Frequency)
func (*ToggleModeButton) SetMode ¶
func (b *ToggleModeButton) SetMode(mode client.Mode)
type VFOListener ¶
type VFOListenerFunc ¶
func (VFOListenerFunc) SetVFO ¶
func (f VFOListenerFunc) SetVFO(vfo client.VFO)
Click to show internal directories.
Click to hide internal directories.