discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Jose Torres Diaz
Subject: [Discuss-gnuradio] Creation of a block (PSDU 29 octets) using message passing technique
Date: Wed, 19 Sep 2012 14:41:21 +0930

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 (0, 0, 0),
           gr_make_io_signature (MIN_OUT, MAX_OUT, sizeof (unsigned char)))

While, the stream tags looks like this:

add_item_tag(0, tag_pos,    
             d_burst_start_key,       
             pmt_sob,     
             d_my_unique_id)

Now, I want to change this approach to message passing as it is explained here: https://github.com/guruofquality/grextras/wiki/Blocks-Coding-Guide. So, I changed the lines indicated above, for the following:

 : gr_sync_block ("test_temporal",
                   gr_make_io_signature(0, 0, 0),
                   gr_make_io_signature(0, 0, 0),
                   msg_signature(false, 1))

and I am passing the message as follows:

   this->post_msg(0,  tag_pos,    
          d_burst_start_key,       
              pmt_sob,     
            d_my_unique_id);

However, when I compile my code after these changes, it complains about the class 'asrp_test_temporal' does not have any field named block (see the errors attached below).
'
asrp_test_temporal.cc:113:5: error: class 'asrp_test_temporal' does not have any field named 'block'
asrp_test_temporal.cc:120:42: error: 'msg_signature' was not declared in this scope
asrp_test_temporal.cc:120:42: note: suggested alternative:
/usr/local/include/gnuradio/block.h:58:22: note:   'gnuradio::msg_signature'

So, I would like to ask you:

1. Do I need to use the IO signature for message passing?, because in the example provide in the https://github.com/guruofquality/grextras/wiki/Blocks-Coding-Guide only uses msg_signature, but not gr_make_io_signature (0, 0, 0).

I would really appreciate your help, sorry for the punctuation or grammar mistake, English is my second language. Please let me know if you need more information, I will be happy to provide it.

Regards,

Jose


reply via email to

[Prev in Thread] Current Thread [Next in Thread]