openwebrx-clone/csdr/chain/demodulator.py

39 lines
715 B
Python
Raw Normal View History

2021-07-19 17:04:14 +00:00
from csdr.chain import Chain
2021-08-27 15:34:48 +00:00
from abc import ABC, abstractmethod
2021-07-19 17:04:14 +00:00
2021-08-23 12:25:28 +00:00
class BaseDemodulatorChain(Chain):
2021-08-31 20:46:11 +00:00
def supportsSquelch(self) -> bool:
2021-08-23 12:25:28 +00:00
return True
2021-08-27 15:34:48 +00:00
2021-09-06 13:05:33 +00:00
def setSampleRate(self, sampleRate: int) -> None:
pass
2021-08-27 15:34:48 +00:00
2021-08-31 14:54:37 +00:00
class SecondaryDemodulator(Chain):
2021-09-06 13:05:33 +00:00
def supportsSquelch(self) -> bool:
return True
2021-08-31 14:54:37 +00:00
2021-08-27 15:34:48 +00:00
class FixedAudioRateChain(ABC):
@abstractmethod
2021-08-31 20:46:11 +00:00
def getFixedAudioRate(self) -> int:
2021-08-27 15:34:48 +00:00
pass
class FixedIfSampleRateChain(ABC):
@abstractmethod
2021-08-31 20:46:11 +00:00
def getFixedIfSampleRate(self) -> int:
pass
class DialFrequencyReceiver(ABC):
@abstractmethod
def setDialFrequency(self, frequency: int) -> None:
pass
2021-08-27 15:34:48 +00:00
# marker interface
class HdAudio:
pass