[seiscomp, scanloc] Install, add .gitignore
This commit is contained in:
7
share/templates/seedlink/antelope/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/antelope/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd="$seedlink.plugin_dir/orb_plugin -v -S $pkgroot/var/lib/seedlink/${seedlink.station.id}.pkt:100 -m '.*${seedlink.station.code}.${sources.antelope.select}' -o $sources.antelope.address:$sources.antelope.port"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.antelope.proc"
|
||||
|
28
share/templates/seedlink/antelope/setup.py
Normal file
28
share/templates/seedlink/antelope/setup.py
Normal file
@ -0,0 +1,28 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the Antelope ORB plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Default host is localhost
|
||||
try: seedlink.param('sources.antelope.address')
|
||||
except: seedlink.setParam('sources.antelope.address', 'localhost')
|
||||
|
||||
# Default port is 39136
|
||||
try: seedlink.param('sources.antelope.port')
|
||||
except: seedlink.setParam('sources.antelope.port', 39136)
|
||||
|
||||
# Select defaults to '*'
|
||||
try: seedlink.param('sources.antelope.select')
|
||||
except: seedlink.setParam('sources.antelope.select', '*')
|
||||
|
||||
# key is station (one instance per station)
|
||||
return seedlink.net + "." + seedlink.sta
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
13
share/templates/seedlink/backup_seqfiles.tpl
Normal file
13
share/templates/seedlink/backup_seqfiles.tpl
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Generated at $date - Do not edit!
|
||||
# template: $template
|
||||
|
||||
KEEP=30
|
||||
|
||||
mkdir -p "$pkgroot/var/lib/seedlink/backup"
|
||||
|
||||
find "$pkgroot/var/lib/seedlink/backup" -type f -mtime +$$KEEP -exec rm -f '{}' \;
|
||||
|
||||
cd "$pkgroot/var/run/seedlink"
|
||||
tar cf - *.seq *.state | gzip >"$pkgroot/var/lib/seedlink/backup/seq-"`date +'%Y%m%d'`.tgz
|
7
share/templates/seedlink/caps/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/caps/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd="$seedlink.plugin_dir/caps_plugin -I $sources.caps.address -f $sources.caps.streamsFile -j $sources.caps.log --max-time-diff $sources.caps.maxTimeDiff$sources.caps.inOrder"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.caps.proc"
|
||||
|
164
share/templates/seedlink/caps/setup.py
Normal file
164
share/templates/seedlink/caps/setup.py
Normal file
@ -0,0 +1,164 @@
|
||||
import os
|
||||
import glob
|
||||
import sys
|
||||
|
||||
|
||||
class CAPSProfile:
|
||||
def __init__(self):
|
||||
self.streams = [] # List of strings, e.g. XY.ABCD.*.*
|
||||
self.stations = [] # List of network, station tuples, e.g. (XY,ABCD)
|
||||
self.oldStates = [] # Content of old state file
|
||||
|
||||
|
||||
'''
|
||||
Plugin handler for the CAPS plugin.
|
||||
'''
|
||||
|
||||
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self):
|
||||
self.profiles = {}
|
||||
|
||||
def push(self, seedlink):
|
||||
try:
|
||||
maxTimeDiff = float(seedlink._get('plugins.caps.maxTimeDiff', False))
|
||||
except:
|
||||
maxTimeDiff = 86400
|
||||
|
||||
inOrder = ""
|
||||
try:
|
||||
if seedlink._get('plugins.caps.inOrder', False):
|
||||
inOrder = " --in-order"
|
||||
except:
|
||||
pass
|
||||
|
||||
# Check and set defaults
|
||||
try:
|
||||
address = seedlink.param('sources.caps.address')
|
||||
except KeyError:
|
||||
address = "localhost:18002"
|
||||
|
||||
try:
|
||||
streams = [chaId.strip() for chaId in seedlink.param(
|
||||
'sources.caps.streams').split(',')]
|
||||
except KeyError:
|
||||
seedlink.setParam('sources.caps.streams', "*.*")
|
||||
streams = ["*.*"]
|
||||
|
||||
try:
|
||||
seedlink.param('sources.caps.encoding')
|
||||
except KeyError:
|
||||
seedlink.setParam('sources.caps.encoding', "STEIM2")
|
||||
|
||||
try:
|
||||
seedlink.param('sources.caps.proc')
|
||||
except KeyError:
|
||||
seedlink.setParam('sources.caps.proc', "")
|
||||
|
||||
try:
|
||||
self.unpack = [chaId.strip() for chaId in seedlink.param(
|
||||
'sources.caps.unpack').split(',')]
|
||||
except KeyError:
|
||||
self.unpack = []
|
||||
# parse address URL and create capsId of form:
|
||||
# host[.port][_user]
|
||||
addressFormatError = "Error: invalid address format, expected " \
|
||||
"[[caps|capss]://][user:pass@]host[:port]"
|
||||
|
||||
# protocol
|
||||
toks = address.split("://")
|
||||
if len(toks) > 2:
|
||||
raise Exception(addressFormatError)
|
||||
elif len(toks) == 2:
|
||||
protocol = toks[0]
|
||||
address = toks[1]
|
||||
if protocol != "caps" and protocol != "capss":
|
||||
raise Exception(addressFormatError)
|
||||
else:
|
||||
protocol = "caps"
|
||||
|
||||
# authentication
|
||||
toks = address.split("@")
|
||||
if len(toks) > 2:
|
||||
raise Exception(addressFormatError)
|
||||
elif len(toks) == 2:
|
||||
capsId = "%s_%s" % (toks[1].replace(
|
||||
":", "."), toks[0].split(":")[0])
|
||||
else:
|
||||
capsId = address.replace(":", ".")
|
||||
|
||||
address = "%s://%s" % (protocol, address)
|
||||
|
||||
if capsId not in self.profiles:
|
||||
profile = CAPSProfile()
|
||||
self.profiles[capsId] = profile
|
||||
else:
|
||||
profile = self.profiles[capsId]
|
||||
|
||||
for chaId in streams:
|
||||
toks = chaId.split('.')
|
||||
if len(toks) != 2:
|
||||
raise Exception(
|
||||
"Error: invalid stream format, expected [LOC.CHA]")
|
||||
|
||||
streamID = seedlink.net + "." + seedlink.sta + "." + chaId
|
||||
profile.streams.append((streamID, self.unpack))
|
||||
profile.stations.append((seedlink.net, seedlink.sta))
|
||||
|
||||
log = os.path.join(seedlink.config_dir, "caps2sl.%s.state" % capsId)
|
||||
streamsFile = os.path.join(
|
||||
seedlink.config_dir, "caps2sl.%s.req" % capsId)
|
||||
seedlink.setParam('sources.caps.address', address)
|
||||
seedlink.setParam('sources.caps.log', log)
|
||||
seedlink.setParam('sources.caps.streamsFile', streamsFile)
|
||||
seedlink.setParam('sources.caps.maxTimeDiff', maxTimeDiff)
|
||||
seedlink.setParam('sources.caps.inOrder', inOrder)
|
||||
seedlink.setParam('seedlink.caps.id', capsId)
|
||||
|
||||
return capsId
|
||||
|
||||
def flush(self, seedlink):
|
||||
# Populate request file per address
|
||||
for id, profile in self.profiles.items():
|
||||
caps2slreq = os.path.join(
|
||||
seedlink.config_dir, "caps2sl.%s.req" % id)
|
||||
fd = open(caps2slreq, "w")
|
||||
for streamId, upackStreams in profile.streams:
|
||||
if self.unpack:
|
||||
fd.write("%s %s\n" % (streamId, ",".join(self.unpack)))
|
||||
else:
|
||||
fd.write("%s\n" % streamId)
|
||||
fd.close()
|
||||
|
||||
try:
|
||||
caps2slstate = os.path.join(seedlink.config_dir, "caps2sl.%s.state" % id)
|
||||
# Read existing state file
|
||||
fd = open(caps2slstate, "r")
|
||||
profile.oldStates = [line.strip() for line in fd.readlines()]
|
||||
except:
|
||||
pass
|
||||
|
||||
# Delete all existing state files
|
||||
for fl in glob.glob(os.path.join(seedlink.config_dir, "caps2sl.*.state")):
|
||||
try:
|
||||
os.remove(fl)
|
||||
except:
|
||||
sys.stderr.write("Failed to remove old state file: %s\n" % str(fl))
|
||||
|
||||
# Clean up state file to contain only configured stations
|
||||
for id, profile in self.profiles.items():
|
||||
caps2slstate = os.path.join(seedlink.config_dir, "caps2sl.%s.state" % id)
|
||||
|
||||
newStates = []
|
||||
|
||||
for (net, sta) in profile.stations:
|
||||
for line in profile.oldStates:
|
||||
if line.startswith(net + "." + sta + "."):
|
||||
newStates.append(line)
|
||||
|
||||
if len(newStates) > 0:
|
||||
fd = open(caps2slstate, "w")
|
||||
for line in newStates:
|
||||
fd.write(line + "\n")
|
||||
fd.close()
|
16
share/templates/seedlink/chain/chain_head.tpl
Normal file
16
share/templates/seedlink/chain/chain_head.tpl
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" standalone="yes"?>
|
||||
|
||||
<!-- Generated at $date - Do not edit! -->
|
||||
<!-- template: $template -->
|
||||
|
||||
<chain
|
||||
timetable_loader="$pkgroot/bin/load_timetable 127.0.0.1:$port"
|
||||
overlap_removal="initial"
|
||||
multistation="yes"
|
||||
batchmode="yes"
|
||||
netto="300"
|
||||
netdly="10"
|
||||
standby="10"
|
||||
keepalive="0"
|
||||
seqsave="60">
|
||||
|
15
share/templates/seedlink/chain/chain_head_notimetable.tpl
Normal file
15
share/templates/seedlink/chain/chain_head_notimetable.tpl
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" standalone="yes"?>
|
||||
|
||||
<!-- Generated at $date - Do not edit! -->
|
||||
<!-- template: $template -->
|
||||
|
||||
<chain
|
||||
overlap_removal="initial"
|
||||
multistation="yes"
|
||||
batchmode="yes"
|
||||
netto="300"
|
||||
netdly="10"
|
||||
standby="10"
|
||||
keepalive="0"
|
||||
seqsave="60">
|
||||
|
6
share/templates/seedlink/chain/seedlink_plugin.tpl
Normal file
6
share/templates/seedlink/chain/seedlink_plugin.tpl
Normal file
@ -0,0 +1,6 @@
|
||||
* template: $template
|
||||
plugin chain$seedlink.chain.id cmd="$seedlink.plugin_dir/chain_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/chain${seedlink.chain.id}.xml"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 15
|
||||
|
274
share/templates/seedlink/chain/setup.py
Normal file
274
share/templates/seedlink/chain/setup.py
Normal file
@ -0,0 +1,274 @@
|
||||
from __future__ import print_function
|
||||
import os, glob
|
||||
|
||||
'''
|
||||
Plugin handler for the chain plugin. The plugin handler needs
|
||||
to support two methods: push and flush.
|
||||
|
||||
push Pushes a Seedlink station binding. Can be used to either
|
||||
create configuration files immediately or to manage the
|
||||
information until flush is called.
|
||||
|
||||
flush Flush the configuration and return a unique key for this
|
||||
station that is used by seedlink to group eg templates for
|
||||
plugins.ini.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self):
|
||||
self.chain_group = {}
|
||||
self.activeDialupConnections = 0
|
||||
self.stations = {}
|
||||
|
||||
|
||||
# Generates the group tag
|
||||
def generateGroupTag(self, seedlink, source_address):
|
||||
try: maxDialupConnections = int(seedlink.param('plugins.chain.dialupConnections', False))
|
||||
except: maxDialupConnections = 0
|
||||
|
||||
dialup = seedlink._get('sources.chain.dialup.enable').lower() in ("yes", "true", "1")
|
||||
|
||||
status_file = source_address
|
||||
|
||||
group_tag = \
|
||||
' <group address="%s"\n' % source_address + \
|
||||
' seqfile="%s/#status_file#.seq"\n' % seedlink.run_dir + \
|
||||
' lockfile="%s/' % seedlink.run_dir
|
||||
|
||||
if not dialup or maxDialupConnections <= 0:
|
||||
group_tag += '#status_file#.pid"'
|
||||
else:
|
||||
group_tag += 'dial%d.pid"' % self.activeDialupConnections
|
||||
self.activeDialupConnections += 1
|
||||
if self.activeDialupConnections >= maxDialupConnections:
|
||||
self.activeDialupConnections = 0
|
||||
|
||||
try:
|
||||
group_tag += '\n' + \
|
||||
' overlap_removal="%s"' % seedlink.param('sources.chain.overlapRemoval')
|
||||
except: pass
|
||||
|
||||
try:
|
||||
if seedlink.param('sources.chain.batchmode').lower() in ("yes", "true", "1"):
|
||||
batchmode = "yes"
|
||||
else:
|
||||
batchmode = "no"
|
||||
except:
|
||||
# Default batchmode is "yes"
|
||||
batchmode = "yes"
|
||||
|
||||
group_tag += '\n' + \
|
||||
' batchmode="%s"' % batchmode
|
||||
|
||||
if dialup:
|
||||
status_file += ".dial"
|
||||
group_tag += '\n' + \
|
||||
' uptime="%s"\n' % seedlink._get('sources.chain.dialup.uptime') + \
|
||||
' schedule="%s"' % seedlink._get('sources.chain.dialup.schedule')
|
||||
|
||||
try:
|
||||
group_tag += '\n' + \
|
||||
' ifup="%s"' % seedlink.param('sources.chain.dialup.ifup')
|
||||
except: pass
|
||||
try:
|
||||
group_tag += '\n' + \
|
||||
' ifdown="%s"' % seedlink.param('sources.chain.dialup.ifdown')
|
||||
except: pass
|
||||
|
||||
group_tag += '>\n'
|
||||
return group_tag, status_file
|
||||
|
||||
|
||||
# Generates the station tag, child of <group>
|
||||
def generateStationTag(self, seedlink):
|
||||
# Create station XML tag
|
||||
id = seedlink._get('seedlink.station.id')
|
||||
station_tpl = " <station id=\"%s\"" % id
|
||||
|
||||
# set station override if configured
|
||||
try: sta = seedlink.param("sources.chain.station")
|
||||
except: sta = seedlink.sta
|
||||
station_tpl += " name=\"%s\"" % sta
|
||||
|
||||
# set out name to match the stations code if sta is not equal to
|
||||
# configured station code
|
||||
if sta != seedlink.sta:
|
||||
station_tpl += " out_name=\"%s\"" % seedlink.sta
|
||||
|
||||
# set network override if configured
|
||||
try: net = seedlink.param("sources.chain.network")
|
||||
except: net = seedlink.net
|
||||
station_tpl += " network=\"%s\"" % net
|
||||
|
||||
# set out network to match the stations network if net is not equal to
|
||||
# configured network code
|
||||
if net != seedlink.net:
|
||||
station_tpl += " out_network=\"%s\"" % seedlink.net
|
||||
|
||||
station_tpl += " selectors=\"%s\"" % seedlink._get("sources.chain.selectors").replace(',', ' ')
|
||||
|
||||
renameMap = []
|
||||
unpackMap = []
|
||||
|
||||
# Read and parse channel rename map
|
||||
if seedlink._get('sources.chain.channels.rename'):
|
||||
renameItems = [x.strip() for x in seedlink._get('sources.chain.channels.rename').split(',')]
|
||||
for item in renameItems:
|
||||
mapping = [x.strip() for x in item.split(':')]
|
||||
if len(mapping) != 2:
|
||||
raise Exception("Error: invalid rename mapping '%s' in %s" % (item, seedlink.station_config_file))
|
||||
if not mapping[0] or not mapping[1]:
|
||||
raise Exception("Error: invalid rename mapping '%s' in %s" % (item, seedlink.station_config_file))
|
||||
renameMap.append(mapping)
|
||||
|
||||
# Read and parse channel unpack map
|
||||
if seedlink._get('sources.chain.channels.unpack'):
|
||||
unpackItems = [x.strip() for x in seedlink._get('sources.chain.channels.unpack').split(',')]
|
||||
for item in unpackItems:
|
||||
mapping = [x.strip() for x in item.split(':')]
|
||||
if len(mapping) != 2 and len(mapping) != 3:
|
||||
raise Exception("Error: invalid unpack definition '%s' in %s" % (item, seedlink.station_config_file))
|
||||
if not mapping[0] or not mapping[1]:
|
||||
raise Exception("Error: invalid unpack definition '%s' in %s" % (item, seedlink.station_config_file))
|
||||
# If double_rate is not enabled, remove the last item
|
||||
if len(mapping) == 3 and mapping[2] != "1":
|
||||
mapping.pop(2)
|
||||
unpackMap.append(mapping)
|
||||
|
||||
if len(renameMap) == 0 and len(unpackMap) == 0:
|
||||
# Close tag
|
||||
station_tpl += "/>\n"
|
||||
else:
|
||||
station_tpl += ">\n"
|
||||
for mapping in renameMap:
|
||||
station_tpl += ' <rename from="%s" to="%s"/>\n' % (mapping[0], mapping[1])
|
||||
for mapping in unpackMap:
|
||||
station_tpl += ' <unpack src="%s" dest="%s"' % (mapping[0], mapping[1])
|
||||
if len(mapping) == 3:
|
||||
station_tpl += ' double_rate="yes"'
|
||||
station_tpl += '/>\n'
|
||||
station_tpl += " </station>\n"
|
||||
|
||||
return station_tpl
|
||||
|
||||
|
||||
# Store the information internally and create chain.xml and
|
||||
# the seedlink.ini configuration when flush is called
|
||||
def push(self, seedlink):
|
||||
try: host = seedlink.param('sources.chain.address')
|
||||
except:
|
||||
host = "geofon.gfz-potsdam.de"
|
||||
seedlink.setParam('sources.chain.address', host)
|
||||
|
||||
try: port = seedlink.param('sources.chain.port')
|
||||
except:
|
||||
port = "18000"
|
||||
seedlink.setParam('sources.chain.port', port)
|
||||
|
||||
try: dialuptime = seedlink.param('sources.chain.dialup.uptime')
|
||||
except: seedlink.setParam('sources.chain.dialup.uptime', 600)
|
||||
|
||||
try: dialuptime = seedlink.param('sources.chain.dialup.schedule')
|
||||
except: seedlink.setParam('sources.chain.dialup.schedule', '0,30 * * * *')
|
||||
|
||||
# The default grouping behaviour is enabled
|
||||
try: group = seedlink.param('sources.chain.group')
|
||||
except: group = ""
|
||||
|
||||
group = group.replace(' ', '_')\
|
||||
.replace("$NET", seedlink.net)\
|
||||
.replace("$STA", seedlink.sta)
|
||||
|
||||
source_address = host + ":" + port
|
||||
group_tag, status_file = self.generateGroupTag(seedlink, source_address)
|
||||
if group: status_file += "." + group
|
||||
|
||||
chain_key = (group_tag, status_file)
|
||||
|
||||
# Find out what chain.xml instance to use
|
||||
try:
|
||||
net = seedlink.param("sources.chain.network")
|
||||
except: net = seedlink.net
|
||||
try:
|
||||
sta = seedlink.param("sources.chain.station")
|
||||
except: sta = seedlink.sta
|
||||
|
||||
station_key = net + "." + sta
|
||||
|
||||
chain_instance = 0
|
||||
if station_key in self.stations:
|
||||
chain_instance = self.stations[station_key]+1
|
||||
|
||||
self.stations[station_key] = chain_instance
|
||||
|
||||
# Register the new chainX.xml instance
|
||||
if chain_instance not in self.chain_group:
|
||||
self.chain_group[chain_instance] = {}
|
||||
|
||||
chain_group = self.chain_group[chain_instance]
|
||||
|
||||
if not chain_key in chain_group:
|
||||
chain_group[chain_key] = group_tag
|
||||
|
||||
station_tpl = self.generateStationTag(seedlink)
|
||||
|
||||
# Register tag to be flushed when flush is called
|
||||
chain_group[chain_key] += station_tpl
|
||||
|
||||
# Set the name of the current chainX.xml file
|
||||
seedlink._set("seedlink.chain.id", chain_instance, False)
|
||||
|
||||
return chain_instance
|
||||
|
||||
|
||||
# Create chain.xml and return the plugin commands for all
|
||||
# chain plugins
|
||||
def flush(self, seedlink):
|
||||
status_map = {}
|
||||
|
||||
# Create chainX.xml
|
||||
chains = {}
|
||||
for x in self.chain_group.keys():
|
||||
chainxmlbase = "chain%d.xml" % x
|
||||
chainxml = os.path.join(seedlink.config_dir, chainxmlbase)
|
||||
chain_group = self.chain_group[x]
|
||||
if chain_group:
|
||||
# Mark this file as used
|
||||
chains[chainxml] = 1
|
||||
fd = open(chainxml, "w")
|
||||
|
||||
try:
|
||||
if seedlink.param('plugins.chain.loadTimeTable', False).lower() in ("yes", "true", "1"):
|
||||
loadTimeTable = True
|
||||
else:
|
||||
loadTimeTable = False
|
||||
except: loadTimeTable = True
|
||||
|
||||
if loadTimeTable:
|
||||
fd.write(seedlink._process_template("chain_head.tpl", "chain", False))
|
||||
else:
|
||||
fd.write(seedlink._process_template("chain_head_notimetable.tpl", "chain", False))
|
||||
first = True
|
||||
for ((g,s),i) in sorted(chain_group.items()):
|
||||
if not first: fd.write('\n')
|
||||
if s in status_map:
|
||||
status_map[s] += 1
|
||||
s += ".%d" % status_map[s]
|
||||
else:
|
||||
status_map[s] = 0
|
||||
|
||||
fd.write(i.replace("#status_file#", s))
|
||||
fd.write(" </group>\n")
|
||||
first = False
|
||||
fd.write("</chain>\n")
|
||||
fd.close()
|
||||
else:
|
||||
# If no groups are configured, delete chainX.xml
|
||||
try: os.remove(chainxml)
|
||||
except: print("Warning: %s could not be removed" % chainxml)
|
||||
|
||||
files = glob.glob(os.path.join(seedlink.config_dir, "chain*"))
|
||||
for f in files:
|
||||
if f in chains: continue
|
||||
try: os.remove(f)
|
||||
except: print("Warning: %s could not be removed" % f)
|
73
share/templates/seedlink/dr24/plugins.ini.tpl
Normal file
73
share/templates/seedlink/dr24/plugins.ini.tpl
Normal file
@ -0,0 +1,73 @@
|
||||
* Generated at $date - Do not edit!
|
||||
* template: $template
|
||||
|
||||
[$seedlink.source.id]
|
||||
|
||||
* Settings for Geotech DR24 digitizer
|
||||
|
||||
* Station ID (network/station code is set in seedlink.ini)
|
||||
station=$seedlink.station.id
|
||||
|
||||
* Use the command 'serial_plugin -m' to find out which protocols are
|
||||
* supported.
|
||||
protocol=dr24
|
||||
|
||||
* Serial port
|
||||
port=$sources.dr24.comport
|
||||
|
||||
* Baud rate
|
||||
bps=$sources.dr24.baudrate
|
||||
|
||||
* lsb (defaults to 8): least significant bit (relative to 32-bit samples),
|
||||
* normally 8 for 24-bit samples, but can be set for example to 7 to get
|
||||
* 25-bit samples;
|
||||
* statusinterval (defaults to 0): time interval in minutes when "state of
|
||||
* health" information is logged, 0 means "disabled". State of health
|
||||
* channels can be used independently of this option.
|
||||
*
|
||||
* If you set 'checksum' to a wrong value then the driver will not work and
|
||||
* you will get error messages like "bad SUM segment" or "bad MOD segment".
|
||||
lsb=8
|
||||
statusinterval=60
|
||||
|
||||
* Parameter 'time_offset' contains the amount of microseconds to be added
|
||||
* to the time reported by the digitizer.
|
||||
|
||||
* 1.389 sec is possibly the correct offset if you have a version of the
|
||||
* Earth Data digitizer with external GPS unit.
|
||||
* time_offset=1389044
|
||||
|
||||
* Maximum number of consecutive zeros in datastream before data gap will be
|
||||
* declared (-1 = disabled).
|
||||
zero_sample_limit = -1
|
||||
|
||||
* Default timing quality in percents. This value will be used when no
|
||||
* timing quality information is available. Can be -1 to omit the blockette
|
||||
* 1001 altogether.
|
||||
default_tq = 0
|
||||
|
||||
* Timing quality to use when GPS is out of lock
|
||||
unlock_tq = 10
|
||||
|
||||
* Keyword 'channel' is used to map input channels to symbolic channel
|
||||
* names. Channel names are arbitrary 1..10-letter identifiers which should
|
||||
* match the input names of the stream processing scheme in streams.xml,
|
||||
* which is referenced from seedlink.ini
|
||||
|
||||
channel Z source_id=0
|
||||
channel E source_id=1
|
||||
channel N source_id=2
|
||||
|
||||
* "State of health" channels
|
||||
|
||||
channel S0 source_id=16
|
||||
channel S1 source_id=17
|
||||
channel S2 source_id=18
|
||||
channel S3 source_id=19
|
||||
channel S4 source_id=20
|
||||
channel S5 source_id=21
|
||||
channel S6 source_id=22
|
||||
channel S7 source_id=23
|
||||
channel S8 source_id=24
|
||||
* channel S9 source_id=25
|
||||
|
7
share/templates/seedlink/dr24/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/dr24/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.dr24.proc"
|
||||
|
26
share/templates/seedlink/dr24/setup.py
Normal file
26
share/templates/seedlink/dr24/setup.py
Normal file
@ -0,0 +1,26 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the Geotech DR24 plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
try: seedlink.param('sources.dr24.comport')
|
||||
except: seedlink.setParam('sources.dr24.comport', '/dev/data')
|
||||
|
||||
try: seedlink.param('sources.dr24.baudrate')
|
||||
except: seedlink.setParam('sources.dr24.baudrate', 19200)
|
||||
|
||||
try: seedlink.param('sources.dr24.proc')
|
||||
except: seedlink.setParam('sources.dr24.proc', 'dr24_50')
|
||||
|
||||
return seedlink.param('sources.dr24.comport')
|
||||
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
28
share/templates/seedlink/dr24/streams_dr24_50.tpl
Normal file
28
share/templates/seedlink/dr24/streams_dr24_50.tpl
Normal file
@ -0,0 +1,28 @@
|
||||
<proc name="dr24_50">
|
||||
<tree>
|
||||
<input name="Z" channel="Z" location="" rate="50"/>
|
||||
<input name="N" channel="N" location="" rate="50"/>
|
||||
<input name="E" channel="E" location="" rate="50"/>
|
||||
<node stream="SH"/>
|
||||
<node filter="F96C" stream="BH">
|
||||
<node filter="FS2D5">
|
||||
<node filter="FS2D5" stream="LH">
|
||||
<node filter="VLP" stream="VH"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</tree>
|
||||
<tree>
|
||||
<input name="S0" channel="0" location="" rate="1/10"/>
|
||||
<input name="S1" channel="1" location="" rate="1/10"/>
|
||||
<input name="S2" channel="2" location="" rate="1/10"/>
|
||||
<input name="S3" channel="3" location="" rate="1/10"/>
|
||||
<input name="S4" channel="4" location="" rate="1/10"/>
|
||||
<input name="S5" channel="5" location="" rate="1/10"/>
|
||||
<input name="S6" channel="6" location="" rate="1/10"/>
|
||||
<input name="S7" channel="7" location="" rate="1/10"/>
|
||||
<input name="S8" channel="8" location="" rate="1/10"/>
|
||||
<input name="S9" channel="9" location="" rate="1/10"/>
|
||||
<node stream="AE"/>
|
||||
</tree>
|
||||
</proc>
|
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd="$seedlink.plugin_dir/echopro_plugin -s $seedlink.station.id -p $sources.echopro.comport"
|
||||
timeout = 0
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.echopro_3ch100hz.proc"
|
||||
|
22
share/templates/seedlink/echopro_3ch100hz/setup.py
Normal file
22
share/templates/seedlink/echopro_3ch100hz/setup.py
Normal file
@ -0,0 +1,22 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the Kelunji EchoPro plugin.
|
||||
'''
|
||||
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
try: seedlink.param('sources.echopro_3ch100hz.comport')
|
||||
except: seedlink.setParam('sources.echopro_3ch100hz.comport', '/dev/ttyS0')
|
||||
|
||||
try: seedlink.param('sources.echopro_3ch100hz.proc')
|
||||
except: seedlink.setParam('sources.echopro_3ch100hz.proc', 'echopro_100')
|
||||
|
||||
return seedlink.param('sources.echopro_3ch100hz.comport')
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink): pass
|
@ -0,0 +1,8 @@
|
||||
<proc name="echopro_100">
|
||||
<tree>
|
||||
<input name="1" channel="Z" location="00" rate="100"/>
|
||||
<input name="2" channel="N" location="00" rate="100"/>
|
||||
<input name="3" channel="E" location="00" rate="100"/>
|
||||
<node stream="HH"/>
|
||||
</tree>
|
||||
</proc>
|
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd="$seedlink.plugin_dir/echopro_plugin -s $seedlink.station.id -p $sources.echopro.comport"
|
||||
timeout = 0
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.echopro_6ch200hz.proc"
|
||||
|
22
share/templates/seedlink/echopro_6ch200hz/setup.py
Normal file
22
share/templates/seedlink/echopro_6ch200hz/setup.py
Normal file
@ -0,0 +1,22 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the Kelunji EchoPro plugin.
|
||||
'''
|
||||
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
try: seedlink.param('sources.echopro_6ch200hz.comport')
|
||||
except: seedlink.setParam('sources.echopro_6ch200hz.comport', '/dev/ttyS0')
|
||||
|
||||
try: seedlink.param('sources.echopro_6ch200hz.proc')
|
||||
except: seedlink.setParam('sources.echopro_6ch200hz.proc', 'echopro_200')
|
||||
|
||||
return seedlink.param('sources.echopro_6ch200hz.comport')
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink): pass
|
@ -0,0 +1,14 @@
|
||||
<proc name="echopro_200">
|
||||
<tree>
|
||||
<input name="1" channel="Z" location="00" rate="200"/>
|
||||
<input name="2" channel="N" location="00" rate="200"/>
|
||||
<input name="3" channel="E" location="00" rate="200"/>
|
||||
<node stream="HH"/>
|
||||
</tree>
|
||||
<tree>
|
||||
<input name="4" channel="Z" location="00" rate="200"/>
|
||||
<input name="5" channel="N" location="00" rate="200"/>
|
||||
<input name="6" channel="E" location="00" rate="200"/>
|
||||
<node stream="HN"/>
|
||||
</tree>
|
||||
</proc>
|
82
share/templates/seedlink/edata/plugins.ini.tpl
Normal file
82
share/templates/seedlink/edata/plugins.ini.tpl
Normal file
@ -0,0 +1,82 @@
|
||||
* Generated at $date - Do not edit!
|
||||
* template: $template
|
||||
|
||||
[$seedlink.source.id]
|
||||
|
||||
* Settings for EarthData PS6-24 digitizer
|
||||
|
||||
* Station ID (network/station code is set in seedlink.ini)
|
||||
station=$seedlink.station.id
|
||||
|
||||
* Use the command 'serial_plugin -m' to find out which protocols are
|
||||
* supported.
|
||||
protocol=edata_r
|
||||
|
||||
* Serial port
|
||||
port=$sources.edata.comport
|
||||
|
||||
* Baud rate
|
||||
bps=$sources.edata.baudrate
|
||||
|
||||
* lsb (defaults to 8): least significant bit (relative to 32-bit samples),
|
||||
* normally 8 for 24-bit samples, but can be set for example to 7 to get
|
||||
* 25-bit samples;
|
||||
* statusinterval (defaults to 0): time interval in minutes when "state of
|
||||
* health" information is logged, 0 means "disabled". State of health
|
||||
* channels can be used independently of this option.
|
||||
*
|
||||
* If you set 'checksum' to a wrong value then the driver will not work and
|
||||
* you will get error messages like "bad SUM segment" or "bad MOD segment".
|
||||
lsb=8
|
||||
statusinterval=60
|
||||
|
||||
* Parameter 'time_offset' contains the amount of microseconds to be added
|
||||
* to the time reported by the digitizer.
|
||||
|
||||
* 1.389 sec is possibly the correct offset if you have a version of the
|
||||
* Earth Data digitizer with external GPS unit.
|
||||
* time_offset=1389044
|
||||
|
||||
* Maximum number of consecutive zeros in datastream before data gap will be
|
||||
* declared (-1 = disabled).
|
||||
zero_sample_limit = -1
|
||||
|
||||
* Default timing quality in percents. This value will be used when no
|
||||
* timing quality information is available. Can be -1 to omit the blockette
|
||||
* 1001 altogether.
|
||||
default_tq = 0
|
||||
|
||||
* Timing quality to use when GPS is out of lock
|
||||
unlock_tq = 10
|
||||
|
||||
* Keyword 'channel' is used to map input channels to symbolic channel
|
||||
* names. Channel names are arbitrary 1..10-letter identifiers which should
|
||||
* match the input names of the stream processing scheme in streams.xml,
|
||||
* which is referenced from seedlink.ini
|
||||
|
||||
channel Z source_id=0
|
||||
channel N source_id=1
|
||||
channel E source_id=2
|
||||
|
||||
channel Z1 source_id=3
|
||||
channel N1 source_id=4
|
||||
channel E1 source_id=5
|
||||
|
||||
* "State of health" channels (1 sps) have source IDs 6...19.
|
||||
* Which Mini-SEED streams (if any) are created from these channels
|
||||
* depends on the stream processing scheme.
|
||||
|
||||
channel S1 source_id=6
|
||||
channel S2 source_id=7
|
||||
channel S3 source_id=8
|
||||
channel S4 source_id=9
|
||||
channel S5 source_id=10
|
||||
channel S6 source_id=11
|
||||
channel S7 source_id=12
|
||||
channel S8 source_id=13
|
||||
|
||||
* Channel 20 records the phase difference between the incoming GPS 1pps
|
||||
* signal and the internal one second mark. One unit is 333 us.
|
||||
|
||||
channel PLL source_id=20
|
||||
|
7
share/templates/seedlink/edata/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/edata/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.edata.proc"
|
||||
|
26
share/templates/seedlink/edata/setup.py
Normal file
26
share/templates/seedlink/edata/setup.py
Normal file
@ -0,0 +1,26 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the EarthData PS6-24 plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
try: seedlink.param('sources.edata.comport')
|
||||
except: seedlink.setParam('sources.edata.comport', '/dev/data')
|
||||
|
||||
try: seedlink.param('sources.edata.baudrate')
|
||||
except: seedlink.setParam('sources.edata.baudrate', 115200)
|
||||
|
||||
try: seedlink.param('sources.edata.proc')
|
||||
except: seedlink.setParam('sources.edata.proc', 'edata_100')
|
||||
|
||||
return seedlink.param('sources.edata.comport')
|
||||
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
38
share/templates/seedlink/edata/streams_edata_100.tpl
Normal file
38
share/templates/seedlink/edata/streams_edata_100.tpl
Normal file
@ -0,0 +1,38 @@
|
||||
<proc name="edata_100">
|
||||
<tree>
|
||||
<input name="Z" channel="Z" location="" rate="100"/>
|
||||
<input name="N" channel="N" location="" rate="100"/>
|
||||
<input name="E" channel="E" location="" rate="100"/>
|
||||
<node stream="HH"/>
|
||||
|
||||
<!-- Uncomment this to enable 50Hz SH? streams -->
|
||||
<!-- -->
|
||||
<!-- <node filter="F96C" stream="SH"/> -->
|
||||
|
||||
<node filter="FS2D5" stream="BH">
|
||||
<node filter="F96C">
|
||||
<node filter="ULP" stream="LH">
|
||||
<node filter="VLP" stream="VH"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</tree>
|
||||
<tree>
|
||||
<input name="Z1" channel="Z" location="" rate="100"/>
|
||||
<input name="N1" channel="N" location="" rate="100"/>
|
||||
<input name="E1" channel="E" location="" rate="100"/>
|
||||
<node stream="HN"/>
|
||||
</tree>
|
||||
<tree>
|
||||
<input name="S1" channel="1" location="" rate="1"/>
|
||||
<input name="S2" channel="2" location="" rate="1"/>
|
||||
<input name="S3" channel="3" location="" rate="1"/>
|
||||
<input name="S4" channel="4" location="" rate="1"/>
|
||||
<input name="S5" channel="5" location="" rate="1"/>
|
||||
<input name="S6" channel="6" location="" rate="1"/>
|
||||
<input name="S7" channel="7" location="" rate="1"/>
|
||||
<input name="S8" channel="8" location="" rate="1"/>
|
||||
<input name="PLL" channel="P" location="" rate="1"/>
|
||||
<node stream="AE"/>
|
||||
</tree>
|
||||
</proc>
|
7
share/templates/seedlink/ewexport/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/ewexport/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd="$seedlink.plugin_dir/ewexport_plugin -v -s $sources.ewexport.address -p $sources.ewexport.port -At '$sources.ewexport.heartbeat.message' -Ar $sources.ewexport.heartbeat.rate"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.ewexport.proc"
|
||||
|
30
share/templates/seedlink/ewexport/setup.py
Normal file
30
share/templates/seedlink/ewexport/setup.py
Normal file
@ -0,0 +1,30 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the Earthworm export plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
try: hb_msg = seedlink.param('sources.ewexport.heartbeat.message')
|
||||
except:
|
||||
hb_msg = 'alive'
|
||||
seedlink.setParam('sources.ewexport.heartbeat.message', hb_msg)
|
||||
|
||||
try: hb_rate = seedlink.param('sources.ewexport.heartbeat.rate')
|
||||
except:
|
||||
hb_rate = 120
|
||||
seedlink.setParam('sources.ewexport.heartbeat.rate', hb_rate)
|
||||
|
||||
host = seedlink._get('sources.ewexport.address')
|
||||
port = seedlink._get('sources.ewexport.port')
|
||||
|
||||
return host + ":" + port
|
||||
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd="$seedlink.plugin_dir/ewexport_pasv_plugin -v -s $sources.ewexport_pasv.address -p $sources.ewexport_pasv.port -At '$sources.ewexport_pasv.heartbeat.message' -Ar $sources.ewexport_pasv.heartbeat.rate"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.ewexport_pasv.proc"
|
||||
|
30
share/templates/seedlink/ewexport_pasv/setup.py
Normal file
30
share/templates/seedlink/ewexport_pasv/setup.py
Normal file
@ -0,0 +1,30 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the Earthworm export plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
try: hb_msg = seedlink.param('sources.ewexport_pasv.heartbeat.message')
|
||||
except:
|
||||
hb_msg = 'alive'
|
||||
seedlink.setParam('sources.ewexport_pasv.heartbeat.message', hb_msg)
|
||||
|
||||
try: hb_rate = seedlink.param('sources.ewexport_pasv.heartbeat.rate')
|
||||
except:
|
||||
hb_rate = 120
|
||||
seedlink.setParam('sources.ewexport_pasv.heartbeat.rate', hb_rate)
|
||||
|
||||
host = seedlink._get('sources.ewexport_pasv.address')
|
||||
port = seedlink._get('sources.ewexport_pasv.port')
|
||||
|
||||
return host + ":" + port
|
||||
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
365
share/templates/seedlink/filters.fir.tpl
Normal file
365
share/templates/seedlink/filters.fir.tpl
Normal file
@ -0,0 +1,365 @@
|
||||
13 number of FIR filters in this file
|
||||
MP name of filter. multi-stop-band used for decimation only.
|
||||
50 number of points in this filter
|
||||
1.0 digital gain of filter
|
||||
4 decimation factor
|
||||
-2.54066472E-05 -6.09197377E-05 -8.40882202E-05 -8.40244538E-05 1.63391334E-04
|
||||
5.16510103E-04 7.65687436E-04 7.80274858E-04 -4.45842306E-04 -2.25522625E-03
|
||||
-3.62849165E-03 -3.78991523E-03 3.44818312E-04 6.77778524E-03 1.20854378E-02
|
||||
1.30976140E-02 2.24578497E-03 -1.63416173E-02 -3.37996147E-02 -3.94811071E-02
|
||||
-1.46564310E-02 4.01543528E-02 1.14328198E-01 1.89809903E-01 2.33582660E-01
|
||||
LP name of filter. single-stop-band low-pass.
|
||||
200 number of points in this filter
|
||||
4.0 digital gain of filter
|
||||
5 decimation factor
|
||||
3.23645679E-07 6.27603639E-07 5.75629996E-07 -1.00657667E-06 -6.27801819E-06
|
||||
-1.86042925E-05 -4.24696263E-05 -8.29456912E-05 -1.44627949E-04 -2.30086734E-04
|
||||
-3.38065990E-04 -4.61854768E-04 -5.88392838E-04 -6.98681862E-04 -7.69910286E-04
|
||||
-7.79347843E-04 -7.09572690E-04 -5.54065569E-04 -3.21793486E-04 -3.92671027E-05
|
||||
2.51179503E-04 4.97445289E-04 6.47570472E-04 6.61840895E-04 5.24436298E-04
|
||||
2.51484307E-04 -1.07339962E-04 -4.75387409E-04 -7.63640680E-04 -8.91005444E-04
|
||||
-8.05950839E-04 -5.03994466E-04 -3.56691998E-05 4.98732435E-04 9.68361273E-04
|
||||
1.24199199E-03 1.22272572E-03 8.78496851E-04 2.59474473E-04 -5.04297786E-04
|
||||
-1.22721668E-03 -1.71084259E-03 -1.79588736E-03 -1.41046755E-03 -6.00851606E-04
|
||||
4.66098572E-04 1.53319922E-03 2.31183949E-03 2.55692657E-03 2.13922281E-03
|
||||
1.09476235E-03 -3.65161395E-04 -1.89103966E-03 -3.07469396E-03 -3.55443242E-03
|
||||
-3.11977649E-03 -1.78673980E-03 1.80607851E-04 2.31448258E-03 4.04895190E-03
|
||||
4.86453622E-03 4.43631876E-03 2.74506560E-03 1.16539268E-04 -2.82981922E-03
|
||||
-5.31874457E-03 -6.61512510E-03 -6.23058853E-03 -4.08509001E-03 -5.74231205E-04
|
||||
3.48643888E-03 7.03835300E-03 9.04299877E-03 8.76884627E-03 6.02670246E-03
|
||||
1.28392561E-03 -4.38675517E-03 -9.52839944E-03 -1.26505149E-02 -1.26299141E-02
|
||||
-9.06068924E-03 -2.45481194E-03 5.77654549E-03 1.35813886E-02 1.87259223E-02
|
||||
1.93600226E-02 1.45586589E-02 4.70184255E-03 -8.41764453E-03 -2.18134336E-02
|
||||
-3.18325236E-02 -3.48961763E-02 -2.83033009E-02 -1.09193558E-02 1.64119005E-02
|
||||
5.08435964E-02 8.79169851E-02 1.22306898E-01 1.48779303E-01 1.63167998E-01
|
||||
VLP name of filter. single-stop-band low-pass.
|
||||
400 number of points in this filter
|
||||
4.0 digital gain of filter
|
||||
10 decimation factor
|
||||
-1.28828092E-09 9.14503405E-09 2.87476904E-08 7.11241767E-08 1.51310061E-07
|
||||
2.91624161E-07 5.23189498E-07 8.87843213E-07 1.44005162E-06 2.24865971E-06
|
||||
3.39826488E-06 4.98999634E-06 7.14144197E-06 9.98547874E-06 1.36677381E-05
|
||||
1.83425054E-05 2.41668694E-05 3.12930642E-05 3.98589945E-05 4.99771267E-05
|
||||
6.17220211E-05 7.51170082E-05 9.01205857E-05 1.06613370E-04 1.24386483E-04
|
||||
1.43132449E-04 1.62439595E-04 1.81791096E-04 2.00569513E-04 2.18067856E-04
|
||||
2.33507438E-04 2.46062962E-04 2.54894577E-04 2.59186228E-04 2.58189102E-04
|
||||
2.51268851E-04 2.37953820E-04 2.17982247E-04 1.91345360E-04 1.58323091E-04
|
||||
1.19509517E-04 7.58249953E-05 2.85122951E-05 -2.08851106E-05 -7.05638885E-05
|
||||
-1.18520940E-04 -1.62631870E-04 -2.00745591E-04 -2.30791746E-04 -2.50896090E-04
|
||||
-2.59498571E-04 -2.55466904E-04 -2.38199442E-04 -2.07709323E-04 -1.64683297E-04
|
||||
-1.10509143E-04 -4.72663596E-05 2.23230290E-05 9.49848763E-05 1.67023521E-04
|
||||
2.34488980E-04 2.93374469E-04 3.39835649E-04 3.70420748E-04 3.82298807E-04
|
||||
3.73472488E-04 3.42961138E-04 2.90940603E-04 2.18827306E-04 1.29296604E-04
|
||||
2.62285666E-05 -8.54221797E-05 -1.99831178E-04 -3.10577452E-04 -4.10974869E-04
|
||||
-4.94446256E-04 -5.54921105E-04 -5.87234622E-04 -5.87504298E-04 -5.53458347E-04
|
||||
-4.84693009E-04 -3.82836529E-04 -2.51602934E-04 -9.67231389E-05 7.42515621E-05
|
||||
2.52271566E-04 4.27226506E-04 5.88479800E-04 7.25475081E-04 8.28381569E-04
|
||||
8.88742855E-04 9.00087353E-04 8.58461483E-04 7.62846262E-04 6.15422613E-04
|
||||
4.21659147E-04 1.90203253E-04 -6.74309048E-05 -3.37372737E-04 -6.04086031E-04
|
||||
-8.51209566E-04 -1.06250588E-03 -1.22286635E-03 -1.31931377E-03 -1.34193967E-03
|
||||
-1.28471490E-03 -1.14611199E-03 -9.29490662E-04 -6.43205188E-04 -3.00409156E-04
|
||||
8.14499435E-05 4.81434777E-04 8.76190140E-04 1.24123308E-03 1.55239471E-03
|
||||
1.78733305E-03 1.92702783E-03 1.95716135E-03 1.86929386E-03 1.66174676E-03
|
||||
1.34011928E-03 9.17386088E-04 4.13541769E-04 -1.45211466E-04 -7.27711361E-04
|
||||
-1.29946659E-03 -1.82459201E-03 -2.26794835E-03 -2.59736110E-03 -2.78579164E-03
|
||||
-2.81331502E-03 -2.66877771E-03 -2.35100835E-03 -1.86948047E-03 -1.24435790E-03
|
||||
-5.05877833E-04 3.06923466E-04 1.14810548E-03 1.96725572E-03 2.71234126E-03
|
||||
3.33282724E-03 3.78288654E-03 4.02450701E-03 4.03029890E-03 3.78581485E-03
|
||||
3.29120969E-03 2.56210216E-03 1.62953662E-03 5.39001426E-04 -6.51497160E-04
|
||||
-1.87423802E-03 -3.05534713E-03 -4.11894545E-03 -4.99166501E-03 -5.60728460E-03
|
||||
-5.91120961E-03 -5.86451776E-03 -5.44730760E-03 -4.66110836E-03 -3.53014865E-03
|
||||
-2.10134988E-03 -4.42970165E-04 1.35810394E-03 3.20033333E-03 4.97261155E-03
|
||||
6.56023062E-03 7.85143300E-03 8.74420720E-03 9.15295816E-03 9.01466794E-03
|
||||
8.29416885E-03 6.98819290E-03 5.12791099E-03 2.77973572E-03 4.42597047E-05
|
||||
-2.94670439E-03 -6.03491859E-03 -9.04218107E-03 -1.17781861E-02 -1.40494322E-02
|
||||
-1.56687591E-02 -1.64650455E-02 -1.62925646E-02 -1.50395213E-02 -1.26352794E-02
|
||||
-9.05589386E-03 -4.32758638E-03 1.47205416E-03 8.21529421E-03 1.57279000E-02
|
||||
2.37950831E-02 3.21695320E-02 4.05811667E-02 4.87481765E-02 5.63888475E-02
|
||||
6.32336214E-02 6.90367594E-02 7.35871717E-02 7.67176896E-02 7.83125534E-02
|
||||
ULP name of filter. single-stop-band low-pass.
|
||||
400 number of points in this filter
|
||||
1.0 digital gain of filter
|
||||
10 decimation factor
|
||||
-1.28828092E-09 9.14503405E-09 2.87476904E-08 7.11241767E-08 1.51310061E-07
|
||||
2.91624161E-07 5.23189498E-07 8.87843213E-07 1.44005162E-06 2.24865971E-06
|
||||
3.39826488E-06 4.98999634E-06 7.14144197E-06 9.98547874E-06 1.36677381E-05
|
||||
1.83425054E-05 2.41668694E-05 3.12930642E-05 3.98589945E-05 4.99771267E-05
|
||||
6.17220211E-05 7.51170082E-05 9.01205857E-05 1.06613370E-04 1.24386483E-04
|
||||
1.43132449E-04 1.62439595E-04 1.81791096E-04 2.00569513E-04 2.18067856E-04
|
||||
2.33507438E-04 2.46062962E-04 2.54894577E-04 2.59186228E-04 2.58189102E-04
|
||||
2.51268851E-04 2.37953820E-04 2.17982247E-04 1.91345360E-04 1.58323091E-04
|
||||
1.19509517E-04 7.58249953E-05 2.85122951E-05 -2.08851106E-05 -7.05638885E-05
|
||||
-1.18520940E-04 -1.62631870E-04 -2.00745591E-04 -2.30791746E-04 -2.50896090E-04
|
||||
-2.59498571E-04 -2.55466904E-04 -2.38199442E-04 -2.07709323E-04 -1.64683297E-04
|
||||
-1.10509143E-04 -4.72663596E-05 2.23230290E-05 9.49848763E-05 1.67023521E-04
|
||||
2.34488980E-04 2.93374469E-04 3.39835649E-04 3.70420748E-04 3.82298807E-04
|
||||
3.73472488E-04 3.42961138E-04 2.90940603E-04 2.18827306E-04 1.29296604E-04
|
||||
2.62285666E-05 -8.54221797E-05 -1.99831178E-04 -3.10577452E-04 -4.10974869E-04
|
||||
-4.94446256E-04 -5.54921105E-04 -5.87234622E-04 -5.87504298E-04 -5.53458347E-04
|
||||
-4.84693009E-04 -3.82836529E-04 -2.51602934E-04 -9.67231389E-05 7.42515621E-05
|
||||
2.52271566E-04 4.27226506E-04 5.88479800E-04 7.25475081E-04 8.28381569E-04
|
||||
8.88742855E-04 9.00087353E-04 8.58461483E-04 7.62846262E-04 6.15422613E-04
|
||||
4.21659147E-04 1.90203253E-04 -6.74309048E-05 -3.37372737E-04 -6.04086031E-04
|
||||
-8.51209566E-04 -1.06250588E-03 -1.22286635E-03 -1.31931377E-03 -1.34193967E-03
|
||||
-1.28471490E-03 -1.14611199E-03 -9.29490662E-04 -6.43205188E-04 -3.00409156E-04
|
||||
8.14499435E-05 4.81434777E-04 8.76190140E-04 1.24123308E-03 1.55239471E-03
|
||||
1.78733305E-03 1.92702783E-03 1.95716135E-03 1.86929386E-03 1.66174676E-03
|
||||
1.34011928E-03 9.17386088E-04 4.13541769E-04 -1.45211466E-04 -7.27711361E-04
|
||||
-1.29946659E-03 -1.82459201E-03 -2.26794835E-03 -2.59736110E-03 -2.78579164E-03
|
||||
-2.81331502E-03 -2.66877771E-03 -2.35100835E-03 -1.86948047E-03 -1.24435790E-03
|
||||
-5.05877833E-04 3.06923466E-04 1.14810548E-03 1.96725572E-03 2.71234126E-03
|
||||
3.33282724E-03 3.78288654E-03 4.02450701E-03 4.03029890E-03 3.78581485E-03
|
||||
3.29120969E-03 2.56210216E-03 1.62953662E-03 5.39001426E-04 -6.51497160E-04
|
||||
-1.87423802E-03 -3.05534713E-03 -4.11894545E-03 -4.99166501E-03 -5.60728460E-03
|
||||
-5.91120961E-03 -5.86451776E-03 -5.44730760E-03 -4.66110836E-03 -3.53014865E-03
|
||||
-2.10134988E-03 -4.42970165E-04 1.35810394E-03 3.20033333E-03 4.97261155E-03
|
||||
6.56023062E-03 7.85143300E-03 8.74420720E-03 9.15295816E-03 9.01466794E-03
|
||||
8.29416885E-03 6.98819290E-03 5.12791099E-03 2.77973572E-03 4.42597047E-05
|
||||
-2.94670439E-03 -6.03491859E-03 -9.04218107E-03 -1.17781861E-02 -1.40494322E-02
|
||||
-1.56687591E-02 -1.64650455E-02 -1.62925646E-02 -1.50395213E-02 -1.26352794E-02
|
||||
-9.05589386E-03 -4.32758638E-03 1.47205416E-03 8.21529421E-03 1.57279000E-02
|
||||
2.37950831E-02 3.21695320E-02 4.05811667E-02 4.87481765E-02 5.63888475E-02
|
||||
6.32336214E-02 6.90367594E-02 7.35871717E-02 7.67176896E-02 7.83125534E-02
|
||||
F260 name of filter.
|
||||
260 number of points in this filter
|
||||
1.0 digital gain of filter
|
||||
10 decimation factor
|
||||
-2.21394471E-05 -3.84535825E-05 -4.37853401E-05 -7.33722980E-05 -9.14422304E-05
|
||||
-1.23938042E-04 -1.49931447E-04 -1.82887343E-04 -2.09853867E-04 -2.37086763E-04
|
||||
-2.56050526E-04 -2.69085953E-04 -2.70466351E-04 -2.60901743E-04 -2.37020459E-04
|
||||
-1.99575960E-04 -1.47611400E-04 -8.30789101E-05 -7.54570009E-06 7.52988073E-05
|
||||
1.61596249E-04 2.46079034E-04 3.23379948E-04 3.87565407E-04 4.33107109E-04
|
||||
4.54859531E-04 4.48835703E-04 4.12364361E-04 3.44629919E-04 2.46817380E-04
|
||||
1.22360547E-04 -2.31280356E-05 -1.81951134E-04 -3.44674611E-04 -5.00592269E-04
|
||||
-6.38365653E-04 -7.46739523E-04 -8.15366206E-04 -8.35626825E-04 -8.01409689E-04
|
||||
-7.09796216E-04 -5.61590365E-04 -3.61609291E-04 -1.18741082E-04 1.54299848E-04
|
||||
4.41516910E-04 7.24451325E-04 9.83254668E-04 1.19797250E-03 1.34993433E-03
|
||||
1.42317743E-03 1.40583275E-03 1.29129178E-03 1.07914617E-03 7.75740225E-04
|
||||
3.94305391E-04 -4.53973317E-05 -5.17899887E-04 -9.93356613E-04 -1.43926207E-03
|
||||
-1.82251312E-03 -2.11168216E-03 -2.27933641E-03 -2.30428586E-03 -2.17355190E-03
|
||||
-1.88391749E-03 -1.44292317E-03 -8.69178473E-04 -1.91919019E-04 5.50195363E-04
|
||||
1.31105057E-03 2.03971158E-03 2.68357106E-03 3.19189196E-03 3.51942906E-03
|
||||
3.62999244E-03 3.49960900E-03 3.11909193E-03 2.49577942E-03 1.65425081E-03
|
||||
6.35925437E-04 -5.02531249E-04 -1.69196661E-03 -2.85453260E-03 -3.90836765E-03
|
||||
-4.77287659E-03 -5.37430179E-03 -5.65125145E-03 -5.55977441E-03 -5.07763678E-03
|
||||
-4.20745577E-03 -2.97838400E-03 -1.44616994E-03 3.08558873E-04 2.18377229E-03
|
||||
4.06116126E-03 5.81273483E-03 7.30846983E-03 8.42472246E-03 9.05277497E-03
|
||||
9.10711322E-03 8.53281201E-03 7.31155462E-03 5.46582627E-03 3.06090353E-03
|
||||
2.04397501E-04 -2.95675636E-03 -6.24184564E-03 -9.44424366E-03 -1.23412755E-02
|
||||
-1.47055941E-02 -1.63174817E-02 -1.69774244E-02 -1.65182284E-02 -1.48159967E-02
|
||||
-1.17992690E-02 -7.45576533E-03 -1.83624710E-03 4.94480992E-03 1.27118799E-02
|
||||
2.12343372E-02 3.02354844E-02 3.94042148E-02 4.84087909E-02 5.69119955E-02
|
||||
6.45869173E-02 7.11325042E-02 7.62880835E-02 7.98460483E-02 8.16620350E-02
|
||||
F260M name of filter.
|
||||
260 number of points in this filter
|
||||
1.0 digital gain of filter
|
||||
10 decimation factor delay=0
|
||||
1.079287267E-05 1.507976413E-05 -5.111238366E-08 4.920823812E-06
|
||||
3.442723028E-06 -1.666146545E-06 -2.831910422E-07 -8.765965504E-06
|
||||
-6.984414540E-06 -1.489227088E-05 -1.351934498E-05 -1.913216693E-05
|
||||
-1.637725290E-05 -1.856702875E-05 -1.368190988E-05 -1.048197555E-05
|
||||
-2.783157470E-06 3.249449946E-06 1.294615868E-05 2.150317414E-05
|
||||
3.076095527E-05 3.794501390E-05 4.370677561E-05 4.589291711E-05
|
||||
4.544014882E-05 4.013070429E-05 3.105981523E-05 1.806470937E-05
|
||||
1.337358526E-06 -1.817191333E-05 -3.827784531E-05 -5.878332013E-05
|
||||
-7.727171032E-05 -9.161897469E-05 -1.008395193E-04 -1.026267710E-04
|
||||
-9.660981596E-05 -8.222017641E-05 -5.894873175E-05 -2.782626689E-05
|
||||
9.373725334E-06 5.067656457E-05 9.316037904E-05 1.334013068E-04
|
||||
1.678299741E-04 1.934354805E-04 2.067741589E-04 2.052731143E-04
|
||||
1.879093761E-04 1.534182229E-04 1.032339133E-04 3.934091728E-05
|
||||
-3.545508662E-05 -1.154975325E-04 -1.954909385E-04 -2.693994029E-04
|
||||
-3.305894206E-04 -3.729540622E-04 -3.915650304E-04 -3.820975835E-04
|
||||
-3.425341274E-04 -2.727923275E-04 -1.751277887E-04 -5.375534602E-05
|
||||
8.350402641E-05 2.291357960E-04 3.718127555E-04 5.009307642E-04
|
||||
6.052816170E-04 6.748266751E-04 7.008539978E-04 6.770903128E-04
|
||||
6.011145306E-04 4.729092761E-04 2.978779667E-04 8.432054892E-05
|
||||
-1.558451040E-04 -4.067220725E-04 -6.512745167E-04 -8.709777030E-04
|
||||
-1.047258265E-03 -1.163375797E-03 -1.205927110E-03 -1.165057765E-03
|
||||
-1.036343863E-03 -8.221727912E-04 -5.294632865E-04 -1.738004212E-04
|
||||
2.258362656E-04 6.438820274E-04 1.052967738E-03 1.422406174E-03
|
||||
1.723671681E-03 1.929736580E-03 2.018134343E-03 1.974065090E-03
|
||||
1.789439819E-03 1.466433518E-03 1.016325201E-03 4.604905262E-04
|
||||
-1.716260012E-04 -8.422890678E-04 -1.509365160E-03 -2.128105843E-03
|
||||
-2.653160132E-03 -3.043799894E-03 -3.265180392E-03 -3.291789908E-03
|
||||
-3.109832294E-03 -2.719027922E-03 -2.132568043E-03 -1.378223533E-03
|
||||
-4.968097201E-04 4.609341850E-04 1.434805687E-03 2.361288760E-03
|
||||
3.176110331E-03 3.818887752E-03 4.237567540E-03 4.392415285E-03
|
||||
4.259531852E-03 3.831942333E-03 3.123845672E-03 2.166822553E-03
|
||||
1.012324356E-03 -2.732906141E-04 -1.611321582E-03 -2.916018711E-03
|
||||
-4.098872188E-03 -5.075794645E-03 -5.772251170E-03 -6.127828266E-03
|
||||
-6.103029009E-03 -5.680531729E-03 -4.868856631E-03 -3.702135757E-03
|
||||
-2.240001690E-03 -5.627380451E-04 1.229931950E-03 3.027866827E-03
|
||||
4.714830313E-03 6.177156698E-03 7.310085464E-03 8.026872762E-03
|
||||
8.262724616E-03 7.981666364E-03 7.179896813E-03 5.885533057E-03
|
||||
4.160894081E-03 2.097048331E-03 -1.887050894E-04 -2.561483998E-03
|
||||
-4.874051083E-03 -6.978864316E-03 -8.734920993E-03 -1.001767162E-02
|
||||
-1.072843745E-02 -1.079997420E-02 -1.020274963E-02 -8.947957307E-03
|
||||
-7.088084705E-03 -4.714520182E-03 -1.954514999E-03 1.036809175E-03
|
||||
4.085261375E-03 7.005818188E-03 9.616161697E-03 1.174601912E-02
|
||||
1.324871834E-02 1.401052903E-02 1.395914797E-02 1.306815445E-02
|
||||
1.136058755E-02 8.909822442E-03 5.833754782E-03 2.293123631E-03
|
||||
-1.520598889E-03 -5.393187050E-03 -9.101052769E-03 -1.242277119E-02
|
||||
-1.515301596E-02 -1.711499877E-02 -1.816916279E-02 -1.822610199E-02
|
||||
-1.724776998E-02 -1.525519229E-02 -1.232561655E-02 -8.591478691E-03
|
||||
-4.231868312E-03 5.333257141E-04 5.457511637E-03 1.027927827E-02
|
||||
1.473488100E-02 1.857483946E-02 2.157553472E-02 2.355172858E-02
|
||||
2.436802909E-02 2.394460328E-02 2.226375788E-02 1.937013119E-02
|
||||
1.537114941E-02 1.042932086E-02 4.757362884E-03 -1.392641687E-03
|
||||
-7.742678747E-03 -1.399901509E-02 -1.986876130E-02 -2.507163025E-02
|
||||
-2.935413271E-02 -3.249925002E-02 -3.433821350E-02 -3.475474566E-02
|
||||
-3.369113803E-02 -3.115013242E-02 -2.719259448E-02 -2.193316258E-02
|
||||
-1.553708967E-02 -8.207984269E-03 -1.812939881E-04 8.287215605E-03
|
||||
1.693388261E-02 2.549592033E-02 3.372291103E-02 4.138626903E-02
|
||||
4.828619212E-02 5.425798520E-02 5.917708203E-02 6.296107173E-02
|
||||
6.556912512E-02 6.700109690E-02 6.729575992E-02 6.652389467E-02
|
||||
6.478506327E-02 6.220113486E-02 5.890738964E-02 5.505050719E-02
|
||||
5.077883229E-02 4.623685405E-02 4.156227410E-02 3.688067943E-02
|
||||
3.230065480E-02 2.791529894E-02 2.379892394E-02 2.000600472E-02
|
||||
1.657426357E-02 1.352316421E-02 1.085716672E-02 8.569415659E-03
|
||||
6.641747896E-03 5.046763923E-03 3.752608085E-03 2.724824706E-03
|
||||
1.925947843E-03 1.320080133E-03 8.730033878E-04 5.531239440E-04
|
||||
3.322452831E-04 1.855984301E-04 9.354957001E-05 4.609702955E-05
|
||||
FS2D5 name of filter
|
||||
160 number of points in this filter
|
||||
1.0 digital gain of filter
|
||||
5 decimation factor
|
||||
4.03246117E-05 7.45328029E-05 1.23455344E-04 1.70188680E-04 1.97310532E-04
|
||||
1.85489100E-04 1.19345640E-04 -5.72310127E-06 -1.77923187E-04 -3.67325860E-04
|
||||
-5.29510442E-04 -6.15008464E-04 -5.83235381E-04 -4.17283710E-04 -1.34951608E-04
|
||||
2.08332984E-04 5.27709020E-04 7.28189911E-04 7.31258728E-04 5.01920189E-04
|
||||
6.78317594E-05 -4.77149288E-04 -9.89158050E-04 -1.30891816E-03 -1.30735850E-03
|
||||
-9.30016754E-04 -2.26254051E-04 6.48347551E-04 1.46170836E-03 1.96322247E-03
|
||||
1.95662461E-03 1.36772481E-03 2.85462804E-04 -1.04038725E-03 -2.25067869E-03
|
||||
-2.96906939E-03 -2.91273668E-03 -1.99058281E-03 -3.57353735E-04 1.59883960E-03
|
||||
3.34097167E-03 4.32376406E-03 4.15563587E-03 2.73600204E-03 3.23430991E-04
|
||||
-2.49475186E-03 -4.93494259E-03 -6.22519679E-03 -5.83613613E-03 -3.66896631E-03
|
||||
-1.39409210E-04 3.88022800E-03 7.26123152E-03 8.91935597E-03 8.14025178E-03
|
||||
4.83704963E-03 -3.43478458E-04 -6.11566515E-03 -1.08477755E-02 -1.29927234E-02
|
||||
-1.15499501E-02 -6.43037649E-03 1.39119851E-03 1.00057069E-02 1.69805710E-02
|
||||
1.99734040E-02 1.74066453E-02 9.02946307E-03 -3.79496938E-03 -1.81830376E-02
|
||||
-3.02229474E-02 -3.57833264E-02 -3.14689785E-02 -1.55044439E-02 1.16723670E-02
|
||||
4.72683317E-02 8.65081895E-02 1.23466753E-01 1.52194165E-01 1.67893857E-01
|
||||
FS2D5M name of filter
|
||||
160 number of points in this filter
|
||||
1.0 digital gain of filter
|
||||
5 decimation factor delay=0
|
||||
1.335380875E-05 -3.923332770E-06 -7.131475286E-06 -1.059135775E-05
|
||||
-1.172398970E-05 -8.714509931E-06 -5.306039839E-07 1.049249931E-05
|
||||
2.181281889E-05 2.850974306E-05 2.577766281E-05 1.271369365E-05
|
||||
-9.378560208E-06 -3.531222319E-05 -5.528407564E-05 -6.044364636E-05
|
||||
-4.527851343E-05 -9.157713066E-06 4.017884567E-05 8.791117580E-05
|
||||
1.167336595E-04 1.115442719E-04 6.604911323E-05 -1.310735934E-05
|
||||
-1.064980970E-04 -1.846880914E-04 -2.167296334E-04 -1.820150501E-04
|
||||
-7.829473907E-05 7.412557898E-05 2.335530298E-04 3.473508987E-04
|
||||
3.681761154E-04 2.707143140E-04 6.475444388E-05 -2.019223757E-04
|
||||
-4.528498102E-04 -6.023320602E-04 -5.825653207E-04 -3.698984219E-04
|
||||
4.784499765E-07 4.360450257E-04 8.069792530E-04 9.826875757E-04
|
||||
8.740680059E-04 4.686421307E-04 -1.528128923E-04 -8.275074651E-04
|
||||
-1.350154169E-03 -1.531622256E-03 -1.261652331E-03 -5.555372336E-04
|
||||
4.328002688E-04 1.438610721E-03 2.152608708E-03 2.311351011E-03
|
||||
1.785400091E-03 6.373397773E-04 -8.714047144E-04 -2.334049437E-03
|
||||
-3.303219564E-03 -3.421054920E-03 -2.538599074E-03 -7.863680366E-04
|
||||
1.431307290E-03 3.524237080E-03 4.869754426E-03 4.993217997E-03
|
||||
3.723787609E-03 1.276530675E-03 -1.770431991E-03 -4.607865587E-03
|
||||
-6.408265792E-03 -6.564482115E-03 -4.886589013E-03 -1.695317449E-03
|
||||
2.224703087E-03 5.810213275E-03 8.001439273E-03 8.047544397E-03
|
||||
5.748359952E-03 1.557392301E-03 -3.494118107E-03 -8.044518530E-03
|
||||
-1.076313760E-02 -1.073082164E-02 -7.732167840E-03 -2.369860886E-03
|
||||
4.044018220E-03 9.804454632E-03 1.326272171E-02 1.329099759E-02
|
||||
9.632877074E-03 3.034127178E-03 -4.896284547E-03 -1.207299344E-02
|
||||
-1.647723839E-02 -1.671513729E-02 -1.243799366E-02 -4.501919262E-03
|
||||
5.191241857E-03 1.414601784E-02 1.991105825E-02 2.073976770E-02
|
||||
1.609740034E-02 6.870985031E-03 -4.787745886E-03 -1.596158929E-02
|
||||
-2.369353548E-02 -2.575754374E-02 -2.127389796E-02 -1.100378577E-02
|
||||
2.765381476E-03 1.673071459E-02 2.736407146E-02 3.179064766E-02
|
||||
2.853777260E-02 1.796180196E-02 2.238315064E-03 -1.509305742E-02
|
||||
-2.993007377E-02 -3.856914118E-02 -3.859790042E-02 -2.950734086E-02
|
||||
-1.287544053E-02 7.926733233E-03 2.844149619E-02 4.408455268E-02
|
||||
5.114487186E-02 4.760229960E-02 3.358611837E-02 1.138180774E-02
|
||||
-1.500780974E-02 -4.064316303E-02 -6.059670448E-02 -7.087340206E-02
|
||||
-6.912043691E-02 -5.499481782E-02 -3.014102951E-02 2.187674399E-03
|
||||
3.776648641E-02 7.215134799E-02 1.013957262E-01 1.226070076E-01
|
||||
1.342594028E-01 1.362394989E-01 1.296578944E-01 1.164925918E-01
|
||||
9.915298969E-02 8.005964011E-02 6.130640954E-02 4.444322363E-02
|
||||
3.039683960E-02 1.950959489E-02 1.165626757E-02 6.403895561E-03
|
||||
3.174387850E-03 1.374438638E-03 4.877717583E-04 1.227020548E-04
|
||||
F64C name of filter
|
||||
64 number of point in this filter
|
||||
1.0 digital gain of filter
|
||||
2 decimation factor
|
||||
2.88049557E-04 1.55313975E-03 2.98230503E-03 2.51714457E-03 -5.02926825E-04
|
||||
-2.81205853E-03 -8.08708347E-04 3.21542991E-03 2.71266001E-03 -2.91550330E-03
|
||||
-5.09429061E-03 1.33933038E-03 7.40034358E-03 1.82796523E-03 -8.81958288E-03
|
||||
-6.56719316E-03 8.38608603E-03 1.24268680E-02 -5.12978843E-03 -1.84868593E-02
|
||||
-1.79236772E-03 2.33604185E-02 1.30477299E-02 -2.51709452E-02 -2.93134766E-02
|
||||
2.12669305E-02 5.21898987E-02 -6.61517332E-03 -8.83535239E-02 -3.66062362E-02
|
||||
1.86273299E-01 4.03764488E-01
|
||||
F64CM name of filter
|
||||
64 number of point in this filter
|
||||
1.0 digital gain of filter
|
||||
2 decimation factor delay=0
|
||||
3.387259540E-06 1.462229284E-05 8.852302017E-06 -3.704947449E-05
|
||||
-1.842113306E-05 5.091349158E-05 5.708269600E-05 -6.161831698E-05
|
||||
-1.197081438E-04 4.531691229E-05 2.089885093E-04 1.981760397E-05
|
||||
-3.084974596E-04 -1.623854041E-04 3.845688479E-04 4.033530422E-04
|
||||
-3.788556496E-04 -7.430217811E-04 2.101059945E-04 1.139437780E-03
|
||||
2.179285511E-04 -1.485493849E-03 -9.902592283E-04 1.579508767E-03
|
||||
2.131217858E-03 -1.094714389E-03 -3.496658755E-03 -4.542660899E-04
|
||||
4.476771224E-03 3.666045377E-03 -2.417212585E-03 -4.413669929E-03
|
||||
1.602813834E-03 6.474791095E-03 1.373626641E-03 -6.992134266E-03
|
||||
-5.067943130E-03 5.717223510E-03 8.806676604E-03 -2.241689712E-03
|
||||
-1.143444050E-02 -3.321751952E-03 1.156822871E-02 1.008895598E-02
|
||||
-7.931207307E-03 -1.622615010E-02 -1.245672029E-04 1.892427169E-02
|
||||
1.184041984E-02 -1.473294292E-02 -2.397307754E-02 6.771095796E-04
|
||||
2.949722297E-02 2.282974124E-02 -1.689939760E-02 -4.499266669E-02
|
||||
-2.546009794E-02 3.010489978E-02 7.811339945E-02 8.785774559E-02
|
||||
6.414864212E-02 3.204495832E-02 1.036127750E-02 1.711701858E-03
|
||||
F96C name of filter
|
||||
96 number of point in this filter
|
||||
1.0 digital gain of filter
|
||||
2 decimation factor
|
||||
-0.46243647E-05 -0.82582981E-04 -0.22601415E-03 -0.25390085E-03 0.76656675E-06
|
||||
0.30501861E-03 0.17127917E-03 -0.34944694E-03 -0.44910128E-03 0.26315766E-03
|
||||
0.78977249E-03 0.38573012E-04 -0.10917830E-02 -0.59999564E-03 0.12064345E-02
|
||||
0.13971540E-02 -0.96246767E-03 -0.23132728E-02 0.20782732E-03 0.31300743E-02
|
||||
0.11370157E-02 -0.35433476E-02 -0.30242419E-02 0.32076360E-02 0.52380066E-02
|
||||
-0.18038393E-02 -0.73759095E-02 -0.87297275E-03 0.88709101E-02 0.48318471E-02
|
||||
-0.90423054E-02 -0.98139052E-02 0.71791365E-02 0.15252997E-01 -0.26287319E-02
|
||||
-0.20267585E-01 -0.51429142E-02 0.23663623E-01 0.16578568E-01 -0.23875478E-01
|
||||
-0.32279525E-01 0.18606780E-01 0.53942080E-01 -0.31405185E-02 -0.88496210E-01
|
||||
-0.40148561E-01 0.18476363E+00 0.40660112E+00
|
||||
F96CM name of filter
|
||||
96 number of point in this filter
|
||||
1.0 digital gain of filter
|
||||
2 decimation factor delay=0
|
||||
3.767143042E-09 5.277283321E-07 2.184650839E-06 -5.639535175E-06
|
||||
-1.233772650E-06 9.386712009E-06 4.859923592E-06 -1.644319491E-05
|
||||
-1.317239821E-05 2.507479076E-05 2.993096314E-05 -3.259086589E-05
|
||||
-5.894959031E-05 3.315616414E-05 1.031050560E-04 -1.704022179E-05
|
||||
-1.622582786E-04 -2.907654925E-05 2.297912142E-04 1.212308562E-04
|
||||
-2.898784878E-04 -2.740878263E-04 3.143153735E-04 4.949508002E-04
|
||||
-2.612767275E-04 -7.759396685E-04 7.885750529E-05 1.082903938E-03
|
||||
2.879371459E-04 -1.346653095E-03 -8.815053734E-04 1.456359867E-03
|
||||
1.709071221E-03 -1.261487370E-03 -2.712600166E-03 5.874882918E-04
|
||||
3.734286642E-03 7.268566987E-04 -4.484158475E-03 -2.758479444E-03
|
||||
4.522238858E-03 5.378657486E-03 -3.296803916E-03 -8.043305948E-03
|
||||
3.887834027E-04 9.495883249E-03 3.135108622E-03 -1.028205734E-02
|
||||
-8.171851747E-03 8.661228232E-03 1.324848551E-02 -4.544010852E-03
|
||||
-1.738541201E-02 -2.137205331E-03 1.920932531E-02 1.074446272E-02
|
||||
-1.742562652E-02 -1.991419680E-02 1.116278674E-02 2.762964368E-02
|
||||
-3.599954362E-04 -3.148786351E-02 -1.390085835E-02 2.917224541E-02
|
||||
2.921765856E-02 -1.910018362E-02 -4.194933176E-02 1.173900906E-03
|
||||
4.766521603E-02 2.249862812E-02 -4.203074425E-02 -4.708649591E-02
|
||||
2.220381424E-02 6.502348185E-02 1.130155474E-02 -6.688357890E-02
|
||||
-5.242851004E-02 4.376283661E-02 8.759634942E-02 7.987769321E-03
|
||||
-9.530761093E-02 -7.873991132E-02 5.070881918E-02 1.344131678E-01
|
||||
5.733893439E-02 -1.083827317E-01 -1.825922579E-01 -7.216122746E-02
|
||||
1.434931308E-01 3.076342046E-01 3.320170939E-01 2.451789677E-01
|
||||
1.310986727E-01 4.999388382E-02 1.250587124E-02 1.587480190E-03
|
||||
NA3 name of filter. A Nanometrics decimation filter, unknown band characterisics.
|
||||
30 number of points in this filter
|
||||
1.0 digital gain of filter
|
||||
3 decimation factor
|
||||
0.65879140E-04 0.18999690E-03 -0.48271860E-04 -0.12167770E-02 -0.24576070E-02
|
||||
-0.56870410E-03 0.64952830E-02 0.12949710E-01 0.54490100E-02 -0.21592960E-01
|
||||
-0.46964620E-01 -0.27110750E-01 0.65665070E-01 0.20294310E+00 0.30618330E+00
|
56
share/templates/seedlink/fs_mseed/plugins.ini.tpl
Normal file
56
share/templates/seedlink/fs_mseed/plugins.ini.tpl
Normal file
@ -0,0 +1,56 @@
|
||||
* Generated at $date - Do not edit!
|
||||
* template: $template
|
||||
|
||||
[$seedlink.source.id]
|
||||
|
||||
input_type = $sources.fs_mseed.input_type
|
||||
data_format = $sources.fs_mseed.data_format
|
||||
location = $sources.fs_mseed.location
|
||||
|
||||
* Stations to process, separated by a comma. Default is all stations.
|
||||
$sources.fs_mseed.station_list_def
|
||||
|
||||
* "pattern" is a POSIX extended regular expression that must match
|
||||
* input file names (useful for filtering out non-data files). For
|
||||
* example "BH[NEZ]" would match any files that contained "BHE",
|
||||
* "BHN" or "BHZ". If no pattern is specified all files will be
|
||||
* processed.
|
||||
$sources.fs_mseed.pattern_def
|
||||
|
||||
* Look for data files at the 1st or 2nd directory level
|
||||
scan_level = $sources.fs_mseed.scan_level
|
||||
|
||||
* Move file to subdirectory "processed" before starting to read it
|
||||
move_files = $sources.fs_mseed.move_files_yesno
|
||||
|
||||
* Delete processed files
|
||||
delete_files = $sources.fs_mseed.delete_files_yesno
|
||||
|
||||
* Look only for files that are newer than the last file processed
|
||||
use_timestamp = $sources.fs_mseed.use_timestamp_yesno
|
||||
|
||||
* Timestamp file is used to save the modification time of the last file
|
||||
* processed
|
||||
timestamp_file = "$sources.fs_mseed.timestamp_file"
|
||||
|
||||
* New files are searched for every "polltime" seconds
|
||||
polltime = $sources.fs_mseed.polltime
|
||||
|
||||
* Wait until the file is at least 30 seconds old, before trying to read it
|
||||
delay = $sources.fs_mseed.delay
|
||||
|
||||
* "verbosity" tells how many debugging messages are printed
|
||||
verbosity = $sources.fs_mseed.verbosity
|
||||
|
||||
* Maximum number of consecutive zeros in datastream before data gap will be
|
||||
* declared (-1 = disabled)
|
||||
zero_sample_limit = $sources.fs_mseed.zero_sample_limit
|
||||
|
||||
* If timing quality is not available, use this value as default
|
||||
* (-1 = disabled)
|
||||
default_timing_quality = $sources.fs_mseed.default_timing_quality
|
||||
|
||||
* Channel definitions (Mini-SEED streams are defined in streams.xml,
|
||||
* look for <proc name="generic_3x50">)
|
||||
|
||||
$sources.fs_mseed.channel_map
|
7
share/templates/seedlink/fs_mseed/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/fs_mseed/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin ${seedlink.source.id} cmd = "$seedlink.plugin_dir/fs_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini"
|
||||
timeout = 1200
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.fs_mseed.proc"
|
||||
|
105
share/templates/seedlink/fs_mseed/setup.py
Normal file
105
share/templates/seedlink/fs_mseed/setup.py
Normal file
@ -0,0 +1,105 @@
|
||||
import os
|
||||
|
||||
|
||||
def updateKey(key, seedlink, name):
|
||||
key[0] += name + ":" + str(seedlink.param(name)) + ";"
|
||||
|
||||
|
||||
def updateSwitch(key, seedlink, name, var):
|
||||
try:
|
||||
if seedlink.param(name).lower() in ("yes", "true", "1"):
|
||||
var = True
|
||||
else:
|
||||
var = False
|
||||
except: pass
|
||||
|
||||
if var == True:
|
||||
seedlink.setParam(name + '_yesno', 'yes')
|
||||
else:
|
||||
seedlink.setParam(name + '_yesno', 'no')
|
||||
updateKey(key, seedlink, name + '_yesno')
|
||||
|
||||
|
||||
def updateString(key, seedlink, name, var):
|
||||
try: var = seedlink.param(name)
|
||||
except: pass
|
||||
seedlink.setParam(name, var)
|
||||
updateKey(key, seedlink, name)
|
||||
|
||||
|
||||
def updateInt(key, seedlink, name, var):
|
||||
try: var = int(seedlink.param(name))
|
||||
except: pass
|
||||
seedlink.setParam(name, var)
|
||||
updateKey(key, seedlink, name)
|
||||
|
||||
|
||||
def updatePath(key, seedlink, name, var):
|
||||
try: var = seedlink.param(name)
|
||||
except: pass
|
||||
var = var.replace("@ROOTDIR@", seedlink.pkgroot)
|
||||
seedlink.setParam(name, var)
|
||||
updateKey(key, seedlink, name)
|
||||
|
||||
|
||||
'''
|
||||
Plugin handler for the FS plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self):
|
||||
self.station_list = {}
|
||||
|
||||
def push(self, seedlink):
|
||||
key = [""]
|
||||
|
||||
# Check and set defaults
|
||||
updateString(key, seedlink, 'sources.fs_mseed.input_type', 'ddb')
|
||||
updateString(key, seedlink, 'sources.fs_mseed.data_format', 'mseed')
|
||||
updatePath(key, seedlink, 'sources.fs_mseed.location', os.path.join("@ROOTDIR@", "var", "lib", "seedlink", "indata"))
|
||||
|
||||
try:
|
||||
pattern = seedlink.param('sources.fs_mseed.pattern')
|
||||
seedlink.setParam('sources.fs_mseed.pattern_def', 'pattern=' + pattern)
|
||||
except:
|
||||
seedlink.setParam('sources.fs_mseed.pattern_def', '*pattern = BH[NEZ]')
|
||||
updateKey(key, seedlink, 'sources.fs_mseed.pattern_def')
|
||||
|
||||
updateInt(key, seedlink, 'sources.fs_mseed.scan_level', 2)
|
||||
updateSwitch(key, seedlink, 'sources.fs_mseed.move_files', True)
|
||||
updateSwitch(key, seedlink, 'sources.fs_mseed.delete_files', False)
|
||||
updateSwitch(key, seedlink, 'sources.fs_mseed.use_timestamp', False)
|
||||
|
||||
updatePath(key, seedlink, 'sources.fs_mseed.timestamp_file', os.path.join("@ROOTDIR@", "var", "run", "seedlink", "fs_mseed.tim"))
|
||||
|
||||
updateInt(key, seedlink, 'sources.fs_mseed.polltime', 10)
|
||||
updateInt(key, seedlink, 'sources.fs_mseed.delay', 30)
|
||||
updateInt(key, seedlink, 'sources.fs_mseed.verbosity', 1)
|
||||
updateInt(key, seedlink, 'sources.fs_mseed.zero_sample_limit', 10)
|
||||
updateInt(key, seedlink, 'sources.fs_mseed.default_timing_quality', -1)
|
||||
|
||||
channel_map = ""
|
||||
|
||||
for (name, value) in seedlink.station_params.items():
|
||||
if name.startswith("sources.fs_mseed.channels."):
|
||||
toks = name[len("sources.fs_mseed.channels."):].split('.')
|
||||
if len(toks) != 2: continue
|
||||
if toks[1] != "source_id": continue
|
||||
channel_map += "channel %s source_id = \"%s\"\n" % (toks[0], value)
|
||||
|
||||
seedlink.setParam('sources.fs_mseed.channel_map', channel_map)
|
||||
key[0] += "sources.fs_mseed.channel_map:" + channel_map + ";"
|
||||
|
||||
try: station_list = self.station_list[key[0]] + ','
|
||||
except: station_list = ''
|
||||
|
||||
station_list += seedlink.sta
|
||||
self.station_list[key[0]] = station_list
|
||||
seedlink.setParam('sources.fs_mseed.station_list_def', 'station_list=' + station_list)
|
||||
|
||||
# Key is per config
|
||||
return key[0]
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
15
share/templates/seedlink/fs_mseed/streams_generic_3x50.tpl
Normal file
15
share/templates/seedlink/fs_mseed/streams_generic_3x50.tpl
Normal file
@ -0,0 +1,15 @@
|
||||
<proc name="generic_3x50">
|
||||
<tree>
|
||||
<input name="Z" channel="Z" location="" rate="50"/>
|
||||
<input name="N" channel="N" location="" rate="50"/>
|
||||
<input name="E" channel="E" location="" rate="50"/>
|
||||
<node stream="SH"/>
|
||||
<node filter="F96C" stream="BH">
|
||||
<node filter="FS2D5">
|
||||
<node filter="FS2D5" stream="LH">
|
||||
<node filter="VLP" stream="VH"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</tree>
|
||||
</proc>
|
6
share/templates/seedlink/gdrt/seedlink_plugin.tpl
Normal file
6
share/templates/seedlink/gdrt/seedlink_plugin.tpl
Normal file
@ -0,0 +1,6 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd="$seedlink.plugin_dir/gdrt_plugin --udpport $sources.gdrt.udpport --stations-from $sources.gdrt.stationsFrom"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
|
63
share/templates/seedlink/gdrt/setup.py
Normal file
63
share/templates/seedlink/gdrt/setup.py
Normal file
@ -0,0 +1,63 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the GDRT plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
def __init__(self):
|
||||
self.instances = {}
|
||||
self.stations = {}
|
||||
|
||||
def push(self, seedlink):
|
||||
try: gdrtStation = seedlink.param('sources.gdrt.station')
|
||||
except: gdrtStation = seedlink.param('seedlink.station.code')
|
||||
|
||||
seedlink.setParam('sources.gdrt.station', gdrtStation);
|
||||
|
||||
try: locationCode = seedlink.param('sources.gdrt.locationCode')
|
||||
except: locationCode = ""
|
||||
|
||||
seedlink.setParam('sources.gdrt.locationCode', locationCode);
|
||||
|
||||
try: sampleRate = float(seedlink.param('sources.gdrt.sampleRate'))
|
||||
except: sampleRate = 1.0
|
||||
|
||||
seedlink.setParam('sources.gdrt.sampleRate', sampleRate)
|
||||
|
||||
try: udpport = int(seedlink.param('sources.gdrt.udpport'))
|
||||
except: udpport = 9999
|
||||
|
||||
seedlink.setParam('sources.gdrt.udpport', udpport);
|
||||
|
||||
try:
|
||||
n = self.instances[udpport]
|
||||
|
||||
except KeyError:
|
||||
n = len(self.instances)
|
||||
self.instances[udpport] = n
|
||||
|
||||
stationsFrom = os.path.join(seedlink.config_dir, "gdrt%d.stations" % n)
|
||||
seedlink.setParam('sources.gdrt.stationsFrom', stationsFrom)
|
||||
|
||||
try:
|
||||
stationList = self.stations[stationsFrom]
|
||||
|
||||
except KeyError:
|
||||
stationList = []
|
||||
self.stations[stationsFrom] = stationList
|
||||
|
||||
stationList.append((gdrtStation,
|
||||
seedlink.param('seedlink.station.network'),
|
||||
seedlink.param('seedlink.station.code'),
|
||||
locationCode if locationCode else "--",
|
||||
sampleRate))
|
||||
|
||||
return udpport
|
||||
|
||||
|
||||
def flush(self, seedlink):
|
||||
for stationsFrom, stations in self.stations.items():
|
||||
with open(stationsFrom, "w") as fd:
|
||||
for s in stations:
|
||||
fd.write("%s %s %s %s %f\n" % s)
|
||||
|
60
share/templates/seedlink/gmeteo/plugins.ini.tpl
Normal file
60
share/templates/seedlink/gmeteo/plugins.ini.tpl
Normal file
@ -0,0 +1,60 @@
|
||||
* Generated at $date - Do not edit!
|
||||
* template: $template
|
||||
|
||||
[$seedlink.source.id]
|
||||
|
||||
* Settings for GFZ meteo
|
||||
|
||||
* Station ID (network/station code is set in seedlink.ini)
|
||||
station=$seedlink.station.id
|
||||
|
||||
* Use the command 'serial_plugin -m' to find out which protocols are
|
||||
* supported.
|
||||
protocol=gmeteo
|
||||
|
||||
* Serial port
|
||||
port=$sources.gmeteo.comport
|
||||
|
||||
* Baud rate
|
||||
bps=$sources.gmeteo.baudrate
|
||||
|
||||
* Time interval in minutes when weather information is logged, 0 (default)
|
||||
* means "disabled". Weather channels can be used independently of this
|
||||
* option.
|
||||
statusinterval=60
|
||||
|
||||
* Maximum number of consecutive zeros in datastream before data gap will be
|
||||
* declared (-1 = disabled).
|
||||
zero_sample_limit = -1
|
||||
|
||||
* Default timing quality in percents. This value will be used when no
|
||||
* timing quality information is available. Can be -1 to omit the blockette
|
||||
* 1001 altogether.
|
||||
default_tq = -1
|
||||
|
||||
* Keyword 'channel' is used to map input channels to symbolic channel
|
||||
* names. Channel names are arbitrary 1..10-letter identifiers which should
|
||||
* match the input names of the stream processing scheme in streams.xml,
|
||||
* which is referenced from seedlink.ini
|
||||
|
||||
* Outdoor Temperature (C * 100)
|
||||
channel KO source_id=TD scale=100
|
||||
|
||||
* Outdoor Humidity (%RH)
|
||||
channel IO source_id=HR scale=1
|
||||
|
||||
* Air Pressure (hPa * 10)
|
||||
channel DO source_id=PR scale=10
|
||||
|
||||
* Wind Direction (deg)
|
||||
channel WD source_id=WD scale=1
|
||||
|
||||
* Wind Speed (m/s * 10)
|
||||
channel WS source_id=WS scale=10
|
||||
|
||||
* Rain accumulation (mm * 100)
|
||||
channel RA source_id=RI scale=100
|
||||
|
||||
* Hail accumulation (hits/cm^2 * 10)
|
||||
channel HA source_id=HI scale=10
|
||||
|
7
share/templates/seedlink/gmeteo/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/gmeteo/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.gmeteo.proc"
|
||||
|
26
share/templates/seedlink/gmeteo/setup.py
Normal file
26
share/templates/seedlink/gmeteo/setup.py
Normal file
@ -0,0 +1,26 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for GFZ meteo.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
try: seedlink.param('sources.gmeteo.comport')
|
||||
except: seedlink.setParam('sources.gmeteo.comport', '/dev/meteo')
|
||||
|
||||
try: seedlink.param('sources.gmeteo.baudrate')
|
||||
except: seedlink.setParam('sources.gmeteo.baudrate', 19200)
|
||||
|
||||
try: seedlink.param('sources.gmeteo.proc')
|
||||
except: seedlink.setParam('sources.gmeteo.proc', 'gmeteo')
|
||||
|
||||
return seedlink.param('sources.gmeteo.comport')
|
||||
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
12
share/templates/seedlink/gmeteo/streams_gmeteo.tpl
Normal file
12
share/templates/seedlink/gmeteo/streams_gmeteo.tpl
Normal file
@ -0,0 +1,12 @@
|
||||
<proc name="gmeteo">
|
||||
<tree>
|
||||
<input name="KO" channel="KO" location="" rate="1/10"/>
|
||||
<input name="IO" channel="IO" location="" rate="1/10"/>
|
||||
<input name="DO" channel="DO" location="" rate="1/10"/>
|
||||
<input name="WD" channel="WD" location="" rate="1/10"/>
|
||||
<input name="WS" channel="WS" location="" rate="1/10"/>
|
||||
<input name="RA" channel="RA" location="" rate="1/10"/>
|
||||
<input name="HA" channel="HA" location="" rate="1/10"/>
|
||||
<node stream="W"/>
|
||||
</tree>
|
||||
</proc>
|
47
share/templates/seedlink/hrd24/plugins.ini.tpl
Normal file
47
share/templates/seedlink/hrd24/plugins.ini.tpl
Normal file
@ -0,0 +1,47 @@
|
||||
* Generated at $date - Do not edit!
|
||||
* template: $template
|
||||
|
||||
[$seedlink.source.id]
|
||||
|
||||
* Settings for Nanometrics HRD24 digitizer
|
||||
|
||||
* Station ID (network/station code is set in seedlink.ini)
|
||||
station=$seedlink.station.id
|
||||
|
||||
* Use the command 'serial_plugin -m' to find out which protocols are
|
||||
* supported.
|
||||
protocol=hrd24
|
||||
|
||||
* Serial port
|
||||
port=$sources.hrd24.comport
|
||||
|
||||
* Baud rate
|
||||
bps=$sources.hrd24.baudrate
|
||||
|
||||
* Number of "bundles" in one packet
|
||||
bundles=$sources.hrd24.bundles
|
||||
|
||||
* Maximum number of consecutive zeros in datastream before data gap will be
|
||||
* declared (-1 = disabled).
|
||||
zero_sample_limit = -1
|
||||
|
||||
* Default timing quality in percents. This value will be used when no
|
||||
* timing quality information is available. Can be -1 to omit the blockette
|
||||
* 1001 altogether.
|
||||
default_tq = 0
|
||||
|
||||
* Timing quality to use when GPS is out of lock
|
||||
unlock_tq = 10
|
||||
|
||||
* Directory for state-of-health log files (optional)
|
||||
* soh_log_dir=$pkgroot/var/log/hrd24-SOH-files
|
||||
|
||||
* Keyword 'channel' is used to map input channels to symbolic channel
|
||||
* names. Channel names are arbitrary 1..10-letter identifiers which should
|
||||
* match the input names of the stream processing scheme in streams.xml,
|
||||
* which is referenced from seedlink.ini
|
||||
|
||||
channel Z source_id=0
|
||||
channel N source_id=1
|
||||
channel E source_id=2
|
||||
|
7
share/templates/seedlink/hrd24/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/hrd24/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.hrd24.proc"
|
||||
|
29
share/templates/seedlink/hrd24/setup.py
Normal file
29
share/templates/seedlink/hrd24/setup.py
Normal file
@ -0,0 +1,29 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the EarthData PS6-24 plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
try: seedlink.param('sources.hrd24.comport')
|
||||
except: seedlink.setParam('sources.hrd24.comport', '/dev/data')
|
||||
|
||||
try: seedlink.param('sources.hrd24.baudrate')
|
||||
except: seedlink.setParam('sources.hrd24.baudrate', 19200)
|
||||
|
||||
try: seedlink.param('sources.hrd24.bundles')
|
||||
except: seedlink.setParam('sources.hrd24.bundles', 59)
|
||||
|
||||
try: seedlink.param('sources.hrd24.proc')
|
||||
except: seedlink.setParam('sources.hrd24.proc', 'hrd24_100')
|
||||
|
||||
return seedlink.net + "." + seedlink.sta
|
||||
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
20
share/templates/seedlink/hrd24/streams_hrd24_100.tpl
Normal file
20
share/templates/seedlink/hrd24/streams_hrd24_100.tpl
Normal file
@ -0,0 +1,20 @@
|
||||
<proc name="hrd24_100">
|
||||
<tree>
|
||||
<input name="Z" channel="Z" location="" rate="100"/>
|
||||
<input name="N" channel="N" location="" rate="100"/>
|
||||
<input name="E" channel="E" location="" rate="100"/>
|
||||
<node stream="HH"/>
|
||||
|
||||
<!-- Uncomment this to enable 50Hz SH? streams -->
|
||||
<!-- -->
|
||||
<!-- <node filter="F96C" stream="SH"/> -->
|
||||
|
||||
<node filter="FS2D5" stream="BH">
|
||||
<node filter="F96C">
|
||||
<node filter="ULP" stream="LH">
|
||||
<node filter="VLP" stream="VH"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</tree>
|
||||
</proc>
|
6
share/templates/seedlink/liss/seedlink_plugin.tpl
Normal file
6
share/templates/seedlink/liss/seedlink_plugin.tpl
Normal file
@ -0,0 +1,6 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd="$seedlink.plugin_dir/sock_plugin -v -s $sources.liss.address -p $sources.liss.port -n $seedlink.station.network"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
|
26
share/templates/seedlink/liss/setup.py
Normal file
26
share/templates/seedlink/liss/setup.py
Normal file
@ -0,0 +1,26 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the liss plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
try: host = seedlink.param('sources.liss.address')
|
||||
except: host = "$STATION.$NET.liss.org"
|
||||
try: port = seedlink.param('sources.liss.port')
|
||||
except:
|
||||
port = "4000"
|
||||
seedlink.setParam('sources.liss.port', port)
|
||||
|
||||
host = host.replace("$STATION", seedlink.sta).replace("$NET", seedlink.net)
|
||||
seedlink.setParam('sources.liss.address', host)
|
||||
|
||||
# key is station (one instance per station)
|
||||
return seedlink.net + "." + seedlink.sta
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
31
share/templates/seedlink/m24/plugins.ini.tpl
Normal file
31
share/templates/seedlink/m24/plugins.ini.tpl
Normal file
@ -0,0 +1,31 @@
|
||||
* Generated at $date - Do not edit!
|
||||
* template: $template
|
||||
|
||||
[M24]
|
||||
|
||||
* Settings for the Lennartz M24 digitizer
|
||||
|
||||
* Station ID (network/station code is set in seedlink.ini)
|
||||
station = $seedlink.station.id
|
||||
|
||||
* Device for serial port
|
||||
device = $sources.m24.comport
|
||||
|
||||
* Speed for serial port
|
||||
speed = $sources.m24.baudrate
|
||||
|
||||
* Frame type on serial line
|
||||
frame-type = 0
|
||||
|
||||
* Sample interval in usecs
|
||||
sample-iv = 10000
|
||||
|
||||
* Time offset in usecs
|
||||
time-off = $sources.m24.time_offset
|
||||
|
||||
*
|
||||
resync-delay = 900
|
||||
|
||||
* Leapseconds file to use
|
||||
* leapseconds = /usr/src/share/zoneinfo/leapseconds
|
||||
|
7
share/templates/seedlink/m24/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/m24/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin M24 cmd = "$seedlink.plugin_dir/m24-plug -p $seedlink.config_dir"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.m24.proc"
|
||||
|
29
share/templates/seedlink/m24/setup.py
Normal file
29
share/templates/seedlink/m24/setup.py
Normal file
@ -0,0 +1,29 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the Lemmartz M24 plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
try: seedlink.param('sources.m24.comport')
|
||||
except: seedlink.setParam('sources.m24.comport', '/dev/data')
|
||||
|
||||
try: seedlink.param('sources.m24.baudrate')
|
||||
except: seedlink.setParam('sources.m24.baudrate', 115200)
|
||||
|
||||
try: seedlink.param('sources.m24.time_offset')
|
||||
except: seedlink.setParam('sources.m24.time_offset', 0)
|
||||
|
||||
try: seedlink.param('sources.m24.proc')
|
||||
except: seedlink.setParam('sources.m24.proc', 'm24_100')
|
||||
|
||||
return None
|
||||
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
33
share/templates/seedlink/m24/streams_m24_100.tpl
Normal file
33
share/templates/seedlink/m24/streams_m24_100.tpl
Normal file
@ -0,0 +1,33 @@
|
||||
<proc name="m24_100">
|
||||
<tree>
|
||||
<input name="Z" channel="Z" location="" rate="100"/>
|
||||
<input name="N" channel="N" location="" rate="100"/>
|
||||
<input name="E" channel="E" location="" rate="100"/>
|
||||
<node stream="HH"/>
|
||||
|
||||
<!-- Uncomment this to enable 50Hz SH? streams -->
|
||||
<!-- -->
|
||||
<!-- <node filter="F96C" stream="SH"/> -->
|
||||
|
||||
<node filter="FS2D5" stream="BH">
|
||||
<node filter="F96C">
|
||||
<node filter="ULP" stream="LH">
|
||||
<node filter="VLP" stream="VH"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</tree>
|
||||
<tree>
|
||||
<input name="Z1" channel="Z" location="" rate="100"/>
|
||||
<input name="N1" channel="N" location="" rate="100"/>
|
||||
<input name="E1" channel="E" location="" rate="100"/>
|
||||
<node stream="HN"/>
|
||||
</tree>
|
||||
<tree>
|
||||
<input name="T" channel="T" location="" rate="1"/>
|
||||
<input name="B" channel="B" location="" rate="1"/>
|
||||
<input name="X" channel="X" location="" rate="1"/>
|
||||
<input name="Y" channel="Y" location="" rate="1"/>
|
||||
<node stream="AE"/>
|
||||
</tree>
|
||||
</proc>
|
48
share/templates/seedlink/maram/plugins.ini.tpl
Normal file
48
share/templates/seedlink/maram/plugins.ini.tpl
Normal file
@ -0,0 +1,48 @@
|
||||
* Generated at $date - Do not edit!
|
||||
* template: $template
|
||||
|
||||
[$seedlink.source.id]
|
||||
|
||||
* Settings for maRam Weatherstation V1
|
||||
|
||||
* Station ID (network/station code is set in seedlink.ini)
|
||||
station=$seedlink.station.id
|
||||
|
||||
* Use the command 'serial_plugin -m' to find out which protocols are
|
||||
* supported.
|
||||
protocol=maram
|
||||
|
||||
* Serial port
|
||||
port=$sources.maram.comport
|
||||
|
||||
* Baud rate
|
||||
bps=$sources.maram.baudrate
|
||||
|
||||
* Time interval in minutes when weather information is logged, 0 (default)
|
||||
* means "disabled". Weather channels can be used independently of this
|
||||
* option.
|
||||
statusinterval=60
|
||||
|
||||
* Maximum number of consecutive zeros in datastream before data gap will be
|
||||
* declared (-1 = disabled).
|
||||
zero_sample_limit = -1
|
||||
|
||||
* Default timing quality in percents. This value will be used when no
|
||||
* timing quality information is available. Can be -1 to omit the blockette
|
||||
* 1001 altogether.
|
||||
default_tq = -1
|
||||
|
||||
* Keyword 'channel' is used to map input channels to symbolic channel
|
||||
* names. Channel names are arbitrary 1..10-letter identifiers which should
|
||||
* match the input names of the stream processing scheme in streams.xml,
|
||||
* which is referenced from seedlink.ini
|
||||
|
||||
* Temperature (C * 100)
|
||||
channel KI source_id=TD scale=100
|
||||
|
||||
* Humidity (%RH * 10)
|
||||
channel II source_id=HR scale=10
|
||||
|
||||
* Air Pressure (hPa * 1000)
|
||||
channel DI source_id=PR scale=1000
|
||||
|
7
share/templates/seedlink/maram/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/maram/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.maram.proc"
|
||||
|
24
share/templates/seedlink/maram/setup.py
Normal file
24
share/templates/seedlink/maram/setup.py
Normal file
@ -0,0 +1,24 @@
|
||||
'''
|
||||
Plugin handler for maRam Weatherstation V1.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
try: seedlink.param('sources.maram.comport')
|
||||
except: seedlink.setParam('sources.maram.comport', '/dev/meteo')
|
||||
|
||||
try: seedlink.param('sources.maram.baudrate')
|
||||
except: seedlink.setParam('sources.maram.baudrate', 9600)
|
||||
|
||||
try: seedlink.param('sources.maram.proc')
|
||||
except: seedlink.setParam('sources.maram.proc', 'maram')
|
||||
|
||||
return seedlink.param('sources.maram.comport')
|
||||
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
8
share/templates/seedlink/maram/streams_maram.tpl
Normal file
8
share/templates/seedlink/maram/streams_maram.tpl
Normal file
@ -0,0 +1,8 @@
|
||||
<proc name="maram">
|
||||
<tree>
|
||||
<input name="KI" channel="KI" location="" rate="1"/>
|
||||
<input name="II" channel="II" location="" rate="1"/>
|
||||
<input name="DI" channel="DI" location="" rate="1"/>
|
||||
<node stream="W"/>
|
||||
</tree>
|
||||
</proc>
|
93
share/templates/seedlink/minilogger/minilogger.prop.tpl
Normal file
93
share/templates/seedlink/minilogger/minilogger.prop.tpl
Normal file
@ -0,0 +1,93 @@
|
||||
#=========================================
|
||||
# section name (do not remove)
|
||||
[Logging]
|
||||
|
||||
|
||||
#--- Device path and name of port for USB Seismometer Interface. type=string default=/dev/usbdev1.1
|
||||
# If the specified port cannot be opened or is not a USB Seismometer Interface device, all available ports
|
||||
# will be scanned to find a USB Seismometer Interface device.
|
||||
#
|
||||
port_path_hint=$sources.minilogger.port_path_hint
|
||||
|
||||
|
||||
#--- Allow low-level setting of port interface attributes when available ports are scanned
|
||||
# to find a USB Seismometer Interface device, 0=NO, 1=Yes. type=int default=0
|
||||
# Setting 1 (=Yes) may help successful detection and correct reading of the USB Seismometer Interface device,
|
||||
# particularly for the RasberryPi (to set correct baud rate?),
|
||||
# but can have adverse effects on other devices, terminals, etc. open on the system.
|
||||
#
|
||||
allow_set_interface_attribs=$sources.minilogger.allow_set_interface_attribs
|
||||
|
||||
|
||||
#--- Sets a fixed sample rate to report in the miniseed file header. type=real; default=-1
|
||||
# The default (value < 0.0) sets an estimated sample rate based on recent packet start times.
|
||||
# This estimated sample rate will vary slightly over time, potentially producing errors in some
|
||||
# software when reading the miniseed files.
|
||||
# See also: [Station] nominal_sample_rate
|
||||
#
|
||||
# For SEISMOMETER INTERFACE (USB) (CODE: SEP 064) use:
|
||||
# nominal_sample_rate: mswrite_header_sample_rate
|
||||
# 20: 20.032 SPS
|
||||
# 40: 39.860 SPS
|
||||
# 80: 79.719 SPS
|
||||
#
|
||||
mswrite_header_sample_rate=$sources.minilogger.mswrite_header_sample_rate
|
||||
|
||||
|
||||
#--- SEED data encoding type for writing miniseed files. type=string; default=DE_INT32
|
||||
# Supported values are: DE_INT16, DE_INT32
|
||||
mswrite_data_encoding_type=DE_$sources.minilogger.mswrite_data_encoding_type
|
||||
|
||||
|
||||
|
||||
#=========================================
|
||||
# section name (do not remove)
|
||||
[Station]
|
||||
|
||||
|
||||
#--- The code representing the network this station belongs to. type=string default=UK
|
||||
#
|
||||
station_network=$seedlink.station.network
|
||||
|
||||
|
||||
#--- Descriptive name for station. Used for AmaSeis server. type=string default=TEST
|
||||
#
|
||||
station_name=$seedlink.station.code
|
||||
|
||||
|
||||
#--- The initial letters to set for the miniseed header 'channel', will be prepended to the component. type=string default=BH
|
||||
#
|
||||
channel_prefix=$sources.minilogger.channel_prefix
|
||||
|
||||
|
||||
#--- Component of seismogram, one of Z, N or E. type=string default=Z
|
||||
#
|
||||
component=$sources.minilogger.component
|
||||
|
||||
|
||||
#--- Set sample rate and gain on SEP 064 device, 0=NO, 1=Yes. type=int default=0
|
||||
#--- For SEISMOMETER INTERFACE (USB) (CODE: SEP 064) can be one of 20, 40 or 80
|
||||
#
|
||||
#
|
||||
do_settings_sep064=$sources.minilogger.do_settings_sep064
|
||||
|
||||
|
||||
#--- Nominal sample rate per second. type=int default=20
|
||||
# See also: [Logging] mswrite_header_sample_rate
|
||||
#
|
||||
#--- For SEISMOMETER INTERFACE (USB) (CODE: SEP 064) can be one of 20, 40 or 80
|
||||
#
|
||||
#
|
||||
nominal_sample_rate=$sources.minilogger.nominal_sample_rate
|
||||
|
||||
|
||||
#--- Nominal gain, one of 1, 2 or 4. type=int default=1
|
||||
#
|
||||
#--- For SEISMOMETER INTERFACE (USB) (CODE: SEP 064) can be 1, 2 or 4:
|
||||
# '1': x1 = 0.64uV/count
|
||||
# '2': x2 = 0.32uV/count
|
||||
# '4': x2 = 0.32uV/count
|
||||
#
|
||||
nominal_gain=$sources.minilogger.nominal_gain
|
||||
|
||||
|
6
share/templates/seedlink/minilogger/seedlink_plugin.tpl
Normal file
6
share/templates/seedlink/minilogger/seedlink_plugin.tpl
Normal file
@ -0,0 +1,6 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/minilogger_plugin -p $seedlink.config_dir/${seedlink.station.network}.${seedlink.station.code}.${sources.minilogger.channel_prefix}${sources.minilogger.component}.prop"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
|
49
share/templates/seedlink/minilogger/setup.py
Normal file
49
share/templates/seedlink/minilogger/setup.py
Normal file
@ -0,0 +1,49 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the minilogger plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
try: seedlink.param('sources.minilogger.port_path_hint')
|
||||
except: seedlink.setParam('sources.minilogger.port_path_hint', '/dev/ttyACM0')
|
||||
|
||||
try: seedlink.param('sources.minilogger.allow_set_interface_attribs')
|
||||
except: seedlink.setParam('sources.minilogger.allow_set_interface_attribs', 1)
|
||||
|
||||
try: seedlink.param('sources.minilogger.mswrite_header_sample_rate')
|
||||
except: seedlink.setParam('sources.minilogger.mswrite_header_sample_rate', '-1')
|
||||
|
||||
try: seedlink.param('sources.minilogger.mswrite_data_encoding_type')
|
||||
except: seedlink.setParam('sources.minilogger.mswrite_data_encoding_type', 'STEIM2')
|
||||
|
||||
try: seedlink.param('sources.minilogger.channel_prefix')
|
||||
except: seedlink.setParam('sources.minilogger.channel_prefix', 'SH')
|
||||
|
||||
try: seedlink.param('sources.minilogger.component')
|
||||
except: seedlink.setParam('sources.minilogger.component', 'Z')
|
||||
|
||||
try: seedlink.param('sources.minilogger.do_settings_sep064')
|
||||
except: seedlink.setParam('sources.minilogger.do_settings_sep064', '1')
|
||||
|
||||
try: seedlink.param('sources.minilogger.nominal_sample_rate')
|
||||
except: seedlink.setParam('sources.minilogger.nominal_sample_rate', '80')
|
||||
|
||||
try: seedlink.param('sources.minilogger.nominal_gain')
|
||||
except: seedlink.setParam('sources.minilogger.nominal_gain', '4')
|
||||
|
||||
tag = seedlink.net + "." + seedlink.sta + "." + seedlink.param('sources.minilogger.channel_prefix') + seedlink.param('sources.minilogger.component')
|
||||
|
||||
fd = open(os.path.join(seedlink.config_dir, tag + ".prop"), "w")
|
||||
fd.write(seedlink._process_template('minilogger.prop.tpl', 'minilogger'))
|
||||
fd.close()
|
||||
|
||||
return tag
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
61
share/templates/seedlink/miscScript/plugins.ini.tpl
Normal file
61
share/templates/seedlink/miscScript/plugins.ini.tpl
Normal file
@ -0,0 +1,61 @@
|
||||
* Generated at $date - Do not edit!
|
||||
* template: $template
|
||||
|
||||
[$seedlink.source.id]
|
||||
|
||||
* Settings for miscScript
|
||||
|
||||
* Station ID (network/station code is set in seedlink.ini)
|
||||
station=$seedlink.station.id
|
||||
|
||||
* Use the command 'serial_plugin -m' to find out which protocols are
|
||||
* supported.
|
||||
protocol=miscScript
|
||||
|
||||
*fake port name, for serial_plugin compatibility
|
||||
port=default
|
||||
|
||||
* specific miscScript entries
|
||||
script_path=$sources.miscScript.script_path
|
||||
script_args=$sources.miscScript.script_args
|
||||
channelsNumber=$sources.miscScript.channelsNumber
|
||||
flush_period=$sources.miscScript.flush_period
|
||||
sample_period=$sources.miscScript.sample_period
|
||||
|
||||
* lsb (defaults to 8): least significant bit (relative to 32-bit samples),
|
||||
* normally 8 for 24-bit samples, but can be set for example to 7 to get
|
||||
* 25-bit samples;
|
||||
* statusinterval (defaults to 0): time interval in minutes when "state of
|
||||
* health" information is logged, 0 means "disabled". State of health
|
||||
* channels can be used independently of this option.
|
||||
*
|
||||
* If you set 'checksum' to a wrong value then the driver will not work and
|
||||
* you will get error messages like "bad SUM segment" or "bad MOD segment".
|
||||
lsb=8
|
||||
statusinterval=60
|
||||
|
||||
* Parameter 'time_offset' contains the amount of microseconds to be added
|
||||
* to the time reported by the digitizer.
|
||||
|
||||
* 1.389 sec is possibly the correct offset if you have a version of the
|
||||
* Earth Data digitizer with external GPS unit.
|
||||
* time_offset=1389044
|
||||
|
||||
* Maximum number of consecutive zeros in datastream before data gap will be
|
||||
* declared (-1 = disabled).
|
||||
zero_sample_limit = -1
|
||||
|
||||
* Default timing quality in percents. This value will be used when no
|
||||
* timing quality information is available. Can be -1 to omit the blockette
|
||||
* 1001 altogether.
|
||||
default_tq = -1
|
||||
|
||||
* Timing quality to use when GPS is out of lock
|
||||
unlock_tq = 10
|
||||
|
||||
* Keyword 'channel' is used to map input channels to symbolic channel
|
||||
* names. Channel names are arbitrary 1..10-letter identifiers which should
|
||||
* match the input names of the stream processing scheme in streams.xml,
|
||||
* which is referenced from seedlink.ini
|
||||
|
||||
$sources.miscScript.channels
|
191
share/templates/seedlink/miscScript/scripts/MCP342X.py
Normal file
191
share/templates/seedlink/miscScript/scripts/MCP342X.py
Normal file
@ -0,0 +1,191 @@
|
||||
#!/usr/bin/python3 -u
|
||||
|
||||
# Written by Tristan DIDIER, OVSG/IPGP, 2019
|
||||
# This script is a front-end script for miscScript plugin
|
||||
# It has been, in first place, developped for and tested on BeagleBone Black
|
||||
# It aims at reading i2c data from MCP342X A/D, used for instance on ADC Pi and ADC Differential Pi Boards of ABelectronics.
|
||||
# This code is freely inspired from the example code provided by ABelectronics : https://www.abelectronics.co.uk/kb/article/10/adc-pi-on-a-beaglebone-black
|
||||
|
||||
|
||||
########## PARAMETERS ##########
|
||||
|
||||
#i2c parameters
|
||||
i2c_bus=2
|
||||
adc_addresses=[0x68,0x69]
|
||||
|
||||
#MCP342X parameters
|
||||
used_channels=4
|
||||
resolution=18
|
||||
pga_gain=1
|
||||
continuous=1
|
||||
|
||||
#Sampling parameter
|
||||
sampling_period=2
|
||||
|
||||
########## IMPORTS ##########
|
||||
|
||||
from smbus2 import SMBus
|
||||
from time import time,gmtime,strftime,sleep
|
||||
from math import ceil
|
||||
from sys import stderr
|
||||
|
||||
|
||||
########### CLASS MCP342X ##########
|
||||
|
||||
class MCP342X:
|
||||
""" class to drive ADC Pi Board from ABElectronics """
|
||||
|
||||
|
||||
rate_code={12:0x00, 14:0x01, 16:0x02, 18:0x03} #resolution to sample rate selection bits
|
||||
pga_code={1:0x00,2:0x01,4:0x02,8:0x03} #PGA gain to PGA gain selection bits
|
||||
resolutionToSPS={12:240, 14:60, 16:15, 18:3.75} #resolution to sps
|
||||
|
||||
#***** __INIT__ *****
|
||||
|
||||
def __init__(self,i2c_bus,i2c_address,resolution=18,pga_gain=1,continuous=1):
|
||||
""" Constructor : initialize object attributs"""
|
||||
|
||||
#connect i2c
|
||||
self.bus=SMBus(i2c_bus)
|
||||
|
||||
#get MCP3422 addresses
|
||||
self.i2c_address=i2c_address
|
||||
|
||||
#get MCP3422 expected answer size and generate corresponding data/sign_filter
|
||||
if resolution==18:
|
||||
self.read_size=4
|
||||
else:
|
||||
self.read_size=3
|
||||
|
||||
self.data_filter=pow(2,resolution-1)-1
|
||||
self.sign_filter=pow(2,resolution-1)
|
||||
|
||||
#Generate static configuration
|
||||
S10=MCP342X.rate_code[resolution] # Sample rate selection
|
||||
G10=MCP342X.pga_code[pga_gain] # PGA gain selection
|
||||
C10=0x00 # Channel selection
|
||||
RDI=1 # Ready bit
|
||||
OC=continuous # Continuous:1 , One-shot:0
|
||||
|
||||
self.staticConf= RDI << 7 | C10 << 5 | OC << 4 | S10 << 2 | G10
|
||||
self.currentConfig=self.staticConf
|
||||
|
||||
#***** GETADCREADING *****
|
||||
|
||||
def getAdcReading(self):
|
||||
""" Read Value. Return None no data available"""
|
||||
|
||||
adcreading = self.bus.read_i2c_block_data(self.i2c_address,self.currentConf,self.read_size)#i2c reading
|
||||
|
||||
confRead = adcreading[self.read_size-1]#Extract conf byte
|
||||
|
||||
if confRead & 128 :# and check if result is ready. If not, return None
|
||||
return None;
|
||||
|
||||
#bitarray to int
|
||||
data=0
|
||||
for i in (range(0,self.read_size-1)):
|
||||
data+=int(adcreading[i]) << 8*(self.read_size-2-i)
|
||||
|
||||
#If the result is negative, convert to negative int
|
||||
if data & self.sign_filter :
|
||||
data=-(self.sign_filter-(data & self.data_filter))
|
||||
|
||||
#Return the result
|
||||
return data
|
||||
|
||||
#***** CHANGECHANNEL *****
|
||||
|
||||
def changeChannel(self, channel):
|
||||
""" Select channel to read """
|
||||
|
||||
self.currentConf=self.staticConf | channel << 5 # generate conf byte from staticConf and channel parameter
|
||||
self.bus.write_byte(self.i2c_address,self.currentConf)
|
||||
|
||||
|
||||
##### EPRINT #####
|
||||
|
||||
def eprint(msg):
|
||||
""" print to stderr """
|
||||
print(msg,file=stderr)
|
||||
|
||||
##########################
|
||||
########## MAIN ##########
|
||||
##########################
|
||||
|
||||
if __name__=="__main__":
|
||||
|
||||
########## SETUP ###########
|
||||
|
||||
res_tab=[None]*(len(adc_addresses)*used_channels)
|
||||
|
||||
#Initialize ABelec Object
|
||||
tab_MCP342X=[];
|
||||
for adc_address in adc_addresses :
|
||||
tab_MCP342X.append(MCP342X(i2c_bus,adc_address,resolution, pga_gain, continuous))
|
||||
|
||||
#Initialize timing
|
||||
nextTime=ceil(time())
|
||||
|
||||
|
||||
########### LOOP ##########
|
||||
|
||||
while(True):
|
||||
wait=nextTime-time()
|
||||
|
||||
#***** Check time sync *****
|
||||
|
||||
if wait>0:
|
||||
if wait < sampling_period :
|
||||
sleep(wait)
|
||||
else :
|
||||
nextTime=ceil(time())
|
||||
eprint("Time to wait before next loop is greater than sampling_period : {} > {} -> New ref time defined".format(wait,sampling_period))
|
||||
continue
|
||||
else :
|
||||
nextTime=ceil(time())
|
||||
eprint("Last loop was {} seconds long while sampling_period is {} seconds -> New ref time defined".format(-wait+sampling_period,sampling_period))
|
||||
continue
|
||||
|
||||
#***** read ADCs' channels *****
|
||||
|
||||
#reset results' tab
|
||||
res_tab=[None]*(len(adc_addresses)*used_channels)
|
||||
|
||||
#Read channel by channel, in parallel on all MCP342X
|
||||
for channel in range(used_channels) :
|
||||
#Select channel on each chip
|
||||
for MCP in tab_MCP342X :
|
||||
MCP.changeChannel(channel)
|
||||
|
||||
res_counter=0
|
||||
i_MCP=0
|
||||
|
||||
while res_counter<len(adc_addresses):
|
||||
|
||||
i_res=channel+i_MCP*used_channels
|
||||
|
||||
if res_tab[i_res]==None:
|
||||
res_tab[i_res]=tab_MCP342X[i_MCP].getAdcReading()
|
||||
if res_tab[i_res]!=None:
|
||||
res_counter+=1
|
||||
|
||||
i_MCP=(i_MCP+1)%len(adc_addresses)
|
||||
|
||||
# generate ASCII frame
|
||||
frame=strftime("%Y-%m-%d %H:%M:%S", gmtime(nextTime))+','+','.join(map(str,res_tab))#+"\n"
|
||||
|
||||
# and print it on stdout
|
||||
print(frame)
|
||||
|
||||
#Set next loop start
|
||||
nextTime+=sampling_period
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
36
share/templates/seedlink/miscScript/scripts/fakeScript.py
Normal file
36
share/templates/seedlink/miscScript/scripts/fakeScript.py
Normal file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/python3 -u
|
||||
|
||||
# Simple Script example to generate fix rate ASCII frames with random data and print it on standard output
|
||||
|
||||
###
|
||||
import sys,time
|
||||
from datetime import datetime,timedelta
|
||||
import random
|
||||
|
||||
|
||||
### Parameters ###
|
||||
channels_nb=3 #How many channel do you want ?
|
||||
period_s=1 #Sample_period (second)
|
||||
period_ms=0 #Sample_period (millisecond, can be combined with period_s)
|
||||
|
||||
|
||||
try:
|
||||
|
||||
next_time=datetime.now()+timedelta(seconds=period_s,microseconds=period_ms*1000)
|
||||
|
||||
while True:
|
||||
data=""
|
||||
for i in range(channels_nb):
|
||||
data=data+","+str(int(round(random.uniform(-10000,10000),0)))
|
||||
|
||||
timeStr=datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3]
|
||||
msg=timeStr+data+"\n"
|
||||
print(msg)
|
||||
|
||||
time.sleep((next_time-datetime.now())/timedelta(seconds=1))
|
||||
next_time= next_time+timedelta(seconds=period_s,microseconds=period_ms*1000)
|
||||
|
||||
except Exception as msg:
|
||||
raise
|
||||
|
||||
|
7
share/templates/seedlink/miscScript/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/miscScript/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.miscScript.proc"
|
||||
|
122
share/templates/seedlink/miscScript/setup.py
Normal file
122
share/templates/seedlink/miscScript/setup.py
Normal file
@ -0,0 +1,122 @@
|
||||
import re
|
||||
|
||||
"""
|
||||
Plugin handler for the miscScript plugin.
|
||||
"""
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self):
|
||||
self.instances = {}
|
||||
|
||||
def push(self, seedlink):
|
||||
sta = seedlink.param("seedlink.station.id")
|
||||
|
||||
try:
|
||||
key = sta + "." + str(self.instances[sta])
|
||||
self.instances[sta] += 1
|
||||
except KeyError:
|
||||
key = sta + ".0"
|
||||
self.instances[sta] = 1
|
||||
|
||||
# Check and set defaults
|
||||
try:
|
||||
seedlink.param("sources.miscScript.script_path")
|
||||
except:
|
||||
seedlink.setParam("sources.miscScript.script_path", "")
|
||||
|
||||
try:
|
||||
seedlink.param("sources.miscScript.script_args")
|
||||
except:
|
||||
seedlink.setParam(
|
||||
"sources.miscScript.script_args", "default"
|
||||
) # If no argument, set 'default'
|
||||
|
||||
try:
|
||||
seedlink.param("sources.miscScript.proc")
|
||||
except:
|
||||
seedlink.setParam("sources.miscScript.proc", "auto")
|
||||
|
||||
try:
|
||||
seedlink.param("sources.miscScript.sample_frequency")
|
||||
except:
|
||||
seedlink.setParam("sources.miscScript.sample_frequency", "1")
|
||||
|
||||
freq = seedlink.param("sources.miscScript.sample_frequency")
|
||||
|
||||
if re.match("[0-9]+$", freq) != None:
|
||||
seedlink.setParam("sources.miscScript.sample_period", str(1.0 / int(freq)))
|
||||
else:
|
||||
res = re.match("([0-9]+)/([0-9]+)$", freq)
|
||||
if res != None:
|
||||
seedlink.setParam(
|
||||
"sources.miscScript.sample_period",
|
||||
str(float(res.group(2)) / float(res.group(1))),
|
||||
)
|
||||
else:
|
||||
print("Sample frequency invalid !!!")
|
||||
raise Exception
|
||||
|
||||
try:
|
||||
seedlink.param("sources.miscScript.channels")
|
||||
except:
|
||||
seedlink.setParam("sources.miscScript.channels", "HHZ,HHN,HHE")
|
||||
|
||||
splitted_chans = seedlink.param("sources.miscScript.channels").split(",")
|
||||
seedlink.setParam("sources.miscScript.channelsNumber", len(splitted_chans))
|
||||
|
||||
try:
|
||||
seedlink.param("sources.miscScript.flush_period")
|
||||
except:
|
||||
seedlink.setParam("sources.miscScript.flush_period", "0")
|
||||
|
||||
##### Auto-generate proc conf and channel/source_id mapping
|
||||
|
||||
if seedlink.param("sources.miscScript.proc") == "auto":
|
||||
seedlink.setParam("sources.miscScript.proc", "auto:miscScript_%s" % key)
|
||||
trees = ""
|
||||
channels = ""
|
||||
idx = 0
|
||||
|
||||
for chan in splitted_chans:
|
||||
chan = chan.strip()
|
||||
|
||||
if chan == "none":
|
||||
idx += 1
|
||||
continue
|
||||
|
||||
elif len(chan) == 3:
|
||||
location_val = "00"
|
||||
stream_val = chan[0:2]
|
||||
channel_val = chan[2]
|
||||
|
||||
elif len(chan) == 5:
|
||||
location_val = chan[0:2]
|
||||
stream_val = chan[2:4]
|
||||
channel_val = chan[4]
|
||||
|
||||
else:
|
||||
print("Invalid channel name")
|
||||
raise Exception
|
||||
|
||||
trees += " <tree>\n"
|
||||
trees += """ <input name="{}" channel="{}" location="{}" rate="{}"/>\n""".format(
|
||||
idx,
|
||||
channel_val,
|
||||
location_val,
|
||||
seedlink.param("sources.miscScript.sample_frequency"),
|
||||
)
|
||||
trees += """ <node stream="{}"/>\n""".format(stream_val)
|
||||
trees += " </tree>\n"
|
||||
|
||||
channels += "channel {} source_id={}\n".format(idx, idx)
|
||||
|
||||
idx += 1
|
||||
|
||||
seedlink.setParam("sources.miscScript.trees", trees)
|
||||
seedlink.setParam("sources.miscScript.channels", channels)
|
||||
|
||||
return key
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
2
share/templates/seedlink/miscScript/streams_auto.tpl
Normal file
2
share/templates/seedlink/miscScript/streams_auto.tpl
Normal file
@ -0,0 +1,2 @@
|
||||
<proc name="$sources.miscScript.proc">
|
||||
$sources.miscScript.trees </proc>
|
63
share/templates/seedlink/miscSerial/plugins.ini.tpl
Normal file
63
share/templates/seedlink/miscSerial/plugins.ini.tpl
Normal file
@ -0,0 +1,63 @@
|
||||
* Generated at $date - Do not edit!
|
||||
* template: $template
|
||||
|
||||
[$seedlink.source.id]
|
||||
|
||||
* Settings for miscSerial "csv" source
|
||||
|
||||
* Station ID (network/station code is set in seedlink.ini)
|
||||
station=$seedlink.station.id
|
||||
|
||||
* Use the command 'serial_plugin -m' to find out which protocols are
|
||||
* supported.
|
||||
protocol=miscSerial
|
||||
|
||||
* Serial port
|
||||
port=$sources.miscSerial.comport
|
||||
|
||||
* Baud rate
|
||||
bps=$sources.miscSerial.baudrate
|
||||
|
||||
* specific miscSerial entries
|
||||
channelsNumber=$sources.miscSerial.channelsNumber
|
||||
flush_period=$sources.miscSerial.flush_period
|
||||
sample_period=$sources.miscSerial.sample_period
|
||||
serial_clock_period=$sources.miscSerial.serial_clock_period
|
||||
|
||||
* lsb (defaults to 8): least significant bit (relative to 32-bit samples),
|
||||
* normally 8 for 24-bit samples, but can be set for example to 7 to get
|
||||
* 25-bit samples;
|
||||
* statusinterval (defaults to 0): time interval in minutes when "state of
|
||||
* health" information is logged, 0 means "disabled". State of health
|
||||
* channels can be used independently of this option.
|
||||
*
|
||||
* If you set 'checksum' to a wrong value then the driver will not work and
|
||||
* you will get error messages like "bad SUM segment" or "bad MOD segment".
|
||||
lsb=8
|
||||
statusinterval=60
|
||||
|
||||
* Parameter 'time_offset' contains the amount of microseconds to be added
|
||||
* to the time reported by the digitizer.
|
||||
|
||||
* 1.389 sec is possibly the correct offset if you have a version of the
|
||||
* Earth Data digitizer with external GPS unit.
|
||||
* time_offset=1389044
|
||||
|
||||
* Maximum number of consecutive zeros in datastream before data gap will be
|
||||
* declared (-1 = disabled).
|
||||
zero_sample_limit = -1
|
||||
|
||||
* Default timing quality in percents. This value will be used when no
|
||||
* timing quality information is available. Can be -1 to omit the blockette
|
||||
* 1001 altogether.
|
||||
default_tq = -1
|
||||
|
||||
* Timing quality to use when GPS is out of lock
|
||||
unlock_tq = 10
|
||||
|
||||
* Keyword 'channel' is used to map input channels to symbolic channel
|
||||
* names. Channel names are arbitrary 1..10-letter identifiers which should
|
||||
* match the input names of the stream processing scheme in streams.xml,
|
||||
* which is referenced from seedlink.ini
|
||||
|
||||
$sources.miscSerial.channels
|
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/python3 -u
|
||||
|
||||
# Simple Script to generate fix rate ASCII frames and send it througth a serial port
|
||||
# pyserial library have to be installed installed first (https://github.com/pyserial/pyserial)
|
||||
# For testing, you can use socat to get virtual serial ports :
|
||||
# socat -d -d pty,raw,echo=0 pty,raw,echo=0
|
||||
|
||||
###
|
||||
import serial
|
||||
import sys,time
|
||||
from datetime import datetime,timedelta
|
||||
import random
|
||||
|
||||
### Parameters ###
|
||||
channels_nb=3 #How many channnel do you want
|
||||
port="/dev/ttyUSB0" #Serial port used by this script to output data
|
||||
ser_speed=9600 #Serial port speed
|
||||
period_s=1 #Sample Period (second)
|
||||
period_ms=0 #Sample Period (millisecond, can be combined with period_s)
|
||||
|
||||
|
||||
try:
|
||||
|
||||
ser=serial.Serial(port,ser_speed,rtscts=0)
|
||||
next_time=datetime.now()+timedelta(seconds=period_s,microseconds=period_ms*1000)
|
||||
|
||||
while True:
|
||||
data=""
|
||||
for i in range(channels_nb):
|
||||
data=data+","+str(round(random.uniform(-10000,10000),0))
|
||||
timeStr=datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3]
|
||||
msg=timeStr+data+"\n"
|
||||
print(msg)
|
||||
ser.write(msg.encode())
|
||||
|
||||
time.sleep((next_time-datetime.now())/timedelta(seconds=1))
|
||||
next_time= next_time+timedelta(seconds=period_s,microseconds=period_ms*1000)
|
||||
|
||||
except Exception as msg:
|
||||
raise
|
||||
|
||||
finally:
|
||||
ser.close()
|
7
share/templates/seedlink/miscSerial/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/miscSerial/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.miscSerial.proc"
|
||||
|
125
share/templates/seedlink/miscSerial/setup.py
Normal file
125
share/templates/seedlink/miscSerial/setup.py
Normal file
@ -0,0 +1,125 @@
|
||||
import re
|
||||
|
||||
"""
|
||||
Plugin handler for the miscSerial plugin.
|
||||
"""
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self):
|
||||
self.instances = {}
|
||||
|
||||
def push(self, seedlink):
|
||||
sta = seedlink.param("seedlink.station.id")
|
||||
|
||||
try:
|
||||
key = sta + "." + str(self.instances[sta])
|
||||
self.instances[sta] += 1
|
||||
except KeyError:
|
||||
key = sta + ".0"
|
||||
self.instances[sta] = 1
|
||||
|
||||
# Check and set defaults
|
||||
try:
|
||||
seedlink.param("sources.miscSerial.comport")
|
||||
except:
|
||||
seedlink.setParam("sources.miscSerial.comport", "/dev/data")
|
||||
|
||||
try:
|
||||
seedlink.param("sources.miscSerial.baudrate")
|
||||
except:
|
||||
seedlink.setParam("sources.miscSerial.baudrate", 9600)
|
||||
|
||||
try:
|
||||
seedlink.param("sources.miscSerial.proc")
|
||||
except:
|
||||
seedlink.setParam("sources.miscSerial.proc", "auto")
|
||||
|
||||
try:
|
||||
seedlink.param("sources.miscSerial.sample_frequency")
|
||||
except:
|
||||
seedlink.setParam("sources.miscSerial.sample_frequency", "1")
|
||||
|
||||
freq = seedlink.param("sources.miscSerial.sample_frequency")
|
||||
|
||||
if re.match("[0-9]+$", freq) != None:
|
||||
seedlink.setParam("sources.miscSerial.sample_period", str(1.0 / int(freq)))
|
||||
else:
|
||||
res = re.match("([0-9]+)/([0-9]+)$", freq)
|
||||
if res != None:
|
||||
seedlink.setParam(
|
||||
"sources.miscSerial.sample_period",
|
||||
str(float(res.group(2)) / float(res.group(1))),
|
||||
)
|
||||
else:
|
||||
print("Sample frequency invalid !!!")
|
||||
raise Exception
|
||||
|
||||
try:
|
||||
seedlink.param("sources.miscSerial.channels")
|
||||
except:
|
||||
seedlink.setParam("sources.miscSerial.channels", "HHZ,HHN,HHE")
|
||||
|
||||
splitted_chans = seedlink.param("sources.miscSerial.channels").split(",")
|
||||
seedlink.setParam("sources.miscSerial.channelsNumber", len(splitted_chans))
|
||||
|
||||
try:
|
||||
seedlink.param("sources.miscSerial.flush_period")
|
||||
except:
|
||||
seedlink.setParam("sources.miscSerial.flush_period", "0")
|
||||
|
||||
try:
|
||||
seedlink.param("sources.miscSerial.serial_clock_period")
|
||||
except:
|
||||
seedlink.setParam("sources.miscSerial.serial_clock_period", "0")
|
||||
|
||||
##### Auto-generate proc conf and channel/source_id mapping
|
||||
|
||||
if seedlink.param("sources.miscSerial.proc") == "auto":
|
||||
seedlink.setParam("sources.miscSerial.proc", "auto:miscSerial_%s" % key)
|
||||
trees = ""
|
||||
channels = ""
|
||||
idx = 0
|
||||
|
||||
for chan in splitted_chans:
|
||||
chan = chan.strip()
|
||||
|
||||
if chan == "none":
|
||||
idx += 1
|
||||
continue
|
||||
|
||||
elif len(chan) == 3:
|
||||
location_val = "00"
|
||||
stream_val = chan[0:2]
|
||||
channel_val = chan[2]
|
||||
|
||||
elif len(chan) == 5:
|
||||
location_val = chan[0:2]
|
||||
stream_val = chan[2:4]
|
||||
channel_val = chan[4]
|
||||
|
||||
else:
|
||||
print("Invalid channel name")
|
||||
raise Exception
|
||||
|
||||
trees += " <tree>\n"
|
||||
trees += """ <input name="{}" channel="{}" location="{}" rate="{}"/>\n""".format(
|
||||
idx,
|
||||
channel_val,
|
||||
location_val,
|
||||
seedlink.param("sources.miscSerial.sample_frequency"),
|
||||
)
|
||||
trees += """ <node stream="{}"/>\n""".format(stream_val)
|
||||
trees += " </tree>\n"
|
||||
|
||||
channels += "channel {} source_id={}\n".format(idx, idx)
|
||||
|
||||
idx += 1
|
||||
|
||||
seedlink.setParam("sources.miscSerial.trees", trees)
|
||||
seedlink.setParam("sources.miscSerial.channels", channels)
|
||||
|
||||
return key
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
2
share/templates/seedlink/miscSerial/streams_auto.tpl
Normal file
2
share/templates/seedlink/miscSerial/streams_auto.tpl
Normal file
@ -0,0 +1,2 @@
|
||||
<proc name="$sources.miscSerial.proc">
|
||||
$sources.miscSerial.trees </proc>
|
7
share/templates/seedlink/mk6/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/mk6/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd = "/umss/source/umsseedl"
|
||||
timeout = 0
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.mk6.proc"
|
||||
|
16
share/templates/seedlink/mk6/setup.py
Normal file
16
share/templates/seedlink/mk6/setup.py
Normal file
@ -0,0 +1,16 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the MK6 plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
return seedlink.net + "." + seedlink.sta
|
||||
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
57
share/templates/seedlink/mppt/plugins.ini.tpl
Normal file
57
share/templates/seedlink/mppt/plugins.ini.tpl
Normal file
@ -0,0 +1,57 @@
|
||||
* Generated at $date - Do not edit!
|
||||
* template: $template
|
||||
|
||||
[$seedlink.source.id]
|
||||
|
||||
* Settings for SunSaver MPPT
|
||||
|
||||
* Station ID (network/station code is set in seedlink.ini)
|
||||
station=$seedlink.station.id
|
||||
|
||||
* Use the command 'serial_plugin -m' to find out which protocols are
|
||||
* supported.
|
||||
protocol=modbus
|
||||
|
||||
* Serial port
|
||||
port=tcp://$sources.mppt.address:$sources.mppt.port
|
||||
|
||||
* Baud rate
|
||||
bps=0
|
||||
|
||||
* Time interval in minutes when status information is logged, 0 (default)
|
||||
* means "disabled". Status channels can be used independently of this
|
||||
* option.
|
||||
statusinterval=60
|
||||
|
||||
* Maximum number of consecutive zeros in datastream before data gap will be
|
||||
* declared (-1 = disabled).
|
||||
zero_sample_limit = -1
|
||||
|
||||
* Default timing quality in percents. This value will be used when no
|
||||
* timing quality information is available. Can be -1 to omit the blockette
|
||||
* 1001 altogether.
|
||||
default_tq = -1
|
||||
|
||||
* Modbus base address
|
||||
baseaddr = 8
|
||||
|
||||
* Keyword 'channel' is used to map input channels to symbolic channel
|
||||
* names. Channel names are arbitrary 1..10-letter identifiers which should
|
||||
* match the input names of the stream processing scheme in streams.xml,
|
||||
* which is referenced from seedlink.ini
|
||||
|
||||
* Battery voltage
|
||||
channel SA source_id=${sources.mppt.unit_id}.${sources.mppt.channels.a.sid} realscale=0.003052 realunit=V precision=2
|
||||
|
||||
* Array voltage
|
||||
channel SB source_id=${sources.mppt.unit_id}.${sources.mppt.channels.b.sid} realscale=0.003052 realunit=V precision=2
|
||||
|
||||
* Load voltage
|
||||
channel SC source_id=${sources.mppt.unit_id}.${sources.mppt.channels.c.sid} realscale=0.003052 realunit=V precision=2
|
||||
|
||||
* Charging current
|
||||
channel SD source_id=${sources.mppt.unit_id}.${sources.mppt.channels.d.sid} realscale=0.002416 realunit=A precision=2
|
||||
|
||||
* Load current
|
||||
channel SE source_id=${sources.mppt.unit_id}.${sources.mppt.channels.e.sid} realscale=0.002416 realunit=A precision=2
|
||||
|
7
share/templates/seedlink/mppt/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/mppt/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd = "$pkgroot/share/plugins/seedlink/serial_plugin$seedlink._daemon_opt -v -f $pkgroot/var/lib/seedlink/plugins.ini"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.mppt.proc"
|
||||
|
40
share/templates/seedlink/mppt/setup.py
Normal file
40
share/templates/seedlink/mppt/setup.py
Normal file
@ -0,0 +1,40 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for SunSaver MPPT.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
address = 'localhost'
|
||||
try: address = seedlink.param('sources.mppt.address')
|
||||
except: seedlink.setParam('sources.mppt.address', address)
|
||||
|
||||
port = 502
|
||||
try: port = int(seedlink.param('sources.mppt.port'))
|
||||
except: seedlink.setParam('sources.mppt.port', port)
|
||||
|
||||
try: int(seedlink.param('sources.mppt.unit_id'))
|
||||
except: seedlink.setParam('sources.mppt.unit_id', 1)
|
||||
|
||||
try: seedlink.param('sources.mppt.proc')
|
||||
except: seedlink.setParam('sources.mppt.proc', 'mppt')
|
||||
|
||||
try:
|
||||
mppt_chan = dict(zip(seedlink.param('sources.mppt.channels').lower().split(','), range(26)))
|
||||
|
||||
except:
|
||||
mppt_chan = dict()
|
||||
|
||||
for letter in range(ord('a'), ord('z') + 1):
|
||||
try: seedlink.param('sources.mppt.channels.%s.sid' % chr(letter))
|
||||
except: seedlink.setParam('sources.mppt.channels.%s.sid' % chr(letter), mppt_chan.get(chr(letter), 256))
|
||||
|
||||
return address + ':' + str(port)
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
10
share/templates/seedlink/mppt/streams_mppt.tpl
Normal file
10
share/templates/seedlink/mppt/streams_mppt.tpl
Normal file
@ -0,0 +1,10 @@
|
||||
<proc name="mppt">
|
||||
<tree>
|
||||
<input name="SA" channel="A" location="" rate="1/10"/>
|
||||
<input name="SB" channel="B" location="" rate="1/10"/>
|
||||
<input name="SC" channel="C" location="" rate="1/10"/>
|
||||
<input name="SD" channel="D" location="" rate="1/10"/>
|
||||
<input name="SE" channel="E" location="" rate="1/10"/>
|
||||
<node stream="AE"/>
|
||||
</tree>
|
||||
</proc>
|
6
share/templates/seedlink/mseedfifo/seedlink_plugin.tpl
Normal file
6
share/templates/seedlink/mseedfifo/seedlink_plugin.tpl
Normal file
@ -0,0 +1,6 @@
|
||||
* template: $template
|
||||
plugin mseedfifo cmd="$seedlink.plugin_dir/mseedfifo_plugin$seedlink._daemon_opt -v $plugins.mseedfifo.noexit_param -d $plugins.mseedfifo.fifo_param"
|
||||
timeout = 0
|
||||
start_retry = 1
|
||||
shutdown_wait = 10
|
||||
|
41
share/templates/seedlink/mseedfifo/setup.py
Normal file
41
share/templates/seedlink/mseedfifo/setup.py
Normal file
@ -0,0 +1,41 @@
|
||||
'''
|
||||
Plugin handler for the mseedfifo plugin.
|
||||
'''
|
||||
|
||||
try:
|
||||
import seiscomp.system
|
||||
hasSystem = True
|
||||
except:
|
||||
hasSystem = False
|
||||
|
||||
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
address = "%s/%s" % (seedlink.run_dir,'mseedfifo')
|
||||
try:
|
||||
address = seedlink.param('plugins.mseedfifo.fifo', False)
|
||||
if hasSystem:
|
||||
e = seiscomp.system.Environment.Instance()
|
||||
address = e.absolutePath(address)
|
||||
except:
|
||||
address = "%s/%s" % (seedlink.run_dir,'mseedfifo')
|
||||
|
||||
seedlink.setParam('plugins.mseedfifo.fifo_param', address, False)
|
||||
|
||||
noexit = ''
|
||||
try:
|
||||
noexit = seedlink.param('plugins.mseedfifo.noexit', False).lower() in ("yes", "true", "1")
|
||||
if noexit:
|
||||
noexit = ' -n '
|
||||
else:
|
||||
noexit = ''
|
||||
except: noexit = ''
|
||||
seedlink.setParam('plugins.mseedfifo.noexit_param', noexit, False)
|
||||
|
||||
def flush(self, seedlink):
|
||||
self.push(seedlink)
|
6
share/templates/seedlink/mseedscan/seedlink_plugin.tpl
Normal file
6
share/templates/seedlink/mseedscan/seedlink_plugin.tpl
Normal file
@ -0,0 +1,6 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd="$seedlink.plugin_dir/mseedscan_plugin -v -N -d $sources.mseedscan.dir -x $pkgroot/var/lib/seedlink/${seedlink.source.id}.seq"
|
||||
timeout = 1200
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
|
21
share/templates/seedlink/mseedscan/setup.py
Normal file
21
share/templates/seedlink/mseedscan/setup.py
Normal file
@ -0,0 +1,21 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the liss plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
dir = os.path.join(seedlink.config_dir, "indata")
|
||||
try: address = seedlink.param('sources.mseedscan.dir')
|
||||
except: seedlink.setParam('sources.mseedscan.dir', dir)
|
||||
|
||||
# key is directory
|
||||
return dir
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
48
share/templates/seedlink/mws/plugins.ini.tpl
Normal file
48
share/templates/seedlink/mws/plugins.ini.tpl
Normal file
@ -0,0 +1,48 @@
|
||||
* Generated at $date - Do not edit!
|
||||
* template: $template
|
||||
|
||||
[$seedlink.source.id]
|
||||
|
||||
* Settings for Reinhardt weather station (GITEWS)
|
||||
|
||||
* Station ID (network/station code is set in seedlink.ini)
|
||||
station=$seedlink.station.id
|
||||
|
||||
* Use the command 'serial_plugin -m' to find out which protocols are
|
||||
* supported.
|
||||
protocol=mws
|
||||
|
||||
* Serial port
|
||||
port=$sources.mws.comport
|
||||
|
||||
* Baud rate
|
||||
bps=$sources.mws.baudrate
|
||||
|
||||
* Time interval in minutes when weather information is logged, 0 (default)
|
||||
* means "disabled". Weather channels can be used independently of this
|
||||
* option.
|
||||
statusinterval=60
|
||||
|
||||
* Maximum number of consecutive zeros in datastream before data gap will be
|
||||
* declared (-1 = disabled).
|
||||
zero_sample_limit = -1
|
||||
|
||||
* Default timing quality in percents. This value will be used when no
|
||||
* timing quality information is available. Can be -1 to omit the blockette
|
||||
* 1001 altogether.
|
||||
default_tq = -1
|
||||
|
||||
* Keyword 'channel' is used to map input channels to symbolic channel
|
||||
* names. Channel names are arbitrary 1..10-letter identifiers which should
|
||||
* match the input names of the stream processing scheme in streams.xml,
|
||||
* which is referenced from seedlink.ini
|
||||
|
||||
* Indoor Temperature (C * 100)
|
||||
channel KI source_id=TE scale=100
|
||||
|
||||
* Indoor Humidity (%)
|
||||
channel II source_id=FE scale=1
|
||||
|
||||
* Air Pressure (hPa * 10)
|
||||
channel DI source_id=DR scale=10
|
||||
|
7
share/templates/seedlink/mws/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/mws/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.mws.proc"
|
||||
|
26
share/templates/seedlink/mws/setup.py
Normal file
26
share/templates/seedlink/mws/setup.py
Normal file
@ -0,0 +1,26 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the MWS plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
try: seedlink.param('sources.mws.comport')
|
||||
except: seedlink.setParam('sources.mws.comport', '/dev/weatherstation')
|
||||
|
||||
try: seedlink.param('sources.mws.baudrate')
|
||||
except: seedlink.setParam('sources.mws.baudrate', 19200)
|
||||
|
||||
try: seedlink.param('sources.mws.proc')
|
||||
except: seedlink.setParam('sources.mws.proc', 'mws')
|
||||
|
||||
return seedlink.param('sources.mws.comport')
|
||||
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
8
share/templates/seedlink/mws/streams_mws.tpl
Normal file
8
share/templates/seedlink/mws/streams_mws.tpl
Normal file
@ -0,0 +1,8 @@
|
||||
<proc name="mws">
|
||||
<tree>
|
||||
<input name="KI" channel="KI" location="" rate="1"/>
|
||||
<input name="II" channel="II" location="" rate="1"/>
|
||||
<input name="DI" channel="DI" location="" rate="1"/>
|
||||
<node stream="W"/>
|
||||
</tree>
|
||||
</proc>
|
7
share/templates/seedlink/naqs/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/naqs/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd="$seedlink.plugin_dir/naqs_plugin -v -t 300 -n $sources.naqs.address -N $seedlink.station.network -p $sources.naqs.port -c $sources.naqs.channels"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.naqs.proc"
|
||||
|
33
share/templates/seedlink/naqs/setup.py
Normal file
33
share/templates/seedlink/naqs/setup.py
Normal file
@ -0,0 +1,33 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the NRTS plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self):
|
||||
self.__channels = set()
|
||||
pass
|
||||
|
||||
def push(self, seedlink):
|
||||
address = "localhost"
|
||||
try: address = seedlink.param('sources.naqs.address')
|
||||
except: seedlink.setParam('sources.naqs.address', address)
|
||||
|
||||
port = 28000
|
||||
try: port = int(seedlink.param('sources.naqs.port'))
|
||||
except: seedlink.setParam('sources.naqs.port', port)
|
||||
|
||||
try: seedlink.param('sources.naqs.proc')
|
||||
except: seedlink.setParam('sources.naqs.proc', 'naqs_bb40_sm100')
|
||||
|
||||
self.__channels.add(seedlink.param('seedlink.station.code'))
|
||||
seedlink.setParam('sources.naqs.channels', ",".join(self.__channels))
|
||||
|
||||
# Key is address and network code
|
||||
return (address + ":" + str(port), seedlink.param('seedlink.station.network'))
|
||||
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
28
share/templates/seedlink/naqs/streams_naqs_bb40_sm100.tpl
Normal file
28
share/templates/seedlink/naqs/streams_naqs_bb40_sm100.tpl
Normal file
@ -0,0 +1,28 @@
|
||||
<proc name="naqs_bb40">
|
||||
<tree>
|
||||
<input name="BHZ" channel="Z" location="" rate="40"/>
|
||||
<input name="BHN" channel="N" location="" rate="40"/>
|
||||
<input name="BHE" channel="E" location="" rate="40"/>
|
||||
<node stream="SH"/>
|
||||
<node filter="F96C" stream="BH">
|
||||
<node filter="F96C">
|
||||
<node filter="ULP" stream="LH">
|
||||
<node filter="VLP" stream="VH"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</tree>
|
||||
</proc>
|
||||
<proc name="naqs_sm100">
|
||||
<tree>
|
||||
<input name="ACZ" channel="Z" location="" rate="100"/>
|
||||
<input name="ACN" channel="N" location="" rate="100"/>
|
||||
<input name="ACE" channel="E" location="" rate="100"/>
|
||||
<node stream="SL"/>
|
||||
</tree>
|
||||
</proc>
|
||||
<proc name="naqs_bb40_sm100">
|
||||
<using proc="naqs_bb40"/>
|
||||
<using proc="naqs_sm100"/>
|
||||
</proc>
|
||||
|
7
share/templates/seedlink/nmxp/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/nmxp/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd="$seedlink.plugin_dir/nmxptool -H $sources.nmxp.address -P $sources.nmxp.port -S $sources.nmxp.short_term_completion -M $sources.nmxp.max_latency$sources.nmxp.additional_options -k"
|
||||
timeout = 0
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.nmxp.proc"
|
||||
|
44
share/templates/seedlink/nmxp/setup.py
Normal file
44
share/templates/seedlink/nmxp/setup.py
Normal file
@ -0,0 +1,44 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the nmxptool plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
address = "idahub.ucsd.edu"
|
||||
try: address = seedlink.param('sources.nmxp.address')
|
||||
except: seedlink.setParam('sources.nmxp.address', address)
|
||||
|
||||
port = 28000
|
||||
try: port = int(seedlink.param('sources.nmxp.port'))
|
||||
except: seedlink.setParam('sources.nmxp.port', port)
|
||||
|
||||
max_latency = 300
|
||||
try: max_latency = int(seedlink.param('sources.nmxp.max_latency'))
|
||||
except: seedlink.setParam('sources.nmxp.max_latency', max_latency)
|
||||
|
||||
short_term_completion = -1
|
||||
try: short_term_completion = int(seedlink.param('sources.nmxp.short_term_completion'))
|
||||
except: seedlink.setParam('sources.nmxp.short_term_completion', short_term_completion)
|
||||
|
||||
try: seedlink.param('sources.nmxp.proc')
|
||||
except: seedlink.setParam('sources.nmxp.proc', 'naqs_bb40_sm100')
|
||||
|
||||
additional_options = ""
|
||||
try: additional_options = " " + seedlink.param('sources.nmxp.additional_options')
|
||||
except: pass
|
||||
|
||||
seedlink.setParam('sources.nmxp.additional_options', additional_options)
|
||||
|
||||
# Key is address (one instance per address)
|
||||
return address + ":" + str(port)
|
||||
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
28
share/templates/seedlink/nmxp/streams_naqs_bb40_sm100.tpl
Normal file
28
share/templates/seedlink/nmxp/streams_naqs_bb40_sm100.tpl
Normal file
@ -0,0 +1,28 @@
|
||||
<proc name="naqs_bb40">
|
||||
<tree>
|
||||
<input name="BHZ" channel="Z" location="" rate="40"/>
|
||||
<input name="BHN" channel="N" location="" rate="40"/>
|
||||
<input name="BHE" channel="E" location="" rate="40"/>
|
||||
<node stream="SH"/>
|
||||
<node filter="F96C" stream="BH">
|
||||
<node filter="F96C">
|
||||
<node filter="ULP" stream="LH">
|
||||
<node filter="VLP" stream="VH"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</tree>
|
||||
</proc>
|
||||
<proc name="naqs_sm100">
|
||||
<tree>
|
||||
<input name="ACZ" channel="Z" location="" rate="100"/>
|
||||
<input name="ACN" channel="N" location="" rate="100"/>
|
||||
<input name="ACE" channel="E" location="" rate="100"/>
|
||||
<node stream="SL"/>
|
||||
</tree>
|
||||
</proc>
|
||||
<proc name="naqs_bb40_sm100">
|
||||
<using proc="naqs_bb40"/>
|
||||
<using proc="naqs_sm100"/>
|
||||
</proc>
|
||||
|
7
share/templates/seedlink/optodas/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/optodas/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/optodas_plugin -a '$sources.optodas.address' -r $sources.optodas.sampleRate -g $sources.optodas.gain -n '$sources.optodas.networkCode' -s '$sources.optodas.stationCode'"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.optodas.proc"
|
||||
|
43
share/templates/seedlink/optodas/setup.py
Normal file
43
share/templates/seedlink/optodas/setup.py
Normal file
@ -0,0 +1,43 @@
|
||||
"""
|
||||
Plugin handler for the OptoDAS plugin.
|
||||
"""
|
||||
class SeedlinkPluginHandler:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def push(self, seedlink):
|
||||
try: seedlink.param("sources.optodas.address")
|
||||
except: seedlink.setParam("sources.optodas.address", "tcp://localhost:3333")
|
||||
|
||||
try: seedlink.param("sources.optodas.sampleRate")
|
||||
except: seedlink.setParam("sources.optodas.sampleRate", "100")
|
||||
|
||||
try: seedlink.param("sources.optodas.gain")
|
||||
except: seedlink.setParam("sources.optodas.gain", "1.0")
|
||||
|
||||
try: seedlink.param("sources.optodas.networkCode")
|
||||
except: seedlink.setParam("sources.optodas.networkCode", "XX")
|
||||
|
||||
try: seedlink.param("sources.optodas.stationCode")
|
||||
except: seedlink.setParam("sources.optodas.stationCode", "{channel:05d}")
|
||||
|
||||
try: seedlink.param("sources.optodas.locationCode")
|
||||
except: seedlink.setParam("sources.optodas.locationCode", "")
|
||||
|
||||
try: seedlink.param("sources.optodas.channelCode")
|
||||
except: seedlink.setParam("sources.optodas.channelCode", "HSF")
|
||||
|
||||
try: seedlink.param("sources.optodas.proc")
|
||||
except: seedlink.setParam("sources.optodas.proc", "auto")
|
||||
|
||||
if seedlink.param("sources.optodas.proc") == "auto":
|
||||
seedlink.setParam("sources.optodas.proc", "auto:optodas_%s_%s_%s" % (
|
||||
seedlink.param("sources.optodas.locationCode"),
|
||||
seedlink.param("sources.optodas.channelCode"),
|
||||
seedlink.param("sources.optodas.sampleRate")))
|
||||
|
||||
return seedlink.param("sources.optodas.address")
|
||||
|
||||
def flush(self, seedlink):
|
||||
pass
|
||||
|
6
share/templates/seedlink/optodas/streams_auto.tpl
Normal file
6
share/templates/seedlink/optodas/streams_auto.tpl
Normal file
@ -0,0 +1,6 @@
|
||||
<proc name="$sources.optodas.proc">
|
||||
<tree>
|
||||
<input name="X" channel="" location="$sources.optodas.locationCode" rate="$sources.optodas.sampleRate"/>
|
||||
<node stream="$sources.optodas.channelCode"/>
|
||||
</tree>
|
||||
</proc>
|
79
share/templates/seedlink/ps2400_eth/plugins.ini.tpl
Normal file
79
share/templates/seedlink/ps2400_eth/plugins.ini.tpl
Normal file
@ -0,0 +1,79 @@
|
||||
* Generated at $date - Do not edit!
|
||||
* template: $template
|
||||
|
||||
[$seedlink.source.id]
|
||||
|
||||
* Settings for the Earth Data PS2400/PS6-24 digitizer (firmware >= 2.23)
|
||||
|
||||
* Station ID (network/station code is set in seedlink.ini)
|
||||
station=$seedlink.station.id
|
||||
|
||||
* Use the command 'serial_plugin -m' to find out which protocols are
|
||||
* supported.
|
||||
protocol=edata_r
|
||||
|
||||
* Port can be a serial port, pipe or "tcp://ip:port"
|
||||
port=tcp://$sources.ps2400_eth.address:$sources.ps2400_eth.port
|
||||
|
||||
* Baud rate is only meaningful for a serial port.
|
||||
bps=0
|
||||
|
||||
* lsb (defaults to 8): least significant bit (relative to 32-bit samples),
|
||||
* normally 8 for 24-bit samples, but can be set for example to 7 to get
|
||||
* 25-bit samples;
|
||||
* statusinterval (defaults to 0): time interval in minutes when "state of
|
||||
* health" information is logged, 0 means "disabled". State of health
|
||||
* channels can be used independently of this option.
|
||||
lsb=8
|
||||
statusinterval=60
|
||||
|
||||
* Parameter 'time_offset' contains the amount of microseconds to be added
|
||||
* to the time reported by the digitizer.
|
||||
|
||||
* 1.389 sec is possibly the correct offset if you have a version of the
|
||||
* Earth Data digitizer with external GPS unit.
|
||||
* time_offset=1389044
|
||||
|
||||
* Maximum number of consecutive zeros in datastream before data gap will be
|
||||
* declared (-1 = disabled).
|
||||
zero_sample_limit = -1
|
||||
|
||||
* Default timing quality in percents. This value will be used when no
|
||||
* timing quality information is available. Can be -1 to omit the blockette
|
||||
* 1001 altogether.
|
||||
default_tq = 0
|
||||
|
||||
* Timing quality to use when GPS is out of lock
|
||||
unlock_tq = 10
|
||||
|
||||
* Keyword 'channel' is used to map input channels to symbolic channel
|
||||
* names. Channel names are arbitrary 1..10-letter identifiers which should
|
||||
* match the input names of the stream processing scheme in streams.xml,
|
||||
* which is referenced from seedlink.ini
|
||||
|
||||
|
||||
channel Z source_id=0
|
||||
channel N source_id=1
|
||||
channel E source_id=2
|
||||
|
||||
channel Z1 source_id=3
|
||||
channel N1 source_id=4
|
||||
channel E1 source_id=5
|
||||
|
||||
* "State of health" channels (1 sps) have source IDs 6...19.
|
||||
* Which Mini-SEED streams (if any) are created from these channels
|
||||
* depends on the stream processing scheme.
|
||||
|
||||
channel S1 source_id=6
|
||||
channel S2 source_id=7
|
||||
channel S3 source_id=8
|
||||
channel S4 source_id=9
|
||||
channel S5 source_id=10
|
||||
channel S6 source_id=11
|
||||
channel S7 source_id=12
|
||||
channel S8 source_id=13
|
||||
|
||||
* Channel 20 records the phase difference between the incoming GPS 1pps
|
||||
* signal and the internal one second mark. One unit is 333 us.
|
||||
|
||||
channel PLL source_id=20
|
7
share/templates/seedlink/ps2400_eth/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/ps2400_eth/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/serial_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini"
|
||||
timeout = 600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.ps2400_eth.proc"
|
||||
|
30
share/templates/seedlink/ps2400_eth/setup.py
Normal file
30
share/templates/seedlink/ps2400_eth/setup.py
Normal file
@ -0,0 +1,30 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the EarthData PS6-24 plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
try: seedlink.param('sources.ps2400_eth.address')
|
||||
except: seedlink.setParam('sources.ps2400_eth.address', '127.0.0.1')
|
||||
|
||||
try: seedlink.param('sources.ps2400_eth.port')
|
||||
except: seedlink.setParam('sources.ps2400_eth.port', 1411)
|
||||
|
||||
try: proc = seedlink.param('sources.ps2400_eth.proc')
|
||||
except: seedlink.setParam('sources.ps2400_eth.proc', 'ps2400_eth_edata_100')
|
||||
|
||||
# Key is per station and configuration settings
|
||||
key = ";".join([
|
||||
str(seedlink.param('sources.ps2400_eth.address')),
|
||||
str(seedlink.param('sources.ps2400_eth.port'))])
|
||||
return key
|
||||
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
@ -0,0 +1,47 @@
|
||||
<proc name="ps2400_eth_edata_100">
|
||||
<tree>
|
||||
<input name="Z" channel="Z" location="" rate="100"/>
|
||||
<input name="N" channel="N" location="" rate="100"/>
|
||||
<input name="E" channel="E" location="" rate="100"/>
|
||||
|
||||
<!-- Uncomment this to enable 100Hz HH? streams -->
|
||||
<!-- -->
|
||||
<!-- <node stream="HH"/> -->
|
||||
|
||||
<!-- Uncomment this to enable 50Hz SH? streams -->
|
||||
<!-- -->
|
||||
<!-- <node filter="F96C" stream="SH"/> -->
|
||||
|
||||
<node filter="FS2D5" stream="BH">
|
||||
<node filter="F96C">
|
||||
<node filter="ULP" stream="LH">
|
||||
<node filter="VLP" stream="VH"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</tree>
|
||||
<tree>
|
||||
<input name="Z1" channel="Z" location="" rate="100"/>
|
||||
<input name="N1" channel="N" location="" rate="100"/>
|
||||
<input name="E1" channel="E" location="" rate="100"/>
|
||||
|
||||
<!-- Uncomment this to enable 100Hz HN? streams -->
|
||||
<!-- -->
|
||||
<!-- <node stream="HN"/> -->
|
||||
|
||||
<node filter="F96C" stream="SN"/>
|
||||
</tree>
|
||||
<tree>
|
||||
<input name="S1" channel="1" location="" rate="1"/>
|
||||
<input name="S2" channel="2" location="" rate="1"/>
|
||||
<input name="S3" channel="3" location="" rate="1"/>
|
||||
<input name="S4" channel="4" location="" rate="1"/>
|
||||
<input name="S5" channel="5" location="" rate="1"/>
|
||||
<input name="S6" channel="6" location="" rate="1"/>
|
||||
<input name="S7" channel="7" location="" rate="1"/>
|
||||
<input name="S8" channel="8" location="" rate="1"/>
|
||||
<input name="PLL" channel="P" location="" rate="1"/>
|
||||
<node stream="AE"/>
|
||||
</tree>
|
||||
</proc>
|
||||
|
16
share/templates/seedlink/q330/plugins.ini.tpl
Normal file
16
share/templates/seedlink/q330/plugins.ini.tpl
Normal file
@ -0,0 +1,16 @@
|
||||
* Generated at $date - Do not edit!
|
||||
* template: $template
|
||||
|
||||
[$seedlink.source.id]
|
||||
|
||||
station=$seedlink.station.id
|
||||
udpaddr=$sources.q330.address
|
||||
baseport=$sources.q330.port
|
||||
dataport=$sources.q330.slot
|
||||
hostport=$sources.q330.udpport
|
||||
serialnumber=$sources.q330.serial
|
||||
authcode=$sources.q330.auth
|
||||
statefile=$seedlink.run_dir/${seedlink.station.id}.${seedlink.source.id}.cn
|
||||
messages=SDUMP,LOGEXTRA,AUXMSG
|
||||
statusinterval=60
|
||||
|
7
share/templates/seedlink/q330/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/q330/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd = "$seedlink.plugin_dir/q330_plugin$seedlink._daemon_opt -v -f $seedlink.config_dir/plugins.ini"
|
||||
timeout = 3600
|
||||
start_retry = 60
|
||||
shutdown_wait = 10
|
||||
proc = "$sources.q330.proc"
|
||||
|
51
share/templates/seedlink/q330/setup.py
Normal file
51
share/templates/seedlink/q330/setup.py
Normal file
@ -0,0 +1,51 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the Quanterra/330 plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
try: seedlink.param('sources.q330.port')
|
||||
except: seedlink.setParam('sources.q330.port', 5330)
|
||||
|
||||
try: seedlink.param('sources.q330.udpport')
|
||||
except: seedlink.setParam('sources.q330.udpport', "auto")
|
||||
|
||||
try: seedlink.param('sources.q330.slot') is None
|
||||
except: seedlink.setParam('sources.q330.slot', 1)
|
||||
|
||||
try: seedlink.param('sources.q330.serial')
|
||||
except: seedlink.setParam('sources.q330.serial', '0x0100000123456789')
|
||||
|
||||
try: seedlink.param('sources.q330.auth')
|
||||
except: seedlink.setParam('sources.q330.auth', '0x00')
|
||||
|
||||
try: seedlink.param('sources.q330.proc')
|
||||
except: seedlink.setParam('sources.q330.proc', '')
|
||||
|
||||
# Evaluate udp port
|
||||
if seedlink._get('sources.q330.udpport').lower() == "auto":
|
||||
try: udpbase = int(seedlink._get('plugins.q330.udpbase', False))
|
||||
except: udpbase = 5500;
|
||||
source_count = len(seedlink.seedlink_source['q330'])+1
|
||||
seedlink.setParam('sources.q330.udpport', udpbase + 2*source_count)
|
||||
|
||||
# Key is per station and configuration settings
|
||||
key = ";".join([
|
||||
str(seedlink.param('sources.q330.address')),
|
||||
str(seedlink.param('sources.q330.port')),
|
||||
str(seedlink.param('sources.q330.udpport')),
|
||||
str(seedlink.param('sources.q330.slot')),
|
||||
seedlink.param('sources.q330.serial'),
|
||||
seedlink.param('sources.q330.auth'),
|
||||
str(seedlink._get('sources.q330.udpport'))])
|
||||
return key
|
||||
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
14
share/templates/seedlink/q330/streams_q330_100.tpl
Normal file
14
share/templates/seedlink/q330/streams_q330_100.tpl
Normal file
@ -0,0 +1,14 @@
|
||||
<proc name="q330_100">
|
||||
<tree>
|
||||
<input name="Z" channel="Z" location="" rate="100"/>
|
||||
<input name="N" channel="N" location="" rate="100"/>
|
||||
<input name="E" channel="E" location="" rate="100"/>
|
||||
<node filter="FS2D5" stream="BH">
|
||||
<node filter="F96C">
|
||||
<node filter="ULP" stream="LH">
|
||||
<node filter="VLP" stream="VH"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</tree>
|
||||
</proc>
|
34
share/templates/seedlink/reftek/plugins.ini.tpl
Normal file
34
share/templates/seedlink/reftek/plugins.ini.tpl
Normal file
@ -0,0 +1,34 @@
|
||||
* Generated at $date - Do not edit!
|
||||
* template: $template
|
||||
|
||||
[$seedlink.source.id]
|
||||
|
||||
* Settings for the RefTek plugin
|
||||
|
||||
* Hostname and TCP port of RTPD server
|
||||
host = $sources.reftek.address
|
||||
port = $sources.reftek.port
|
||||
|
||||
* Connection retry control:
|
||||
* never => no retry
|
||||
* transient => retry on transient errors
|
||||
* nonfatal => retry on non-fatal errors
|
||||
*
|
||||
* Note that when reftek_plugin exits, it will be automatically restarted
|
||||
* by seedlink, depending on the "start_retry" parameter in seedlink.ini
|
||||
retry = nonfatal
|
||||
|
||||
* Timeout length in seconds. If no data is received from a Reftek unit
|
||||
* during this period, the plugin assumes that the unit is disconnected.
|
||||
timeout = $sources.reftek.timeout
|
||||
|
||||
* Default timing quality in percents. This value will be used when no
|
||||
* timing quality information is available. Can be -1 to omit the blockette
|
||||
* 1001 altogether.
|
||||
default_tq = $sources.reftek.default_tq
|
||||
|
||||
* Timing quality to use when GPS is out of lock
|
||||
unlock_tq = $sources.reftek.unlock_tq
|
||||
|
||||
* Send Reftek state-of-health data as Mini-SEED LOG stream
|
||||
log_soh = $sources.reftek.log_soh
|
7
share/templates/seedlink/reftek/seedlink_plugin.tpl
Normal file
7
share/templates/seedlink/reftek/seedlink_plugin.tpl
Normal file
@ -0,0 +1,7 @@
|
||||
* template: $template
|
||||
plugin $seedlink.source.id cmd="$seedlink.plugin_dir/reftek_plugin$seedlink._daemon_opt -v -f '$seedlink.config_dir/plugins.ini' -m '$sources.reftek.mapFlag'"
|
||||
timeout = 0
|
||||
start_retry = 60
|
||||
shutdown_wait = 60
|
||||
proc = "$sources.reftek.proc"
|
||||
|
102
share/templates/seedlink/reftek/setup.py
Normal file
102
share/templates/seedlink/reftek/setup.py
Normal file
@ -0,0 +1,102 @@
|
||||
import os, time
|
||||
|
||||
'''
|
||||
Plugin handler for the Reftek export plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self):
|
||||
self.instances = {}
|
||||
self.unitMap = {}
|
||||
self.idMap = {}
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
address = "127.0.0.1"
|
||||
try: address = seedlink.param('sources.reftek.address')
|
||||
except: seedlink.setParam('sources.reftek.address', address)
|
||||
|
||||
port = 2543
|
||||
try: port = int(seedlink.param('sources.reftek.port'))
|
||||
except: seedlink.setParam('sources.reftek.port', port)
|
||||
|
||||
proc = "reftek"
|
||||
try: proc = seedlink.param('sources.reftek.proc')
|
||||
except: seedlink.setParam('sources.reftek.proc', proc)
|
||||
|
||||
key = (address + ":" + str(port), proc)
|
||||
|
||||
try:
|
||||
reftekId = self.instances[key]
|
||||
|
||||
except KeyError:
|
||||
reftekId = len(self.instances)
|
||||
self.instances[key] = reftekId
|
||||
self.unitMap[reftekId] = []
|
||||
|
||||
try:
|
||||
unit = seedlink.param('sources.reftek.unit')
|
||||
map = os.path.join(seedlink.config_dir, "reftek2sl%d.map" % reftekId)
|
||||
seedlink.setParam('sources.reftek.mapFlag', map)
|
||||
|
||||
mapping = (unit, seedlink._get('seedlink.station.id'))
|
||||
if not mapping in self.unitMap[reftekId]:
|
||||
self.unitMap[reftekId].append(mapping)
|
||||
|
||||
try:
|
||||
if not mapping[1] in self.idMap[mapping[0]]:
|
||||
self.idMap[mapping[0]].append(mapping[1])
|
||||
except KeyError:
|
||||
self.idMap[mapping[0]] = [mapping[1]]
|
||||
|
||||
except KeyError:
|
||||
try:
|
||||
map = seedlink.param('sources.reftek.map')
|
||||
if not os.path.isabs(map):
|
||||
map = os.path.join(seedlink.config_dir, map)
|
||||
except: map = os.path.join(seedlink.config_dir, 'reftek2sl.map')
|
||||
seedlink.setParam('sources.reftek.mapFlag', map)
|
||||
|
||||
timeout = 60
|
||||
try: timeout = int(seedlink.param('sources.reftek.timeout'))
|
||||
except: seedlink.setParam('sources.reftek.timeout', timeout)
|
||||
|
||||
default_tq = 40
|
||||
try: default_tq = int(seedlink.param('sources.reftek.default_tq'))
|
||||
except: seedlink.setParam('sources.reftek.default_tq', default_tq)
|
||||
|
||||
unlock_tq = 10
|
||||
try: unlock_tq = int(seedlink.param('sources.reftek.unlock_tq'))
|
||||
except: seedlink.setParam('sources.reftek.unlock_tq', unlock_tq)
|
||||
|
||||
log_soh = "true"
|
||||
try:
|
||||
if seedlink.param('sources.reftek.log_soh').lower() in ("yes", "true", "1"):
|
||||
log_soh = "true"
|
||||
else:
|
||||
log_soh = "false"
|
||||
except: seedlink.setParam('sources.reftek.log_soh', log_soh)
|
||||
|
||||
# Key is address (one instance per address)
|
||||
return (key, map)
|
||||
|
||||
|
||||
# Flush generates the map file(s)
|
||||
def flush(self, seedlink):
|
||||
for x in self.idMap.keys():
|
||||
if len(self.idMap[x]) > 1:
|
||||
raise Exception("Error: Reftek plugin has multiple mappings for unit %s" % x)
|
||||
|
||||
for x in self.unitMap.keys():
|
||||
mappings = self.unitMap[x]
|
||||
if len(mappings) == 0: continue
|
||||
|
||||
reftek2slmap = os.path.join(seedlink.config_dir, "reftek2sl%d.map" % x)
|
||||
|
||||
fd = open(reftek2slmap, "w")
|
||||
|
||||
fd.write("# Generated at %s - Do not edit!\n" % time.strftime("%Y-%m-%d %H:%M:%S UTC", time.gmtime()))
|
||||
for c in mappings:
|
||||
fd.write("%s %s\n" % (c[0], c[1]))
|
||||
|
||||
fd.close()
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user