adif

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: MIT Imports: 10 Imported by: 1

README

Station Manager: adif package

Documentation

Index

Constants

View Source
const (
	JsonStructTag = "json"

	EorStr     = "<EOR>"
	EohStr     = "<EOH>"
	DashStr    = "-"
	ColonStr   = ":"
	Version    = "3.1.5"
	NewLineStr = "\n"
)
View Source
const (
	UserDefQslWanted        = "<USERDEF1:10>QSL_WANTED"             //
	UserDefFwdByEmailStatus = "<USERDEF2:22>SM_FWD_BY_EMAIL_STATUS" // Forwarded by email status
	UserDefFwdByEmailDate   = "<USERDEF3:20:D>SM_FWD_BY_EMAIL_DATE" // Forwarded by email date
	UserDefQsoUploadStatus  = "<USERDEF4:20>SM_QSO_UPLOAD_STATUS"   // QSO upload status
	UserDefQsoUploadDate    = "<USERDEF5:18:D>SM_QSO_UPLOAD_DATE"   // QSO upload date
)
View Source
const (
	YesString       = "Y"
	NoString        = "N"
	IgnoreString    = "I"
	RequestedString = "R"
)

Variables

This section is empty.

Functions

func ComposeToAdifString

func ComposeToAdifString(slice types.QsoSlice) (string, error)

func ConvertQsoToAdifNoHeader

func ConvertQsoToAdifNoHeader(q types.Qso) (string, error)

Types

type Adif

type Adif struct {
	HeaderSection HeaderSection
	Records       []Record
}

func Marshal

func Marshal(data []byte) (Adif, error)

Marshal parses ADIF data provided as bytes and returns a populated Adif struct. It is intentionally tolerant: unknown fields are ignored, tags are case-insensitive, and only string fields are supported.

func (*Adif) String

func (a *Adif) String() string

type HeaderSection

type HeaderSection struct {
	ADIFVer          string // ADIF version number
	CreatedTimestamp string // timestamp when the ADIF file was created
	ProgramID        string // name of the logging program
	ProgramVersion   string // version of the logging program
}

func (*HeaderSection) String

func (h *HeaderSection) String() string

type QslSection

type QslSection struct {
	QslMsg     string `adif:"qslmsg,omitempty"`
	QslMsgIntl string `adif:"qslmsg_intl,omitempty"`
	QslRDate   string `adif:"qslrdate,omitempty"`
	QslSDate   string `adif:"qsl_sdate,omitempty"`
	QslRcvd    string `adif:"qsl_rcvd,omitempty"` // QslRcvd: the QSL received status
	QslSent    string `adif:"qsl_sent,omitempty"` // QslSent: the QSL sent status
	QslSentVia string `adif:"qsl_sent_via,omitempty"`
	QslVia     string `adif:"qsl_via,omitempty"`

	QrzComQsoDownloadDate   string `adif:"qrzcom_qso_download_date,omitempty"`
	QrzComQsoDownloadStatus string `adif:"qrzcom_qso_download_status,omitempty"`
	QrzComQsoUploadDate     string `adif:"qrzcom_qso_upload_date,omitempty"`
	QrzComQsoUploadStatus   string `adif:"qrzcom_qso_upload_status,omitempty"`
}

type Record

Record represents a single ADIF (Amateur Data Interchange Format) record.

func QsoToRecord

func QsoToRecord(q types.Qso) Record

func (*Record) String

func (r *Record) String() string

type UserDef

type UserDef struct {
	SmQsoUploadDate     string `adif:"sm_qso_upload_date"`      // Values: "[date-time-stamp]" or empty string
	SmQsoUploadStatus   string `adif:"sm_qso_upload_status"`    // Values: "Y" = Uploaded, "N" = Not Uploaded
	SmFwrdByEmailDate   string `adif:"sm_fwrd_by_email_date"`   // Values: "[date-time-stamp]" or empty string
	SmFwrdByEmailStatus string `adif:"sm_fwrd_by_email_status"` // Values: "Y" = Forwarded by email, "N" = Not forwarded

	// Indicates if a QSL (physical card) is wanted for this QSO. This allows for tracking if a QSL card is required for
	// this qso. 'qsl_rcvd' should be then used to track the status: 'R' = Requested, 'Y' = QSL received.
	QslWanted string `adif:"qsl_wanted"`
}

Jump to

Keyboard shortcuts

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