ЯЗЫК ОПИСАНИЯ КОНТЕСТОВ В DXLOG.NET

Данный документ сформирован на основании раздела Contest Definition Wiki-документации программы DXLog.NET и анализа доступных файлов описания контестов. Документация постоянно обновляется и содержит более полное описание, чем указанный WiKi раздел. Если Вы заметили какие-либо неточности, либо у вас есть уточнения или дополнения, пожалуйста, отправьте мне сообщение, воспользовавшись формой на сайте.

СОДЕРЖАНИЕ

==Description==


Rules for most contests are different and are usually written by the group adjudicating the contest.<br>

The differences can be points per qso, multiplier determination and calculations etc.<br>


To support all these different rules and to allow easier adding / changing contest rules in DXLog.net, 

all parameters for complying with the specific contest rules are defined and controlled through the specific contest config file.<br><br>

Contest config files are plain text files which are located in the '''Contest''' sub-folder of the DXLog.net installation folder.<br>


When DXlog.net is started, the contents of Contest folder is copied into the ApplicationData folder in your Windows OS.<br>

During the copying process, DXLog.net compares modified date of each file in the installation folder with the version in the ApplicationData folder.<br>

If a newer version exists in the ApplicationData folder, the original file would not be copied over from the contest folder.<br>


The end user can modify the existing, or create a new file, in the ApplicationData folder, so changes can be made to the contest definition file for testing, or the end user can create a new contest definition file to support a new or previously unsupported contest.<br>


==File structure==


Each line in a contest definition file usually contains '''KEY + VALUE''' pairs.<br> 

The pair is always separated by the "=" sign.<br>

For example:<br>

  CONTEST_NAME=9A CW <br>

  This means the field KEY is '''CONTEST_NAME''', and '''9A CW''' is the field value.


==Regex expressions==


You will see that in many cases DXLog.net is using regular expressions (regex) to verify condition validation and possibly to process an entry in a special way. For example, regex is used to check if the user keyboard entry is valid against a condition or set of conditions, for QSO points calculations etc.<br>


Regex expressions in the config file can be defined as fixed values, but regex can also compare QSO data against fixed values.<br><br>


* Case one: We want to validate the user entered data in some of the fields.<br>

  For example, we want to validate that the user is allowed to enter NY,FL,GA, or DX in the EXCHANGE field on the contest configuration screen.<br>

  The regex key field for this operation is: CFG_MULT_RGX_CHECK<br>

  So to create a validation, as per the previous example, we need the following definition in the contest config file:<br>

  CFG_MULT_RGX_CHECK=^NY$|^FL$|^GA$|^DX$<br>

  "^" in regex denotes start of the string value

  "$" in regex denotes end of string value

  "|" in regex is logical or operation

<br>

* Case two: We want to validate a value which could change on each entry into the log.<br>

  For example, we want to calculate points for each QSO with the same country, on the 160m band, in the CW and SSB mode, with 1 point.

  The regex key field for qso points calculation is POINTS_FIELD_BAND_MODE<br>

  So to create the calculation, as per the previous example, we need the following definition in the contest config file:<br>

  POINTS_FIELD_BAND_MODE=SOURCE->DXCC:DEST->DXCC;ALL;^160$;^CW$|^SSB$;1<br>

  We can read this definition in the following way:

  If the SOURCE (our) DXCC is the same as DEST (correspondent) DXCC and the band is 160 and the mode is CW or SSB then the qso is worth 1 point.

  In the above definition notice the '''SOURCE''' and '''DEST''' keys. we can also use the '''CONFIG''' key.

 

* Keys Reference:

   SOURCE->CONT - our own continent

   SOURCE->DXCC - our own DXCC

   SOURCE->CALL - our own CALLSIGN

   SOURCE->PFX  - our own prefix 

   SOURCE->WPX  - our own prefix

   DEST->CONT - correspondent continent

   DEST->DXCC - correspondent DXCC

   DEST->CALL - correspondent CALLSIGN

   DEST->RCVD - value entered in the received field of qso line

   DEST->RECINFO - value entered in the recinfo field of qso line

   DEST->RECINFO2 - value entered in the recinfo2 field of qso line

   DEST->RECINFO3 - value entered in the recinfo3 field of qso line

   CONFIG->EXCHANGE - value from the exchange field entered in the contest configuration screen

   CONFIG->CQZONE - value from the WAZ field entered in the contest configuration screen

   CONFIG->ITUZONE - value from the ITU field entered in the contest configuration screen

   CONFIG->OPNAME - value from the OPNAME field entered in the contest configuration screen

   CONFIG->POWER - value from the POWERfield entered in the contest configuration screen


