Send USRP-users mailing list submissions to usrp-users@lists.ettus.com
To subscribe or unsubscribe via the World Wide Web, visit http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com or, via email, send a message with subject or body 'help' to usrp-users-requ...@lists.ettus.com You can reach the person managing the list at usrp-users-ow...@lists.ettus.com When replying, please edit your Subject line so it is more specific than "Re: Contents of USRP-users digest..." Today's Topics: 1. UHD 3.8 (Dan Sego) 2. Re: Use of external reference clock to sync the internal clock of X310 USRPs (Isen I-Chun Chao) 3. Re: UHD 3.8 (Nir Eden) 4. Re: Windows UHD C++ API (Krzysztof Cwalina) 5. Add Customized Module in X300 FGPA code (Isen I-Chun Chao) 6. Re: Windows UHD C++ API (Nir Eden) 7. Re: Windows UHD C++ API (Krzysztof Cwalina) 8. UHD and C# - New open source library (Nir Eden) 9. UHD-3.7.3 in E100 package feeds (Philip Balister) ---------------------------------------------------------------------- Message: 1 Date: Sat, 8 Nov 2014 13:14:12 -0800 From: Dan Sego <bubbadora...@gmail.com> To: usrp-users@lists.ettus.com Subject: [USRP-users] UHD 3.8 Message-ID: <CALGEVjtkznan6cN2=fUtc7h=9RZgUK3vcp4uLYveqoq=O1OM=g...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Good afternoon the list. I've just loaded the latest UHD release 3.8 for windows. Successfully loaded. configuration is a Lenovo I7 with Windows 8.1 and VS 2010. Boost 1_55 also installed. property_tree.hpp and is generating a very large number of errors at build, along with device.hpp. Had no such problems with the previous configuration (Lenovo Think Pad, Windows 7, older UHD and boost 1_47 and using VS 2012 Errors are pasted below. 1>------ Build started: Project: single unit operation, Configuration: Debug Win32 ------ 1> stdafx.cpp 1> AssemblyInfo.cpp 1> single unit operation.cpp 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(103): error C2611: 'property' : illegal following '~' (expected identifier) 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(103): error C2988: unrecognizable template declaration/definition 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(103): error C2059: syntax error : 'property' 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(122): error C2143: syntax error : missing ';' before '/' 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(122): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(122): error C2143: syntax error : missing ',' before '&' 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(123): error C2143: syntax error : missing ';' before '/' 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(123): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(123): error C2143: syntax error : missing ',' before '&' 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(88): error C2039: 'create' : is not a member of 'uhd::property_tree' 1> c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of 'uhd::property_tree' 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(88): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(88): error C2143: syntax error : missing ',' before '&' 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(93): error C2039: 'access' : is not a member of 'uhd::property_tree' 1> c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of 'uhd::property_tree' 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(93): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(93): error C2143: syntax error : missing ',' before '&' 1>c:\Program Files (x86)\UHD\include\uhd/device.hpp(32): error C2990: 'uhd::property_tree' : non-class template has already been declared as a class template 1> c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of 'uhd::property_tree' 1>c:\Program Files (x86)\UHD\include\uhd/device.hpp(106): error C2955: 'uhd::property_tree' : use of class template requires template argument list 1> c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of 'uhd::property_tree' 1>c:\Program Files (x86)\UHD\include\uhd/device.hpp(106): error C2027: use of undefined type 'uhd::property_tree' 1> c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of 'uhd::property_tree' 1>c:\Program Files (x86)\UHD\include\uhd/device.hpp(114): error C2955: 'uhd::property_tree' : use of class template requires template argument list 1> c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of 'uhd::property_tree' 1>c:\Program Files (x86)\UHD\include\uhd/device.hpp(114): error C2027: use of undefined type 'uhd::property_tree' 1> c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of 'uhd::property_tree' 1> Generating Code... ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Any suggestions? cheers Dan Sego -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20141108/6af2129b/attachment-0001.html> ------------------------------ Message: 2 Date: Sat, 8 Nov 2014 17:08:31 -0500 From: Isen I-Chun Chao <chao...@gmail.com> To: Ian Buckley <i...@ionconcepts.com> Cc: "usrp-users@lists.ettus.com" <usrp-users@lists.ettus.com> Subject: Re: [USRP-users] Use of external reference clock to sync the internal clock of X310 USRPs Message-ID: <CAEG73KrX5_+HjtJnv_ZBPe4PEB2wEJn_=tzb-axzfyuvt_v...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Thanks very much Ian and Marcus. This discussion helps a lot. I have other questions regarding Verilog code. I think it is not appropriate to discuss in this thread because the topic is not matched. I will send another thread for my FPGA-related questions. Thanks. *Best Regards,Isen I-Chun Chao* On Fri, Nov 7, 2014 at 11:24 PM, Ian Buckley <i...@ionconcepts.com> wrote: > Isen, > > On Nov 7, 2014, at 7:31 PM, Isen I-Chun Chao <chao...@gmail.com> wrote: > > Hi Ian, > Thanks for the explanation. It is much more clear to me about the clock > arch in X310 now. > > So I think the arch maybe based on Fig. 2 (0-delay dual PLL) of the > LMK04816 manual (http://www.ti.com/lit/ds/symlink/lmk04816.pdf) and this > chip takes CLKin1 as a reference clock. The CLKin1 in this case is > connected to a multiplexer (SY89547LMGTR), which is responsible for > selecting external ref, internal ref or GPSDO. And that is why user have to > use set_clock_source() to set up/select the one of them as the source. > > Yes, though it should default to the internal 10MHz TCXO if no arguments > are supplied and no GPSDO is installed. > > > And I tried to find out the signal master_clock in verilog code (X300 > series). But I did no find it. Is is actually called 'master_clock' in > verilog code? > > master_clk_rate is the keyword used in UHD command invocation for all the > new USRP models and it corresponds to the sample rate of the ADC/DAC. We > have standardized on this term, since most users only write S/W and have no > visibility into the FPGA design. > In the X310 Verilog follow the signal "radio_clk" from X300.v down through > the hierarchy?the name will change to just "clk" in some sub-modules?.this > is the 200MHz clock. > > > Has a time register based on master_clock (5ns resolution) been > implemented in fpga-src of current version (3.8.0) UHD? > Or people have to implement it by themselves? I was told that the time > maintained so far in the FPGA in X3x0 is not as precise as ins? > > > Yes, there is a 64bit 200MHz counter in each instance of the radio in > X300. All time specs for X310 are accurate in the H/W to 5nS when using a > 200MHz master_clock_rate. We use the term vita_time also to refer to the > same clocks sometimes. > > > > > -Ian > > > *Best Regards,Isen I-Chun Chao* > > On Fri, Nov 7, 2014 at 5:34 PM, Ian Buckley <i...@ionconcepts.com> wrote: > >> Isen, >> >> On Nov 7, 2014, at 1:51 PM, Isen I-Chun Chao via USRP-users < >> usrp-users@lists.ettus.com> wrote: >> >> Hi Marcus, >> I took a look at the the X3x0 schematic ( >> http://files.ettus.com/schematics/x300/x3xx.pdf). >> 1a) According to the page 1 and page 11 of X3x0 schematic, it looks like >> that there is a 96MHz main oscillator as a master clock and it will >> redistributed to DAC/ADC. Then what is the "200MHz default master clock" >> you mentioned previously? >> >> The 96MHz oscillator drives the TI PLL chip(LMK04816) which is used to >> synthesis a variety of clocks, including the so called "master_clock". The >> default frequency of the master_clock is 200MHz but we also provide support >> for a tested configurations of 120MHz and 184.32MHz. The TI chip actually >> contains two PLL's and is very powerful, but complicated to program. The >> master clock is provided directly to ADC's and DAC's as well as the FPGA. >> Other reference clocks to synthesize RF LO's are provided to the Radio >> daughter cards. >> >> 1b). In the page 1 and pgae 12 of the X3x0 schematic, there is three are >> internal 10MHz TCXO, external 10MHz interface and the GPSDO interface so I >> can understand how set_clock_source() works for selecting one of them. >> However, I don't understand the role that the 96MHz main oscillator and the >> internal 10MHz TCXO play, respectively. What are they responsible for, >> respectively, in X310 architecture? >> >> >> The 96MHz oscillator is a VCXO, it is disciplined using a 10MHz reference >> clock. When there is no external source of a 10MHz ref clock then the on >> board 10MHz TCXO is used instead. >> >> >> 2). Just to make sure we are in the same page, by talking about "there >> are multiple clock domains in X310" in your previously email, did you >> mean the output of "clock gen" block in the X3x0 schematic? >> >> >> There a great number of discrete clocks of different frequency and phase >> used within the FPGA.. >> >> >> 3) According to your answer for the question about set_time_source(): >> "Setting >> the time source -- ie. saying that the internal time of the X310 should >> come from the GPSDO or somewhere else." and the page one of the X3x0 >> schematic, there must be time registers design in the FPGA and the content >> of the time registers are something like second and nanosecond, counting >> based on one of the output of "Clock Gen" connecting to FPGA. Do I >> understand it correctly? If so, what is the time source this clock signal >> based on? the internal 10MHz TCXO or the 96MHz main oscillator? >> >> >> The internal reference clock maintained in the FPGA is in quanta of the >> master_clock. By default therefore it's incrementing every 5nS. >> >> >> 4) Regarding the previous question of using set_clock_source() and >> set_time_source(), I was asking if these two method is one-time use. Like >> people write a Linux drivers to access a hardware device attached on >> computer and set up a register to enable some feature of the hardware >> device as a configuration process. This only needs to be done in the >> initialization phase of loading a driver program or running a driver >> program. So If I turn the X310 on and plug the reference clock, I only need >> to call set_clock_source("external")/set_time_source("external") one time >> and the X3x0 will be configured as working on external reference until I >> turned the X310 off. >> >> I am using uhd 3.7.3. I will install the newest one and give it a try to >> see if I still have lo_locked failed warning. And for your interest >> question, I don't have the measure result regarding to the clock stability >> using T-connector with me. But based on our previous related experimental >> work, one-stage of our T-connector will be just fine. And the precision we >> do care is not the frequency output, which is used for verifying if the >> internal clock follows external clock. We actually care about the precision >> of a generated time-stamp in the FPGA. >> >> >> >> *Best Regards,Isen I-Chun Chao* >> >> On Fri, Nov 7, 2014 at 5:39 AM, Marcus M?ller <marcus.muel...@ettus.com> >> wrote: >> >>> Hello Isen, >>> On 06.11.2014 23:08, Isen I-Chun Chao wrote: >>> > Hi Marcus, >>> > In our application, the quality of clock is extremely affect our >>> interest. >>> > So clearly understanding of what clock source is related to our >>> application >>> > is important. That is why we are using atomic clock as the external >>> > reference. >>> As this is interesting to me: What are your accuracy needs? >>> Have you measured phase noise with a highspeed oscilloscope when using >>> your t-connector with 50Ohm termination on the measurement end, and a >>> running X310 plugged in to the other end of the t-piece? You really have >>> to make sure the signal quality is excellent if you want to be better >>> than the internal oscillator, and thus should ensure your external >>> cabling doesn't eliminate the gain in clock stability you get by using >>> an atomic clock by introducing phase noise. >>> >>> > Besides, the USRP Tx and Rx will be respectively coordinating with >>> other >>> > devices. It is expected to be separated. >>> Ah, so you need two USRPs to simulate your comm system. >>> > That is why two USRPs are used. I >>> > agree with you. I don't think Daisy-chain is appropriate in the our use >>> > case. >>> > >>> > Following are extended questions: >>> > 1a). By talking about internal clock, does it mean the 200MHz clock? >>> Um, there are dozens of internal clocks in the X310; I don't know which >>> statement you are referring to. Most probably, when we're talking about >>> "internal clock source", we mean the 10MHz reference clock. >>> > >>> > 1b). According to the manual there are "set_clock_source()", >>> > "set_clock_source_out()", "set_time_source()", >>> "set_time_source_out()". And >>> > I wonder if I set_clock_source_out() and set_time_source_out() are only >>> > used for enabling/disabling Ref and PPS output respectively. >>> >>> http://files.ettus.com/manual/classuhd_1_1usrp_1_1multi__usrp.html#a60445c1a52e4763b6ebbbfce2db96569 >>> yes. >>> > If so, what is >>> > the Ref output based on? The 200MHz clock? >>> I'm assuming you're referring to the 200MHz default master clock rate, >>> which it cannot be based on, as that clock is adjustable and the Ref Out >>> must be 10MHz. >>> >>> Compare page 11 of the X300 schematic: >>> http://files.ettus.com/schematics/x300/x3xx.pdf >>> The ref clock output gets generated directly by the central clock >>> generation, stabilization and distribution IC, the LMK04816, which means >>> it's derived inside that chip from the reference clock with the help of >>> stabilization and further oscillators. I must admit that I still haven't >>> gotten around to understanding the workings of the LMK in fullness; it's >>> a complex piece of hardware, and for you, as a user, it basically "does >>> what it should". >>> > >>> > 1c). Is the PPS output based on a register maintaining count ticks from >>> > 200MHz clock, or based on what mechanism? >>> Depends on whether you use an actual PPS as input (in which case that >>> one is used) or not (in which case ticks are counted in the FPGA). >>> > 1d). What is the concrete use case of set_time_source() in USRP X310? >>> Setting the time source -- ie. saying that the internal time of the X310 >>> should come from the GPSDO or somewhere else. >>> > If I >>> > have an external PPS reference connected to X310 and I use this method, >>> > does that mean the PPS signal (including the PPS output) throughout >>> whole >>> > X310 will BE the external PPS reference? >>> yes. >>> > >>> > 2). Is the method, set_clock_source() (so are et_clock_source_out(), >>> > set_time_source(), set_time_source_out()), needed to use only one time >>> > (call it for configuring USRP, and USRP will stay using external clock >>> > until it is powered off)? >>> I don't understand, sorry. Every USRP can only have one device time. >>> > >>> > 3). If I run applications in GRC on USRP without connecting an external >>> > clock (and I did not use set_clock_source() either), I always got >>> warning >>> > message "WARN: Sensor 'lo_locked' failed to lock within timeout on >>> channel 0"; >>> > however, if I connect the atomic clock as an external clock, there is >>> no >>> > such warning message. Looks like there is something activated after >>> > plugging eternal clock. If so, what is that? something like the PLL >>> locking >>> > mechanism? >>> Yes, that is the information that the USRP couldn't gain a stabilized >>> clock, which is a bad thing as is. >>> However, there is no way to detect whether a cable is connected to the >>> ref in port, which means that either the external clock source is >>> selected in the UHD source/sinks options, or you have a problem with the >>> clock locking mechanism. >>> Are you using a recent version of UHD? >>> >>> Greetings, >>> Marcus >>> >>> > >>> > >>> > >>> > >>> > >>> > >>> > *Best Regards,Isen I-Chun Chao* >>> > >>> > On Tue, Nov 4, 2014 at 4:22 PM, Marcus M?ller < >>> marcus.muel...@ettus.com> >>> > wrote: >>> > >>> >> Hi Isen, >>> >> On 04.11.2014 21:37, Isen I-Chun Chao wrote: >>> >>> Hi Marcus Leech and Marcus Muller, >>> >>> Thanks for the answers. But I am a little bit confused. >>> >>> >>> >>> Once I connect the atomic and X310, hardware (X310 USRPs) should >>> operate >>> >>> based on external clock (atomic clock) >>> >> no, you must explicitely select the external clock source. >>> >>> due to the daisy-chain(?). >>> >> Daisy-chaining is the option to connect the reference output of one >>> USRP >>> >> to the reference input of the next; inherently, it doesn't relate to >>> >> your use case. >>> >>> This is >>> >>> regardless of application use. >>> >> Depends on what your application wants to do. Most application will >>> not >>> >> care where the reference comes from -- but you'll still need to set >>> the >>> >> reference source. >>> >>> And I should have synchronized signal from >>> >>> REF outputs of two USRPs, right? >>> >>> >>> >>> If applications did not set up the use of external clock by using >>> >>> set_clock_source(), the application is going to use the default >>> clock on >>> >>> X310 USRPs. (?) >>> >> yes. >>> >>> What clock the FPGA is based on? because the FPGA code will be >>> modified >>> >>> working on our application. >>> >> The FPGA design has multiple clock domains. The most important clock >>> >> domain is driven at the master clock rate, which is 200MHz by default, >>> >> but can take more values (see UHD manual). >>> >>> BTW, the two X310 USRPs are Tx and Rx. >>> >> Each X310 has two completely independent TX and RX chains. Unless you >>> >> need to have them in two different places, I'm afraid I don't >>> understand >>> >> why you need two X310. >>> >>> I am not using them as MIMO. The >>> >>> reason I want to make sure their clock can synchronized to an atomic >>> >> clock >>> >>> is that I would like to draw timestamps on both Tx and Rx based on >>> the >>> >>> clock on USRPs. I use T-connectors to distribute atomic signals to >>> two >>> >> X310 >>> >>> USRP. >>> >> T-Connectors might or might not work -- distributing a 10MHz clock is >>> a >>> >> bit of a tricky task, since reflections might mess up your phase >>> >> quality. Also, you split energy (let's say by half) between the two >>> >> USRPs! Make sure you're still able to reliably drive the clock inputs. >>> >> Usually, this is a case where you would need a proper clock >>> distributor, >>> >> or a forwarding solution (such as daisy-chaining). For PPS >>> synchronity, >>> >> you really should make sure you know what you're doing on the signal >>> >> distribution. I can see that daisy chaining will not be a good >>> solution >>> >> here, unless you calibrate (which you could easily do). >>> >> >>> >> Best regards, >>> >> Marcus >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *Best Regards,Isen I-Chun Chao* >>> >>> >>> >>> On Tue, Nov 4, 2014 at 3:11 PM, Marcus M?ller < >>> >> usrp-users@lists.ettus.com> >>> >>> wrote: >>> >>> >>> >>>> Hi Isen, >>> >>>> >>> >>>> yes, you're understanding correctly, but you'll have to select the >>> >>>> external reference explicitely using the set_clock_source method. >>> >>>> Also, your atomic clock has to have the possibility to drive two >>> >>>> receivers; distributing clock signals correctly isn't inherently >>> >> trivial. >>> >>>> For this reason, the X3x0s have the ability to "daisy-chain" the >>> >> reference >>> >>>> and PPS signals. >>> >>>> >>> >>>> Greetings, >>> >>>> Marcus >>> >>>> >>> >>>> >>> >>>> On 04.11.2014 20:48, Isen I-Chun Chao via USRP-users wrote: >>> >>>> >>> >>>> Hi, >>> >>>> If I have a atomic clock with me and would like to two X310 USRP >>> >>>> synchronize to this atomic clock. >>> >>>> I just connect the PPS output and the 10MHz Ref output on atomic >>> clock >>> >> to >>> >>>> the input of two USRP. As long as the 'REF' leds on the front panel >>> of >>> >> X310 >>> >>>> USRPs are turned on, the internal clock of X310 USRPs are locked. No >>> >>>> further settings are required. >>> >>>> >>> >>>> Am I understanding it right? >>> >>>> Thanks. >>> >>>> >>> >>>> >>> >>>> >>> >>>> *Best Regards,Isen I-Chun Chao* >>> >>>> >>> >>>> >>> >>>> >>> >>>> >>> >>>> _______________________________________________ >>> >>>> USRP-users mailing listUSRP-users@lists.ettus.comhttp:// >>> >> lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com >>> >>>> >>> >>>> >>> >>>> _______________________________________________ >>> >>>> USRP-users mailing list >>> >>>> USRP-users@lists.ettus.com >>> >>>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com >>> >>>> >>> >>>> >>> >> >>> >>> >> _______________________________________________ >> USRP-users mailing list >> USRP-users@lists.ettus.com >> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20141108/4a0887cd/attachment-0001.html> ------------------------------ Message: 3 Date: Sun, 9 Nov 2014 10:45:01 +0200 From: Nir Eden <nir.e...@gmail.com> To: Dan Sego <bubbadora...@gmail.com> Cc: "usrp-users@lists.ettus.com" <usrp-users@lists.ettus.com> Subject: Re: [USRP-users] UHD 3.8 Message-ID: <CAP4_4=dift=_xy1pfmjmvx1v8ecfvhowxhetulquthwr05a...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Try to comment the distractor at property_tree.hpp at line 102. So it will be like this this: //template <typename T>//property<T>::~property(void){// /* NOP *///} On Sat, Nov 8, 2014 at 11:14 PM, Dan Sego via USRP-users < usrp-users@lists.ettus.com> wrote: > Good afternoon the list. > > I've just loaded the latest UHD release 3.8 for windows. Successfully > loaded. configuration is a Lenovo I7 with Windows 8.1 and VS 2010. Boost > 1_55 also installed. > > property_tree.hpp and is generating a very large number of errors at > build, along with device.hpp. > > Had no such problems with the previous configuration (Lenovo Think Pad, > Windows 7, older UHD and boost 1_47 and using VS 2012 > > Errors are pasted below. > > 1>------ Build started: Project: single unit operation, Configuration: > Debug Win32 ------ > > 1> stdafx.cpp > > 1> AssemblyInfo.cpp > > 1> single unit operation.cpp > > 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(103): error > C2611: 'property' : illegal following '~' (expected identifier) > > 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(103): error > C2988: unrecognizable template declaration/definition > > 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(103): error > C2059: syntax error : 'property' > > 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(122): error > C2143: syntax error : missing ';' before '/' > > 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(122): error > C4430: missing type specifier - int assumed. Note: C++ does not support > default-int > > 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(122): error > C2143: syntax error : missing ',' before '&' > > 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(123): error > C2143: syntax error : missing ';' before '/' > > 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(123): error > C4430: missing type specifier - int assumed. Note: C++ does not support > default-int > > 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(123): error > C2143: syntax error : missing ',' before '&' > > 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(88): error > C2039: 'create' : is not a member of 'uhd::property_tree' > > 1> c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see > declaration of 'uhd::property_tree' > > 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(88): error > C4430: missing type specifier - int assumed. Note: C++ does not support > default-int > > 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(88): error > C2143: syntax error : missing ',' before '&' > > 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(93): error > C2039: 'access' : is not a member of 'uhd::property_tree' > > 1> c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see > declaration of 'uhd::property_tree' > > 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(93): error > C4430: missing type specifier - int assumed. Note: C++ does not support > default-int > > 1>c:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(93): error > C2143: syntax error : missing ',' before '&' > > 1>c:\Program Files (x86)\UHD\include\uhd/device.hpp(32): error C2990: > 'uhd::property_tree' : non-class template has already been declared as a > class template > > 1> c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see > declaration of 'uhd::property_tree' > > 1>c:\Program Files (x86)\UHD\include\uhd/device.hpp(106): error C2955: > 'uhd::property_tree' : use of class template requires template argument list > > 1> c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see > declaration of 'uhd::property_tree' > > 1>c:\Program Files (x86)\UHD\include\uhd/device.hpp(106): error C2027: use > of undefined type 'uhd::property_tree' > > 1> c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see > declaration of 'uhd::property_tree' > > 1>c:\Program Files (x86)\UHD\include\uhd/device.hpp(114): error C2955: > 'uhd::property_tree' : use of class template requires template argument list > > 1> c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see > declaration of 'uhd::property_tree' > > 1>c:\Program Files (x86)\UHD\include\uhd/device.hpp(114): error C2027: use > of undefined type 'uhd::property_tree' > > 1> c:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see > declaration of 'uhd::property_tree' > > 1> Generating Code... > > ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== > > Any suggestions? > > cheers > Dan Sego > > _______________________________________________ > USRP-users mailing list > USRP-users@lists.ettus.com > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20141109/e7f5e18c/attachment-0001.html> ------------------------------ Message: 4 Date: Sun, 09 Nov 2014 09:48:45 +0100 From: Krzysztof Cwalina <kkcwal...@gmail.com> To: Nir Eden <nir.e...@gmail.com> Cc: "usrp-users@lists.ettus.com" <usrp-users@lists.ettus.com> Subject: Re: [USRP-users] Windows UHD C++ API Message-ID: <545f2a6d.7010...@gmail.com> Content-Type: text/plain; charset="utf-8"; Format="flowed" Hello, I wrote that I will have an access to the device but the problem is I cant just simply compile my project now. Namespace Runtime::InteropServices requires to select in project options Common Language Runtime Support (/clr) - but then I got like 20 errors from UHD driver: C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(103): error C2611: 'property' : illegal following '~' (expected identifier) 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(103): error C2988: unrecognizable template declaration/definition 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(103): error C2059: syntax error : 'property' 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(122): error C2143: syntax error : missing ';' before '/' 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(122): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(122): error C2143: syntax error : missing ',' before '&' 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(123): error C2143: syntax error : missing ';' before '/' 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(123): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(123): error C2143: syntax error : missing ',' before '&' 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(88): error C2039: 'create' : is not a member of 'uhd::property_tree' 1> C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of 'uhd::property_tree' 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(88): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(88): error C2143: syntax error : missing ',' before '&' 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(93): error C2039: 'access' : is not a member of 'uhd::property_tree' 1> C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of 'uhd::property_tree' 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(93): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(93): error C2143: syntax error : missing ',' before '&' 1>C:\Program Files (x86)\UHD\include\uhd/device.hpp(32): error C2990: 'uhd::property_tree' : non-class template has already been declared as a class template 1> C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of 'uhd::property_tree' 1>C:\Program Files (x86)\UHD\include\uhd/device.hpp(106): error C2955: 'uhd::property_tree' : use of class template requires template argument list 1> C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of 'uhd::property_tree' 1>C:\Program Files (x86)\UHD\include\uhd/device.hpp(106): error C2027: use of undefined type 'uhd::property_tree' 1> C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of 'uhd::property_tree' 1>C:\Program Files (x86)\UHD\include\uhd/device.hpp(114): error C2955: 'uhd::property_tree' : use of class template requires template argument list 1> C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of 'uhd::property_tree' 1>C:\Program Files (x86)\UHD\include\uhd/device.hpp(114): error C2027: use of undefined type 'uhd::property_tree' 1> C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of 'uhd::property_tree' Have You got any idea? W dniu 2014-11-08 o 11:50, Nir Eden pisze: > Hi, > > I'm not sure that I'm fully understand your setup. You are trying to > call UHD in windows from c++/cli program? if so you need to marshal > string. Try this: > > std::string MarshalString(String ^ s) > { > using namespace Runtime::InteropServices; > const char* chars = (const > char*)(Marshal::StringToHGlobalAnsi(s)).ToPointer(); > std::string os = chars; > Marshal::FreeHGlobal(IntPtr((void*)chars)); > return os; > } > > and than: > usrp->set_clock_source(MarshalString("internal"); > > -- Nir, 4Z7DEF > > On Sat, Nov 8, 2014 at 11:55 AM, Krzysztof Cwalina via USRP-users > <usrp-users@lists.ettus.com <mailto:usrp-users@lists.ettus.com>> wrote: > > Hello Ben, > > Thank You for reply. Yes I do not explain my problem enough. Dont > focus on C# - C++ connection and DLL. I just want to write a > little library which uses UHD driver to connect with the device > (N2920 and N2921). > > I just copy my code from DLL and build a simple C++ project which > uses the UHD driver. The problem is that in Linux this code works > very welland anything is ok. But suddenly on Windows I've got an > error in the places where I need to pass parameters as a string > like methods: > usrp->set_clock_source("internal"); > uhd::stream_args_t stream_args("fc32"); > > The other like: > usrp->set_rx_rate(rate); > usrp->get_rx_rate(); > > Works well under the Windows. I'm a bit confused why is it > happening and why I get error there. Only the methods where string > is a parameter seems to not working for me. I tried almost everything. > > W dniu 2014-11-08 o 02:02, Ben Hilburn pisze: >> Hi Krzysztof - >> >> I'm a bit confused, I think. Can you explain what you mean by >> importing the UHD DLL into a C# project? I'm not familiar with >> C#, but is that expected to work? >> >> We certainly haven't tested anything like that, here. Or am I >> misunderstanding your question? >> >> Cheers, >> Ben >> >> On Fri, Nov 7, 2014 at 5:49 AM, Krzysztof Cwalina via USRP-users >> <usrp-users@lists.ettus.com <mailto:usrp-users@lists.ettus.com>> >> wrote: >> >> Hello, >> >> in my project I just write the C++ DLL Library and import it >> into C# project. The problem is - there are some problems >> with the UHD. My platform: >> >> Windows 7 x64, >> Visual Studio 2013 Pro >> >> when I run project sometimes on the line: >> uhd::usrp::multi_usrp::sptr usrp = >> uhd::usrp::multi_usrp::make(args); there is exception like: >> >> A first chance exception of type >> 'System.Runtime.InteropServices.SEHException' occurred in >> USRPTest.exe >> Additional information: External component has thrown an >> exception. >> >> Sometimes it is - sometimes is not (depends on how many times >> I compile the same code. Next problem is when I want to use >> two methods: >> >> usrp->set_clock_source("internal"); or uhd::stream_args_t >> stream_args("fc32"); >> >> Same error show up. I tried everything, I've searched almost >> all topics about this subject - but I didn't found the >> solution. Can anyone help me? >> >> Thanks. >> >> _______________________________________________ >> USRP-users mailing list >> USRP-users@lists.ettus.com <mailto:USRP-users@lists.ettus.com> >> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com >> >> > > > _______________________________________________ > USRP-users mailing list > USRP-users@lists.ettus.com <mailto:USRP-users@lists.ettus.com> > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20141109/1ad8971e/attachment-0001.html> ------------------------------ Message: 5 Date: Sun, 9 Nov 2014 03:49:21 -0500 From: Isen I-Chun Chao <chao...@gmail.com> To: "usrp-users@lists.ettus.com" <usrp-users@lists.ettus.com> Subject: [USRP-users] Add Customized Module in X300 FGPA code Message-ID: <caeg73kre1nt1w32dmqx2safio3bclcweuxakg1v-9rkv3e4...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi, I am trying to add a customized module (called customized_rx_mod) after DDC module (ddc_chain_x300 ddc_chain) in Rx and another one (called customized_tx_mod) before DUC module (duc_chain duc_chain). The interface of these customized Rx module are below (same as Tx one): module customized_rx_mod (input clk, input rst, input vita_time, input sample_in, output sample_out); The gr-ieee802-11 is used as the application and is responsible for sending wifi packets. The functions of customized_tx_mod are: a). detect a packet (which should be in the form of samples) delivered from application (gr-ieee802-11) b). insert a pattern (a series of samples) at the head of incoming samples (the packet from application) as the sample preamble. c). At the time of making the sample preamble, create a timestamp (by save the value of vita_time) d). Save the timestamp value to an register for applications access. The functions of customized_rx_mod are: a). detect a packet (which should be in the form of samples) received from the front end by doing correlation of the sample pattern (preamble) designed in Tx side b). At the time of detecting the sample preamble, create a timestamp (by save the value of vita_time) d). Save the timestamp value to an register for applications access. Based on above. I have following questions. 1). Does what I am doing already exist similar functions or mechanisms in current X310 FPGA design? 2). Can the current X310 FPGA design identify a packet (like wifi packet in gr-ieee802-11) coming from application? 3). What is the unit of vita_time? Is it 64-bit nanosecond or other format? 4). Is it possible that I can add the timestamp information in sample stream in the HW module. And applications can just retrieve this timestamp from received payload/meta data/header data? 5). If storing the timestamp into a register is the only way passing it to software application, how do I make a new register and add a new method in UHD to access this data. 6). I found that x300 uses ddc_chain_x300.v instead of ddc_chain.v. However, both usrp2 and usrp3 take duc_chain.v. There is no duc_chain_x300.v. So I am curious what is different between ddc_chain_x300.v and ddc_chain.v. Thanks. *Best Regards,Isen I-Chun Chao* -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20141109/b2b5207d/attachment-0001.html> ------------------------------ Message: 6 Date: Sun, 9 Nov 2014 11:55:08 +0200 From: Nir Eden <nir.e...@gmail.com> To: Krzysztof Cwalina <kkcwal...@gmail.com> Cc: "usrp-users@lists.ettus.com" <usrp-users@lists.ettus.com> Subject: Re: [USRP-users] Windows UHD C++ API Message-ID: <CAP4_4=dcvozj2vmc6j1vh-z4vbjz3pe1htaazoatedr_nsx...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" >From my replay to Dan Sego: Try to comment the distractor at property_tree.hpp at line 102. So it will be like this this: //template <typename T>//property<T>::~property(void){// /* NOP *///} Is it helpful? On Sun, Nov 9, 2014 at 10:48 AM, Krzysztof Cwalina <kkcwal...@gmail.com> wrote: > Hello, > > I wrote that I will have an access to the device but the problem is I cant > just simply compile my project now. Namespace Runtime::InteropServices > requires to select in project options Common Language Runtime Support > (/clr) - but then I got like 20 errors from UHD driver: > > C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(103): error > C2611: 'property' : illegal following '~' (expected identifier) > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(103): error > C2988: unrecognizable template declaration/definition > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(103): error > C2059: syntax error : 'property' > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(122): error > C2143: syntax error : missing ';' before '/' > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(122): error > C4430: missing type specifier - int assumed. Note: C++ does not support > default-int > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(122): error > C2143: syntax error : missing ',' before '&' > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(123): error > C2143: syntax error : missing ';' before '/' > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(123): error > C4430: missing type specifier - int assumed. Note: C++ does not support > default-int > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(123): error > C2143: syntax error : missing ',' before '&' > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(88): error > C2039: 'create' : is not a member of 'uhd::property_tree' > 1> C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) > : see declaration of 'uhd::property_tree' > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(88): error > C4430: missing type specifier - int assumed. Note: C++ does not support > default-int > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(88): error > C2143: syntax error : missing ',' before '&' > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(93): error > C2039: 'access' : is not a member of 'uhd::property_tree' > 1> C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) > : see declaration of 'uhd::property_tree' > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(93): error > C4430: missing type specifier - int assumed. Note: C++ does not support > default-int > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(93): error > C2143: syntax error : missing ',' before '&' > 1>C:\Program Files (x86)\UHD\include\uhd/device.hpp(32): error C2990: > 'uhd::property_tree' : non-class template has already been declared as a > class template > 1> C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) > : see declaration of 'uhd::property_tree' > 1>C:\Program Files (x86)\UHD\include\uhd/device.hpp(106): error C2955: > 'uhd::property_tree' : use of class template requires template argument list > 1> C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) > : see declaration of 'uhd::property_tree' > 1>C:\Program Files (x86)\UHD\include\uhd/device.hpp(106): error C2027: use > of undefined type 'uhd::property_tree' > 1> C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) > : see declaration of 'uhd::property_tree' > 1>C:\Program Files (x86)\UHD\include\uhd/device.hpp(114): error C2955: > 'uhd::property_tree' : use of class template requires template argument list > 1> C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) > : see declaration of 'uhd::property_tree' > 1>C:\Program Files (x86)\UHD\include\uhd/device.hpp(114): error C2027: use > of undefined type 'uhd::property_tree' > 1> C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(128) > : see declaration of 'uhd::property_tree' > > Have You got any idea? > > W dniu 2014-11-08 o 11:50, Nir Eden pisze: > > Hi, > > I'm not sure that I'm fully understand your setup. You are trying to call > UHD in windows from c++/cli program? if so you need to marshal string. Try > this: > > std::string MarshalString(String ^ s) > { > using namespace Runtime::InteropServices; > const char* chars = (const > char*)(Marshal::StringToHGlobalAnsi(s)).ToPointer(); > std::string os = chars; > Marshal::FreeHGlobal(IntPtr((void*)chars)); > return os; > } > > and than: > usrp->set_clock_source(MarshalString("internal"); > > -- Nir, 4Z7DEF > > On Sat, Nov 8, 2014 at 11:55 AM, Krzysztof Cwalina via USRP-users < > usrp-users@lists.ettus.com> wrote: > >> Hello Ben, >> >> Thank You for reply. Yes I do not explain my problem enough. Dont focus >> on C# - C++ connection and DLL. I just want to write a little library which >> uses UHD driver to connect with the device (N2920 and N2921). >> >> I just copy my code from DLL and build a simple C++ project which uses >> the UHD driver. The problem is that in Linux this code works very welland >> anything is ok. But suddenly on Windows I've got an error in the places >> where I need to pass parameters as a string like methods: >> usrp->set_clock_source("internal"); >> uhd::stream_args_t stream_args("fc32"); >> >> The other like: >> usrp->set_rx_rate(rate); >> usrp->get_rx_rate(); >> >> Works well under the Windows. I'm a bit confused why is it happening and >> why I get error there. Only the methods where string is a parameter seems >> to not working for me. I tried almost everything. >> >> W dniu 2014-11-08 o 02:02, Ben Hilburn pisze: >> >> Hi Krzysztof - >> >> I'm a bit confused, I think. Can you explain what you mean by importing >> the UHD DLL into a C# project? I'm not familiar with C#, but is that >> expected to work? >> >> We certainly haven't tested anything like that, here. Or am I >> misunderstanding your question? >> >> Cheers, >> Ben >> >> On Fri, Nov 7, 2014 at 5:49 AM, Krzysztof Cwalina via USRP-users < >> usrp-users@lists.ettus.com> wrote: >> >>> Hello, >>> >>> in my project I just write the C++ DLL Library and import it into C# >>> project. The problem is - there are some problems with the UHD. My platform: >>> >>> Windows 7 x64, >>> Visual Studio 2013 Pro >>> >>> when I run project sometimes on the line: uhd::usrp::multi_usrp::sptr >>> usrp = uhd::usrp::multi_usrp::make(args); there is exception like: >>> >>> A first chance exception of type >>> 'System.Runtime.InteropServices.SEHException' occurred in USRPTest.exe >>> Additional information: External component has thrown an exception. >>> >>> Sometimes it is - sometimes is not (depends on how many times I compile >>> the same code. Next problem is when I want to use two methods: >>> >>> usrp->set_clock_source("internal"); or uhd::stream_args_t >>> stream_args("fc32"); >>> >>> Same error show up. I tried everything, I've searched almost all topics >>> about this subject - but I didn't found the solution. Can anyone help me? >>> >>> Thanks. >>> >>> _______________________________________________ >>> USRP-users mailing list >>> USRP-users@lists.ettus.com >>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com >>> >> >> >> >> _______________________________________________ >> USRP-users mailing list >> USRP-users@lists.ettus.com >> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20141109/6d7de957/attachment-0001.html> ------------------------------ Message: 7 Date: Sun, 09 Nov 2014 11:21:35 +0100 From: Krzysztof Cwalina <kkcwal...@gmail.com> To: Nir Eden <nir.e...@gmail.com> Cc: "usrp-users@lists.ettus.com" <usrp-users@lists.ettus.com> Subject: Re: [USRP-users] Windows UHD C++ API Message-ID: <545f402f.3090...@gmail.com> Content-Type: text/plain; charset="utf-8"; Format="flowed" Thanks for Your reply - yes it is I think. But now I am a bit confused about building the DLL and importing it into C#. C++: extern "C" __declspec(dllexport) void initdevice(char* device, double device_rate, double device_freq, double device_gain); __declspec(dllexport) void initdevice(char* device, double device_rate, double device_freq, double device_gain) { } C#: [DllImport("USRP_UHD.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "initdevice")] public static extern void initdevice(string device, double device_rate, double device_freq, double device_gain); initdevice("192.168.10.2", 5000000, 93900000, 10); And the error is now: An unhandled exception of type 'System.EntryPointNotFoundException' occurred in USRPTest.exe Additional information: Unable to find an entry point named 'initdevice' in DLL 'USRP_UHD.dll'. I think I just missing something obvious. W dniu 2014-11-09 o 10:55, Nir Eden pisze: > From my replay to Dan Sego: > Try to comment the distractor at property_tree.hpp at line 102. So it > will be like this this: > > //template <typename T> > //property<T>::~property(void){ > // /* NOP */ > //} > Is it helpful? > > On Sun, Nov 9, 2014 at 10:48 AM, Krzysztof Cwalina > <kkcwal...@gmail.com <mailto:kkcwal...@gmail.com>> wrote: > > Hello, > > I wrote that I will have an access to the device but the problem > is I cant just simply compile my project now. Namespace > Runtime::InteropServices requires to select in project options > Common Language Runtime Support (/clr) - but then I got like 20 > errors from UHD driver: > > C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(103): > error C2611: 'property' : illegal following '~' (expected identifier) > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(103): > error C2988: unrecognizable template declaration/definition > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(103): > error C2059: syntax error : 'property' > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(122): > error C2143: syntax error : missing ';' before '/' > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(122): > error C4430: missing type specifier - int assumed. Note: C++ does > not support default-int > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(122): > error C2143: syntax error : missing ',' before '&' > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(123): > error C2143: syntax error : missing ';' before '/' > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(123): > error C4430: missing type specifier - int assumed. Note: C++ does > not support default-int > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.hpp(123): > error C2143: syntax error : missing ',' before '&' > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(88): > error C2039: 'create' : is not a member of 'uhd::property_tree' > 1> C:\Program Files > (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of > 'uhd::property_tree' > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(88): > error C4430: missing type specifier - int assumed. Note: C++ does > not support default-int > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(88): > error C2143: syntax error : missing ',' before '&' > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(93): > error C2039: 'access' : is not a member of 'uhd::property_tree' > 1> C:\Program Files > (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of > 'uhd::property_tree' > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(93): > error C4430: missing type specifier - int assumed. Note: C++ does > not support default-int > 1>C:\Program Files (x86)\UHD\include\uhd/property_tree.ipp(93): > error C2143: syntax error : missing ',' before '&' > 1>C:\Program Files (x86)\UHD\include\uhd/device.hpp(32): error > C2990: 'uhd::property_tree' : non-class template has already been > declared as a class template > 1> C:\Program Files > (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of > 'uhd::property_tree' > 1>C:\Program Files (x86)\UHD\include\uhd/device.hpp(106): error > C2955: 'uhd::property_tree' : use of class template requires > template argument list > 1> C:\Program Files > (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of > 'uhd::property_tree' > 1>C:\Program Files (x86)\UHD\include\uhd/device.hpp(106): error > C2027: use of undefined type 'uhd::property_tree' > 1> C:\Program Files > (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of > 'uhd::property_tree' > 1>C:\Program Files (x86)\UHD\include\uhd/device.hpp(114): error > C2955: 'uhd::property_tree' : use of class template requires > template argument list > 1> C:\Program Files > (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of > 'uhd::property_tree' > 1>C:\Program Files (x86)\UHD\include\uhd/device.hpp(114): error > C2027: use of undefined type 'uhd::property_tree' > 1> C:\Program Files > (x86)\UHD\include\uhd/property_tree.hpp(128) : see declaration of > 'uhd::property_tree' > > Have You got any idea? > > W dniu 2014-11-08 o 11:50, Nir Eden pisze: >> Hi, >> >> I'm not sure that I'm fully understand your setup. You are trying >> to call UHD in windows from c++/cli program? if so you need to >> marshal string. Try this: >> >> std::string MarshalString(String ^ s) >> { >> using namespace Runtime::InteropServices; >> const char* chars = (const >> char*)(Marshal::StringToHGlobalAnsi(s)).ToPointer(); >> std::string os = chars; >> Marshal::FreeHGlobal(IntPtr((void*)chars)); >> return os; >> } >> >> and than: >> usrp->set_clock_source(MarshalString("internal"); >> >> -- Nir, 4Z7DEF >> >> On Sat, Nov 8, 2014 at 11:55 AM, Krzysztof Cwalina via USRP-users >> <usrp-users@lists.ettus.com <mailto:usrp-users@lists.ettus.com>> >> wrote: >> >> Hello Ben, >> >> Thank You for reply. Yes I do not explain my problem enough. >> Dont focus on C# - C++ connection and DLL. I just want to >> write a little library which uses UHD driver to connect with >> the device (N2920 and N2921). >> >> I just copy my code from DLL and build a simple C++ project >> which uses the UHD driver. The problem is that in Linux this >> code works very welland anything is ok. But suddenly on >> Windows I've got an error in the places where I need to pass >> parameters as a string like methods: >> usrp->set_clock_source("internal"); >> uhd::stream_args_t stream_args("fc32"); >> >> The other like: >> usrp->set_rx_rate(rate); >> usrp->get_rx_rate(); >> >> Works well under the Windows. I'm a bit confused why is it >> happening and why I get error there. Only the methods where >> string is a parameter seems to not working for me. I tried >> almost everything. >> >> W dniu 2014-11-08 o 02:02, Ben Hilburn pisze: >>> Hi Krzysztof - >>> >>> I'm a bit confused, I think. Can you explain what you mean >>> by importing the UHD DLL into a C# project? I'm not familiar >>> with C#, but is that expected to work? >>> >>> We certainly haven't tested anything like that, here. Or am >>> I misunderstanding your question? >>> >>> Cheers, >>> Ben >>> >>> On Fri, Nov 7, 2014 at 5:49 AM, Krzysztof Cwalina via >>> USRP-users <usrp-users@lists.ettus.com >>> <mailto:usrp-users@lists.ettus.com>> wrote: >>> >>> Hello, >>> >>> in my project I just write the C++ DLL Library and >>> import it into C# project. The problem is - there are >>> some problems with the UHD. My platform: >>> >>> Windows 7 x64, >>> Visual Studio 2013 Pro >>> >>> when I run project sometimes on the line: >>> uhd::usrp::multi_usrp::sptr usrp = >>> uhd::usrp::multi_usrp::make(args); there is exception like: >>> >>> A first chance exception of type >>> 'System.Runtime.InteropServices.SEHException' occurred >>> in USRPTest.exe >>> Additional information: External component has thrown an >>> exception. >>> >>> Sometimes it is - sometimes is not (depends on how many >>> times I compile the same code. Next problem is when I >>> want to use two methods: >>> >>> usrp->set_clock_source("internal"); or >>> uhd::stream_args_t stream_args("fc32"); >>> >>> Same error show up. I tried everything, I've searched >>> almost all topics about this subject - but I didn't >>> found the solution. Can anyone help me? >>> >>> Thanks. >>> >>> _______________________________________________ >>> USRP-users mailing list >>> USRP-users@lists.ettus.com >>> <mailto:USRP-users@lists.ettus.com> >>> >>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com >>> >>> >> >> >> _______________________________________________ >> USRP-users mailing list >> USRP-users@lists.ettus.com <mailto:USRP-users@lists.ettus.com> >> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20141109/be25213c/attachment-0001.html> ------------------------------ Message: 8 Date: Sun, 9 Nov 2014 16:12:54 +0200 From: Nir Eden <nir.e...@gmail.com> To: "usrp-users@lists.ettus.com" <usrp-users@lists.ettus.com> Subject: [USRP-users] UHD and C# - New open source library Message-ID: <CAP4_4=chnxaecowsunfjhlnvaxbnkq7rrdg3stgbpk+aacf...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi, I've wrote C# wrapper library for UHD.dll library. Its name is UHD_SHARP. I have released both binaries and source code for free at Codeplex <https://uhdsharp.codeplex.com/>: https://uhdsharp.codeplex.com/. UHD_SHARP library designed to lower the barriers to entry into SDR world. The API was simplified and the lower layers taking care for all the buffering, multitasking and other nasty tasks. This makes UHD_SHARP is easy to learn. This allows you to keep your focus on signal processing and leave some programming overhead behind. Here is a receiver code example: using UHD_SHARP; static void Main(string[] args) { usrp = new multi_usrp(); // Connect to the first device if (!usrp.isConnected) { Console.WriteLine("Cannot connect to device."); return; } usrp.set_rx_rate(32e6); // RX rate = 32MHz usrp.set_rx_freq(100e6); // RX frequency = 100 MHz usrp.set_rx_gain(40); // RX gain = 40 dB usrp.DataReceiverEvent += OnDataReceiverEvent; // Wire RX event Console.WriteLine("### Starting ### "); Console.WriteLine("Press any key to exit"); usrp.begin_rx_stream(); // Start stream RX data Console.ReadKey(); } static private void OnDataReceiverEvent(int[] real, int[] imaginary, int length, rx_metadata_t md) { // Your code goes here Console.Write("."); } As for now I have implemented only the receiver path. I have tested it using my B200 radio. I will be grateful if others will verify it on different units. I hope that you will find UHD_SHARP library useful, Nir Eden, 4Z7DEF -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20141109/72d43746/attachment-0001.html> ------------------------------ Message: 9 Date: Sun, 09 Nov 2014 11:38:54 -0500 From: Philip Balister <phi...@balister.org> To: "USRP-users@lists.ettus.com" <USRP-users@lists.ettus.com> Subject: [USRP-users] UHD-3.7.3 in E100 package feeds Message-ID: <545f989e.6020...@balister.org> Content-Type: text/plain; charset=utf-8 I've pushed uhd-3.7.3 into the E100 package feeds. This should solve problems for people using the CBX daughterboard with the E100. To update run: opkg update opkg upgrade Philip ------------------------------ Subject: Digest Footer _______________________________________________ USRP-users mailing list USRP-users@lists.ettus.com http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com ------------------------------ End of USRP-users Digest, Vol 51, Issue 9 *****************************************