<< Click to Display Table of Contents >>

EQuIS 7  >>  Live > Agents > Campbell Scientific LoggerNet >


App Settings


Before using EQuIS Live LoggerNet Agent, you may change one or more app settings in the *.config file as follows:

1.Open the EarthSoft.Live.Agents.LoggerNet.exe.config file in a text editor (e.g., Notepad++).

2.In the <appSettings> section, find the desired settings key, and set its value, per table below.

3.Repeat steps 1-2 for additional settings that you want to change.

4.Save and close the *.config file.


Note that some of the examples in the Example(s) column use *, known as wildcard characters.






True or False

If this setting is true, the EQuIS Live LoggerNet Agent will add error lines to an errors file. For example, if a line in file a.dat contains an error (e.g., a non-numerical value), then it will add the line to file a.dat.errors.


Note that if this setting is set to false, logging will still occur as defined in the LoggerNet Agent's log4net.config file.


MM/dd/yyyy HH:mm:ss

If this setting is populated, the EQuIS Live LoggerNet Agent will use this custom date and time format when parsing the dates and times in the *.dat files. A list of format specifiers can be found here. Otherwise, if this setting is empty, it lets the DateTime.Parse(String) method determine the date and time format. The latter works well enough in most cases, but can run into problems if the date and time can have a double meaning (e.g., if the month-day-year can be interpreted as either dd/MM/yyyy or MM/dd/yyyy).


True or False

If this setting is true, the EQuIS Live LoggerNet Agent will set DT_LOGGER.UTC_OFFSET_HRS to 0 when adding a logger, and will set DT_LOGGER_DATUM.DATUM_UTC_DT to the dates and times in the *.dat files, without subtracting DT_LOGGER.UTC_OFFSET_HRS, when loading data. Otherwise, if this setting is false or empty, it will set DT_LOGGER.UTC_OFFSET_HRS to the local time zone's standard time UTC offset hours when adding a logger, and will set DT_LOGGER_DATUM.DATUM_UTC_DT to the dates and times in the *.dat files, minus DT_LOGGER.UTC_OFFSET_HRS, when loading data.



The agent uses this encoding to read the files. If this setting is empty, it uses the computer's default encoding: Encoding.Default. Possible values for this setting are listed in the Name column of the table in the Encoding class topic's Remarks section.



This setting is used to delay loading file data to the database by a defined interval, in milliseconds.


The FileSystemWatcher, used by the agent to watch the files and folders, may detect MULTIPLE near-same-time OnChanged events, for ONE file system operation (e.g., copying a file). To prevent a file from being processed multiple times for one file system operation, the agent starts / resets a timer when it detects an OnChanged event that fires after this number of milliseconds (e.g., 500 ms) and processes the file.



C:\CampbellSci\LoggerNet\ Daily\*.dat,

or *_15.*

This setting is used when LoggerNet starts up to filter the DT_LOGGER.LIVE_DATA_SOURCE paths and file names, when it loads logger rows, and creates file watchers. If this setting is empty, it creates file watchers for ALL paths and file names.



If this setting is populated, the EQuIS Live LoggerNet Agent will watch this path for new files, and automatically add loggers and load data for them.



If this setting is populated, the EQuIS Live LoggerNet Agent folder watcher will only process new files matching this filter. Otherwise, if this setting is empty, it will process all files. Note that the folderWatcherPath needs to be populated for this setting to be used.


True or False

If this setting is true or empty, and the folderWatcherPath is populated, the EQuIS Live LoggerNet Agent will automatically add file watchers, and add DT_LOGGER rows and load data for every file added to folderWatcherPath. It saves you from having to add loggers manually; see the Add logger(s) section here.


If set to false, and folderWatcherPath is populated, new loggers and data will still be added from the folderWatcherPath. But, data from multiple files will be loaded to one DT_LOGGER.LOGGER_ID if the 2nd, 8th, and 7th values (the values that define DT_LOGGER.LOGGER_CODE) are the same in the first line of each of the files. It will also set the DT_LOGGER.LIVE_DATA_SOURCE to csif: (followed by the computer name and folder location).


