Cs Code Modules

This page is for technical users only. No novice user will ever encounter anything mentioned on this page.
Essentially, it works through the cs files on the git hub for Cumulus] and gives a brief indication of what each module does.
=Modules compiled into ExportToMySQL.exe=
This is simplest cumulus code, so described first.
==iniFile.cs==
This is the code that reads Cumulus.ini and extracts the information from that file that the utility needs.
==Program.cs==
This is the code that does all the work, connecting to the database server taking (host, port, username, password, database name) parameters from Cumulus.ini, taking compass point modifiers from any strings.ini file present, reading standard log files and dayfile.txt, and exporting data from within those files to the respective database tables named in Cumulus.ini using "insert ignore".
=Modules compiled into CreateMissing.exe=
This is of in-between complexity, it needs a few more code modules,
==Cumulus.cs==
This is the code that determines what needs to be read from Cumuklus.ini, in this case quite a lot of the settings affect what the utility needs to do; a few examples are units, decimal places, and whether Cumulus is calculating wind chill.
==Dayfile.cs==
This is the code that renames any existing file, creates new file, and adds the various daily summary values and times (either from old file or recalculated) to the new file.
==iniFile.cs==
See previous sub-section with same name.
==MeteoLib.cs==
This is the code that takes supplied temperatures, wind speeds, humidities, and others. It then calculates all the derived values, such as dew point, wind chill, and humidity index.
==Program.cs in CreateMissing==
The sub-section name is qualified because the content of this code module varies.
This is the code that sets the sequence for the processes involved. It outputs status messages, and keeps counts for such actions as the adding of new lines. It handles meteorological day, by working out what time in standard log files, the source file, represents a new date (and start of what needs to be considered for new line) in dayfile.txt, the destination file. As it works through the times, it can add new derivatives to the source file, for the destination file it updates any maxima and minima, and at the end of the day it extracts the total daily rainfall.
==Utils.cs in CreateMissing==
The utilities in this code include conversion of temperature units, conversion of wind speed units, and calculation of average bearing.
=Modules compiled into CumulusMX.exe=
This is big one!
==AirQualityIndices.cs==
No prizes for what this module calculates!
==Alarm.cs==
Handles the generation, and stopping, of alarm indications. Also handles the content of emails.
==AlarmSettings.cs==
Code for the setting page covering alarms.
==Api.cs==
Code for handling application programming interface (transfers data to and from the various internal web pages for showing data.
==ApiTagprocessor==
Code for other application programming interfaces, including alarms, and custom requests.
==AstroLib.cs and Astrolib2.cs==
Two code modules, the first handling various conversions, and sun position calculations (plus various Steve Loft calculations no longer used), and the second being updates on the various solar calculations by Mark Crossley.
==CalibrationSettings.cs==
Code for processing the Calibration page in the settings. This includes multipliers, offsets, spike settings, and limits.
==CalibrationLimits.cs==
Code for default settings on that calibration page.
==CumulusService.Designer.cs==
Fixed code referencing the name and components of the Cumulus service.
==CumulusService.cs==
This code reads the optional parameters supplied when the service is begun, it arranges to broadcast any status messages, and it can stop Cumulus safely.
==DataEditor.cs==
This code supports the web pages in the 'Edit menu.
==DataStructure.cs==
This code supports the JSON files by defining values that can be sent to an external web server.
==DavisAirLink.cs==
This code reads the data from an AirLink station.
==DavisStation.cs==
This code reads the data directly from a Davis weather station.
==DavisWllStation.cs==
This code reads the data from the Davis Weather Link Live source of weather data.
==EasyWeather.cs==
This code reads the data from old versions of EasyWeather text files (not the newer Access style database design).
==EmailSender.cs==
As you can guess, this code processes the sending of emails (triggered by Alarm.cs).
==ExtraSensorSettings.cs==
This code handles the reading/editing of Extra Sensor Files.
==FOStation.cs==
This code reads the data from old Fine Offset stations (sold under a number of brand names).
==GW1000Station.cs==
This code reads the data processed by GW1000 units (and equivalent models under other brand names).
==GlobalSuppressions.cs==
The author Goran Devic's contribution to Cumulus.
==ImetStation.cs==
This code reads the data from Instromet weather stations.
==IniFile.cs==
See first sub-section with the same name.
==InternetSettings.cs==
This code supports the Internet Settings page.
==MeteoLib.cs==
See first sub-section with the same name.
==MoonriseMoonset.cs==
No prizes for guessing what this code calculates.
==MqttPublisher.cs==
This code supports the MQTT functionality in MX.
==MxFtpClient.cs==
This code handles the transfer of a file to a web server using file transfer.
==MysqlSettings.cs==
This code supports the MySQL Settings page.
==NOAA.cs, NOAAReports.cs and NOAASettings.cs==
All these code modules relate to reports. The first module handles the various values, where they come from, and any transformation needed to present them in the reports. The second module handles the actual generation of the reports, and copes with meterological day issues. The third module supports the NOAA Settings page, and the various "normal" values.
==Program.cs in CumulusMX==
The sub-section name is qualified because the content of this code module varies.
This code controls the actions during starting and stopping of MX incuding dealing with optional parameters and differences between running interactively and as a service.
==ProgramSettings.cs==
This code supports the program settings page.
==SQlite.cs==
A library module to connect to, and run queries against the two sqlite databases cumulusmx.db and diary.db used by MX.
==SelfInstaller.cs==
Another code module.
==ServiceCumulusInstaller.cs==
This code sets up a Microsoft Windows Service.
==SunriseSunset.cs==
Another of the author Goran Devic's contributions to Cumulus returns various sun event timings.
==ThirdPartySettings.cs==
This code supports the third party upload settings page.
==TokenParser.cs==
This code is what examines any Cumulus_template_file, each time it finds a web tag, this code module will find the value to insert into the file replacing the tag.
==Trig.cs==
Another of the author Goran Devic's contributions to Cumulus, this one has all the trignometry formulae.
==Utils.cs in CumulusMX==
There are time conversions, conversions between variable types, and encoding utilities, in this module. 
==WM918Station.cs, WMR100Station.cs, WMR200Station, WMR928Station.cs, and WS2300Station.cs==
These code modules read data from various station types.
==WeatherData.cs==
This code defines properties for wind speed, average wind speed, outdoor temperature, pressure, and rainfall total.
==WeatherDataCollections.cs==
This code simply defines the existance of a collection containing weather data.
==WeatherLink.cs==
Another of the author Goran Devic's contributions to Cumulus, this one reads data from a Vantage Pro weather station using the Loop data as source.
==WeatherLinkDotCom.cs==
This module reads data from the internet (WL.com).
==WeatherStation.cs==
This code takes the data, supplied by station specific modules, and does all the standard tasks that MX does with weather station data, like converting units, applying calibrations, and checking/updating extreme records. This code is where the rain earlier in the season is added on. This code is also responsible for collecting extra sensor data, converting its units, and looking up names for extra sensors.
==WebSocket.cs==
This code deals with the supply of data through web sockets, as alternative to HTTP transfers.