Earthworm Module: compress_UA
Contributed by:
Function
The compress_UA and decompress_UA modules implement the gencompress algorithm which is used with permission from Boulder Real Time Technologies, Inc., copyright 1997.
Details
The compress_UA and decompress_UA modules implement the gencompress algorithm which is used with permission from Boulder Real Time Technologies, Inc., copyright 1997.
Compress_UA inputs selected trace data messages (TYPE_TRACEBUF), compresses the samples via the BRTT algorithm, leaves the header intact, and outputs the resulting message as TYPE_TRACE_COMP_UA. Trace messages are selected via SCN names listed in the .d file. Wildcards are allowed. The compressed data output can be tagged with compress_UA's installation_id and module_id (normal Earthworm behavior), or with the installation_id and module_id of the original uncompressed message.
decompress_UA is the matching decompressor. Its output is identical to the input to the compressor. As with compress_UA, decompress_UA's output can be tagged with its own installation_id and module_id, or with those of the original message. This option allows the logo of the original data source to be preserved thru the compress/decompress operation.
In order to run compress_UA and decompress_UA, you must add TYPE_TRACE_COMP_UA message to 'earthworm.d'.
Example Configuration File
# compress_UA's Configuration File # MyModId MOD_COMPRESS_UA # This instance of compress_UA InRing WAVE_RING # Transport ring to find waveform data on, OutRing COMP_RING # Transport ring to write output to, HeartBeatInterval 15 # Heartbeat interval, in seconds, LogFile 1 # 0=write log to stderr/stdout, not to disk # 1=write a log file to disk # 2=write a module log but not to stderr/stdout UseOriginalLogo 0 # 0=use compress_UA's logo on outgoing TYPE_TRACE_COMP_UA msgs # non-zero=use instid & modid of original TYPE_TRACEBUF msg # on outgoing TYPE_TRACE_COMP_UA msg # instead of getting specific LOGOS, we are only interested in # messages of TYPE_TRACEBUF, but we may want to specify messages # with particular SCN codes of interest # # Wildcard character '*' is allowed in the SCN_Code fields # #GetEventsFrom * * * INST_WILDCARD MOD_WILDCARD GetEventsFrom * * NC INST_WILDCARD MOD_WILDCARD GetEventsFrom KSP * * INST_WILDCARD MOD_WILDCARD #GetEventsFrom KSP * NC INST_WILDCARD MOD_WILDCARD #GetEventsFrom KSP VHZ * INST_WILDCARD MOD_WILDCARD #GetEventsFrom HGS VHZ NC INST_WILDCARD MOD_WILDCARD