[Discuss-gnuradio] Delete a reference to PMT - GRextras

2013-01-04 Thread Jose Torres Diaz
Hi Community, I'm working with blob manager to implement our design. The block diagram in GRExtras looks similar to this: BLOCK 1 --> BLOCK 2 --> BLOCK 3 --> SINK Where, Block 1 contains the manager as follows: MsgBlobManager = pmt::pmt_mgr::make(); for (size_t i = 0; i < MSG_BLOBS_ALLOCA

Re: [Discuss-gnuradio] Manager for blob and message passing - Blocking in E110

2012-11-26 Thread Jose Torres Diaz
v 27, 2012 at 4:53 PM, Josh Blum wrote: > > > On 11/26/2012 10:11 PM, Jose Torres Diaz wrote: > > Hi All, > > > > I'm still doing some blocks using message passing technique. Now, I'm > > working with blob passing downstream, however, my code blocks if

[Discuss-gnuradio] Manager for blob and message passing - Blocking in E110

2012-11-26 Thread Jose Torres Diaz
Hi All, I'm still doing some blocks using message passing technique. Now, I'm working with blob passing downstream, however, my code blocks if I run a infinite loop. Before, I had some issues with memory blowing out (using PMT dictionaries), but using the pmt manager solves the problem. My code i

[Discuss-gnuradio] pmt and dictionary blowing out memory

2012-11-22 Thread Jose Torres Diaz
Hi All, I'm using some blocks that I created using pmt dictionaries. Each of these blocks can run in an infinite loop, so that it is what I am testing. I connect 2 blocks and I left them running for 10 minutes, what I found is that the memory consumption (looking at using -top) is increasing ever

[Discuss-gnuradio] uhd module not found in E110

2012-11-18 Thread Jose Torres Diaz
Hi Community, I'm building GRExtras in E110 according to the instructions: *cmake ../ make sudo make install * What I got all the time is that uhd_module is not found: checking for module 'uhd' -- package 'uhd' not found Which it gave me some errors later on for other modules. Anyone can giv

[Discuss-gnuradio] New blocks build into E110 "AttributeError: 'module' object has no attribute"

2012-11-14 Thread Jose Torres Diaz
Hi All, I've made some blocks on top of GRExtras, which are running without problem in my local machine (I build the whole GRExtras + new blocks). However, when I build the same GRExtras into my USRP E110 and then, I run the top block, I got the following error: "AttributeError: 'module' object h

Re: [Discuss-gnuradio] Create a synchronous block using GRExtras

2012-11-05 Thread Jose Torres Diaz
; > *From:* discuss-gnuradio-bounces+sean.nowlan=gtri.gatech@gnu.org[mailto: > discuss-gnuradio-bounces+sean.nowlan=gtri.gatech....@gnu.org] *On Behalf > Of *Jose Torres Diaz > *Sent:* Monday, November 05, 2012 8:02 PM > *To:* j...@ettus.com > *Cc:* discuss-gnuradio@gnu.org > *Su

Re: [Discuss-gnuradio] Create a synchronous block using GRExtras

2012-11-05 Thread Jose Torres Diaz
Hi Josh, Yes, I am using: set_tag_propagation_policy(). However, I'm not sure what is the parameter expected in order to not propagate tags. Thanks again, Jose On Tue, Nov 6, 2012 at 11:09 AM, Josh Blum wrote: > > > On 11/05/2012 04:12 PM, Jose Torres Diaz wrote: > >

Re: [Discuss-gnuradio] Create a synchronous block using GRExtras

2012-11-05 Thread Jose Torres Diaz
tag_propagation_policy(TPP_DONT); Thanks, Jose On Tue, Nov 6, 2012 at 5:31 AM, Josh Blum wrote: > > > On 11/04/2012 03:08 PM, Jose Torres Diaz wrote: > > Hi All, > > > > Now I'm doing a block that uses stream instead of message passing. > However, > > my code is base

Re: [Discuss-gnuradio] Casting an input value using block() function

