2021-02-20 17:09:24 +00:00
|
|
|
from owrx.source.soapy import SoapyConnectorSource, SoapyConnectorDeviceDescription
|
2021-02-20 17:48:12 +00:00
|
|
|
from owrx.form import Input
|
|
|
|
from owrx.form.device import BiasTeeInput, DirectSamplingInput
|
|
|
|
from typing import List
|
2020-01-10 19:43:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
class RtlSdrSoapySource(SoapyConnectorSource):
|
2020-03-14 00:04:52 +00:00
|
|
|
def getSoapySettingsMappings(self):
|
|
|
|
mappings = super().getSoapySettingsMappings()
|
2020-03-14 22:06:52 +00:00
|
|
|
mappings.update({"direct_sampling": "direct_samp", "bias_tee": "biastee"})
|
2020-03-14 00:04:52 +00:00
|
|
|
return mappings
|
2020-01-10 19:50:56 +00:00
|
|
|
|
2020-01-10 19:43:28 +00:00
|
|
|
def getDriver(self):
|
|
|
|
return "rtlsdr"
|
2021-02-20 17:09:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
class RtlSdrSoapyDeviceDescription(SoapyConnectorDeviceDescription):
|
2021-02-20 17:48:12 +00:00
|
|
|
def getInputs(self) -> List[Input]:
|
2021-02-21 23:35:47 +00:00
|
|
|
return super().getInputs() + [BiasTeeInput(), DirectSamplingInput()]
|
|
|
|
|
2021-03-24 22:17:50 +00:00
|
|
|
def getDeviceOptionalKeys(self):
|
|
|
|
return super().getDeviceOptionalKeys() + ["bias_tee", "direct_sampling"]
|
2021-02-23 17:32:23 +00:00
|
|
|
|
|
|
|
def getProfileOptionalKeys(self):
|
|
|
|
return super().getProfileOptionalKeys() + ["bias_tee", "direct_sampling"]
|