<< Click to Display Table of Contents >> Navigation: Live > Agents > File Agents > File Processor > Examples > Live File Processor Agent Example – HOBO |
1.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 |
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. |
HOBO |
dateTimeColumnHeaderRegex |
^Date Time |
DT_LOGGER_DATUM.DATUM_UTC_DT; column header text starts with Date Time. |
HOBO |
delimiters |
, |
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 |
loggerCodeHeaderLinesRegex |
Plot Title:(?'a'[^"\t,]*) |
DT_LOGGER.LOGGER_CODE |
HOBO |
seriesNameColumnHeaderRegex |
^(((?'a'.*?),.*)|(?'b'.*))$ |
DT_LOGGER_SERIES.SERIES_NAME (e.g., 'Temp, °F (...)' => 'Temp') |
HOBO |
seriesUnitColumnHeaderRegex |
(,.*units.*LBL:(?'a'.*?)\))|(,(?'b'.*?)\() |
DT_LOGGER_SERIES.SERIES_UNIT (e.g., 'Temp, °F (...)' => '°F', or 'Rainfall, units (... LBL: mm)' => 'mm') |
HOBO |
utcOffsetHeaderLinesRegex |
Date Time,\s*GMT(?'a'[^"\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 field. Find/add the logger row, for example:
LOGGER_CODE |
LIVE_DATA_SOURCE |
UTC_OFFSET_HRS |
---|---|---|
A-123 |
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 |
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
|
The fields are separated by tabs instead of commas. (Note: For this example, dateTimeFormats cannot be en-AU; it should be local or en-US.)
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
|
Copyright © 2023 EarthSoft, Inc • Modified: 20 Dec 2023