# Where can I write the Coding of C++ in the GNU radio

**URL:** <https://www.ruby-forum.com/t/where-can-i-write-the-coding-of-c-in-the-gnu-radio/221629>\
**Category:** GNU Radio\
**Created:** [July 23, 2012, 1:41pm UTC](https://www.ruby-forum.com/t/where-can-i-write-the-coding-of-c-in-the-gnu-radio/221629 "2012-07-23T13:41:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [July 23, 2012, 1:41pm UTC](https://www.ruby-forum.com/t/where-can-i-write-the-coding-of-c-in-the-gnu-radio/221629/1 "2012-07-23T13:41:12Z")

</div>

Hi all,

Sorry if this question is repeated, I am still a beginner in GNU radio,  
I couldn’t find the answer after searching the Web.

Where I can write the Coding of C++ in the GNU radio? and How can access  
these Installed C++ blocks in GNU radio ?  
I want it to run a project ofParallelProcessing using C++ to operate  
multiple USRPs with 20 MS/s each at the same time synchronized with each  
others.  
I am using Ubuntu 10.04 LTS as operating system.  
Thanks in advance.

Anis

---

<div class="post-metadata">

**Author:** ![Abdelrahman\_Anis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/b4bc9f/32.png) [@Abdelrahman\_Anis](https://www.ruby-forum.com/u/Abdelrahman_Anis)\
**Post date:** [July 23, 2012, 3:21pm UTC](https://www.ruby-forum.com/t/where-can-i-write-the-coding-of-c-in-the-gnu-radio/221629/2 "2012-07-23T15:21:09Z")

</div>

Hi Anis,

I think a good starting would be to modify “rx\_samples\_to\_file.cpp” or  
“tx\_samples\_to\_file.cpp.”. The files are located in uhd/host/examples.

How many USRPs will you use? Will they use the same host machine? Time  
synchronization is possible using the PPS input on a USRP2 or N2xx. My  
group uses the PPS and 10MHz oscillator output from a GPS receiver for  
time  
sync. Check out the following for more information on synchronzing  
device  
time: [http://files.ettus.com/uhd\_docs/manual/html/sync.html](http://files.ettus.com/uhd_docs/manual/html/sync.html)

Hope this helps!  
Ryan

On Mon, Jul 23, 2012 at 7:40 AM, Abdelrahman Anis \<

---

<div class="post-metadata">

**Author:** ![Abdelrahman\_Anis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/b4bc9f/32.png) [@Abdelrahman\_Anis](https://www.ruby-forum.com/u/Abdelrahman_Anis)\
**Post date:** [July 25, 2012, 8:25am UTC](https://www.ruby-forum.com/t/where-can-i-write-the-coding-of-c-in-the-gnu-radio/221629/3 "2012-07-25T08:25:18Z")

</div>

Anis,

The file you referenced contains no main function for execution: it is a  
header file that defines the functions contained in the multi\_usrp  
class. Additionally, I believe that code is used for multi\_usrp.py  
(Python  
script, not C++). I have never used the Python scripts: my recording  
needs  
are simple enough that I can get away with modifying  
“rx\_samples\_to\_file.cpp”

The source code for the C++ examples is located in “uhd/host/examples”  
but  
the compiled executables are in “uhd/host/build/examples.” The  
following  
will show you a list of parameters that are available for  
“rx\_samples\_to\_file”:

./uhd/host/build/examples/rx\_samples\_to\_file --help

-Ryan

On Tue, Jul 24, 2012 at 8:24 AM, Abdelrahman Anis \<
