refactor parsers; introduce new pocsag parser
This commit is contained in:
12
owrx/wsjt.py
12
owrx/wsjt.py
@ -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):
|
||||
|
Reference in New Issue
Block a user