Hello Jafar:

The "Embedded Python Block" is named as "Python Block" on GNU Radio Companion; 
it is not called "Embedded Python Block" there. If you cannot find that either, 
then you may have to get GNU Radio source codes and build them manually.. which 
could be a bit annoying (There are a few tutorials on the GNU Radio wiki 
regarding that). Instead of that, you can write your own custom Python GNU 
Radio blocks (without using the Embedded Python Blocks) by following the Python 
programming tutorials on the GNU Radio wiki:


https://wiki.gnuradio.org/index.php/Guided_Tutorial_GNU_Radio_in_Python (Sec. 
3.2 and later). In your case, this is probably the best practice.


If you want to use TCP, then you can simply add a TCP sink to your flowgraphs, 
and connect it to the data stream which you wish to output. Now you can connect 
your Python programs to the TCP sink by using a TCP socket. You will have to 
study the TCP socket programming if you haven't already. Your program will 
receive a series of numbers, in binary (interleaved 4-byte  floats, if your 
numbers are in complex format; 4-byte floats, if your numbers are in float). 
You may have to convert their types to the appropriate one.


ZMQ works in much the same way; you simply add ZMQ sinks to your GNU Radio 
flowgraphs, and add codes in your Python programs to handle the ZMQ connection. 
Tutorials for ZMQ are available at http://zeromq.org/intro:read-the-manual . 
ZMQ is a bit more 'appropriate way', but a pure TCP socket will also do the 
trick.



*Please note that the TCP/UDP source/sink blocks that are bundled with GNU 
Radio are deprecated; you may want to use a third-party module instead ( 
https://github.com/ghostop14/gr-grnet )  .



Regards,

Kyeong Su Shin


________________________________
보낸 사람: jafar jafari <jafarjafari0...@gmail.com>
보낸 날짜: 2019년 6월 23일 일요일 오후 4:11:40
받는 사람: Kyeong Su Shin
제목: Re: [Discuss-gnuradio] extract value of signal

hi Kyeong
-I use GRC on raspberry but this version has not embedded python block can i 
retrieve this block?
-can i use TCP,ZMQ for real time ? if yes how can i use?
best regards

On Mon, Jun 17, 2019 at 6:47 PM Kyeong Su Shin 
<kss...@postech.ac.kr<mailto:kss...@postech.ac.kr>> wrote:

Hello Jafar,


If what you are asking for is a way to access data which are being generated 
(and outputted) by your pre-existing GNU Radio flowgraphs, the best way would 
be NOT extracting them. You can embed your own Python code to your GNU Radio 
flowgraph by writing Embedded Python Blocks (ex: 
http://aaronscher.com/GNU_Radio_Companion_Collection/Embedded_Python_Example1.html
 ,  
http://aaronscher.com/GNU_Radio_Companion_Collection/Embedded_Python_Example2.html
 ,  
http://aaronscher.com/GNU_Radio_Companion_Collection/Embedded_Python_Example3.html
 ,  
http://aaronscher.com/GNU_Radio_Companion_Collection/Embedded_Python_Example4.html
 ).


If that does not work for you, you can use TCP, ZMQ or a file sink to extract 
your data. For non-real time processing, you will want to use a File Sink block 
to store your data into your disk. You can then parse the data by following 
descriptions in 
https://wiki.gnuradio.org/index.php/FAQ#What_is_the_file_format_of_a_file_sink.3F_How_can_I_read_files_produced_by_a_file_sink.3F
 .


Regards,

Kyeong Su Shin


________________________________
보낸 사람: jafar jafari 
<jafarjafari0...@gmail.com<mailto:jafarjafari0...@gmail.com>> 대신 
Discuss-gnuradio 
<discuss-gnuradio-bounces+ksshin=postech.ac...@gnu.org<mailto:postech.ac...@gnu.org>>
보낸 날짜: 2019년 6월 17일 월요일 오후 7:09:45
받는 사람: discuss-gnuradio@gnu.org<mailto:discuss-gnuradio@gnu.org>
제목: [Discuss-gnuradio] extract value of signal

hi
how can i extract value of signal in gnuradio companion and use them in my 
python code

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to