File Processor Agent Example – HOBO

<< Click to Display Table of Contents >>

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

File Processor Agent Example – HOBO

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

 

Setting

Value

Description

HOBO.dateTimeColumnHeaderRegex

^Date Time

DT_LOGGER_DATUM.DATUM_UTC_DT; column header text starts with Date Time.

HOBO.dateTimeFormats

d/M/y H:m:s

Resolve ambiguity; if not, the date and time can have a double meaning— day/month/year or month/day/year.

HOBO.delimiters

&#09;,

The fields are separated by tabs and/or commas.

HOBO.folderWatcherPath

C:\EarthSoft\Live\HOBO


HOBO.headerLinesRegex

Date Time

Header line contains Date Time.

HOBO.ignoreColumnHeadersRegex

^#$

Do not add series or datum for columns whose header text is #.

HOBO.loggerCodeHeaderLinesRegexGroups

Plot Title:(?'a'[^&quot;\t,]*)

DT_LOGGER.LOGGER_CODE

HOBO.loggerDescPrefix

HOBO


HOBO.seriesNameColumnHeaderRegexGroups

^(((?'a'.*?),.*)|(?'b'.*))$

DT_LOGGER_SERIES.SERIES_NAME

(e.g., 'Temp, °F (...)' => 'Temp')

HOBO.seriesUnitColumnHeaderRegexGroups

(,.*units.*LBL:(?'a'.*?)\))|(,(?'b'.*?)\()

DT_LOGGER_SERIES.SERIES_UNIT

(e.g., 'Temp, °F (...)' => '°F', or

'Rainfall, units (... LBL: mm)' => 'mm')

HOBO.utcOffsetLineRegexGroups

Date Time,\s*GMT(?'a'[^&quot;\t,]*)

DT_LOGGER.UTC_OFFSET_HRS; Date Time, + zero or more whitespace characters + GMT + named group value + double-quote or tab or comma.

 

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

 

 

"Plot Title: A-123"

"#","Date Time, GMT+10:00","Temp, °C (LGR S/N: 10954911, SEN S/N: 10954911)"

1,03/10/18 08:03:07,21.473

2,03/10/18 08:04:07,21.760

3,03/10/18 08:05:07,21.760

 

 

3.The file's Plot Title line contains the DT_LOGGER.LOGGER_CODE. Find/add the logger row, for example:

 

LOGGER_CODE

LOGGER_DESC

LIVE_DATA_SOURCE

UTC_OFFSET_HRS

A-123

HOBO A-123 (= HOBO.loggerDescPrefix + LOGGER_CODE)

folder://COMPUTER_NAME/
C:/EarthSoft/Live/HOBO

+10:00

 

4.The line that contains Date Time is the header line; it contains the DT_LOGGER_DATUM.DATUM_UTC_DT column. The # column is ignored. The other columns are the series; they contain DT_LOGGER_SERIES.SERIES_NAMEs and DT_LOGGER_SERIES.SERIES_UNITs.

 

5.For each subsequent line:

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

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

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

 

SERIES_NAME

DATUM_UTC_DT

DATUM_VALUE

SERIES_UNIT

Temp

2018-10-02 22:03:07 (= 2018-10-03 08:03:07 - +10:00)

21.473

°C

 

Example File 2

 

The units (mm) are inside the parentheses.

 

 

"Plot Title: A-123"

"#","Date Time, GMT+10:00","Rainfall, units (LGR S/N: 10954911, SEN S/N: 10954911, LBL: mm)"

1,03/10/18 08:03:07,0.0

2,03/10/18 10:10:52,0.5

3,03/10/18 10:10:53,1.0

 

 

Example File 3

 

The fields are separated by tabs instead of commas.

 

 

Plot Title: B-456                                                

#        "Date Time, GMT-05:00"        "Temp, °F (LGR S/N: 20186732, SEN S/N: 20186732)"        Coupler Detached (LGR S/N: 20186732)        Coupler Attached (LGR S/N: 20186732)        Host Connected (LGR S/N: 20186732)        End Of File (LGR S/N: 20186732)

1        11/29/2017 10:56        68.913                                

2        11/29/2017 10:56                Logged                        

3        11/29/2017 11:11        69.942