2012-11-04 Thread Jose Torres Diaz
Thanks Bastian, This fix the issue, Regards, Jose On Mon, Nov 5, 2012 at 5:11 PM, Bastian Bloessl wrote: > Hi Jose, > > > On 11/05/2012 01:12 AM, Jose Torres Diaz wrote: > >> int work( >> const InputItems &input_items, >>

Re: [Discuss-gnuradio] Casting an input value using block() function

2012-11-04 Thread Jose Torres Diaz
> InputItems; Because it is casting using const, rather than: typedef std::vector > OutputItems; I'm stuck in this point, because I'm not sure how to use the input_items in my work function, if I'm not able to cast it. Regards, Jose On Mon, Nov 5, 2012 at 10:42 AM, Jose Torr

[Discuss-gnuradio] Casting an input value using block() function

2012-11-04 Thread Jose Torres Diaz
Hi, My question is related to the work function using block() as provided in GRExtras. I have a block that input a gr_complex value and output a gr_complex value. I'm trying to cast the input and output, in order to use them in my work function, what I have is: int work( const InputItems

[Discuss-gnuradio] Create a synchronous block using GRExtras

2012-11-04 Thread Jose Torres Diaz
Hi All, Now I'm doing a block that uses stream instead of message passing. However, my code is based on those provided in GRExtras. My block should be a gr_sync_block, however in GRExtras is used block() instead. How can I make sure that my block is a synchronous block in this case?, because I can

[Discuss-gnuradio] How to avoid windowing in FFT - GNURadio

2012-11-04 Thread Jose Torres Diaz
Hi Community, I'm working with FFT from GNURadio and I would like to use it as it is. However, I need to avoid the windowing, but I'm not sure which parameter I can provide to the block to do this. Should I leave the field empty or should I give a 1?. Thanks for your help, Regards, Jose __

Re: [Discuss-gnuradio] Pmt value as an integer

2012-10-31 Thread Jose Torres Diaz
Thanks Tom!!, This solve the problem. Cheers, Jose On Thu, Nov 1, 2012 at 1:24 AM, Tom Rondeau wrote: > On Wed, Oct 31, 2012 at 7:40 AM, Jose Torres > wrote: > > Hi All, > > > > I'm wondering if there is an easy way to use a pmt_t value as a normal > integer value. What happen is I'm receivi

[Discuss-gnuradio] saving a complex data into a file

2012-10-30 Thread Jose Torres Diaz
Hi Community, I'm trying to save complex data from a block into a file, in order to process the information later on. My code is very simple, as shown bellow: //Definition of values std::vector complex_values(4); complex_values[0]=(-0.707,-0.707); complex_values[1]=(0.707,-0.707); complex_values

Re: [Discuss-gnuradio] Debugging printing GRC - E110

2012-10-24 Thread Jose Torres Diaz
gt; On 10/22/2012 09:28 PM, Jose Torres Diaz wrote: > > Hi, > > > > I've a kind of basic question, but it has taken me a lot of time to > figure > > out. I made a signal processing chain of blocks (very simple in facts, > > generate PSDU then send as a m

Re: [Discuss-gnuradio] saving internal (to a block) variable values to a file

2012-10-23 Thread Jose Torres Diaz
Hi, Also I'm saving some variables into a file. What I did: Before the work function: myfile.open ("/home/Desktop/examples/variables_from_block"); Then, inside the work function: myfile << _msg.key; //Save the variable value myfile << std::flush; I've found that I have to std::flush the file,

[Discuss-gnuradio] Debugging printing GRC - E110

2012-10-22 Thread Jose Torres Diaz
Hi, I've a kind of basic question, but it has taken me a lot of time to figure out. I made a signal processing chain of blocks (very simple in facts, generate PSDU then send as a message downstream, manipulate the content and count the number of message that I've received). In order to debug my bl

Re: [Discuss-gnuradio] Problems passing the control between blocks - message passing

2012-10-22 Thread Jose Torres Diaz
. But, will the work function come back again?. Thanks a lot, Jose. On Tue, Oct 23, 2012 at 12:23 PM, Josh Blum wrote: > > > On 10/22/2012 03:24 PM, Jose Torres Diaz wrote: > > Hi Community, > > > > In following up this issue, we've tried different options (ie.

Re: [Discuss-gnuradio] Problems passing the control between blocks - message passing

2012-10-22 Thread Jose Torres Diaz
issue?. Thanks for your comments, Jose. On Mon, Oct 22, 2012 at 5:55 PM, Jose Torres Diaz wrote: > Hi John, > > Also, I am trying to use boost::this_thread::yield() between blocks, but > when I add a third block into the chain, the control passes between BLOCK 1 > <-> BLOC

Re: [Discuss-gnuradio] Error running top_block.py in E110

