You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
683 B
Python

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