Forum: GNU Radio Create a synchronous block using GRExtras

Posted by Jose Torres Diaz (Guest)
on 2012-11-05 00:09
(Received via mailing list)
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 
cannot
use directly gr_sync_block.

Regards,

Jose.
Posted by Josh Blum (Guest)
on 2012-11-05 20:02
(Received via mailing list)
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 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 cannot
> use directly gr_sync_block.
>

The 1:1 ratio is actually the default mode of operation. See:

https://github.com/guruofquality/grextras/wiki/Blo...

-josh
Posted by Jose Torres Diaz (Guest)
on 2012-11-06 01:13
(Received via mailing list)
Thank Josh, it works.

Can I ask kind of related question?. I would like to stop the block 
posting
tags, in a GNURadio block, it is used:

set_tag_propagation_policy(TPP_DONT);

How to do it in block ()?. I tried this way, but gave me errors:

gr_block::tag_propagation_policy_t tag_propagation_policy(TPP_DONT);

Thanks,

Jose
Posted by Josh Blum (Guest)
on 2012-11-06 01:40
(Received via mailing list)
On 11/05/2012 04:12 PM, Jose Torres Diaz wrote:
>
Use the set_tag_propagation_policy() member function. See
void set_tag_propagation_policy(gr_block::tag_propagation_policy_t p);
in block.h

_josh
Posted by Jose Torres Diaz (Guest)
on 2012-11-06 02:02
(Received via mailing list)
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
Posted by Nowlan, Sean (Guest)
on 2012-11-06 02:26
(Received via mailing list)
Jose,



Try gr_block::TPP_DONT . Note the namespace gr_block.

Sean

From: discuss-gnuradio-bounces+sean.nowlan=gtri.gatech.edu@gnu.org 
[mailto:discuss-gnuradio-bounces+sean.nowlan=gtri.gatech.edu@gnu.org] On 
Behalf Of Jose Torres Diaz
Sent: Monday, November 05, 2012 8:02 PM
To: josh@ettus.com
Cc: discuss-gnuradio@gnu.org
Subject: Re: [Discuss-gnuradio] Create a synchronous block using 
GRExtras

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 
<josh@ettus.com<mailto:josh@ettus.com>> wrote:


On 11/05/2012 04:12 PM, Jose Torres Diaz wrote:
>
Use the set_tag_propagation_policy() member function. See
void set_tag_propagation_policy(gr_block::tag_propagation_policy_t p);
in block.h

_josh
Posted by Jose Torres Diaz (Guest)
on 2012-11-06 02:40
(Received via mailing list)
Thanks Sean and Josh!, It is working using:

*gr_block::TPP_DONT *

Regards,

Jose.

On Tue, Nov 6, 2012 at 11:56 AM, Nowlan, Sean
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.