2012-10-22 Thread Jose Torres Diaz
Hi Josh, The error was when I built the grextras in the E110. I did again and now is working properly, Thanks, Jose On Mon, Oct 22, 2012 at 1:42 PM, Josh Blum wrote: > > > On 10/21/2012 08:08 PM, Jose Torres Diaz wrote: > > Hi All, > > > > I'm running a bloc

Re: [Discuss-gnuradio] Problems passing the control between blocks - message passing

2012-10-22 Thread Jose Torres Diaz
:17 AM, Jose Torres Diaz wrote: > Hi John, > > Please, find attached the codes (.cc) for BLOCK 1 and BLOCK 2. I'm still > unable to control the correct order of them, when I generated an infinite > loop. > > Thanks a lot for your help in this issue, > > Regards, &g

[Discuss-gnuradio] Error running top_block.py in E110

2012-10-21 Thread Jose Torres Diaz
Hi All, I'm running a block that I finished in GRextras in the USRP E110. I built the grextras as: build/sudo cmake ../ build/sudo make build/sudo make install It finishes without errors, but when I run my example in E110: /python top_block.py. It gives the following error: *File "top_block.p

Re: [Discuss-gnuradio] Problems passing the control between blocks - message passing

2012-10-17 Thread Jose Torres Diaz
's with arbirtrary > key and value, the heart_beat block in my pre-cog branch might help... > > -John > > > > > > On Tue, Oct 16, 2012 at 11:34 PM, Jose Torres Diaz < > torresdiaz.j...@gmail.com> wrote: > >> Hi John, >> >> I wrote the co

Re: [Discuss-gnuradio] Problems passing the control between blocks - message passing

2012-10-16 Thread Jose Torres Diaz
the > queue: > > self.pop_msg_queue() > > Should help you avoid the return -1 > > Or maybe I've misunderstood your problem...? > > -John > > > > On Tue, Oct 16, 2012 at 11:18 PM, Jose Torres Diaz < > torresdiaz.j...@gmail.com> wrote: > >&

[Discuss-gnuradio] Problems passing the control between blocks - message passing

2012-10-16 Thread Jose Torres Diaz
Hi All, I'm working with 2 blocks that I've created using "UHD_AMsg_Source" as a reference model. In these blocks, I am passing pmt_dict type as messages, ie: this->post_msg(0, AMSG_KEY, dictionary,_id); Where, dictionary contains data/metadata that I can read in the next block downstream. BLO

Re: [Discuss-gnuradio] Error using block UHD AMsg Source

2012-10-14 Thread Jose Torres Diaz
timestamp); Thanks, Jose. On Mon, Oct 15, 2012 at 11:54 AM, Jose Torres Diaz < torresdiaz.j...@gmail.com> wrote: > Hi Josh, > > You mentioned that: > > > "the code to add a key/value actually returns a new dictionary and doesnt > change the old ones. > > I

Re: [Discuss-gnuradio] Error using block UHD AMsg Source

2012-10-14 Thread Jose Torres Diaz
value_dict, TIME_KEY, pmt::pmt_from_uint64(3200)); this->post_msg(0, AMSG_KEY, value_dict, _id); std::cout << std::endl << "Posting downstream" << std::endl; std::cout << std::endl << "checking if null:" < wrote: > > > O

[Discuss-gnuradio] Help to understand "UHD AMsg Source"