More details about point calculation and the POINTS_FIELD_BAND_MODE key can be found in a later section of this document.<br>


==General contest description==


These keys are used for general contest description in the contest config file, such as the contest name, link to the rules etc.<br>


  '''CONTESTGROUP'''

  Used for group contest when displaying the config screen for contest selection.

  For example: Digital, 9A Local Contest etc.<br>

  '''CONTESTNAME'''

  The contest name as it will be shown and recognized in the contest selection box.

  Note: this can be same as the cabrillo contest name, but usually it is the full contest name.

  '''This field is mandatory and must be unique for all files in contest definition folder.'''<br>

  '''CONTESTRULES'''

  Link to contest rules.<br>

  '''CONTESTWEB'''

  Link to contest web.



Configuration Screen Control

==Configuration screen control==

 

  '''CATEGORIES'''

  List of available categories separated by ";" to build category selection list at contest configuration screen.<br>

  Default value: 

  Single operator;Single operator assisted;Multioperator, single transmitter;Multioperator, two transmitter;Multi operator, multi-transmitter<br><br>

  '''CATEGORY_MODES'''

  List of available modes separated by ";" to build mode selection list at contest configuration screen.<br>

  Default value: CW;SSB;MIXED <br><br>

 

  '''CLASS'''

  List of available classes separated by ";" to build class selection list at contest configuration screen.<br>

  Default value: High;Low;QRP <br><br>

 

   '''OVERLAY'''

  List of available category overlays separated by ";" to build overlay selection list at contest configuration screen.<br>

  Default value: ---;Band restricted;Radio club;Dxpedition;Headquarters;Open;Restricted;Novice;Classic;Rookie;Tribander/Single element;QRP;

                     Fixed station;Portable station<br><br>

 

  '''CFG_MULT'''

  Controls exchange field at contest configuration screen. 

  Acceptable values are: YES/NO.

  If set to YES, exchange field will be enabled for entering data. Usually in exchange field user enters own multiplier, zone or some other info.

  Default value: NO<br><br>

 

  '''CFG_MULT_DX_ALLOWED'''

  Is "DX" acceptable entry in exchange field at contest configuration screen.

  For example in ARRL DX Contest, all USA/VE stations needs to enter their state/province, while all other stations enters DX here.<br><br>

  Acceptable values are: YES/NO <br>

  Default value: NO<br>

 

  '''CFG_MULT_MANDATORY'''

  Is exchange field mandatory (needs to be filled) or can be blank.<br><br>

  Acceptable values are: YES/NO<br>

  Default value: NO<br>

 

  '''CFG_MULT_ERRORTEXT'''

  Defines error text which will be shown in case that user enters wrong data in exchange field at contest configuration screen.

  For example, in ARRL DX Contest, user enters state abbreviation which isn't on predefined list.<br>

 

  '''CFG_MULT_FROM'''

  Defines where we can check if user entry in exchange field is valid. Can have value like CUSTOM_MULT_LIST or ITUZONE.<br>

  Can be blank if we are using regex expression to check the value or we can accept any entry.<br>

 

  '''CFG_MULT_RGX_CHECK'''

  Regex expression which will be used to verify if data entered in exchange field at contest configuration screen is valid.<br>

  Please note that regex expression can contains special tag CUSTOM_MULT_LIST too. This means that any entry specified in

  custom multiplier list will be valid entry.<br>

 

  '''CFG_CQZONE_ERRORTEXT'''

  Defines error text which will be shown in case that user enters wrong data in WAZ field at contest configuration screen.<br>

 

  '''CFG_CQZONE_MANDATORY'''

  Is WAZ field mandatory (needs to be filled) or can be blank.<br><br>

  Acceptable values are: YES/NO

  Default value: NO<br>

 

  '''CFG_GRID_ERRORTEXT'''

  Defines error text which will be shown in case that user enters wrong data in GRIDSQUARE field at contest configuration screen.<br>

 

  '''CFG_GRID_MANDATORY'''

  Is GRIDSQUARE field mandatory (needs to be filled) or can be blank.<br><br>

  Acceptable values are: YES/NO

  Default value: NO<br>

 

  '''CFG_GRID_RGX_CHECK'''

  Regex expression which will be used to verify if data entered in GRIDSQUARE field at contest configuration screen is valid.<br>

 

  '''CFG_ITUZONE_ERRORTEXT'''

  Defines error text which will be shown in case that user enters wrong data in ITU field at contest configuration screen.<br>

 

  '''CFG_ITUZONE_MANDATORY'''

  Is ITU field mandatory (needs to be filled) or can be blank.<br><br>

  Acceptable values are: YES/NO

  Default value: NO<br>

 

  '''CFG_MYDXCC_ERRORTEXT'''

  Defines error text which will be shown in case that user enters wrong data in DXCC field at contest configuration screen.<br>

 

  '''CFG_MYDXCC_MANDATORY'''

  Is DXCC field mandatory (needs to be filled) or can be blank.<br><br>

  Acceptable values are: YES/NO

  Default value: NO<br>

 

  '''CFG_OPNAME_ERRORTEXT'''

  Defines error text which will be shown in case that user enters wrong data in OPNAME field at contest configuration screen.<br>

 

  '''CFG_OPNAME_MANDATORY'''

  Is OPNAME field mandatory (needs to be filled) or can be blank.<br><br>

  Acceptable values are: YES/NO

  Default value: NO<br>

 

  '''CFG_POWER_ERRORTEXT'''

  Defines error text which will be shown in case that user enters wrong data in POWER field at contest configuration screen.<br>

 

  '''CFG_POWER_MANDATORY'''

  Is POWER field mandatory (needs to be filled) or can be blank.<br><br>

  Acceptable values are: YES/NO

  Default value: NO<br>

 

  '''CFG_POWER_RGX_CHECK'''

  Regex expression which will be used to verify if data entered in POWER field at contest configuration screen is valid.<br>

 

  '''CFG_STATE_ERRORTEXT'''

  Defines error text which will be shown in case that user enters wrong data in STATE/PROVINCE/OTHER field at contest configuration screen.<br>

 

  '''CFG_STATE_FROM'''

  Defines where we can check if user entry in STATE/PROVINCE/OTHER field is valid. Can have value like CUSTOM_MULT_LIST or ITUZONE.

  Can be blank if we are using regex expression to check the value or we can accept any entry.<br>

 

  '''CFG_STATE_MANDATORY'''

  Is STATE/PROVINCE/OTHER field mandatory (needs to be filled) or can be blank.<br><br>

  Acceptable values are: YES/NO

  Default value: NO<br>

 

  '''CFG_STATE_RGX_CHECK'''

  Regex expression which will be used to verify if data entered in STATE/PROVINCE/OTHER field at contest configuration screen is valid.

  Please note that regex expression can contains special tag CUSTOM_MULT_LIST too. 

  This means that any entry specified in custom multiplier list will be valid entry.<br>

 

