File Processor Agent Example – Diver

<< Click to Display Table of Contents >>

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

File Processor Agent Example – Diver

 

Setting

Value

Description

Diver.dataEndLineRegex

^END OF DATA

Stop loading data at line that starts with END OF DATA.

Diver.dateTimeColumnHeaderRegex

Date/time

DT_LOGGER_DATUM.DATUM_UTC_DT; column header text contains Date/Time.

Diver.folderWatcherPath

C:\EarthSoft\Live\Diver


Diver.headerLinesRegex

^Date/time

The header is 1 line and it starts with Date/time.

Diver.loggerCodeHeaderLinesRegexGroups

Location\s*=\s*(?'a'.*?),*$

DT_LOGGER.LOGGER_CODE

Diver.loggerDescPrefix

Diver


Diver.seriesNameColumnHeaderRegexGroups

((?'a'.*)\[|(?'b'.*))

DT_LOGGER_SERIES.SERIES_NAME

(e.g., 'Pressure[cm]' => 'Pressure')

Diver.seriesUnitColumnHeaderRegexGroups

\[(?'a'[^]]*)\][^[]*$

DT_LOGGER_SERIES.SERIES_UNIT

(e.g., 'Pressure[cm]' => 'cm')

 

And default (non-Diver) settings:

 

Setting

Value

Description

dateTimeFormats


Empty; determined automatically.

delimiters

,

The fields are separated by commas.

utcOffsetHrs

0

DT_LOGGER.UTC_OFFSET_HRS

 

 

Data file for DataLogger.,,

==============================================================================,,

COMPANY    : <Company name>,,

COMP.STATUS: Not Appl.,,

DATE       : 23/01/2017,,

TIME       : 12:36:32,,

FILENAME   : Diver.Xls,,

CREATED BY : Diver-Office 9.1.0.0,,

==========================    BEGINNING OF DATA     ==========================,,

[Logger settings],,

 Instrument type         =Mini-Diver=14,,

 Status                  =Started =0,,

 Serial number           =M0N!K4,,

 Instrument number       =                    ,,

                         =0,,

 Location                =Diver Loc,,

 Sample period           =M60,,

 Sample method           =T   ,,

 Number of channels      =2,,

[Channel 1],,

 Identification          =PRESSURE,,

 Reference level         =400.000   cm,,

 Range                   =750.000   cm,,

 Master level            =0         m,,

 Altitude                =0         m,,

[Channel 2],,

 Identification          =TEMPERATURE,,

 Reference level         =-20.000   °C,,

 Range                   =100.000   °C,,

,,

,,

[Series settings],,

 Serial number           =M0N!K4,,

 Instrument number       =                    ,,

 Location                = Diver Loc,,

 Sample period           =00 00:60:00 0,,

 Sample method           =T   ,,

 Start date / time       =00:00:15 27/07/16,,

 End date / time         =00:00:15 12/01/17,,

[Channel 1 from data header],,

 Identification          =PRESSURE,,

 Reference level         =400.000   cm,,

 Range                   =750.000   cm,,

 Master level            =0         m,,

 Altitude                =0         m,,

[Channel 2 from data header],,

 Identification          =TEMPERATURE,,

 Reference level         =-20.000   °C,,

 Range                   =100.000   °C,,

,,

,,

Date/time,Pressure[cm],Temperature[°C]

27/07/2016 15:00,996.625,19.203

27/07/2016 16:00,995.95,14.717

27/07/2016 17:00,995.775,14.283

END OF DATA FILE OF DATALOGGER FOR WINDOWS,,

,,

,,

,,

 

 

Note: There are two lines in the file's header that match pattern, Diver.loggerCodeHeaderLinesRegexGroups = Location\s*=\s*(?'a'.*?),*$:
 
[Logger settings],,
 Location                =Diver Loc,,
 
[Series settings],,
 Location                = Diver Loc,,
 
one for the Logger and one for the Series. The agent joins the values using a colon (:), e.g., Diver Loc:Diver Loc.
 
A multiline pattern may be used to get one or the other, but only if the number of lines in the pattern is fixed, e.g., if there is always five lines in between the Logger and Location lines (see Solinst example).