2012-10-14 Thread Jose Torres Diaz
Hi Community, I would like to ask if someone can give a hand to figure out how "UHD AMsg Source" block works. I mean, I would like to understand in particular how this block can post message using pmt_dict type. The piece of routine that I'm keen on it's this: void post_async_md(const uhd::async_

Re: [Discuss-gnuradio] Error using block UHD AMsg Source

2012-10-10 Thread Jose Torres Diaz
> File "/home/asrpuser/Desktop/Jose Torres Material /top_block.py", line 33 > self.extras_uhd_amsg_source_0 = > gr_extras.uhd_amsg_source(uhd.device_addr="add=172.17.3.140") > SyntaxError: keyword can't be an expression > > Thanks, > > Jose. &g

Re: [Discuss-gnuradio] Error using block UHD AMsg Source

2012-10-10 Thread Jose Torres Diaz
ould like to see how your code is working with these dictionaries. Thanks again, Jose On Thu, Oct 11, 2012 at 12:05 PM, Jose Torres Diaz < torresdiaz.j...@gmail.com> wrote: > Hi Josh, > > I've changed the .xml file. Also, I've checked the new top_block.py f

Re: [Discuss-gnuradio] Error using block UHD AMsg Source

2012-10-10 Thread Jose Torres Diaz
ce.xml > > @@ -4,7 +4,7 @@ > > extras_uhd_amsg_source > > from gnuradio import uhd > > import gnuradio.extras as gr_extras > > -gr_extras.uhd_amsg_source(device_addr=$dev_addr) > > +gr_extras.uhd_amsg_source(uhd.device_addr($dev_addr)) > > > >

Re: [Discuss-gnuradio] Error using block UHD AMsg Source

2012-10-10 Thread Jose Torres Diaz
osh, Regards, Jose On Thu, Oct 11, 2012 at 11:24 AM, Josh Blum wrote: > > > On 10/10/2012 05:51 PM, Jose Torres Diaz wrote: > > Hi All, > > > > I'm checking the functionality of the block "UHD AMsg Source" using the > > USRP N210. The device is c

Re: [Discuss-gnuradio] Message passing as input and output in block (C++ coding)

2012-10-09 Thread Jose Torres Diaz
help, Jose. On Wed, Oct 10, 2012 at 2:22 PM, Jose Torres Diaz wrote: > Hi Josh, > > I've checked this information and it is very useful. I've solved several > issues that I had before. However, it is still complaining when I post a > BLOB_METADATA (which is a pmt_l

Re: [Discuss-gnuradio] Message passing as input and output in block (C++ coding)

2012-10-09 Thread Jose Torres Diaz
Hi Josh, I've checked this information and it is very useful. I've solved several issues that I had before. However, it is still complaining when I post a BLOB_METADATA (which is a pmt_list) downstream. What I have is the following: BLOCK 1 --- > BLOCK 2 (both blocks use message passing as blobs

Re: [Discuss-gnuradio] Message passing as input and output in block (C++ coding)

2012-10-08 Thread Jose Torres Diaz
t type?. Many thanks again, Jose On Tue, Oct 9, 2012 at 11:06 AM, Jose Torres Diaz wrote: > Hi Josh, > > Thanks for the info. So, for example if I want to modify the > blob_to_stream example as blob_to_blob (ie. input a message and then output > a message). The .cc files is as

Re: [Discuss-gnuradio] Message passing as input and output in block (C++ coding)

2012-10-08 Thread Jose Torres Diaz
_t item_size){ return gnuradio::get_initial_sptr(new blob_to_blob_impl(item_size)); } Many thanks again for your kind help, Jose On Tue, Oct 9, 2012 at 4:25 AM, Josh Blum wrote: > > > On 10/07/2012 09:56 PM, Jose Torres Diaz wrote: > > Hi All, > > > > I have another

[Discuss-gnuradio] Message passing as input and output in block (C++ coding)

2012-10-07 Thread Jose Torres Diaz
Hi All, I have another question about the message passing technique. In this opportunity, I would like to create a block that takes message as input, but also that post message downstream as output. In my initial attempt, I'm using the original blob_to_stream example (see below), the incoming mess

[Discuss-gnuradio] Modify data inside a blob

2012-10-07 Thread Jose Torres Diaz
Hi, I would like to ask about how to modify data inside a block that work with blobs. I've finished a block (let name as "BLOCK_1"), which post message downstream. In particular, it posts 2 blobs with metadata and data. The idea is the following: - --- | BLOCK_1 |

Re: [Discuss-gnuradio] Initialize a pointer - object

2012-10-04 Thread Jose Torres Diaz
: In constructor >> 'asrp_fec_encoder::asrp_fec_encoder(const char*)': >> > > You may find reading up on virtual inheritance helpful: > http://www.cplusplus.com/doc/tutorial/polymorphism/ > http://www.learncpp.com/cpp-tutorial/118-virtual-base-classes/ > > Cheers,

Re: [Discuss-gnuradio] Initialize a pointer - object

2012-10-03 Thread Jose Torres Diaz
PM, Jose Torres Diaz wrote: > In order to add extra information, > > I know that block() contains a pure virtual function, so that, in the > blob_to_stream program it is used: > > _item_size(item_size). Then, _item_size is the object used in > blob_to_stream. > > However

Re: [Discuss-gnuradio] Initialize a pointer - object

2012-10-02 Thread Jose Torres Diaz
&, const OutputItems&) asrp_fec_encoder.cc: In constructor 'asrp_fec_encoder::asrp_fec_encoder(const char*)': Regards, Jose On Wed, Oct 3, 2012 at 3:03 PM, Jose Torres Diaz wrote: > Hi, > > I'm modifying the block BLOB_TO_STREAM and I would like to

[Discuss-gnuradio] Initialize a pointer - object

2012-10-02 Thread Jose Torres Diaz
Hi, I'm modifying the block BLOB_TO_STREAM and I would like to pass a pointer to that function. The original file (blob_to_stream.cc) is like this: class blob_to_stream_impl : public blob_to_stream{ public: blob_to_stream_impl(const size_t item_size): block( "blob_to_strea

Re: [Discuss-gnuradio] Message passing - PSDU block and sink connection

2012-09-25 Thread Jose Torres Diaz
lock". All the example is based on blob to stream and socket to block. Many thanks for your kind help, Regards, Jose On Wed, Sep 26, 2012 at 2:18 PM, Josh Blum wrote: > > > On 09/26/2012 12:47 AM, Jose Torres Diaz wrote: > > Hi, > > > > I've just finishe

[Discuss-gnuradio] Message passing - PSDU block and sink connection

2012-09-25 Thread Jose Torres Diaz
Hi, I've just finished my block that generates PSDUs and then, it transmits downstream subscribers using message passing mechanism. I am using as a sink "Extras: Blob to Socket", but when I run my flowgraph in GNU Radio Companion (after connect my new block and the sink), I got the following error

Re: [Discuss-gnuradio] Block missing GNU Radio Companion

2012-09-24 Thread Jose Torres Diaz
Hi Josh, Many thanks for your help, the block now is in the correct category after adding the line: Extras Regards, Jose. On Mon, Sep 24, 2012 at 10:27 PM, Josh Blum wrote: > > > On 09/24/2012 01:49 AM, Jose Torres Diaz wrote: > > Hi, > > > > I made a new block

[Discuss-gnuradio] Block missing GNU Radio Companion

2012-09-23 Thread Jose Torres Diaz
Hi, I made a new block called "my_block", copying the example "blob_to_stream" provided in grcextras. I changed the files .cc, .h and .xml. Also, I added some lines in the CMakeList.txt files in the path: /grc /include/gnuradio/extras /lib Then, I compiled using: build/ sudo cmake ../ build/ su

Re: [Discuss-gnuradio] Creation of a block (PSDU 29 octets) using message passing technique

2012-09-20 Thread Jose Torres Diaz
ning about (detail and set_detail). However, it does not compile anymore if I tried this option. Thanks for your help, Regards, Jose. On Fri, Sep 21, 2012 at 5:37 AM, Josh Blum wrote: > > > On 09/20/2012 03:28 AM, Jose Torres Diaz wrote: > > Hi Josh, > > > > I checke

Re: [Discuss-gnuradio] Creation of a block (PSDU 29 octets) using message passing technique

2012-09-20 Thread Jose Torres Diaz
eter. I was using before in my block "gr_sync_block" and I did not get any error, I think because the file "gr_sync_block.h" does have a "detail" parameter. Is this right?, is this error due to this "detail" parameter missing?, how can I overcome/solve this

Re: [Discuss-gnuradio] Creation of a block (PSDU 29 octets) using message passing technique

2012-09-20 Thread Jose Torres Diaz
x27; Do you have any suggestion in this case?. Best Regards, Jose. On Thu, Sep 20, 2012 at 10:47 AM, Josh Blum wrote: > > > On 09/19/2012 07:42 PM, Jose Torres Diaz wrote: > > Hi Josh, > > > > I modified in my .h file: > > > > #include > > > &g

Re: [Discuss-gnuradio] Creation of a block (PSDU 29 octets) using message passing technique

2012-09-19 Thread Jose Torres Diaz
ed to use the gr_make_io_signature anyway, because I am reading the code for the example of "socket_to_blob.cc". 1. Do I need to use gr_make_io_signature or just msg_signature is enough?. Many thanks for your kind help, Regards, Jose. On Wed, Sep 19, 2012 at 3:33 PM, Josh Blum wrote: &

[Discuss-gnuradio] Creation of a block (PSDU 29 octets) using message passing technique

2012-09-18 Thread Jose Torres Diaz
Hi, I'm trying to use "message passing" technique in order to create a block that generates 29 Octets. Currently, I'm using a block that generates 29 Octets and then use tag streaming. In the .cc file, IO signature looks like: gr_sync_block ("st1_pktsrc_dummy_b", gr_make_io_signature (