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

2012-10-22 Thread Jose Torres Diaz
Hi Josh, Do you see an error when you return 0 from work? Like source block returned 0, marking it done? If this is the case, you can update gnuradio to get the fix. A: I returned 0 for every block and in that case, the routines run once only. However, I don't see any error. On the other hand, i

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

2012-10-22 Thread Josh Blum
On 10/22/2012 03:24 PM, Jose Torres Diaz wrote: > Hi Community, > > In following up this issue, we've tried different options (ie. returns 0, > yield or returns -1 in work function). What is happening is the block are > running exactly once. In other words, the work() function never comes back >

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

2012-10-22 Thread Jose Torres Diaz
Hi Community, In following up this issue, we've tried different options (ie. returns 0, yield or returns -1 in work function). What is happening is the block are running exactly once. In other words, the work() function never comes back and run again. Anyone can suggest a way to solve this issue?

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

2012-10-22 Thread Jose Torres Diaz
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 <-> BLOCK 2. When they finish, the control is passed to BLOCK 3. Thanks again for your suggestions, Jose On Mon, Oct 22, 2012 at 9:17 AM,

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

2012-10-17 Thread John Malsbury
Can you send me the files? -John On Wed, Oct 17, 2012 at 4:16 PM, Jose Torres Diaz wrote: > Hi John, > > Yes, I also checked the examples in your branch. In regards to your > questions. > > *1.* BLOCK 2 is processing the data from BLOCK 1, but only when BLOCK 1 > has finished the routine "N t

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

2012-10-17 Thread Jose Torres Diaz
Hi John, Yes, I also checked the examples in your branch. In regards to your questions. *1.* BLOCK 2 is processing the data from BLOCK 1, but only when BLOCK 1 has finished the routine "N times". Let me post a piece of code from BLOCK 1: int work( const InputItems &, const Outpu

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

2012-10-16 Thread Jose Torres Diaz
Hi John, I wrote the code in C++ based on UHD_AMsg_source.cc, provided in GRExtras. In my work function, I've finished it using return -1 (ie. the block has finished processing correctly) as shown below: int work( const InputItems &, const OutputItems & ){ //work definit

[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