Live File Processor Agent Example – Envirosuite

<< Click to Display Table of Contents >>

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

Live File Processor Agent Example – Envirosuite

Add the Envirosuite settings below to the ST_CONFIG table using the Live File Processor widget:

Settings

 

OBJECT_TYPE

OBJECT_VALUE

STRING_VALUE

Envirosuite

dataEndLineRegex

^,,,|^\s*$

Envirosuite

dataLinesRegexReplacements

% =>  || (?i),[^,]*Battery Low[^,]*, => ,0,,, || (?i),[^,]*Battery OK[^,]*, => ,1,,, || (?i),[^,]*Router Power Off[^,]*, => ,,0,, || (?i),[^,]*Router Power On[^,]*, => ,,1,, || (?i),[^,]*Terminal disconnected[^,]*, => ,,,0, || (?i),[^,]*Terminal connected[^,]*, => ,,,1,

Envirosuite

dateTimeColumnHeaderRegex

(?i)^(Time|Start Time)$

Envirosuite

dateTimeFormats

en-AU

Envirosuite

folderWatcherPath

C:\EarthSoft\Live\Envirosuite

Envirosuite

headerLinesRegex

(?i)Location.*Time

Envirosuite

headerLinesRegexReplacements

,\s*Alarm\s*, => ,Battery Low [0] / OK [1],Router Power Off [0] / On [1],Terminal Disconnected [0] / Connected [1],

Envirosuite

ignoreColumnHeadersRegex

(?i)Deviation|Calibration|Cal.|Level|Resource|Serial Number|Longitude|Latitude|CIC|Duration|Percentiles|Recording|Trigger|Interval|Downtime

Envirosuite

ignoreLinesRegex

(?i)^[\s,]*Please Note

Envirosuite

loggerCodeColumnHeaderRegex

(?i)^Location$

Envirosuite

multiHeaderFiles

true

Envirosuite

seriesNameColumnHeaderRegexGroups

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

Envirosuite

seriesNameHeaderLinesRegexGroups

(?i),*(?'a'[^,-]*).*\n(?i).*Location.*Time

Envirosuite

seriesUnitColumnHeaderRegexGroups

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

 

 

 

Overall Data,,,,,,,,,,,,,,,,,,

Location,Start Time,End Time,Activity,LDN (dB),LAeq (dB),LAImin (dB),LASmin (dB),LAFmin (dB),LCpeak (dB),LZpeak (dB),LA10 (dB),LA90 (dB),Sum Precipitation (mm),Average Wind Speed (m/s),Average Wind Direction (Deg),Average Temperature (°C),Average Humidity (%),Average Pressure (hPa)

NML1,14/02/2021 7:00:00 AM,15/02/2021 7:00:00 AM,100%,57.0,57.0,,,54.9,103.4,,57.9,56.1,0.2,2.5,141.3,15.3,69.0,1005.9

NML2,14/02/2021 7:00:00 AM,15/02/2021 7:00:00 AM,100%,56.0,56.0,,,53.6,103.3,,56.5,54.8,0.0,2.8,155.5,15.7,67.3,1005.4

NML3,14/02/2021 7:00:00 AM,15/02/2021 7:00:00 AM,100%,75.8,75.8,,,67.2,102.0,,78.5,71.5,0.2,2.5,141.3,15.3,69.0,1005.9

,,,,,,,,,,,,,,,,,,,

 

Data Samples - Resolution 30 minutes,,,,,,,,,,,,,,,,,,

Location,Start Time,End Time,Activity,LDN Contribution (dB),LAeq (dB),LAImin (dB),LASmin (dB),LAFmin (dB),LCpeak (dB),LZpeak (dB),LA10 (dB),LA90 (dB),Sum Precipitation (mm),Average Wind Speed (m/s),Average Wind Direction (Deg),Average Temperature (°C),Average Humidity (%),Average Pressure (hPa)

NML1,14/02/2021 7:00:00 AM,14/02/2021 7:30:00 AM,100%,57.0,57.0,,,55.7,87.3,,57.6,56.4,0.0,1.2,214.2,13.9,68.5,1004.5

