Importing and Exporting ADIF Modes and Submodes
With respect to importing and exporting ADIF records, DXKeeper endeavors to present the user with a simple model:
- every logged QSO specifies a mode
- a logged QSO created by importing an ADIF record will specify the correct mode
- an ADIF record exported from a logged QSO will specify the correct mode
- interactions with Club Log, eQSL.cc, and LoTW will work correctly
This article explains in detail how the above simple model is maintained in the face of the MODE and SUBMODE tags used in ADIF. Knowledge of these details is not necessary for day-to-day operations; this explanation is provided so that interested readers can understand exactly what's going on with Modes and Submodes when a logged QSO is created by importing an ADIF record, or when an ADIF record is created by exporting a logged QSO.
First, some context:
Not all applications that claim to be ADIF compliant are actually ADIF compliant. The ADIF style options panel on the Import QSOs tab of DXKeeper's Main window enables you to identify several such applications as the source of the ADIF file you are importing so that DXKeeper can correctly interpret the information in the ADIF file. "Correctly interpret" means anything from accepting frequencies that contain multiple decimal points to separating name and comments combined in the NAME tag. Unless you are importing ADIF from one of the applications listed, the ADIF style options panel should be set to Standard ADIF.
Every SUBMODE defined in ADIF has exactly one parent MODE. For example, the parent MODE of the SUBMODE FT4 is uniquely MFSK. There is no second FT4 SUBMODE with a parent MODE other than MFSK, and there never will be.
Every logged QSO specifies a Mode item and a Submode item. Both items can be made visible via columns in the Log Page Display. When selected, a logged QSO's Mode item appears in the QSO panel at the top of the Main window's Log QSOs tab - but only if the value is one specified in DXKeeper's Modes.txt or DefaultModes.txt file, as described here. A logged QSO's Submode item appears in the Auxiliary panel on the Main window's Log QSOs tab.
- In the interest of "preserving the data", DXKeeper will import and export a mode not defined by ADIF.
Importing ADIF MODE and SUBMODE Tags
This section describes importing an ADIF record with the ADIF Style Options panel set to Standard ADIF. This section does not describe the processing of ADIF records received from Club Log, eQSL.cc, or LoTW.
When importing a valid ADIF record from a file (or a valid ADIF record sent by another application like WinWarbler or JTAlert), the presence or absence of MODE and SUBMODE tags creates 4 scenarios:
1. MODE and SUBMODE tags are both present, and specify a combination defined in ADIF
2. MODE and SUBMODE tags are both present, but don't specify a combination defined in ADIF
3. a MODE tag is present and specifies a value defined in ADIF, but a SUBMODE tag is absent
4. a MODE tag is present, but specifies a value not defined in ADIF, and a SUBMODE tag is absent
Scenario 1
When importing an ADIF record whose MODE tag and SUBMODE tag define a combination specified in ADIF the imported QSO's Mode item is set to the value specified in the SUBMODE tag, and it's Submode item is cleared. Thus importing an ADIF record that specifies
<MODE:4>MFSK <SUBMODE:3>FT4
produces an imported QSO whose Mode item is set to FT4 and whose Submode item is empty.
Scenario 2
When importing an ADIF record whose MODE tag and SUBMODE tag define a combination not specified in ADIF, the imported QSO's Mode item is set to the value specified in the MODE tag, and it's Submode item is set to the value in the SUBMODE tag. Thus importing an ADIF record that specifies
<MODE:4>RTTY <SUBMODE:3>FT4
produces an imported QSO whose Mode item is set to RTTY and whose Submode item is set to FT4. Why does DXKeeper accept an ADIF record that is not ADIF-compliant? Because not losing data when importing is more important than strict ADIF compliance. DXKeeper will go so far as to import a mode it cannot display in its mode selectors; for example, importing
<MODE:3>FSK <SUBMODE:3>FT4
produces an imported QSO whose Mode item is set to FSK and whose Submode item is set to FT4, but since FSK isn't a valid ADIF mode, the mode shown in the QSO panel on the Main window's Log QSOs panel will be empty. In the Log Page Display, however, the QSO's mode column will contain FSK. Export this logged QSO to an ADIF file, and the exported ADIF will contain
<MODE:3>FSK <SUBMODE:3>FT4
Note that by default, DXKeeper's mode selectors are populated with modes defined in ADIF, but you can add or remove modes as described here.
Scenarios 3 and 4
When importing an ADIF record with a MODE tag but with no SUBMODE tab, the imported QSO's Mode item is set to the value specified in the MODE tag, and it's Submode item is cleared; this done whether the contents of the MODE tag are specified in ADIF, or not. Thus when importing an ADIF record that specifies
<MODE:3> FT4
the imported QSO's Mode item is set to FT4, and its Submode item is cleared -- a result identical to importing an ADIF-compliant record that specifies
<MODE:4>MFSK <SUBMODE:3>FT4
Exporting ADIF MODE and SUBMODE tags
Exporting a logged QSO to an ADIF record involves a binary choice:
A. the logged QSO's Mode item specifies a MODE or SUBMODE defined in ADIF - in which case the ADIF-specified MODE tag is emitted and, if appropriate, the ADIF-specified SUBMODE tag is emitted
B. the logged QSO's Mode item does not specify a MODE or SUBMODE defined in ADIF, in which case the exported MODE tag specifies the contents of the QSO's Mode item and the exported QSO's SUBMODE tab specifies the contents of the QSO's Submode item.