bandmap

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 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, asyncRunner core.AsyncRunner, updatePeriod time.Duration, maximumAge time.Duration) *Bandmap

func NewDefaultBandmap

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

func (*Bandmap) Add

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

func (*Bandmap) Close

func (m *Bandmap) Close()

func (*Bandmap) ContestChanged

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

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) QTCAdded added in v1.1.0

func (m *Bandmap) QTCAdded(qtc core.QTC)

func (*Bandmap) ScoreChanged added in v1.1.0

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

func (*Bandmap) SelectByCallsign

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

func (*Bandmap) SelectEntry

func (m *Bandmap) SelectEntry(id core.BandmapEntryID)

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
	UpdateValue(*core.Callinfo, core.Band, core.Mode) bool
}

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(notifier *Notifier, 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(id core.BandmapEntryID, 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) MarkAsWorked added in v1.0.0

func (l *Entries) MarkAsWorked(call callsign.Callsign, band core.Band, mode core.Mode)

func (*Entries) Query added in v0.20.2

func (l *Entries) Query(order core.BandmapOrder, filters ...core.BandmapFilter) []core.BandmapEntry

func (*Entries) RefreshCallinfo added in v1.1.0

func (l *Entries) RefreshCallinfo(call callsign.Callsign, now time.Time, weights core.BandmapWeights)

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) MatchesAllFilters added in v0.22.0

func (e *Entry) MatchesAllFilters(filters ...core.BandmapFilter) bool

func (*Entry) MatchesAnyFilter added in v0.22.0

func (e *Entry) MatchesAnyFilter(filters ...core.BandmapFilter) 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 Notifier added in v0.22.0

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

func (*Notifier) Notify added in v0.22.0

func (n *Notifier) Notify(listener any)

type Selection added in v0.22.0

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

func NewSelection added in v0.22.0

func NewSelection(entries *Entries, notifier *Notifier, visibleFilter core.BandmapFilter) *Selection

func (*Selection) SelectByCallsign added in v0.22.0

func (s *Selection) SelectByCallsign(call callsign.Callsign)

func (*Selection) SelectEntry added in v0.22.0

func (s *Selection) SelectEntry(id core.BandmapEntryID)

func (*Selection) SelectHighestValue added in v0.22.0

func (s *Selection) SelectHighestValue()

func (*Selection) SelectNearest added in v0.22.0

func (s *Selection) SelectNearest(frequency core.Frequency)

func (*Selection) SelectNextDown added in v0.22.0

func (s *Selection) SelectNextDown(frequency core.Frequency)

func (*Selection) SelectNextUp added in v0.22.0

func (s *Selection) SelectNextUp(frequency core.Frequency)

func (*Selection) SelectedEntry added in v0.22.0

func (s *Selection) SelectedEntry() (core.BandmapEntry, bool)

type View

type View interface {
	Show()
	Hide()

	ShowFrame(frame core.BandmapFrame)
}

Jump to

Keyboard shortcuts

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