NML1,15/02/2021 6:30:00 AM,15/02/2021 7:00:00 AM,100%,57.3,57.3,,,55.9,95.1,,58.0,56.4,0.0,3.2,63.2,14.2,78.3,1006.7

NML2,14/02/2021 7:00:00 AM,14/02/2021 7:30:00 AM,100%,56.2,56.2,,,54.9,89.4,,56.4,55.6,0.0,1.8,177.2,14.3,66.8,1004.1

NML2,15/02/2021 6:30:00 AM,15/02/2021 7:00:00 AM,100%,55.5,55.5,,,54.2,83.2,,55.9,54.8,0.0,2.1,94.1,14.4,77.7,1006.3

NML3,14/02/2021 7:00:00 AM,14/02/2021 7:30:00 AM,100%,72.0,72.0,,,68.9,96.1,,73.8,69.8,0.0,1.2,214.2,13.9,68.5,1004.5

NML3,15/02/2021 6:30:00 AM,15/02/2021 7:00:00 AM,100%,77.4,77.4,,,69.8,95.8,,79.8,73.7,0.0,3.2,63.2,14.2,78.3,1006.7

,,Please Note! Weather data shown in gray colour are copied from the master weather station.,,,,,,,,,,,,,,,,

 

,AlarmsLog,,,,,,,,,

,Location,Time,Alarm,,,,,,,

,NML1,14/02/2021 10:33:12 AM,Battery OK,,,,,,,

,NML1,14/02/2021 8:37:03 PM,Battery Low,,,,,,,

,NML1,15/02/2021 1:55:00 AM,Router Power Off,,,,,,,

,NML1,15/02/2021 1:56:03 AM,Router Power On,,,,,,,

,NML1,15/02/2021 1:56:13 AM,Terminal disconnected. Name NMT - 3004251. Id 01410010-6300-0093-3000-24157dbc9b5e,,,,,,,

,NML1,15/02/2021 1:57:42 AM,Terminal connected. Name NMT - 3004251. Id 01410010-6300-0093-3000-24157dbc9b5e,,,,,,,

,NML2,14/02/2021 7:30:33 PM,Terminal disconnected. Name 2250 - 3007659. Id 01410010-6300-0093-3000-6795a0c59b5e,,,,,,,

,NML2,14/02/2021 7:30:35 PM,Terminal connected. Name 2250 - 3007659. Id 01410010-6300-0093-3000-6795a0c59b5e,,,,,,,

,NML2,14/02/2021 9:34:09 PM,Terminal disconnected. Name 2250 - 3007659. Id 01410010-6300-0093-3000-6795a0c59b5e,,,,,,,

,NML2,14/02/2021 9:34:27 PM,Terminal connected. Name 2250 - 3007659. Id 01410010-6300-0093-3000-6795a0c59b5e,,,,,,,

,NML2,15/02/2021 1:55:00 AM,Router Power Off,,,,,,,

,NML2,15/02/2021 1:56:02 AM,Router Power On,,,,,,,

,NML2,15/02/2021 1:56:12 AM,Terminal disconnected. Name 2250 - 3007659. Id 01410010-6300-0093-3000-6795a0c59b5e,,,,,,,

,NML2,15/02/2021 1:57:43 AM,Terminal connected. Name 2250 - 3007659. Id 01410010-6300-0093-3000-6795a0c59b5e,,,,,,,

,NML2,15/02/2021 5:32:17 AM,Terminal disconnected. Name 2250 - 3007659. Id 01410010-6300-0093-3000-6795a0c59b5e,,,,,,,

,NML2,15/02/2021 5:32:37 AM,Terminal connected. Name 2250 - 3007659. Id 01410010-6300-0093-3000-6795a0c59b5e,,,,,,,

,NML3,14/02/2021 10:03:38 AM,Battery OK,,,,,,,

,NML3,15/02/2021 5:39:02 AM,Battery Low,,,,,,,

,,,,,,,,,,,

 

 

 

Note: headerLinesRegexReplacements and dataLinesRegexReplacements are used to split the (one) Alarm column into three columns, one column for each of the alarms to be saved:

Battery (Low or OK)

Router Power (Off or On)

Terminal (Disconnected or Connected)

And to convert the alarm text to a number, so that it can be saved in DT_LOGGER_DATUM.DATUM_VALUE.