==Cabrillo==

 

  '''CABRILLO_ASSISTED'''

  '''CABRILLO_BAND'''

  '''CABRILLO_CONTEST_NAME'''

  '''CABRILLO_DEF_RECINFO'''

  '''CABRILLO_DEF_RECINFO2'''

  '''CABRILLO_DEF_RECINFO3'''

  '''CABRILLO_DXPEDITION'''

 

  '''CABRILLO_LINE'''<br>

  USE: CABRILLO_LINE=FREQ{F=R,6, };MODE{F=L,2, };DATE;TIME;MYCALL{F=L,13, };SENT{F=L,3, };NR{F=R,3,0,4}<br>

  Data is taken from the field name and entered into the Cabrillo file in the order entered, EG FREQ will enter Frequency of QSO, MODE will enter Mode etc<br>

  Formatting information is contained within the {}

  F= is the formatting call and should be followed by the following parameters: 

  Alignment: L(eft), R(ight)

  Total size for alignment: How many characters is used for formatting, padding, alignment.

  Padding character: Which character will be used for filling empty spaces

  And last one is optional: Total size of the field in Cabrillo field.<br>

  EG: RCVD2{F=R,3,0,4}

  RCVD2 field value will be aligned Right, on length of 3 characters. For padding, we using "0" characters.

  End total size will be 4 characters (so we will add one more space if needed to have size of 4 chars).

  This means that if RCVD2 field value is "1", it will be formatted as " 001" and this value will be written in Cabrillo QSO line.

 

  '''CABRILLO_LOCATION_CHECK'''

  '''CABRILLO_LOCATION_DEFAULT'''

  '''CABRILLO_LOCATION_PROMPT'''

  '''CABRILLO_MODES'''

  '''CABRILLO_OPERATOR'''

  '''CABRILLO_OVERLAY'''

  '''CABRILLO_OVERLAY_DISABLED'''

  '''CABRILLO_POWER'''

  '''CABRILLO_QTC_LINE'''

  '''CABRILLO_TIME'''

  '''CABRILLO_TRANSMITTER'''

 

