Live File Processor Agent Example – Diver

<< Click to Display Table of Contents >>

Navigation:  Live > Agents > File Agents > File Processor > Examples >

Live File Processor Agent Example – Diver

Add the following settings to the ST_CONFIG table (CONFIG_SECTION = 'Live.FileProcessor', CONFIG_KEY = 'Agent').

 

OBJECT_TYPE

OBJECT_VALUE

STRING_VALUE

Description

Default

dateTimeFormats

en-AU

Note, this is a default (for all processors, unless overridden by a specific processor) setting.

 

Also, the en-AU culture info contains all of the English (Australia) date and time formats, including d/M/y H:m:s.

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

loggerCodeHeaderLinesRegex
Groups

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

DT_LOGGER.LOGGER_CODE

Diver

seriesNameColumnHeaderRegex
Groups

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

DT_LOGGER_SERIES.SERIES_NAME

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

Diver

seriesUnitColumnHeaderRegex
Groups

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

DT_LOGGER_SERIES.SERIES_UNIT

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

 

 

 

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 uses the last one.
 
A multi-line 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).