Difference between revisions of "Contest definition"

From DXLog.net
Jump to navigation Jump to search
(Configuration screen control)
(Entry field definitions)
Line 251: Line 251:
 
   '''FIELD_CALLSIGN_WWL_CHECK'''
 
   '''FIELD_CALLSIGN_WWL_CHECK'''
 
   If YES, entry in the log callsign field will be checked for a gridsquare entry.
 
   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>
+
   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
 
   Acceptable values: YES/NO
 
   Default value: NO<br>
 
   Default value: NO<br>

Revision as of 21:25, 9 April 2015

Description

Rules for most contests are different and are usually written by the group adjudicating the contest.
The differences can be points per qso, multiplier determination and calculations etc.

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.

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

When DXlog.net is started, the contents of Contest folder is copied into the ApplicationData folder in your Windows OS.
During the copying process, DXLog.net compares modified date of each file in the installation folder with the version in the ApplicationData folder.
If a newer version exists in the ApplicationData folder, the original file would not be copied over from the contest folder.

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.

File structure

Each line in a contest definition file usually contains KEY + VALUE pairs.
The pair is always separated by the "=" sign.
For example:

 CONTEST_NAME=9A CW 
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.

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

  • Case one: We want to validate the user entered data in some of the fields.
 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.
The regex key field for this operation is: CFG_MULT_RGX_CHECK
So to create a validation, as per the previous example, we need the following definition in the contest config file:
CFG_MULT_RGX_CHECK=^NY$|^FL$|^GA$|^DX$
"^" in regex denotes start of the string value "$" in regex denotes end of string value "|" in regex is logical or operation


  • Case two: We want to validate a value which could change on each entry into the log.
 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
So to create the calculation, as per the previous example, we need the following definition in the contest config file:
POINTS_FIELD_BAND_MODE=SOURCE->DXCC:DEST->DXCC;ALL;^160$;^CW$|^SSB$;1
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.

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.

 CONTESTGROUP
 Used for group contest when displaying the config screen for contest selection.
 For example: Digital, 9A Local Contest etc.
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.
CONTESTRULES Link to contest rules.
CONTESTWEB Link to contest web.

Configuration screen control

 CATEGORIES
 List of available categories separated by ";" to build category selection list at contest configuration screen.
Default value: Single operator;Single operator assisted;Multioperator, single transmitter;Multioperator, two transmitter;Multi operator, multi-transmitter

CATEGORY_MODES List of available modes separated by ";" to build mode selection list at contest configuration screen.
Default value: CW;SSB;MIXED

 CLASS
 List of available classes separated by ";" to build class selection list at contest configuration screen.
Default value: High;Low;QRP

  OVERLAY
 List of available category overlays separated by ";" to build overlay selection list at contest configuration screen.
Default value: ---;Band restricted;Radio club;Dxpedition;Headquarters;Open;Restricted;Novice;Classic;Rookie;Tribander/Single element;QRP; Fixed station;Portable station

 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

 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.

Acceptable values are: YES/NO
Default value: NO
 CFG_MULT_MANDATORY
 Is exchange field mandatory (needs to be filled) or can be blank.

Acceptable values are: YES/NO
Default value: NO
 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.
 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.
Can be blank if we are using regex expression to check the value or we can accept any entry.
 CFG_MULT_RGX_CHECK
 Regex expression which will be used to verify if data entered in exchange 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.
 CFG_CQZONE_ERRORTEXT
 Defines error text which will be shown in case that user enters wrong data in WAZ field at contest configuration screen.
 CFG_CQZONE_MANDATORY
 Is WAZ field mandatory (needs to be filled) or can be blank.

Acceptable values are: YES/NO Default value: NO
 CFG_GRID_ERRORTEXT
 Defines error text which will be shown in case that user enters wrong data in GRIDSQUARE field at contest configuration screen.
 CFG_GRID_MANDATORY
 Is GRIDSQUARE field mandatory (needs to be filled) or can be blank.

Acceptable values are: YES/NO Default value: NO
 CFG_GRID_RGX_CHECK
 Regex expression which will be used to verify if data entered in GRIDSQUARE field at contest configuration screen is valid.
 CFG_ITUZONE_ERRORTEXT
 Defines error text which will be shown in case that user enters wrong data in ITU field at contest configuration screen.
 CFG_ITUZONE_MANDATORY
 Is ITU field mandatory (needs to be filled) or can be blank.

Acceptable values are: YES/NO Default value: NO
 CFG_MYDXCC_ERRORTEXT
 Defines error text which will be shown in case that user enters wrong data in DXCC field at contest configuration screen.
 CFG_MYDXCC_MANDATORY
 Is DXCC field mandatory (needs to be filled) or can be blank.

