keyer

package
v0.20.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const PatternCount = 4

Variables

This section is empty.

Functions

This section is empty.

Types

type ButtonView added in v0.20.0

type ButtonView interface {
	ShowMessage(...interface{})
	SetLabel(int, string)
	SetPattern(int, string)
	SetSpeed(int)
}

ButtonView represents the visual parts of trigger the transmission of the keyer macros.

type CWClient

type CWClient interface {
	Speed(int)
	Send(text string)
	Abort()
}

CWClient defines the interface used by the Keyer to output the CW.

type Keyer

type Keyer struct {
	// contains filtered or unexported fields
}

func New

func New(settings core.Settings, client CWClient, keyerSettings core.KeyerSettings, workmode core.Workmode, presets []core.KeyerPreset) *Keyer

New returns a new Keyer that has no patterns or templates defined yet.

func (*Keyer) EnterLabel added in v0.20.0

func (k *Keyer) EnterLabel(workmode core.Workmode, index int, text string)

func (*Keyer) EnterMacro added in v0.20.0

func (k *Keyer) EnterMacro(workmode core.Workmode, index int, pattern string)

func (*Keyer) EnterPattern

func (k *Keyer) EnterPattern(index int, pattern string)

func (*Keyer) EnterSpeed

func (k *Keyer) EnterSpeed(speed int)

func (*Keyer) GetPattern

func (k *Keyer) GetPattern(index int) string

func (*Keyer) GetText

func (k *Keyer) GetText(index int) (string, error)

func (*Keyer) KeyerSettings added in v0.6.0

func (k *Keyer) KeyerSettings() core.KeyerSettings

func (*Keyer) Notify added in v0.5.0

func (k *Keyer) Notify(listener any)

func (*Keyer) OpenKeyerSettings added in v0.20.0

func (k *Keyer) OpenKeyerSettings()

func (*Keyer) Save added in v0.6.0

func (k *Keyer) Save()

func (*Keyer) SelectPreset added in v0.12.0

func (k *Keyer) SelectPreset(name string)

func (*Keyer) Send

func (k *Keyer) Send(index int)

func (*Keyer) SendQuestion

func (k *Keyer) SendQuestion(q string)

func (*Keyer) SetSettings added in v0.15.0

func (k *Keyer) SetSettings(settings core.KeyerSettings)

func (*Keyer) SetSettingsView added in v0.20.0

func (k *Keyer) SetSettingsView(view SettingsView)

func (*Keyer) SetValues

func (k *Keyer) SetValues(values KeyerValueProvider)

func (*Keyer) SetView

func (k *Keyer) SetView(view ButtonView)

func (*Keyer) SetWriter added in v0.6.0

func (k *Keyer) SetWriter(writer Writer)

func (*Keyer) StationChanged added in v0.6.0

func (k *Keyer) StationChanged(station core.Station)

func (*Keyer) Stop

func (k *Keyer) Stop()

func (*Keyer) WorkmodeChanged added in v0.6.0

func (k *Keyer) WorkmodeChanged(workmode core.Workmode)

type KeyerValueProvider

type KeyerValueProvider func() core.KeyerValues

KeyerValueProvider provides the variable values for the Keyer templates on demand.

type SettingsView added in v0.20.0

type SettingsView interface {
	Show()
	ShowMessage(...any)
	ClearMessage()
	SetLabel(core.Workmode, int, string)
	SetMacro(core.Workmode, int, string)
	SetPresetNames([]string)
	SetPreset(string)
}

SettingsView represents the visual parts to enter keyer macros.

type Writer added in v0.6.0

type Writer interface {
	WriteKeyer(core.KeyerSettings) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL