discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] "Could not find port: cfg in:" error


From: Jason Matusiak
Subject: Re: [Discuss-gnuradio] "Could not find port: cfg in:" error
Date: Mon, 12 Jun 2017 09:00:39 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

I got it. It was a problem with my XML I included. I had to change the top of the file to:
  <name>RFNoC: FrequencyShift</name>
  <key>multiaperture_freqShift</key>
  <category>multiaperture</category>
  <import>import multiaperture</import>
  <make>multiaperture.freqShift(
          self.device3,
          uhd.stream_args( # TX Stream Args
        cpu_format="fc32", \# TODO: This must be made an option
        otw_format="sc16",
        args="spp={}".format($spp),
          ),
          uhd.stream_args( # RX Stream Args
        cpu_format="fc32", \# TODO: This must be made an option
        otw_format="sc16",
        args="",
          ),
          $block_index,
          $device_index
)

Now it seems to be happy again.



On 06/12/2017 08:10 AM, Jason Matusiak wrote:
This is the same problem I had once before, but I am not sure why I can't fix it this time. I have an RFNoC OOT module that wants to have a msg port input. I called this port 'cfg'.

Attached is my freqShift_impl.cc file where I declare the message port "cfg". I also included multiaperture_freqShift.xml where the port gets declared as a sink.

When I make and make install, everything seems to run fine. I do a sudo ldconfig, and then refresh GRC. When I build it is happy, then when I run I get the following error:

Could not find port: cfg in:
rfnoc
system

Traceback (most recent call last):
  File "/home/jmat/rfnoc-ma/examples/CPremoval.py", line 278, in <module>
    main()
  File "/home/jmat/rfnoc-ma/examples/CPremoval.py", line 266, in main
    tb = top_block_cls()
  File "/home/jmat/rfnoc-ma/examples/CPremoval.py", line 219, in __init__
self.msg_connect((self.qtgui_edit_box_msg_1, 'msg'), (self.uhd_rfnoc_streamer_freqShift_0, 'cfg')) File "/home/jmat/rfnoc/lib/python2.7/dist-packages/gnuradio/gr/hier_block2.py", line 59, in wrapped func(self, src.to_basic_block(), srcport, dst.to_basic_block(), dstport) File "/home/jmat/rfnoc/lib/python2.7/dist-packages/gnuradio/gr/hier_block2.py", line 131, in msg_connect
    self.primitive_msg_connect(*args)
File "/home/jmat/rfnoc/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py", line 3489, in primitive_msg_connect return _runtime_swig.top_block_sptr_primitive_msg_connect(self, *args)
RuntimeError: invalid msg port in connect() or disconnect()

>>> Done

The last time I had this issue with a block it was because I didn't make the changes to my .cpp and .h files, but I did that this time. What else could I be missing???




reply via email to

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