File Processor Agent Example – Solinst

<< Click to Display Table of Contents >>

Live > Agents > File Agents > File Processor > Examples >

File Processor Agent Example – Solinst

1.Add Solinst to the *.config file's processors setting, and ensure the following Solinst settings:

 

Setting

Value

Description

Solinst.dateTimeColumnHeaderRegex

Date

DT_LOGGER_DATUM.DATUM_UTC_DT date; column header text contains Date.

Solinst.folderWatcherPath

C:\EarthSoft\Live\Solinst


Solinst.headerLinesRegex

Date.*Time

The header line contains Date + anything (.*) + Time.

Solinst.loggerCodeHeaderLinesRegexGroups

^Location.*\n(?'a'[^:,]*)

DT_LOGGER.LOGGER_CODE; two lines, separated by a '\n'; the logger code is on the second line, before the colon or comma.

Solinst.loggerDescPrefix

Solinst


Solinst.timeColumnHeaderRegex

Time

DT_LOGGER_DATUM.DATUM_UTC_DT time; column header text contains Time.

 

And default (non-Solinst) settings (or add Solinst.dateTimeFormats, etc., settings):

 

Setting

Value

Description

dateTimeFormats


Empty; determined automatically.

delimiters

,

The fields are separated by commas.

utcOffsetHrs

-5

DT_LOGGER.UTC_OFFSET_HRS

 

2.Start the agent, and copy the following file to folder C:\EarthSoft\Live\Solinst.

 

 

Location:,,,,

SpringField,,,,

Level,,,,

UNIT: m,,,,

Offset: 35.000000 m,,,,

Temperature,,,,

UNIT: Deg C,,,,

Date,Time,ms,Level,Temperature

10/2/2011,16:00:00,0,1.4393,9.698

10/3/2011,20:00:00,0,1.3936,9.498

10/4/2011,0:00:00,0,1.371,9.487

 

 

3.The line after the Location contains the the DT_LOGGER.LOGGER_CODE. Find/add the logger row, e.g.:

 

LOGGER_CODE

LOGGER_DESC

LIVE_DATA_SOURCE

UTC_OFFSET_HRS

SpringField

Solinst SpringField (= Solinst.loggerDescPrefix + LOGGER_CODE)

folder://COMPUTER_NAME/
C:/EarthSoft/Live/Solinst

-5 (= utcOffsetHrs)

 

4.The file's Date,Time line is the header line; it contains the DT_LOGGER_DATUM.DATUM_UTC_DT columns Date and Time. The other columns are the series; they contain DT_LOGGER_SERIES.SERIES_NAMEs.

 

5.For each subsequent line:

a.For each series (each column, excluding Date and Time columns):

i.Find/add the series row for the SERIES_NAME.

ii.Add the datum row, e.g., for the first data line:

 

SERIES_NAME

DATUM_UTC_DT

DATUM_VALUE

SERIES_UNIT

ms

2011-10-02 21:00:00 (= 2011-10-02 16:00:00 - UTC_OFFSET_HRS)

0

NULL

Level

2011-10-02 21:00:00

1.4393

NULL

Temperature

2011-10-02 21:00:00

9.698

NULL

 

Notes:

The series units, m and Deg C, in the file's header, lines:
 
Level,,,,
UNIT: m,,,,
 
Temperature,,,,
UNIT: Deg C,,,,
 
are not added to DT_LOGGER_SERIES.SERIES_UNIT; seriesUnitColumnHeaderRegexGroups requires the units to be in the headerLinesRegex lines, and to be in the same column as their series names.
 
A SERIES_UNIT and/or SERIES_DESC may be added later, manually, but the SERIES_NAME cannot be changed, it uniquely identifies the series.

The 35.000000 m Level Offset, in the file's header, lines:
 
Level,,,,
Offset: 35.000000 m,,,,
 
is not added to the datum values.
 
The Data Computation Agent or Data Deriver Agent may be used to add the offset.