WriteLog Contest Module Development – Part 3: The Code

In the previous part, I worked through the easiest of the TODO items and ended up with a contest module that will compile. If you are just picking up this series of articles here, may I suggest you start at Part 1 where the tools are described.

First, lets look at the terrain from a distance. WriteLog needs to do a few things: accept program configuration and set up details, accept contest configuration details, control the rig at the op’s command, show the operator status messages as a contact is typed in, show a list of worked multipliers, add a contact to the log, show the score summary as the contest progresses, read and write the log to disk, summarize the log into reports and files to submit to the contest committee, and more such as handling spots etc. The items in this list that are unique to the contest are what the contest module needs to handle.

Most of the editing occurs in only two key source files: SKCCWESdat.cpp and SKCCWESmm.cpp. A little editing needs to be done to the resource files but all of that will be done with the Dialog Editor in VC++. Only a tiny bit of code editing needs to be done anywhere else. We will make a handful of edits to constants in SKCCWESmm.h. A little work needs to be done to the INI file for the contest and to the summary sheet templates using your favorite text and RTF file editors.

SKCCWESdat.cpp defines some data elements critical to the contest module. The exchange entry and log file columns are defined here. Definitions for three structures used throughout the module are declared here. And a handful of key constants are defined in this source file.

SKCCWESdat.cpp – key constants

  • The width and position constants (all have _WID and _POS in the name).
  • A note on the width and position constants: this was a little confusing but the same width and position constant names defined in SKCCWESdat.cpp are redefined in SKCCWESmm.cpp. This is a bold assumption on my part but I think this is to accommodate the fact that you can change the exchange layout in WriteLog. I guess you have to expect the configuration in your module might be different than the one actually used because the operator can choose to change the layout.

    SKCCWESdat.cpp – key structures

  • exfa_stru
  • band_stru
  • g_SKCCWESConfigArray[]
  • SKCCWESmm.cpp
    There is one supporting structure defined in SKCCWESmm.cpp that will need to be edited to support a custom exchange input box and a list of constants that will need a couple of additions as well. By far, method definitions make up the most important part of the contest module and those are all defined in this source file.

    The contest module is composed primarily of one large class ::SKCCWES. SKCCWESmm.h holds the class definition and SKCCWESmm.cpp defines all of the methods that the contest module will need.

    I created a table of SKCWESmm class methods with a few notes on each one but it’s too big for a blog post. Please check the table out because it will provide a shortcut to what you will need to edit for the SKCCWES contest module to work.

    We have gained altitude but the trail has plenty of switch-backs and a few rocks left to climb.

    WriteLog is Copyright © 1992-2009 by Wayne E. Wright, W5XD.

    Creative Commons License
    This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.

    Leave a Reply