refactor parsers; introduce new pocsag parser

This commit is contained in:
Jakob Ketterl
2020-01-09 15:11:53 +01:00
parent 0f8c86a26c
commit 0e528c9267
6 changed files with 49 additions and 34 deletions

View File

@ -11,6 +11,7 @@ from owrx.config import PropertyManager
from owrx.bands import Bandplan
from owrx.metrics import Metrics, CounterMetric, DirectMetric
from owrx.pskreporter import PskReporter
from owrx.parser import Parser
import logging
@ -258,12 +259,7 @@ class Ft4Chopper(WsjtChopper):
return ["jt9", "--ft4", "-d", str(self.decoding_depth("ft4")), file]
class WsjtParser(object):
def __init__(self, handler):
self.handler = handler
self.dial_freq = None
self.band = None
class WsjtParser(Parser):
modes = {"~": "FT8", "#": "JT65", "@": "JT9", "+": "FT4"}
def parse(self, data):
@ -312,10 +308,6 @@ class WsjtParser(object):
metric.inc()
def setDialFrequency(self, freq):
self.dial_freq = freq
self.band = Bandplan.getSharedInstance().findBand(freq)
class Decoder(object):
def parse_timestamp(self, instring, dateformat):