diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-06-13 23:21:57 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-06-14 12:38:04 +0200 |
commit | 61707e8b23564e3a3b1123f231e428cae0759cc7 (patch) | |
tree | 82e3a5dfe9ca71e069979ca6a8f9bfe32d7b3cfe /Transceiver52M/device/lms/LMSDevice.h | |
parent | ce70ba529cfd5c32e5c9f2652affb36d6a8d1b09 (diff) |
radioDevice: better encapsulation in base class
It's not good style to have the derived classes initialize members
inherited from the base class using "this->foo = bar". Rather, let's
make the base class have a constructor, and call that constructor to
initialize the members of the base class.
While doing this
* rename 'offset' to 'lo_offset' to avoid confusion with timestamp offset
* move 'InterfaceType' into the base class
* move 'chans' into the base class
* move 'rx_sps' into the base class
* mark base class members as 'protected'
Change-Id: Ib885675a7612a392aa7f75fca81269ddcff2f6ab
Diffstat (limited to 'Transceiver52M/device/lms/LMSDevice.h')
-rw-r--r-- | Transceiver52M/device/lms/LMSDevice.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Transceiver52M/device/lms/LMSDevice.h b/Transceiver52M/device/lms/LMSDevice.h index 0fe4c15..349efbb 100644 --- a/Transceiver52M/device/lms/LMSDevice.h +++ b/Transceiver52M/device/lms/LMSDevice.h @@ -46,7 +46,6 @@ private: std::vector<uint32_t> m_last_tx_underruns; std::vector<uint32_t> m_last_tx_overruns; - size_t chans; double actualSampleRate; ///< the actual USRP sampling rate unsigned long long samplesRead; ///< number of samples read from LMS @@ -65,7 +64,7 @@ private: public: /** Object constructor */ - LMSDevice(size_t tx_sps, size_t chans, + LMSDevice(size_t tx_sps, size_t rx_sps, InterfaceType iface, size_t chans, double lo_offset, const std::vector<std::string>& tx_paths, const std::vector<std::string>& rx_paths); |