discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Modifying OFDM-TX block get an additional output


From: Damindra Bandara
Subject: Re: [Discuss-gnuradio] Modifying OFDM-TX block get an additional output
Date: Sat, 24 Dec 2016 09:47:18 -0500

Thanks Karthik, I figured that out too. I am using it in my code.

On Sat, Dec 24, 2016 at 1:47 AM, Kartik Patel <address@hidden> wrote:
Hi Damindra,

For this problem, we have a better approach. Since, both output ports in your block are homogeneous (i.e. both types are same) it is preferred to use gr.io_signature, without mentioning gr.sizeof_gr_complex twice. So, the statement would be as follows:
        gr.hier_block2.__init__(self, "ofdm_tx",
                    gr.io_signature(1, 1, gr.sizeof_char),
                    gr.io_signature(2, 2, gr.sizeof_gr_complex))

Do try this. Let me know if there's any problem with this.

Regards,
Kartik Patel



On Fri, Dec 23, 2016 8:57 PM, Damindra Bandara address@hidden wrote:
Dear Kartik,

Thank you for your response. It solved the problem.

Damindra

On Fri, Dec 23, 2016 at 2:31 AM, Kartik Patel <address@hidden> wrote:
Hi Damindra,

The error shows that gr.io_signature can take 3 arguments. In your case you have added 4 arguments. Now, when we look at some examples of gr.io_signature for python, we can see that the function you are looking for is gr.io_singature2 (link). So, the statement would be as follows:
        gr.hier_block2.__init__(self, "ofdm_tx",
                    gr.io_signature(1, 1, gr.sizeof_char),
                    gr.io_signature2(2, 2, gr.sizeof_gr_complex, gr.sizeof_gr_complex))

This should solve the problem. Let me know if problem still persists.

Also, if there's any other way this problem can be approached, I will glad to know it.

Regards,
Kartik Patel



On Fri, Dec 23, 2016 3:17 AM, Damindra Bandara address@hidden wrote:
Hi,

I am trying to modify OFDM-TX block to get an additional output after the payload_mod block(Payload Constellation modulator). I modified the ofdm_txrx.py file in /gr-digital/python/digital as follows.

gr.hier_block2.__init__(self, "ofdm_tx",
                    gr.io_signature(1, 1, gr.sizeof_char),
                    gr.io_signature(1, 2, gr.sizeof_gr_complex,gr.sizeof_gr_complex))

self.connect((payload_mod), (self, 1))

I also added the following to digital_ofdm_tx.xml as,

  <source>
    <name>New out</name>
    <type>complex</type>
    <optional>1</optional>
  </source>


After make install I can see the additional output port. But when I try to run it I get the following error.

gr.io_signature(1, 2, gr.sizeof_gr_complex,gr.sizeof_gr_complex))
TypeError: make() takes exactly 3 arguments (4 given)


Could you please let me know whether there are any additional changes that I have to do to make this work.

Thank you,
Damindra

--
Damindra Savithri Bandara,
Ph.D. in Information Technology (Candidate)
George Mason University,
Fairfax,
Virginia



--
Damindra Savithri Bandara,
Ph.D. in Information Technology (Candidate)
George Mason University,
Fairfax,
Virginia



--
Damindra Savithri Bandara,
Ph.D. in Information Technology (Candidate)
George Mason University,
Fairfax,
Virginia

reply via email to

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