[seiscomp, scanloc] Install, add .gitignore
This commit is contained in:
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>
|
Reference in New Issue
Block a user