Acceptable values are: YES/NO Default value: NO
 CFG_OPNAME_ERRORTEXT
 Defines error text which will be shown in case that user enters wrong data in OPNAME field at contest configuration screen.
 CFG_OPNAME_MANDATORY
 Is OPNAME field mandatory (needs to be filled) or can be blank.

Acceptable values are: YES/NO Default value: NO
 CFG_POWER_ERRORTEXT
 Defines error text which will be shown in case that user enters wrong data in POWER field at contest configuration screen.
 CFG_POWER_MANDATORY
 Is POWER field mandatory (needs to be filled) or can be blank.

Acceptable values are: YES/NO Default value: NO
 CFG_POWER_RGX_CHECK
 Regex expression which will be used to verify if data entered in POWER field at contest configuration screen is valid.
 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.
 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.
 CFG_STATE_MANDATORY
 Is STATE/PROVINCE/OTHER field mandatory (needs to be filled) or can be blank.

Acceptable values are: YES/NO Default value: NO
 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.

Cabrillo

 CABRILLO_ASSISTED
 CABRILLO_BAND
 CABRILLO_CONTEST_NAME
 CABRILLO_DEF_RECINFO
 CABRILLO_DEF_RECINFO2
 CABRILLO_DEF_RECINFO3
 CABRILLO_DXPEDITION
 CABRILLO_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.
Default value: 160;80;40;20;15;10
 MODES
 Contains list of available modes separated by ";" for specific contest.
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.

 FIELD_AZ_VISIBLE
 Controls the visibility of the Azimuth field. Mostly used on VHF/UHF/SHF to get the Azimuth angle from a gridsquare.
Acceptable values: YES/NO Default value: NO
 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.
Acceptable values: YES/NO Default value: NO
 FIELD_MODE_VISIBLE
 Mode field visable on the qso entry line.
Acceptable values: YES/NO
Default value: NO
 FIELD_MODE_NAME
 Header name for field mode.
 FIELD_MULT_VISIBLE
 MULT field visable on the screen.
Acceptable values: YES/NO
 FIELD_NR_VISIBLE
 SENT QSO SERIAL NUMBER visible on the qso entry line.
Acceptable values: YES/NO
 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).
 FIELD_PERIOD_VISIBLE
 Is field PERIOD number visible on qso entry line.
Acceptable values: YES/NO
 FIELD_PERIOD_NAME
 Header name for field NAME.
 FIELD_PTS_VISIBLE
 Is field POINTS visible in qso entry line.
Acceptable values: YES/NO
 FIELD_PTS_NAME
 Header name for field POINTS.
 FIELD_RCVD_CHECK_FORMAT_FX
 C# expression to reformat RCVD field value before any further checking.
 FIELD_RCVD_COPY
 Is field RCVD automatically copied from previous qso with same station.
Acceptable values: YES/NO
 FIELD_RCVD_COPY_EXC_DXCC
 List of DXCC countries separated by ";" which are exception for copy value.
Usable in case when we want to copy value from previous QSO for some station.
 FIELD_RCVD_COPY_EXC_RGX
 Regex expression. If condition is true, we have a value copy exception for the QSO.
 FIELD_RCVD_COPY_FX
 C# expression used to copy value from previous qso.
 FIELD_RCVD_DEFAULT_VALUE
 If RCVD field is empty, this is default value to be filled in cabrillo output.
 FIELD_RCVD_EXC_CHECK_DXCC
 List of DXCC countries separated by ";" which are exception for value checking procedure.
 FIELD_RCVD_FORMAT_FX
 C# expression used to format entered value before save.
 FIELD_RCVD_FX_CHECK
 C# expression used to check is value entered in RCVD field is valid.
 FIELD_RCVD_MANDATORY
 Is RCVD field entry is mandatory. 
Acceptable values: YES/NO
 FIELD_RCVD_MANDATORY_RGX_EXC
 Regex expression. If condition is true, we have exception from mandatory rule.
 FIELD_RCVD_MAX_LENGTH
 Maximum number of characters accepted in RCVD field.
 FIELD_RCVD_MIN_LENGTH
 Minimum number of characters accepted in RCVD field.
 FIELD_RCVD_NUMERIC
 Controls if RCVD field accepts only numeric characters.
Acceptable values: YES/NO
 FIELD_RCVD_RGX_CHECK
 Regex expression. Used to check if entry in RCVD field is valid.
 FIELD_RCVD_TYPE
 Define type of RCVD field for possible calculations and check routines.
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.
Acceptable values: YES/NO Default value: NO
 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