This feature is used to merge data from multiple files into one DT_LOGGER.LOGGER_ID. For example, in the case that the logger starts writing data to a new file.



This setting is used to skip adding series and datum rows for one or more columns (e.g., columns with non-numeric values). It may contain (case-insensitive) column names and/or (zero-based) column indexes.


These columns will be ignored for ALL files in a LoggerNet Agent instance. If necessary, use serviceNameSuffix to start multiple LoggerNet Agent instances, each with different ignoreColumns, and fileWatcherFilters.


You can also deactivate one or more series (by setting their STATUS_FLAGs = 'R'), and restart the LoggerNet Agent (or change the file's header, so it re-gets the series info). New data rows will not be added. (Tip: You can deactivate the series immediately after adding the logger (and series) using the addlogger command line option. Thus, no data rows will be added for them.)


Common app settings for all EQuIS Live Agents that can be installed as Windows Services are listed here.


Command Line Options


EarthSoft.Live.Agents.LoggerNet.exe supports the following command line options:


Please note that you may need to run the Command Prompt as an Administrator.





Generate the hash of the header lines of the given file (see DT_LOGGER.CUSTOM_FIELD_2).

e.g., [LoggerNet.exe] hash "C:/temp/somefile.dat"


Create a DT_LOGGER row for the given file (see DT_LOGGER.LIVE_DATA_SOURCE).

e.g., [LoggerNet.exe] addlogger "C:/temp/somefile.dat"


Load data from the given file (third parameter) to the given logger.

e.g., [LoggerNet.exe] loaddata [logger_id] "C:/temp/somefile.dat"

loaddata all

Load data from all active logger files on the current computer.


List all active file and folder watchers on this computer.


Common command line options, for all EQuIS Live Agents that can be installed as Windows Services, are listed here.




The DT_LOGGER table contains the following fields that are used by EQuIS Live LoggerNet Agent:

LOGGER_ID – A system-assigned unique identifier for the logger.

LOGGER_CODE – A user/vendor assigned code that identifies the logger program/configuration.

LOGGER_DESC – A description of the logger program/configuration.

START_DATE – The effective start date of this logger program/configuration.

END_DATE – The effective end date of this logger program/configuration.

UTC_OFFSET_HRS – The number of hours offset from UTC, disregarding Daylight Savings. This value is added to the date/time value in each TOA5 record to compute UTC time.

LIVE_DATA_SOURCE – The path to the LoggerNet output file (*.dat) for this logger.

REMARK – A remark about this logger.

FACILITY_ID – The facility with which this logger is associated.

SYS_LOC_CODE – The location with which this logger is associated.

DEVICE_CODE – A code (e.g., serial number) that identifies the logger hardware.

DEVICE_DESC – A description of the logger hardware.

LOG_PERIOD_S – The number of seconds between each logging event on the data logger (aka, how often data is logged on the logger).

TRANSMIT_PERIOD_S – The number of seconds between each LoggerNet Data Collection (aka, how often data is transmitted from the logger to LoggerNet).

SYMBOL_ID – Reserved for future use.

STATUS_FLAG – A status flag to indicate whether or not this logger is active (aka, STATUS_FLAG = 'A').

CUSTOM_FIELD_1 – "TOA5" (the type of file being written by LoggerNet).

CUSTOM_FIELD_2 – A hash of the file header lines that is used to detect if a logger program has changed (additional parameters, different units, etc.).

CUSTOM_FIELD_3 – Used as a bookmark that indicates the last record that was processed. It is in the form of "<byte offset from the beginning of the *.dat file to the last line>|<date/time of the last line>".

CUSTOM_FIELD_4 – If populated as '<max file size in bytes>|<destination folder>', the *.dat file will automatically be truncated and archived to the destination folder when it reaches the specified number of bytes. For example, CUSTOM_FIELD_4 equal to '8192|C:\temp\archive' would archive the *.dat file to the C:\temp\archive folder whenever it exceeds 8192 bytes in length.

CUSTOM_FIELD_5 – Reserved for future use.