data.edit.corr
data.edit.corr reads corr.conf and based on that and the time range requested, spawns a number of filters to edit the stream.
Must be called from within the environment set up by data.edit.get. Will fail outside of that.
Filter Calling Environment
Environment Variable | Meaning |
---|---|
$START | Start of processing range this program should alter. |
$END | End of processing range. |
$RECORD | Requested record. |
$STATION | Station being processed. |
Input and Output
Incoming data arrives on standard input, outgoing (processed) data should be written to standard output. When no more input is available (EOF) on standard input, the program should exit.
Input consists of multiple interwoven record types. Records may be altered in any way as long as the outputted header reflects this. A record type may only be removed if the config file is structured such that nothing after the removing filter can request that record type (this is not enforced, but violating it has undefined results). Additionally a program should only alter data who's time is in the range [$START,$END), unless it is structurally modifying a record, in which case it must preform the structure modification always but only the content modification between the given times.
All data outside the time range must be passed through the filter. That is, a filter must pass all data before the interval unchanged, and after it must finish passing the stream off until it reaches an EOF.
Disabling buffering is recommended, but not required.
The net result is that the simplest (noop) processor is just:
#!/usr/bin/perl select STDOUT; $| = 1; while(<>) { print; }