keyer

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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) 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) 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) SetValues

func (k *Keyer) SetValues(values KeyerValueProvider)

func (*Keyer) SetView

func (k *Keyer) SetView(view View)

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 View

type View interface {
	ShowMessage(...interface{})
	SetPattern(int, string)
	SetSpeed(int)
	SetPresetNames([]string)
	SetPreset(string)
}

View represents the visual parts of the keyer.

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