diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-06-13 23:42:19 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-06-14 12:38:09 +0200 |
commit | b229439b3120c8bc4bed7884fc1418f8261c90a1 (patch) | |
tree | c45e63cf48c097ea673e4b46c405fcd6864dacc3 /Transceiver52M/device/usrp1 | |
parent | ffb3301bd8b0036f1e2408a0279dce698cbc3dc0 (diff) |
usrp1: Fail in case of unsupported configuration
There might be some configuration that's not supported by osmo-bts-usrp1,
and we should reject that properly.
Change-Id: Ic7308ce0c57439fe97668bd31801c4bf76b797ad
Closes: OS#3348
Diffstat (limited to 'Transceiver52M/device/usrp1')
-rw-r--r-- | Transceiver52M/device/usrp1/USRPDevice.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Transceiver52M/device/usrp1/USRPDevice.cpp b/Transceiver52M/device/usrp1/USRPDevice.cpp index 7a31c97..5705e22 100644 --- a/Transceiver52M/device/usrp1/USRPDevice.cpp +++ b/Transceiver52M/device/usrp1/USRPDevice.cpp @@ -655,5 +655,17 @@ RadioDevice *RadioDevice::make(size_t tx_sps, size_t rx_sps, const std::vector<std::string>& tx_paths, const std::vector<std::string>& rx_paths) { + if (tx_sps != rx_sps) { + LOG(ERROR) << "USRP1 requires tx_sps == rx_sps"; + return NULL; + } + if (chans != 1) { + LOG(ERROR) << "USRP1 supports only 1 channel"; + return NULL; + } + if (lo_offset != 0.0) { + LOG(ERROR) << "USRP1 doesn't support lo_offset"; + return NULL; + } return new USRPDevice(tx_sps, rx_sps, iface, chans, lo_offset, tx_paths, rx_paths); } |