Documentation
¶
Overview ¶
This file contains the implementation of the common properties used for contest scoring.
The package conval helps to evaluate the log files from amateur radio contests.
This file contains the implementation of the specific things for contests announced by the EUDXCC (https://eudxcc.altervista.org/).
This file contains the implementation of the specific things for contests announced by the Dutch amateur radio association VERON.
Index ¶
- Constants
- Variables
- func CanadianTerritory(call callsign.Callsign) string
- func Distance(myLocator locator.Locator, theirLocatorExchange string) int
- func IncludedDefinitionNames() ([]string, error)
- func IsWAECountry(call callsign.Callsign, dxccEntity DXCCEntity) bool
- func NewPrefixDatabase(arrlCompliant bool) (*prefixDatabase, error)
- func SaveDefinitionYAML(w io.Writer, definition *Definition, withExamples bool) error
- func ValidateExamples(definition *Definition, prefixes PrefixDatabase) error
- func ValidateExamplesTrace(definition *Definition, prefixes PrefixDatabase) error
- func VeronEntity(call callsign.Callsign, dxccEntity DXCCEntity) string
- func WAEEntity(call callsign.Callsign, dxccEntity DXCCEntity) string
- func WPXPrefix(call callsign.Callsign) string
- type BandAndMode
- type BandChangeRule
- type BandCount
- type BandRule
- type BandScore
- type CQZone
- type Category
- type ConstrainedDuration
- type Constraint
- type ContestBand
- type ContestIdentifier
- type Continent
- type Counter
- func (c *Counter) Add(qso QSO) QSOScore
- func (c *Counter) AddQTC(qtc QTC) QTCScore
- func (c Counter) BandScore(band ContestBand) BandScore
- func (c Counter) BandsPerMulti(property Property, multi string) []ContestBand
- func (c *Counter) ComputeMinBreakDuration() time.Duration
- func (c *Counter) EffectiveExchangeFields(theirCall callsign.Callsign) []ExchangeField
- func (c Counter) EvaluateAll(startTime time.Time, resolution time.Duration) ([]ScoreBin, TimeReport)
- func (c Counter) MultiProperties() []Property
- func (c Counter) MultisPerBand(property Property, band ContestBand) []string
- func (c Counter) MultisPerProperty(property Property) []string
- func (c Counter) Probe(qso QSO) QSOScore
- func (c *Counter) ProbeQTC(qtc QTC) QTCScore
- func (c *Counter) SetTrace(trace bool)
- func (c Counter) Total(score BandScore) int
- func (c Counter) TotalScore() BandScore
- func (c Counter) UsedBands() []ContestBand
- type DXCCEntity
- type Definition
- func (d Definition) ExchangeFields() []ExchangeField
- func (d Definition) HasQTCs() bool
- func (d Definition) MyPropertyGetter(property Property) (PropertyGetter, bool)
- func (d Definition) MyQTCPropertyGetter(property Property) (QTCPropertyGetter, bool)
- func (d Definition) PropertyGetter(property Property) (PropertyGetter, bool)
- func (d Definition) PropertyValidator(property Property) (PropertyValidator, bool)
- func (d Definition) QTCPropertyGetter(property Property) (QTCPropertyGetter, bool)
- type DurationConstraintMode
- type Example
- type ExchangeDefinition
- type ExchangeField
- type ITUZone
- type Mode
- type MultiOperation
- type OperatorMode
- type Overlay
- type PowerMode
- type PrefixDatabase
- type PrefixDatabaseFunc
- type Property
- type PropertyConstraint
- type PropertyDefinition
- func (d *PropertyDefinition) GetLabel() string
- func (d *PropertyDefinition) GetProperty(qso QSO, setup Setup, prefixes PrefixDatabase) string
- func (d *PropertyDefinition) GetQTCProperty(qtc QTC, setup Setup, prefixes PrefixDatabase) string
- func (d *PropertyDefinition) ValidateProperty(value string, _ PrefixDatabase) error
- type PropertyGetter
- type PropertyGetterFunc
- type PropertyValidator
- type PropertyValidatorFunc
- type PropertyValidators
- type PropertyValidatorsFunc
- type QSO
- type QSOExample
- type QSOExchange
- type QSOScore
- type QTC
- type QTCExample
- type QTCKind
- type QTCPropertyGetter
- type QTCPropertyGetterFunc
- type QTCScore
- type ScoreBin
- type ScoreExample
- type ScoreMode
- type ScoredQSO
- type ScoredQTC
- type Scoring
- type ScoringRule
- type Setup
- type SetupExample
- type TXMode
- type TimeReport
- type TimeSheet
Constants ¶
View Source
const ( SamePrefix string = "same" OtherPrefix string = "other" NotPrefix string = "not" )
View Source
const DefaultBreakDuration = 30 * time.Minute
Variables ¶
View Source
var ( CallsignValidator = PropertyValidatorFunc(func(exchange string, _ PrefixDatabase) error { _, err := callsign.Parse(exchange) if err != nil { return err } return nil }) DXCCPrefixValidator = PropertyValidatorFunc(func(exchange string, prefixes PrefixDatabase) error { _, entity, _, _, found := prefixes.Find(exchange) if !found { return fmt.Errorf("%s is not a valid DXCC prefix", exchange) } if exchange != string(entity) { return fmt.Errorf("%s is not a primary DXCC prefix", exchange) } return nil }) LocatorValidator = PropertyValidatorFunc(func(exchange string, _ PrefixDatabase) error { _, err := locator.Parse(exchange) if err != nil { return err } return nil }) )
View Source
var AllHFBands = []ContestBand{Band160m, Band80m, Band40m, Band20m, Band15m, Band10m}
View Source
var EmptyValidator = PropertyValidatorFunc(func(exchange string, _ PrefixDatabase) error { exchange = strings.TrimSpace(exchange) if exchange != "" { return fmt.Errorf("%s is not empty", exchange) } return nil })
Functions ¶
func CanadianTerritory ¶ added in v0.3.4
func IncludedDefinitionNames ¶
func IsWAECountry ¶
func IsWAECountry(call callsign.Callsign, dxccEntity DXCCEntity) bool
func NewPrefixDatabase ¶ added in v0.3.0
func SaveDefinitionYAML ¶ added in v0.3.0
func SaveDefinitionYAML(w io.Writer, definition *Definition, withExamples bool) error
func ValidateExamples ¶
func ValidateExamples(definition *Definition, prefixes PrefixDatabase) error
func ValidateExamplesTrace ¶ added in v0.5.0
func ValidateExamplesTrace(definition *Definition, prefixes PrefixDatabase) error
func VeronEntity ¶ added in v0.3.4
func VeronEntity(call callsign.Callsign, dxccEntity DXCCEntity) string
Types ¶
type BandAndMode ¶
type BandAndMode struct {
Band ContestBand
Mode Mode
}
type BandChangeRule ¶
type BandChangeRule struct {
Constraint `yaml:",inline"`
GracePeriod time.Duration `yaml:"grace_period"`
MultiplierException bool `yaml:"multiplier_exception"`
// see https://euhf.s5cc.eu/rules/euhfc_rules_latest.pdf, chapter 9 for more details
ChangesPerHour int `yaml:"changes_per_hour"`
IncludeModeChanges bool `yaml:"include_mode_changes"`
}
type Category ¶
type Category struct {
Name string `yaml:"name"`
Operator OperatorMode `yaml:"operator_mode,omitempty"`
TX TXMode `yaml:"tx,omitempty"`
Power PowerMode `yaml:"power,omitempty"`
BandCount BandCount `yaml:"band_count"`
Bands []ContestBand `yaml:"bands,omitempty"`
Modes []Mode `yaml:"modes,omitempty"`
Assisted bool `yaml:"assisted,omitempty"`
Overlay Overlay `yaml:"overlay,omitempty"`
ScoreMode ScoreMode `yaml:"score_mode,omitempty"`
Duration time.Duration `yaml:"duration,omitempty"`
}
type ConstrainedDuration ¶
type ConstrainedDuration struct {
Constraint `yaml:",inline"`
Duration time.Duration `yaml:"duration"`
Mode DurationConstraintMode `yaml:"constraint_mode,omitempty"`
}
type Constraint ¶
type Constraint struct {
OperatorMode OperatorMode `yaml:"operator_mode"`
Overlay Overlay `yaml:"overlay"`
}
type ContestBand ¶
type ContestBand string
const ( BandAll ContestBand = "all" Band160m ContestBand = "160m" Band80m ContestBand = "80m" Band40m ContestBand = "40m" Band20m ContestBand = "20m" Band15m ContestBand = "15m" Band10m ContestBand = "10m" )
type ContestIdentifier ¶
type ContestIdentifier string
A ContestIdentifier aka. Cabrillo name is a unique identifier for a contest. See https://www.contestcalendar.com/cabnames.php
type Continent ¶
type Continent string
func ContinentForCallsign ¶ added in v0.10.2
func ContinentForCallsign(call callsign.Callsign, prefixes PrefixDatabase) Continent
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
func NewCounter ¶
func NewCounter(definition Definition, setup Setup, prefixes PrefixDatabase) *Counter
func (Counter) BandScore ¶
func (c Counter) BandScore(band ContestBand) BandScore
func (Counter) BandsPerMulti ¶
func (c Counter) BandsPerMulti(property Property, multi string) []ContestBand
func (*Counter) ComputeMinBreakDuration ¶ added in v0.10.0
func (*Counter) EffectiveExchangeFields ¶
func (c *Counter) EffectiveExchangeFields(theirCall callsign.Callsign) []ExchangeField
func (Counter) EvaluateAll ¶ added in v0.2.0
func (Counter) MultiProperties ¶
func (Counter) MultisPerBand ¶
func (c Counter) MultisPerBand(property Property, band ContestBand) []string
func (Counter) MultisPerProperty ¶
func (Counter) TotalScore ¶
func (Counter) UsedBands ¶
func (c Counter) UsedBands() []ContestBand
type DXCCEntity ¶
type DXCCEntity string
const ( SameCountry DXCCEntity = "same" OtherCountry DXCCEntity = "other" NotCountry DXCCEntity = "not" )
func (DXCCEntity) String ¶ added in v0.5.0
func (e DXCCEntity) String() string
type Definition ¶
type Definition struct {
Name string `yaml:"name"`
Identifier ContestIdentifier `yaml:"identifier"`
OfficialRules string `yaml:"official_rules"`
ARRLCountryList bool `yaml:"arrl_country_list"`
UploadURL string `yaml:"upload_url"`
UploadFormat string `yaml:"upload_format"`
Duration time.Duration `yaml:"duration,omitempty"`
DurationConstraints []ConstrainedDuration `yaml:"duration-constraints,omitempty"`
Breaks []ConstrainedDuration `yaml:"breaks,omitempty"`
Categories []Category `yaml:"categories,omitempty"`
Overlays []Overlay `yaml:"overlays,omitempty"`
Modes []Mode `yaml:"modes,omitempty"`
Bands []ContestBand `yaml:"bands,omitempty"`
BandChangeRules []BandChangeRule `yaml:"band_change_rules,omitempty"`
Properties []PropertyDefinition `yaml:"properties,omitempty"`
Exchange []ExchangeDefinition `yaml:"exchange"`
Scoring Scoring `yaml:"scoring"`
Examples []Example `yaml:"examples,omitempty"`
}
A Definition of a contest.
func IncludedDefinition ¶
func IncludedDefinition(name string) (*Definition, error)
func LoadDefinitionFromFile ¶
func LoadDefinitionFromFile(filename string) (*Definition, error)
func LoadDefinitionYAML ¶
func LoadDefinitionYAML(r io.Reader) (*Definition, error)
func (Definition) ExchangeFields ¶ added in v0.3.1
func (d Definition) ExchangeFields() []ExchangeField
func (Definition) HasQTCs ¶ added in v0.11.0
func (d Definition) HasQTCs() bool
func (Definition) MyPropertyGetter ¶ added in v0.7.5
func (d Definition) MyPropertyGetter(property Property) (PropertyGetter, bool)
func (Definition) MyQTCPropertyGetter ¶ added in v0.11.0
func (d Definition) MyQTCPropertyGetter(property Property) (QTCPropertyGetter, bool)
func (Definition) PropertyGetter ¶ added in v0.4.0
func (d Definition) PropertyGetter(property Property) (PropertyGetter, bool)
func (Definition) PropertyValidator ¶ added in v0.4.0
func (d Definition) PropertyValidator(property Property) (PropertyValidator, bool)
func (Definition) QTCPropertyGetter ¶ added in v0.11.0
func (d Definition) QTCPropertyGetter(property Property) (QTCPropertyGetter, bool)
type DurationConstraintMode ¶ added in v0.3.2
type DurationConstraintMode string
const ( // TotalTime counts from the timestamp of the first QSO until the timestamp of the last QSO without considering breaks. TotalTime DurationConstraintMode = "total_time" // OperationTime counts from the timestamp of the first QSO until the timestamp of the last QSO, breaks in between are subtracted. OperationTime DurationConstraintMode = "operation_time" )
type Example ¶
type Example struct {
Setup SetupExample `yaml:"setup"`
QSOs []QSOExample `yaml:"qsos"`
QTCs []QTCExample `yaml:"qtcs,omitempty"`
Score ScoreExample `yaml:"score"`
}
type ExchangeDefinition ¶
type ExchangeDefinition struct {
MyContinent []Continent `yaml:"my_continent,omitempty"`
MyCountry []DXCCEntity `yaml:"my_country,omitempty"`
TheirContinent []Continent `yaml:"their_continent,omitempty"`
TheirCountry []DXCCEntity `yaml:"their_country,omitempty"`
TheirWorkingCondition []string `yaml:"their_working_condition,omitempty"`
AdditionalWeight int `yaml:"additional_weight,omitempty"`
Fields []ExchangeField `yaml:"fields,omitempty"`
}
type ExchangeField ¶
type ExchangeField []Property
func (ExchangeField) Contains ¶ added in v0.3.1
func (f ExchangeField) Contains(property Property) bool
func (ExchangeField) Strings ¶ added in v0.3.1
func (f ExchangeField) Strings() []string
type MultiOperation ¶ added in v0.3.2
type MultiOperation string
const ( DefaultMultiOperation MultiOperation = "" MultiplyMultis MultiOperation = "multiply" AddMultis MultiOperation = "add" )
type OperatorMode ¶
type OperatorMode string
const ( SingleOperator OperatorMode = "single" MultiOperator OperatorMode = "multi" )
type PrefixDatabase ¶
type PrefixDatabaseFunc ¶ added in v0.3.1
type PrefixDatabaseFunc func(s string) (Continent, DXCCEntity, bool)
func (PrefixDatabaseFunc) Find ¶ added in v0.3.1
func (f PrefixDatabaseFunc) Find(s string) (Continent, DXCCEntity, bool)
type Property ¶
type Property string
const ( TheirCallProperty Property = "their_call" RSTProperty Property = "rst" SerialNumberProperty Property = "serial" MemberNumberProperty Property = "member_number" NoMemberProperty Property = "nm" CallsignProperty Property = "callsign" // can be used as exchange, e.g. in the silent key memorial contests CQZoneProperty Property = "cq_zone" ITUZoneProperty Property = "itu_zone" DXCCEntityProperty Property = "dxcc_entity" WorkingConditionProperty Property = "working_condition" NameProperty Property = "name" AgeProperty Property = "age" PowerProperty Property = "power" ClassProperty Property = "class" StateProvinceProperty Property = "state_province" DXCCPrefixProperty Property = "dxcc_prefix" // can be used as exchange, e.g. in the CWops contests WAEEntityProperty Property = "wae_entity" WPXPrefixProperty Property = "wpx_prefix" ContinentProperty Property = "continent" // can be used as exchange, e.g. in the LABRE-DX contest LocatorProperty Property = "locator" // can be used as exchange DistanceProperty Property = "distance" // derived, needs the locator property QTCKindProperty Property = "kind" GenericTextProperty Property = "generic_text" GenericNumberProperty Property = "generic_number" EmptyProperty Property = "empty" )
const (
EURegionProperty Property = "eu_region"
)
type PropertyConstraint ¶ added in v0.3.2
type PropertyConstraint struct {
Name Property `yaml:"name"`
Min string `yaml:"min,omitempty"`
Max string `yaml:"max,omitempty"`
MyValue string `yaml:"my_value,omitempty"`
MyValueEmpty bool `yaml:"my_value_empty,omitempty"`
MyValueNotEmpty bool `yaml:"my_value_not_empty,omitempty"`
TheirValue string `yaml:"their_value,omitempty"`
TheirValueEmpty bool `yaml:"their_value_empty,omitempty"`
TheirValueNotEmpty bool `yaml:"their_value_not_empty,omitempty"`
SameValue bool `yaml:"same,omitempty"`
OtherValue bool `yaml:"other,omitempty"`
}
type PropertyDefinition ¶ added in v0.4.0
type PropertyDefinition struct {
Name Property `yaml:"name"`
Label string `yaml:"label,omitempty"`
Values []string `yaml:"values,omitempty"`
Expression string `yaml:"expression,omitempty"`
Source Property `yaml:"source,omitempty"`
MemberOf string `yaml:"member_of,omitempty"`
// contains filtered or unexported fields
}
func (*PropertyDefinition) GetLabel ¶ added in v0.4.0
func (d *PropertyDefinition) GetLabel() string
func (*PropertyDefinition) GetProperty ¶ added in v0.4.0
func (d *PropertyDefinition) GetProperty(qso QSO, setup Setup, prefixes PrefixDatabase) string
func (*PropertyDefinition) GetQTCProperty ¶ added in v0.11.0
func (d *PropertyDefinition) GetQTCProperty(qtc QTC, setup Setup, prefixes PrefixDatabase) string
func (*PropertyDefinition) ValidateProperty ¶ added in v0.4.0
func (d *PropertyDefinition) ValidateProperty(value string, _ PrefixDatabase) error
type PropertyGetter ¶
type PropertyGetter interface {
GetProperty(QSO, Setup, PrefixDatabase) string
}
type PropertyGetterFunc ¶
type PropertyGetterFunc func(QSO, Setup, PrefixDatabase) string
func (PropertyGetterFunc) GetProperty ¶
func (f PropertyGetterFunc) GetProperty(qso QSO, setup Setup, prefixes PrefixDatabase) string
type PropertyValidator ¶
type PropertyValidator interface {
ValidateProperty(string, PrefixDatabase) error
}
func CommonPropertyValidator ¶ added in v0.4.0
func CommonPropertyValidator(property Property) (PropertyValidator, bool)
func NumberRangeValidator ¶
func NumberRangeValidator(from, to int, name string) PropertyValidator
func RegexpValidator ¶
func RegexpValidator(exp *regexp.Regexp, name string) PropertyValidator
type PropertyValidatorFunc ¶
type PropertyValidatorFunc func(string, PrefixDatabase) error
func (PropertyValidatorFunc) ValidateProperty ¶
func (f PropertyValidatorFunc) ValidateProperty(exchange string, prefixes PrefixDatabase) error
type PropertyValidators ¶
type PropertyValidators interface {
PropertyValidator(Property) (PropertyValidator, bool)
}
type PropertyValidatorsFunc ¶ added in v0.4.0
type PropertyValidatorsFunc func(Property) (PropertyValidator, bool)
func (PropertyValidatorsFunc) PropertyValidator ¶ added in v0.4.0
func (f PropertyValidatorsFunc) PropertyValidator(property Property) (PropertyValidator, bool)
type QSO ¶
type QSO struct {
TheirCall callsign.Callsign
TheirContinent Continent
TheirCountry DXCCEntity
Timestamp time.Time
Band ContestBand
Mode Mode
MyExchange QSOExchange
TheirExchange QSOExchange
}
func (QSO) TheirPrefix ¶ added in v0.3.4
type QSOExample ¶
type QSOExample struct {
TheirCall string `yaml:"their_call,omitempty"`
TheirContinent Continent `yaml:"their_continent,omitempty"`
TheirCountry DXCCEntity `yaml:"their_country,omitempty"`
Timestamp time.Time `yaml:"time,omitempty"`
Band ContestBand `yaml:"band,omitempty"`
Mode Mode `yaml:"mode,omitempty"`
TheirExchange []string `yaml:"their_exchange,omitempty"`
Score QSOScore `yaml:",inline"`
}
func (QSOExample) ToQSO ¶
func (q QSOExample) ToQSO(fields []ExchangeField, myExchange QSOExchange, prefixes PrefixDatabase, propertyValidators PropertyValidators) QSO
type QSOExchange ¶
func ParseExchange ¶
func ParseExchange(fields []ExchangeField, values []string, prefixes PrefixDatabase, propertyValidators PropertyValidators) QSOExchange
func (QSOExchange) Add ¶
func (e QSOExchange) Add(fields []ExchangeField, values []string, prefixes PrefixDatabase, propertyValidators PropertyValidators)
type QSOScore ¶
type QTC ¶ added in v0.11.0
type QTC struct {
Kind QTCKind
TheirCall callsign.Callsign
TheirContinent Continent
TheirCountry DXCCEntity
Header string
Band ContestBand
Mode Mode
Count int
}
func (QTC) TheirPrefix ¶ added in v0.11.0
type QTCExample ¶ added in v0.11.0
type QTCExample struct {
Kind string `yaml:"kind,omitempty"`
TheirCall string `yaml:"their_call,omitempty"`
TheirContinent Continent `yaml:"their_continent,omitempty"`
TheirCountry DXCCEntity `yaml:"their_country,omitempty"`
Header string `yaml:"header,omitempty"`
Band ContestBand `yaml:"band,omitempty"`
Mode Mode `yaml:"mode,omitempty"`
Count int `yaml:"count,omitempty"`
Score QTCScore `yaml:",inline"`
}
func (QTCExample) ToQTC ¶ added in v0.11.0
func (q QTCExample) ToQTC() QTC
type QTCPropertyGetter ¶ added in v0.11.0
type QTCPropertyGetter interface {
GetQTCProperty(QTC, Setup, PrefixDatabase) string
}
type QTCPropertyGetterFunc ¶ added in v0.11.0
type QTCPropertyGetterFunc func(QTC, Setup, PrefixDatabase) string
func (QTCPropertyGetterFunc) GetQTCProperty ¶ added in v0.11.0
func (f QTCPropertyGetterFunc) GetQTCProperty(qtc QTC, setup Setup, prefixes PrefixDatabase) string
type ScoreBin ¶ added in v0.2.0
type ScoreExample ¶ added in v0.3.2
type ScoreMode ¶ added in v0.3.2
type ScoreMode string
const ( // StrictScore allows only the number of bands defined in the category (single, <any number>, all). If more bands were worked, the claimed score is zero. StrictScore ScoreMode = "strict" // BestScore counts only the best n bands, according to the number of bands defined in the category (single, <any number>, all). BestScore ScoreMode = "best" )
type Scoring ¶
type Scoring struct {
QSORules []ScoringRule `yaml:"qsos,omitempty"`
QSOBandRule BandRule `yaml:"qso_band_rule,omitempty"`
QTCRules []ScoringRule `yaml:"qtcs,omitempty"`
MultiRules []ScoringRule `yaml:"multis,omitempty"`
MultiOperation MultiOperation `yaml:"multi_operation,omitempty"`
}
type ScoringRule ¶
type ScoringRule struct {
MyContinent []Continent `yaml:"my_continent,omitempty"`
MyCountry []DXCCEntity `yaml:"my_country,omitempty"`
MyPrefix []string `yaml:"my_prefix,omitempty"`
MyWorkingCondition []string `yaml:"my_working_condition,omitempty"`
TheirContinent []Continent `yaml:"their_continent,omitempty"`
TheirCountry []DXCCEntity `yaml:"their_country,omitempty"`
TheirPrefix []string `yaml:"their_prefix,omitempty"`
TheirWorkingCondition []string `yaml:"their_working_condition,omitempty"`
Bands []ContestBand `yaml:"bands,omitempty"`
Property Property `yaml:"property,omitempty"` // only useful for multis
Except []string `yaml:"except,omitempty"` // only useful for multis
PropertyConstraints []PropertyConstraint `yaml:"property_constraints,omitempty"`
BandRule BandRule `yaml:"band_rule,omitempty"`
AdditionalWeight int `yaml:"additional_weight,omitempty"`
Value int `yaml:"value,omitempty"`
ValueOfProperty Property `yaml:"value_of_property,omitempty"`
QTCKind QTCKind `yaml:"kind,omitempty"` // only useful for QTCs
}
type Setup ¶
type Setup struct {
MyCall callsign.Callsign
MyContinent Continent
MyCountry DXCCEntity
GridLocator locator.Locator
Operators []callsign.Callsign
OperatorMode OperatorMode
Overlay Overlay
Power PowerMode
Bands []ContestBand
Modes []Mode
MyExchange QSOExchange
}
func LoadSetupFromFile ¶
type SetupExample ¶
type SetupExample struct {
MyCall string `yaml:"my_call,omitempty"`
MyContinent Continent `yaml:"my_continent,omitempty"`
MyCountry DXCCEntity `yaml:"my_country,omitempty"`
GridLocator string `yaml:"grid_locator,omitempty"`
Operators []string `yaml:"operators,omitempty"`
OperatorMode OperatorMode `yaml:"operator_mode,omitempty"`
Overlay Overlay `yaml:"overlay,omitempty"`
Power PowerMode `yaml:"power,omitempty"`
Bands []ContestBand `yaml:"bands,omitempty"`
Modes []Mode `yaml:"modes,omitempty"`
MyExchange QSOExchange `yaml:"my_exchange,omitempty"`
}
func (SetupExample) ToSetup ¶
func (s SetupExample) ToSetup() Setup
type TimeReport ¶ added in v0.10.0
type TimeReport struct {
MinBreakDuration time.Duration
// ActiveMinutes counts minutes with logged QSOs
ActiveMinutes int
// IdleMinutes counts minutes between active minutes without QSO that do not qualify as break
IdleMinutes int
// BreakMinutes counts consecutive minutes that qualify as break
BreakMinutes int
// Breaks counts the number of breaks
Breaks int
// TotalMinutes counts from the first to the last active minute
TotalMinutes int
}
func (TimeReport) OperationTime ¶ added in v0.10.0
func (r TimeReport) OperationTime() time.Duration
type TimeSheet ¶ added in v0.10.0
type TimeSheet struct {
// contains filtered or unexported fields
}
func NewTimeSheet ¶ added in v0.10.0
func (*TimeSheet) MarkActive ¶ added in v0.10.0
func (*TimeSheet) TimeReport ¶ added in v0.10.1
func (s *TimeSheet) TimeReport(minBreakDuration time.Duration) TimeReport
Source Files
¶
Click to show internal directories.
Click to hide internal directories.