bandmap

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultUpdatePeriod: the bandmap is updated with this period
	DefaultUpdatePeriod time.Duration = 2 * time.Second
	// DefaultMaximumAge of entries in the bandmap
	// entries that were not seen within this period are removed from the bandmap
	DefaultMaximumAge time.Duration = 10 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bandmap

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

func NewBandmap

func NewBandmap(clock core.Clock, settings core.Settings, dupeChecker DupeChecker, updatePeriod time.Duration, maximumAge time.Duration) *Bandmap

func NewDefaultBandmap

func NewDefaultBandmap(clock core.Clock, settings core.Settings, dupeChecker DupeChecker) *Bandmap

func (*Bandmap) Add

func (m *Bandmap) Add(spot core.Spot)

func (*Bandmap) AllBy

func (m *Bandmap) AllBy(order core.BandmapOrder) []core.BandmapEntry

func (*Bandmap) Clear

func (m *Bandmap) Clear()

func (*Bandmap) Close

func (m *Bandmap) Close()

func (*Bandmap) ContestChanged

func (m *Bandmap) ContestChanged(contest core.Contest)

func (*Bandmap) EntryVisible

func (m *Bandmap) EntryVisible(index int) bool

func (*Bandmap) GotoHighestValueEntry added in v0.18.0

func (m *Bandmap) GotoHighestValueEntry()

func (*Bandmap) GotoNearestEntry

func (m *Bandmap) GotoNearestEntry()

func (*Bandmap) GotoNextEntryDown

func (m *Bandmap) GotoNextEntryDown()

func (*Bandmap) GotoNextEntryUp

func (m *Bandmap) GotoNextEntryUp()

func (*Bandmap) Hide

func (m *Bandmap) Hide()

func (*Bandmap) Notify

func (m *Bandmap) Notify(listener any)

func (*Bandmap) RemainingLifetime

func (m *Bandmap) RemainingLifetime(index int) float64

func (*Bandmap) ScoreUpdated added in v0.18.0

func (m *Bandmap) ScoreUpdated(_ core.Score)

func (*Bandmap) SelectByCallsign

func (m *Bandmap) SelectByCallsign(call callsign.Callsign) bool

func (*Bandmap) SelectEntry

func (m *Bandmap) SelectEntry(index int)

func (*Bandmap) SetActiveBand

func (m *Bandmap) SetActiveBand(band core.Band)

func (*Bandmap) SetCallinfo

func (m *Bandmap) SetCallinfo(callinfo Callinfo)

func (*Bandmap) SetVFO

func (m *Bandmap) SetVFO(vfo core.VFO)

func (*Bandmap) SetView

func (m *Bandmap) SetView(view View)

func (*Bandmap) SetVisibleBand

func (m *Bandmap) SetVisibleBand(band core.Band)

func (*Bandmap) Show

func (m *Bandmap) Show()

func (*Bandmap) VFOBandChanged

func (m *Bandmap) VFOBandChanged(band core.Band)

func (*Bandmap) VFOFrequencyChanged

func (m *Bandmap) VFOFrequencyChanged(frequency core.Frequency)

func (*Bandmap) VFOModeChanged

func (m *Bandmap) VFOModeChanged(mode core.Mode)

type Callinfo

type Callinfo interface {
	GetInfo(callsign.Callsign, core.Band, core.Mode, []string) core.Callinfo
	GetValue(callsign.Callsign, core.Band, core.Mode, []string) (int, int, map[conval.Property]string)
}

type DupeChecker

type DupeChecker interface {
	FindWorkedQSOs(callsign.Callsign, core.Band, core.Mode) ([]core.QSO, bool)
}

type Entries

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

func NewEntries

func NewEntries(countEntryValue func(core.BandmapEntry) bool) *Entries

func (*Entries) Add

func (l *Entries) Add(spot core.Spot, now time.Time, weights core.BandmapWeights)

func (*Entries) All

func (l *Entries) All() []core.BandmapEntry

func (*Entries) AllBy

func (l *Entries) AllBy(order core.BandmapOrder) []core.BandmapEntry

func (*Entries) Bands

func (l *Entries) Bands(active, visible core.Band) []core.BandSummary

func (*Entries) CleanOut

func (l *Entries) CleanOut(maximumAge time.Duration, now time.Time, weights core.BandmapWeights)

func (*Entries) Clear

func (l *Entries) Clear()

func (*Entries) DoOnEntry

func (l *Entries) DoOnEntry(index int, f func(core.BandmapEntry))

func (*Entries) ForEach

func (l *Entries) ForEach(f func(entry core.BandmapEntry) bool)

func (*Entries) Len

func (l *Entries) Len() int

func (*Entries) Notify

func (l *Entries) Notify(listener any)

func (*Entries) Select

func (l *Entries) Select(index int)

func (*Entries) SetBands

func (l *Entries) SetBands(bands []core.Band)

func (*Entries) SetCallinfo

func (l *Entries) SetCallinfo(callinfo Callinfo)

type Entry

type Entry struct {
	core.BandmapEntry
	// contains filtered or unexported fields
}

func NewEntry

func NewEntry(spot core.Spot) Entry

func (*Entry) Add

func (e *Entry) Add(spot core.Spot) (core.SpotQuality, bool)

func (*Entry) Len

func (e *Entry) Len() int

func (*Entry) Matches

func (e *Entry) Matches(spot core.Spot) (core.SpotQuality, bool)

func (*Entry) RemoveSpotsBefore

func (e *Entry) RemoveSpotsBefore(timestamp time.Time) bool

type EntryAddedListener

type EntryAddedListener interface {
	EntryAdded(core.BandmapEntry)
}

type EntryOnFrequencyListener added in v0.20.0

type EntryOnFrequencyListener interface {
	EntryOnFrequency(core.BandmapEntry, bool)
}

type EntryRemovedListener

type EntryRemovedListener interface {
	EntryRemoved(core.BandmapEntry)
}

type EntrySelectedListener

type EntrySelectedListener interface {
	EntrySelected(core.BandmapEntry)
}

type EntryUpdatedListener

type EntryUpdatedListener interface {
	EntryUpdated(core.BandmapEntry)
}

type Logger

type Logger struct{}

func (*Logger) EntryAdded

func (l *Logger) EntryAdded(e core.BandmapEntry)

func (*Logger) EntryRemoved

func (l *Logger) EntryRemoved(e core.BandmapEntry)

func (*Logger) EntryUpdated

func (l *Logger) EntryUpdated(e core.BandmapEntry)

type View

type View interface {
	Show()
	Hide()

	ShowFrame(frame core.BandmapFrame)
	RevealEntry(entry core.BandmapEntry)
}

Jump to

Keyboard shortcuts

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