On Fri, Feb 10, 2012 at 2:24 PM, Max.Suraev@fairwaves.ru wrote:
As for plugging UmTRX into uhd::usrp::multi_usrp - there're several options in here:
- Add support for UmTRX-specific clock and codec controllers into usrp2_impl with
boolean flag to differentiate between USRP2 and UmTRX. 2) Create dedicated "class umtrx_impl : public uhd::device" and implement codec and clock controllers logic in there or inside UmTRX's dboard_iface. 3) Create separate lib/umtrx/* implementation without reuse\adoption of code from lib/usrp2/*
How messy would option 1 be? Option 2 (or 3) more closely follows the existing UHD model where the shared code is mainly limited to the transport. I think that would be the best approach unless option 1 can be done very cleanly.
What is the difference between option 2 and 3? Does option 2 create a second impl class within the usrp2 directory? I think a separate directory is appropriate.
b100 and usrp1 implementations were created based on copies of existing usrp2 / e100 code without explicit class reuse. For example, b100 / e100 / usrp1 exist separately, but share the same ad9862 codec. There is some copied code between the three codec versions, but that was less messy than creating a unified codec impl for all three.
Thomas