Documentation
¶
Index ¶
- Constants
- Variables
- func BandmapByFrequency(a, b BandmapEntry) int
- func BandmapByValue(a, b BandmapEntry) int
- func BinCountForDuration(duration time.Duration) int
- func Compare[T constraints.Ordered](a, b T) int
- func FormatDuration(d time.Duration) string
- func FormatTimestamp(ts time.Time) string
- func IsExchangeField(name string) bool
- func IsWorkedSpot(entry BandmapEntry) bool
- func QTCByTimestamp(a, b QTC) int
- type AnnotatedCallsign
- type AsyncRunner
- type Band
- type BandGraph
- func (g *BandGraph) Add(timestamp time.Time, score QSOScore)
- func (g *BandGraph) AddQTC(timestamp time.Time, score QTCScore)
- func (g *BandGraph) Bindex(timestamp time.Time) int
- func (g BandGraph) Copy() BandGraph
- func (g BandGraph) ElapsedTime(timestamp time.Time) time.Duration
- func (g BandGraph) ElapsedTimePercent(timestamp time.Time) float64
- func (g BandGraph) PercentAsDuration(percent float64) time.Duration
- func (g BandGraph) ScaleHourlyGoalToBin(goal int) float64
- func (g BandGraph) String() string
- type BandScore
- func (s *BandScore) Add(other BandScore)
- func (s *BandScore) AddQSO(qso QSOScore)
- func (s *BandScore) AddQTC(qtc QTCScore)
- func (s BandScore) Max(other BandScore) BandScore
- func (s BandScore) PointsPerQSO() float64
- func (s BandScore) QSOsPerMulti() float64
- func (s BandScore) Result() int
- func (s BandScore) String() string
- type BandSummary
- type BandmapEntry
- type BandmapEntryID
- type BandmapFilter
- func And(filters ...BandmapFilter) BandmapFilter
- func FromContinent(continent string) BandmapFilter
- func FromDXCC(primaryPrefix string) BandmapFilter
- func FromSource(source SpotType) BandmapFilter
- func HeardAfter(deadline time.Time) BandmapFilter
- func InMode(mode Mode) BandmapFilter
- func Not(filter BandmapFilter) BandmapFilter
- func OnBand(band Band) BandmapFilter
- func OnFrequency(frequency Frequency) BandmapFilter
- func Or(filters ...BandmapFilter) BandmapFilter
- func WithQuality(quality SpotQuality) BandmapFilter
- type BandmapFrame
- type BandmapFrameIndex
- type BandmapOrder
- type BandmapWeights
- type Callinfo
- type CallinfoFrame
- type Callsign
- type CallsignEnteredListener
- type CallsignLoggedListener
- type Clock
- type Contest
- type ESMState
- type EntryField
- type ExchangeField
- type Frequency
- type Hour
- type Keyer
- type KeyerPreset
- type KeyerSettings
- type KeyerType
- type KeyerValues
- type MatchingAssembly
- type MatchingOperation
- type MatchingPart
- type Mode
- type QSO
- type QSODataState
- type QSONumber
- type QSORate
- type QSOScore
- type QSOsPerHour
- type QSOsPerHours
- type QTC
- type QTCField
- type QTCHeader
- type QTCKind
- type QTCMode
- type QTCScore
- type QTCSeries
- type QTCTime
- type QTCWorkflowPhase
- type RST
- type Radio
- type RadioType
- type Score
- type Service
- type ServiceStatusListener
- type ServiceStatusListenerFunc
- type Settings
- type Spot
- type SpotFilter
- type SpotQuality
- type SpotSource
- type SpotType
- type Station
- type Summary
- type TimeReport
- type VFO
- type VFOBandListener
- type VFOFrequencyListener
- type VFOModeListener
- type VFOPTTListener
- type VFOXITListener
- type Workmode
- type XITControl
Constants ¶
const FilterPlaceholder = "."
FilterPlaceholder can be used as placeholder for a missed character in the callsign.
const MaxQTCsPerCall = 10 // TODO: this should be configurable through the contest definition
const NoQTCIndex int = -1
const RadioKeyer = "radio"
const SpotQualityTags = "?BQV"
Variables ¶
var Bands = []Band{Band160m, Band80m, Band60m, Band40m, Band30m, Band20m, Band17m, Band15m, Band12m, Band10m}
Bands are all supported HF bands.
var Modes = []Mode{ModeCW, ModeSSB, ModeFM, ModeRTTY, ModeDigital}
Modes are all relevant modes.
var NoCallsign = callsign.NoCallsign
var ZeroQTCTime = QTCTime{0, 0}
Functions ¶
func BandmapByFrequency ¶ added in v0.13.0
func BandmapByFrequency(a, b BandmapEntry) int
func BandmapByValue ¶ added in v0.20.2
func BandmapByValue(a, b BandmapEntry) int
func BinCountForDuration ¶ added in v1.0.0
func Compare ¶ added in v1.1.0
func Compare[T constraints.Ordered](a, b T) int
func FormatDuration ¶ added in v1.1.0
func FormatTimestamp ¶ added in v1.1.0
func IsExchangeField ¶ added in v0.10.0
func IsWorkedSpot ¶ added in v0.22.0
func IsWorkedSpot(entry BandmapEntry) bool
func QTCByTimestamp ¶ added in v1.1.0
Types ¶
type AnnotatedCallsign ¶
type AnnotatedCallsign struct {
Callsign Callsign
Assembly MatchingAssembly
Duplicate bool
Worked bool
ExactMatch bool
Points int
Multis int
PredictedExchange []string
Name string
UserText string
OnFrequency bool
Comparable any
Compare func(any, any) bool
}
AnnotatedCallsign contains a callsign with additional information retrieved from databases and the logbook.
func (AnnotatedCallsign) LessThan ¶ added in v0.9.0
func (c AnnotatedCallsign) LessThan(o AnnotatedCallsign) bool
type AsyncRunner ¶ added in v0.5.0
type AsyncRunner func(func())
type Band ¶
type Band string
Band represents an amateur radio band.
type BandGraph ¶ added in v0.12.0
type BandGraph struct {
Band Band
DataPoints []BandScore
Max BandScore
// contains filtered or unexported fields
}
func NewBandGraph ¶ added in v0.12.0
func (*BandGraph) Bindex ¶ added in v0.12.0
Bindex returns the index of the bin corresponding to the given timestamp.
func (BandGraph) ElapsedTime ¶ added in v1.0.0
func (BandGraph) ElapsedTimePercent ¶ added in v1.0.0
func (BandGraph) PercentAsDuration ¶ added in v1.0.0
func (BandGraph) ScaleHourlyGoalToBin ¶ added in v0.12.0
type BandScore ¶ added in v0.2.0
func (BandScore) PointsPerQSO ¶ added in v0.3.0
func (BandScore) QSOsPerMulti ¶ added in v0.3.0
type BandSummary ¶ added in v0.13.0
type BandSummary struct {
Band Band
Points int
MultiValues map[conval.Property]map[string]bool
MaxPoints bool
MaxMultis bool
Active bool
Visible bool
}
func (*BandSummary) AddMultiValues ¶ added in v0.17.0
func (s *BandSummary) AddMultiValues(values map[conval.Property]string)
func (*BandSummary) Multis ¶ added in v0.13.0
func (s *BandSummary) Multis() int
type BandmapEntry ¶ added in v0.13.0
type BandmapEntry struct {
ID BandmapEntryID
Label string
Call Callsign
Frequency Frequency
Band Band
Mode Mode
LastHeard time.Time
Source SpotType
SpotCount int
Quality SpotQuality
Info Callinfo
}
func (BandmapEntry) OnFrequency ¶ added in v0.17.0
func (e BandmapEntry) OnFrequency(frequency Frequency) bool
OnFrequency indicates if this entry is on the given frequency, within the defined threshold.
func (BandmapEntry) ProximityFactor ¶ added in v0.13.0
func (e BandmapEntry) ProximityFactor(frequency Frequency) float64
ProximityFactor increases the closer the given frequency is to this entry's frequency. 0.0 = not in proximity, 1.0 = exactly on frequency the sign indiciates if the entry's frequency is above (>0) or below (<0) the reference frequency
type BandmapEntryID ¶ added in v0.20.2
type BandmapEntryID uint64
const NoEntryID BandmapEntryID = 0
type BandmapFilter ¶ added in v0.20.2
type BandmapFilter func(entry BandmapEntry) bool
func And ¶ added in v0.22.0
func And(filters ...BandmapFilter) BandmapFilter
func FromContinent ¶ added in v0.20.2
func FromContinent(continent string) BandmapFilter
func FromDXCC ¶ added in v0.20.2
func FromDXCC(primaryPrefix string) BandmapFilter
func FromSource ¶ added in v0.20.2
func FromSource(source SpotType) BandmapFilter
func HeardAfter ¶ added in v0.20.2
func HeardAfter(deadline time.Time) BandmapFilter
func InMode ¶ added in v0.20.2
func InMode(mode Mode) BandmapFilter
func Not ¶ added in v0.22.0
func Not(filter BandmapFilter) BandmapFilter
func OnBand ¶ added in v0.20.2
func OnBand(band Band) BandmapFilter
func OnFrequency ¶ added in v0.22.0
func OnFrequency(frequency Frequency) BandmapFilter
func Or ¶ added in v0.22.0
func Or(filters ...BandmapFilter) BandmapFilter
func WithQuality ¶ added in v0.20.2
func WithQuality(quality SpotQuality) BandmapFilter
type BandmapFrame ¶ added in v0.13.0
type BandmapFrame struct {
Frequency Frequency
ActiveBand Band
VisibleBand Band
Mode Mode
Bands []BandSummary
Entries []BandmapEntry
Index BandmapFrameIndex
SelectedEntry BandmapEntry
NearestEntry BandmapEntry
HighestValueEntry BandmapEntry
QTCsEnabled bool
}
func (BandmapFrame) EntryByID ¶ added in v0.20.2
func (f BandmapFrame) EntryByID(id BandmapEntryID) (BandmapEntry, bool)
func (BandmapFrame) IndexOf ¶ added in v0.20.2
func (f BandmapFrame) IndexOf(id BandmapEntryID) (int, bool)
type BandmapFrameIndex ¶ added in v0.20.2
type BandmapFrameIndex map[BandmapEntryID]int
func NewFrameIndex ¶ added in v0.20.2
func NewFrameIndex(entries []BandmapEntry) BandmapFrameIndex
type BandmapOrder ¶ added in v0.13.0
type BandmapOrder func(BandmapEntry, BandmapEntry) int
func BandmapByDistance ¶ added in v0.13.0
func BandmapByDistance(referenceFrequency Frequency) BandmapOrder
func BandmapByDistanceAndDescendingID ¶ added in v0.22.0
func BandmapByDistanceAndDescendingID(referenceFrequency Frequency) BandmapOrder
func Descending ¶ added in v0.13.0
func Descending(o BandmapOrder) BandmapOrder
type BandmapWeights ¶ added in v0.18.0
type Callinfo ¶ added in v0.13.0
type Callinfo struct {
Input string
Call Callsign
CallValid bool
DXCCEntity dxcc.Prefix
Azimuth latlon.Degrees
Distance latlon.Km
PredictedExchange []string
UserText string
Worked bool // already worked on another band/mode, but does not count as duplicate
Duplicate bool // counts as duplicate
Points int
Multis int
MultiValues map[conval.Property]string
Value int
WeightedValue float64
SentQTCs int
ReceivedQTCs int
}
type CallinfoFrame ¶ added in v0.22.0
type CallinfoFrame struct {
NormalizedCallInput string
DXCCEntity dxcc.Prefix
Azimuth latlon.Degrees
Distance latlon.Km
CallsignOnFrequency AnnotatedCallsign
PredictedExchange []string
Points int
Multis int
Value int
SentQTCs int
ReceivedQTCs int
UserInfo string
Supercheck []AnnotatedCallsign
}
func (CallinfoFrame) BestMatchOnFrequency ¶ added in v0.22.0
func (f CallinfoFrame) BestMatchOnFrequency() AnnotatedCallsign
func (CallinfoFrame) GetMatch ¶ added in v0.22.0
func (f CallinfoFrame) GetMatch(i int) string
type CallsignEnteredListener ¶ added in v0.20.0
type CallsignEnteredListener interface {
CallsignEntered(callsign string)
}
type CallsignLoggedListener ¶ added in v0.20.0
type Contest ¶ added in v0.6.0
type Contest struct {
Definition *conval.Definition
Name string
ExchangeValues []string
GenerateSerialExchange bool
GenerateReport bool
StartTime time.Time
EnableQTCs bool
MyExchangeFields []ExchangeField
MyReportExchangeField ExchangeField
MyNumberExchangeField ExchangeField
TheirExchangeFields []ExchangeField
TheirReportExchangeField ExchangeField
TheirNumberExchangeField ExchangeField
OperationModeSprint bool
CallHistoryFilename string
CallHistoryFieldNames []string
QSOsGoal int
PointsGoal int
MultisGoal int
}
func (*Contest) UpdateExchangeFields ¶ added in v0.10.0
func (c *Contest) UpdateExchangeFields()
type ESMState ¶ added in v1.0.0
type ESMState int
ESMState represents the current state of the ESM state machine.
type EntryField ¶
type EntryField string
EntryField represents an entry field in the visual part.
const ( CallsignField EntryField = "callsign" BandField EntryField = "band" ModeField EntryField = "mode" OtherField EntryField = "other" )
The entry fields.
func MyExchangeField ¶ added in v0.10.0
func MyExchangeField(index int) EntryField
func TheirExchangeField ¶ added in v0.10.0
func TheirExchangeField(index int) EntryField
func (EntryField) ExchangeIndex ¶ added in v0.10.0
func (f EntryField) ExchangeIndex() int
func (EntryField) IsMyExchange ¶ added in v0.10.0
func (f EntryField) IsMyExchange() bool
func (EntryField) IsTheirExchange ¶ added in v0.10.0
func (f EntryField) IsTheirExchange() bool
func (EntryField) NextExchangeField ¶ added in v0.10.0
func (f EntryField) NextExchangeField() EntryField
type ExchangeField ¶ added in v0.10.0
type ExchangeField struct {
Field EntryField
CanContainSerial bool
CanContainReport bool
EmptyAllowed bool
Properties conval.ExchangeField
Short string
Name string
Hint string
ReadOnly bool
}
func DefinitionsToExchangeFields ¶ added in v0.10.0
func DefinitionsToExchangeFields(fieldDefinitions []conval.ExchangeField, exchangeEntryField func(int) EntryField) []ExchangeField
type KeyerPreset ¶ added in v0.12.0
type KeyerSettings ¶ added in v0.15.0
type KeyerType ¶ added in v0.12.0
type KeyerType string
const (
KeyerTypeCWDaemon KeyerType = "cwdaemon"
)
type KeyerValues ¶
type KeyerValues struct {
TheirCall string
MyNumber QSONumber
MyReport RST
MyXchange string
MyExchange string
MyExchanges []string
}
KeyerValues contains the values that can be used as variables in the keyer templates.
type MatchingAssembly ¶ added in v0.9.0
type MatchingAssembly []MatchingPart
func (MatchingAssembly) String ¶ added in v0.9.0
func (m MatchingAssembly) String() string
type MatchingOperation ¶ added in v0.8.0
type MatchingOperation int
const ( Matching MatchingOperation = iota Insert Delete Substitute FalseFriend )
type MatchingPart ¶ added in v0.9.0
type MatchingPart struct {
OP MatchingOperation
Value string
}
type Mode ¶
type Mode string
Mode represents the mode.
type QSO ¶
type QSO struct {
Callsign Callsign
Time time.Time
Frequency Frequency
Band Band
Mode Mode
MyReport RST
MyNumber QSONumber
MyExchange []string
TheirReport RST
TheirNumber QSONumber
TheirExchange []string
LogTimestamp time.Time
DXCC dxcc.Prefix
Points int
Multis int
Duplicate bool
Workmode Workmode
}
QSO contains the details about one radio contact.
type QSODataState ¶ added in v1.1.0
type QSODataState int
QSODataState represents the current state of the entered QSO data
const ( QSODataEmpty QSODataState = iota QSODataInvalid QSODataValid )
type QSONumber ¶
type QSONumber int
QSONumber is the unique number of a QSO in the log, either on my or on their side.
type QSORate ¶ added in v0.3.1
type QSORate struct {
LastHourRate QSOsPerHour
Last5MinRate QSOsPerHour
QSOsPerHours QSOsPerHours
SinceLastQSO time.Duration
LastHourPoints int
Last5MinPoints int
LastHourMultis int
Last5MinMultis int
}
QSORate contains all statistics regarding the rate of QSOs in a contest.
func (QSORate) SinceLastQSOFormatted ¶ added in v0.4.0
type QSOsPerHour ¶ added in v0.3.1
type QSOsPerHour int
QSOsPerHour is the rate of QSOs per one hour
type QSOsPerHours ¶ added in v0.3.1
type QSOsPerHours map[Hour]QSOsPerHour
QSOsPerHours contains the complete QSO rate statistic mapping each Hour in the contest to the rate of QSOs within this Hour
type QTC ¶ added in v1.1.0
type QTC struct {
// Basic Information
Kind QTCKind
QSONumber QSONumber // used only for SentQTC, references the QSO in my log
TheirCallsign Callsign
Header QTCHeader
// Log Information, must be set, when actually sending the QTC
Timestamp time.Time
Frequency Frequency
Band Band
Mode Mode
Confirmed bool // this field is not persistent, it is only used during the QTC workflow to track which QTCs have been confirmed
// Data from referenced QSO, either from my log, or from their log
QTCTime QTCTime
QTCCallsign Callsign
QTCNumber QSONumber
}
QTC represents one QTC. If the QTC is not yet logged, it contains no timestamp, frequency, and mode information
func (QTC) VerifyComplete ¶ added in v1.1.0
func (QTC) WasTransmitted ¶ added in v1.1.0
type QTCField ¶ added in v1.1.0
type QTCField string
QTCField represents the currently active entry field in the QTC exchange workflow
type QTCHeader ¶ added in v1.1.0
func ParseQTCHeader ¶ added in v1.1.0
type QTCSeries ¶ added in v1.1.0
func NewQTCSeries ¶ added in v1.1.0
func NewReceivingQTCSeries ¶ added in v1.1.0
func (*QTCSeries) IsComplete ¶ added in v1.1.0
func (*QTCSeries) IsLastQTCIndex ¶ added in v1.1.0
func (*QTCSeries) IsPrepared ¶ added in v1.1.0
func (*QTCSeries) IsValidQTCIndex ¶ added in v1.1.0
type QTCTime ¶ added in v1.1.0
func ParseQTCTime ¶ added in v1.1.0
ParseQTCTime parses the given string as QTC time (hhmm). The additional reference time is used, if only the minutes are given in the string. In that case, the hours are taken from the reference.
func QTCTimeFromTimestamp ¶ added in v1.1.0
func (QTCTime) ShortString ¶ added in v1.1.0
type QTCWorkflowPhase ¶ added in v1.1.0
type QTCWorkflowPhase int
QTCWorkflowPhase represents the phases in the QTC exchange workflow
const ( QTCNone QTCWorkflowPhase = iota QTCStart QTCExchangeHeader QTCExchangeData QTCFinish )
type RST ¶
type RST string
RST represents a signal report using the "Readability/Signalstrength/Tone" system.
type Score ¶ added in v0.2.0
func (Score) StackedGraphPerBand ¶ added in v0.13.0
type ServiceStatusListener ¶ added in v0.5.0
type ServiceStatusListenerFunc ¶ added in v0.5.0
func (ServiceStatusListenerFunc) StatusChanged ¶ added in v0.5.0
func (f ServiceStatusListenerFunc) StatusChanged(service Service, available bool)
type Spot ¶ added in v0.13.0
type SpotFilter ¶ added in v0.13.0
type SpotFilter string
const ( AllSpots SpotFilter = "" OwnContinentSpotsOnly SpotFilter = "continent" OwnCountrySpotsOnly SpotFilter = "country" )
type SpotQuality ¶ added in v0.20.0
type SpotQuality int
const ( UnknownSpotQuality SpotQuality = iota BustedSpotQuality QSYSpotQuality ValidSpotQuality )
func (SpotQuality) Tag ¶ added in v0.20.0
func (q SpotQuality) Tag() string
type SpotSource ¶ added in v0.13.0
type SpotSource struct {
Name string `json:"name"`
Type SpotType `json:"type"`
HostAddress string `json:"host_address"`
Username string `json:"username"`
Password string `json:"password,omitempty"`
Filter SpotFilter `json:"filter,omitempty"`
IgnoreTimestamp bool `json:"ignore_timestamp,omitempty"`
}
type Summary ¶ added in v1.1.0
type Summary struct {
// comes from the contest definition
ContestName string
CabrilloName string
// comes from the contest settings
StartTime time.Time
Callsign Callsign
MyExchanges string
QTCsEnabled bool
// has to be selected by the user in a dialog
OperatorMode conval.OperatorMode
Overlay conval.Overlay
PowerMode conval.PowerMode
Assisted bool
// comes from the score counter
WorkedModes []string
WorkedBands []string
Score Score
TimeReport TimeReport
}
func (Summary) ScoreTable ¶ added in v1.1.0
func (Summary) WorkingConditions ¶ added in v1.1.0
type TimeReport ¶ added in v1.1.0
type TimeReport = conval.TimeReport
type VFOBandListener ¶ added in v0.13.0
type VFOBandListener interface {
VFOBandChanged(Band)
}
type VFOFrequencyListener ¶ added in v0.13.0
type VFOFrequencyListener interface {
VFOFrequencyChanged(Frequency)
}
type VFOModeListener ¶ added in v0.13.0
type VFOModeListener interface {
VFOModeChanged(Mode)
}
type VFOPTTListener ¶ added in v0.22.4
type VFOPTTListener interface {
VFOPTTChanged(bool)
}
type VFOXITListener ¶ added in v0.22.2
type XITControl ¶ added in v0.22.2
Directories
¶
| Path | Synopsis |
|---|---|
|
Package callhistory provides access to call history files.
|
Package callhistory provides access to call history files. |
|
export
|
|
|
The package persist allows to store data between sessions of hellocontest.
|
The package persist allows to store data between sessions of hellocontest. |