keyer

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 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 {
	Connect() error
	IsConnected() bool
	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, keyer core.Keyer, workmode core.Workmode) *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.Keyer

func (*Keyer) Notify added in v0.5.0

func (k *Keyer) Notify(listener interface{})

func (*Keyer) Save added in v0.6.0

func (k *Keyer) Save()

func (*Keyer) Send

func (k *Keyer) Send(index int)

func (*Keyer) SendQuestion

func (k *Keyer) SendQuestion(q string)

func (*Keyer) SetKeyer added in v0.6.0

func (k *Keyer) SetKeyer(keyer core.Keyer)

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 KeyerListener added in v0.6.0

type KeyerListener interface {
	KeyerChanged(core.Keyer)
}

type KeyerListenerFunc added in v0.6.0

type KeyerListenerFunc func(core.Keyer)

func (KeyerListenerFunc) KeyerChanged added in v0.6.0

func (f KeyerListenerFunc) KeyerChanged(keyer core.Keyer)

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

View represents the visual parts of the keyer.

type Writer added in v0.6.0

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

Jump to

Keyboard shortcuts

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