adif 315.1.1 copy "adif: ^315.1.1" to clipboard
adif: ^315.1.1 copied to clipboard

Amateur Data Interchange Format (ADIF) parser for Dart.

Dart_adif #

Amateur Data Interchange Format (ADIF) parser for Dart.

There are three parts among the version. The first part is the version of the related ADIF file, for example 315 refers to ADIF 3.1.5. The second and third part are the version of this library that is compatiple to the corresponding ADIF version.

This library is still under active development. Now it supports exproting ADIF-defined fields to ADX files, on the next version APP/user-defined fields and importing from ADX files will also be supported, and eventually ADI files.

Note:

  • Submodes are considered as strings, but please use the submodes enumeration for interoperability.
  • All the fields exported to ADX are considered as international as possible.

Breaking updates from v315.0.1:

Usage #

First let's see the data structure of a QSO:

class Qso {
  /// The QSO's ADIF-defined fields.
  List<AdifField> adifdefs = [];

  /// TODO: The application-defined fields.
  List<Appdef> appdefs;

  /// TODO: The user-defined fields.
  List<Userdef> userdefs;
}

You can generate a QSO like this:

final call = adifFieldFactory('CALL', 'BA1ABC');
final date = adifFieldFactory('DATE', '20250505');

final qso = Qso([call, date], [], []);

And here is the structure of an ADIF object:

class Adif {
  /// The ADIF version. Generally defined by this library.
  String adifVer = adifVersion;

  /// Created timestamp, shall be converted to string when converting.
  /// Generated automatically.
  DateTime? createdTimestamp = DateTime.now().toUtc();

  /// The program's name.
  final String? programid;

  /// The program's version.
  final String? programversion;

  /// TODO: The userdefined fields.
  /// The `index`th one on the list refers to `USERDEF[index+1]` as for ADIF it
  /// shall be a postive number.
  List<String> userdef;

  /// The QSO data.
  List<Qso> data;

  Adif(this.programid, this.programversion, this.userdef, this.data);
}

Give the fields of your program, leave the userdef as empty, and put the QSOs together as a list, you can get an ADIF object:

// Generate an ADIF log.
final adif = Adif(
  "dart-adif.test_suites",
  "315.1.1",
  [],
  [qso1, qso2, qso3]);

Then export it into an ADX string:

final String adxString = adif.buildAdxString();

Roadmap #

Supported ADIF Data types #

  • ✅ AwardList
  • ✅ Boolean
  • ✅ Character
  • ✅ CreditList
  • ✅ Date
  • ✅ Digit
  • ✅ Enumeration
  • ✅ GridSquare
  • ✅ GridSquareExt
  • ✅ GridSquareList
  • ✅ Integer
  • ✅ IntlCharacter
  • ✅ IntlMultilineString
  • ✅ IntlString
  • ✅ IOTARefNo
  • ✅ Location
  • ✅ MultilineString
  • ✅ Number
  • ✅ PositiveInteger
  • ✅ POTARef
  • ✅ POTARefList
  • ✅ SecondarySubdivisionList (Secondary_Administrative_Subdivision_Alt items are treated as strings)
  • ❌ SecondaryAdministrativeSubdivisionListAlt
  • ✅ SOTARef
  • ❌ SponsoredAwardList
  • ✅ String
  • ✅ Time
  • ✅ WWFFRef

Supported operations #

  • ❌ Import from ADI
  • ❌ Export to ADI
  • ❌ Import from ADX
  • ✅ Export to ADX

Supported fields #

  • ✅ ADIF-defined fields
  • ❌ APP-defined fields
  • ❌ User-defied fields

Unupported ADIF-defined fields #

  • AWARD_SUBMITTED
  • AWARD_GRANTED
  • CNTY
  • CNTY_ALT
  • DARK_DOK
  • MY_CNTY
  • MY_CNTY_ALT
  • MY_DARK_DOK
  • MY_STATE
  • STATE
1
likes
0
points
199
downloads

Publisher

unverified uploader

Weekly Downloads

Amateur Data Interchange Format (ADIF) parser for Dart.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

intl, xml

More

Packages that depend on adif