Editing Guided Tutorial GNU Radio in Python

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1,551: Line 1,551:


<syntaxhighlight lang="python" line="line">
<syntaxhighlight lang="python" line="line">
<?xml version="1.0"?>
<block>
  <name>qpsk_demod_py</name>
  <key>tutorial_qpsk_demod_py</key>
  <category>tutorial</category>
  <import>import tutorial</import>
  <make>tutorial.qpsk_demod_py($gray_code)</make>
  <!-- Make one 'param' node for every Parameter you want settable from the GUI.
      Sub-nodes:
      * name
      * key (makes the value accessible as $keyname, e.g. in the make node)
      * type -->
  <param>
    <name>Gray Code</name>
    <key>gray_code</key>
    <type>int</type>
  </param>


   <!-- Make one 'sink' node per input. Sub-nodes:
   qpsk_demod_py
      * name (an identifier for the GUI)
  tutorial_qpsk_demod_py
      * type
  tutorial
      * vlen
  import tutorial
      * optional (set to 1 for optional inputs) -->
  tutorial.qpsk_demod_py($gray_code)
   <sink>
    
     <name>in</name>
 
     <type>complex</type>
    Gray Code
   </sink>
     gray_code
     int
    


   <!-- Make one 'source' node per output. Sub-nodes:
    
      * name (an identifier for the GUI)
    
      * type
     in
      * vlen
     complex
      * optional (set to 1 for optional inputs) -->
    
      <!-- e.g. int, float, complex, byte, short, xxx_vector, ...-->
   <source>
     <name>out</name>
     <type>byte</type>
   </source>
</block>


 
     
 
    out
    byte
 
</syntaxhighlight>
</syntaxhighlight>




We can then install as we did for the multiply block however we need to rerun cmake in order to take into account the new block:
We can then install as we did for the multiply block however we need to rerun cmake in order to take into account the new block:
<pre>
 
  cd build
  cd build
  cmake ../
  cmake ../
Line 1,601: Line 1,586:
  sudo make install
  sudo make install
  sudo ldconfig
  sudo ldconfig
</pre>
 
Then we can open up our GRC file from the beginning and place our missing block we just made.
Then we can open up our GRC file from the beginning and place our missing block we just made.


What is the Expected Output?
What is the Expected Output?
https://raw.githubusercontent.com/gnuradio/gr-tutorial/master/examples/tutorial3/images/tutorial_three_4.png
https://raw.githubusercontent.com/gnuradio/gr-tutorial/master/examples/tutorial3/images/tutorial_three_4.png


== 3.4. Conclusion ==
== 3.4. Conclusion ==

Please note that all contributions to GNU Radio are considered to be released under the Creative Commons Attribution-ShareAlike (see GNU Radio:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)