==Band and mode specific==

 

  '''BANDS'''

  Contains list of available bands separated by ";" for specific contest.<br>

  Default value: 160;80;40;20;15;10

 

  '''MODES'''

  Contains list of available modes separated by ";" for specific contest.<br>

  Default value: CW;SSB

 

  '''EDI_BANDS'''

  Contains list of EDI values for bands specified in BANDS key.

  Must contain same number of entries as BANDS key.

  This is used for generating EDI log files for VHF/UHF/SHF contests in IARU Region I.

 

==Entry field definitions==

 

These keys are used to control the layout of QSO entry screen. The keys set the visibility, length, labels, checking procedures etc. for each of the fields which the user can enter data or display for any QSO.<br>

 

  '''FIELD_AZ_VISIBLE'''

  Controls the visibility of the Azimuth field. Mostly used on VHF/UHF/SHF to get the Azimuth angle from a gridsquare.<br>

  Acceptable values: YES/NO

  Default value: NO<br>

 

  '''FIELD_CALLSIGN_WWL_CHECK'''

  If YES, entry in the log callsign field will be checked for a gridsquare entry.

  If a gridsquare is found, then the callsign field value will be copied to the gridsquare entry field and the Azimuth angle will be

  calculated and shown.<br>

  Acceptable values: YES/NO

  Default value: NO<br>

 

  '''FIELD_MODE_VISIBLE'''

  Mode field visable on the qso entry line.<br>

  Acceptable values: YES/NO<br>

  Default value: NO<br>

 

  '''FIELD_MODE_NAME'''

  Header name for field mode.<br>

 

  '''FIELD_MULT_VISIBLE'''

  MULT field visable on the screen.<br>

  Acceptable values: YES/NO<br>

 

  '''FIELD_NR_VISIBLE'''

  SENT QSO SERIAL NUMBER visible on the qso entry line.<br>

  Acceptable values: YES/NO<br>

 

  '''FIELD_NR_HIDDEN_DXCC'''

  List of DXCC separated by ";". If our own DXCC is on this list, SENT QSO SERIAL NUMBER will be hidden.

  Usable for contests where some stations are sending a serial number exchange and other stations are sending other data

  (for example a local province).

 

  '''FIELD_NR_HIDDEN_RGX'''

  Regex expression. If the condition is valid, SENT QSO SERIAL NUMBER will be hidden.

  Usable for contests where some stations are sending a serial number exchange and other stations are sending other date

  (for example a local province).<br>

 

  '''FIELD_PERIOD_VISIBLE'''

  Is field PERIOD number visible on qso entry line.<br>

  Acceptable values: YES/NO<br>

 

  '''FIELD_PERIOD_NAME'''

  Header name for field NAME.<br>

 

  '''FIELD_PTS_VISIBLE'''

  Is field POINTS visible in qso entry line.<br>

  Acceptable values: YES/NO<br>

 

  '''FIELD_PTS_NAME'''

  Header name for field POINTS.

 

  '''FIELD_RCVD_CHECK_FORMAT_FX'''

  C# expression to reformat RCVD field value before any further checking.<br>

 

  '''FIELD_RCVD_COPY'''

  Is field RCVD automatically copied from previous qso with same station.<br>

  Acceptable values: YES/NO<br>

 

  '''FIELD_RCVD_COPY_EXC_DXCC'''

  List of DXCC countries separated by ";" which are exception for copy value.<br>

  Usable in case when we want to copy value from previous QSO for some station.<br>

 

  '''FIELD_RCVD_COPY_EXC_RGX'''

  Regex expression. If condition is true, we have a value copy exception for the QSO.<br>

 

  '''FIELD_RCVD_COPY_FX'''

  C# expression used to copy value from previous qso.<br>

 

  '''FIELD_RCVD_DEFAULT_VALUE'''

  If RCVD field is empty, this is default value to be filled in cabrillo output.<br>

 

  '''FIELD_RCVD_EXC_CHECK_DXCC'''

  List of DXCC countries separated by ";" which are exception for value checking procedure.<br>

 

  '''FIELD_RCVD_FORMAT_FX'''

  C# expression used to format entered value before save.<br>

 

  '''FIELD_RCVD_FX_CHECK'''

  C# expression used to check is value entered in RCVD field is valid.<br>

 

  '''FIELD_RCVD_MANDATORY'''

  Is RCVD field entry is mandatory. <br>

  Acceptable values: YES/NO<br>

 

  '''FIELD_RCVD_MANDATORY_RGX_EXC'''

  Regex expression. If condition is true, we have exception from mandatory rule.<br>

 

  '''FIELD_RCVD_MAX_LENGTH'''

  Maximum number of characters accepted in RCVD field.<br>

 

  '''FIELD_RCVD_MIN_LENGTH'''

  Minimum number of characters accepted in RCVD field.<br>

 

  '''FIELD_RCVD_NUMERIC'''

  Controls if RCVD field accepts only numeric characters.<br>

  Acceptable values: YES/NO<br>

 

  '''FIELD_RCVD_RGX_CHECK'''

  Regex expression. Used to check if entry in RCVD field is valid.<br>

 

  '''FIELD_RCVD_TYPE'''

  Define type of RCVD field for possible calculations and check routines.<br>

  For example: MULT, NR, CONT etc.

 

  '''FIELD_RCVD_WWL_CHECK'''

  If YES, entry in RCVD field will be checked if it can be possible gridsquare entry.

  It it is gridsquare, then RCVD field value will be copied to gridsquare entry field and Azimuth will be calculated and shown.<br>

  Acceptable values: YES/NO

  Default value: NO<br>

 

  '''FIELD_RECINFO_CHECK_FORMAT_FX'''

  '''FIELD_RECINFO_COPY'''

  '''FIELD_RECINFO_COPY_RGX_EXC'''

  '''FIELD_RECINFO_FORMAT_FX'''

  '''FIELD_RECINFO_FX_CHECK'''

  '''FIELD_RECINFO_MANDATORY'''

  '''FIELD_RECINFO_MANDATORY_RGX_EXC'''

  '''FIELD_RECINFO_MAX_LENGTH'''

  '''FIELD_RECINFO_MIN_LENGTH'''

  '''FIELD_RECINFO_NAME'''

  '''FIELD_RECINFO_NUMERIC'''

  '''FIELD_RECINFO_RGX_CHECK'''

  '''FIELD_RECINFO_RGX_SEL_POS'''

  '''FIELD_RECINFO_TYPE'''

  '''FIELD_RECINFO_VISIBLE'''

  '''FIELD_RECINFO2_CHECK_FORMAT_FX'''

  '''FIELD_RECINFO2_COPY'''

  '''FIELD_RECINFO2_COPY_RGX_EXC'''

  '''FIELD_RECINFO2_FORMAT_FX'''

  '''FIELD_RECINFO2_FX_CHECK'''

  '''FIELD_RECINFO2_MANDATORY'''

  '''FIELD_RECINFO2_MANDATORY_RGX_EXC'''

  '''FIELD_RECINFO2_MAX_LENGTH'''

  '''FIELD_RECINFO2_MIN_LENGTH'''

  '''FIELD_RECINFO2_NAME'''

  '''FIELD_RECINFO2_NUMERIC'''

  '''FIELD_RECINFO2_RGX_CHECK'''

  '''FIELD_RECINFO2_RGX_SEL_POS'''

  '''FIELD_RECINFO2_TYPE'''

  '''FIELD_RECINFO2_VISIBLE'''

  '''FIELD_RECINFO3_CHECK_FORMAT_FX'''

  '''FIELD_RECINFO3_COPY'''

  '''FIELD_RECINFO3_COPY_RGX_EXC'''

  '''FIELD_RECINFO3_FORMAT_FX'''

  '''FIELD_RECINFO3_FX_CHECK'''

  '''FIELD_RECINFO3_MANDATORY'''

  '''FIELD_RECINFO3_MANDATORY_RGX_EXC'''

  '''FIELD_RECINFO3_MAX_LENGTH'''

  '''FIELD_RECINFO3_MIN_LENGTH'''

  '''FIELD_RECINFO3_NAME'''

  '''FIELD_RECINFO3_NUMERIC'''

  '''FIELD_RECINFO3_RGX_CHECK'''

  '''FIELD_RECINFO3_RGX_SEL_POS'''

  '''FIELD_RECINFO3_TYPE'''

  '''FIELD_RECINFO3_VISIBLE'''

  '''FIELD_RST_3RD_LETTER'''

  '''FIELD_SENT_VISIBLE'''

  '''FIELD_STN_VISIBLE'''