hqsl-ts
    Preparing search index...

    Class HQSL

    The HQSL object represents a QSO through the entire parsing, signing and verification life cycle.

    Index

    Constructors

    • Construct a HQSL from scratch.

      No syntax checking is performed at this stage, though it will happen when anything calls signedData.

      Parameters

      • Optionalfields: {
            extra?: string;
            freq: number;
            from: string;
            mode: string;
            signal?: string;
            to: string;
            when: UTCDate;
            where: string;
        }
        • Optionalextra?: string

          Extra data.

        • freq: number

          Frequency in MHz.

        • from: string

          QSL sender call sign.

        • mode: string

          Communication mode.

        • Optionalsignal?: string

          Signal report.

        • to: string

          QSL recipient call sign.

        • when: UTCDate

          QSO datetime in UTC.

        • where: string

          QSL sender Maidenhead grid location.

      Returns HQSL

    Properties

    extra?: string

    Extra data.

    freq?: number

    Frequency.

    from?: string

    Sender's call sign

    mode?: string

    Mode.

    reserved?: string

    Reserved field. Don't use it.

    signal?: string

    Signal report.

    signature?: Uint8Array<ArrayBufferLike>

    Binary signature data.

    to?: string

    Correspondent's call sign.

    verification?: HQSLVerification

    Verification results.

    when?: UTCDate

    QSO date in UTC. Requires the use of date-fns to properly work in UTC.

    where?: string

    Sender's grid square

    Accessors

    • get band(): string

      Derives an ADIF-standardized band name from frequency.

      Returns string

    • get displayDate(): string

      Derives a date in a generic ISO-like format for display.

      Returns string

    • get hamDate(): string

      Derives a datetime formatted as per HQSL standard.

      Returns string

    • get signedData(): string

      Constructs a signable string from the HQSL, throwing SyntaxErrors in case of missing or malformed data fields.

      Returns string

      The entire HQSL as string sans the signature field.

    Methods

    • Formats a complete HQSL as an ADIF string. Will contain a fully encoded .toString() in APP_HQSL_DATA.

      Returns string

      A string of a single-QSO ADIF.

    • Formats a complete HQSL as string. Signed HQSLs will contain the encoded signature, while unsigned will have UNSIGNED in the signature field as the standard specifies.

      Returns string

      A string containing the HQSL (sans a header)

    • Parses an ADIF file string to construct a series of HQSL. Whether any of it will be signable depends on how complete the ADIF was.

      Parameters

      • s: string

        An ADIF file string.

      • call: string

        The default call to assume if none is present in the record.

      • grid: string

        The default grid to assume if none is present in the record.

      Returns HQSL[]

      Error in case of ADIF parsing errors and SyntaxError when data of a QSO is insufficient to construct a valid HQSL.

    • Parses a HQSL from string, applying as many verification checks as feasible. Will ignore an URL header if present.

      Parameters

      • s: string

        A string containing the HQSL

      Returns HQSL

      HQSL object

      SyntaxError describing a particular parsing error.