keyer

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2020 License: MIT Imports: 6 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(client CWClient, myCall callsign.Callsign, speed int) *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) Send

func (k *Keyer) Send(index int)

func (*Keyer) SendQuestion

func (k *Keyer) SendQuestion(q string)

func (*Keyer) SetPatterns

func (k *Keyer) SetPatterns(patterns []string)

func (*Keyer) SetValues

func (k *Keyer) SetValues(values KeyerValueProvider)

func (*Keyer) SetView

func (k *Keyer) SetView(view View)

func (*Keyer) Stop

func (k *Keyer) Stop()

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.

Jump to

Keyboard shortcuts

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