Wednesday, May 3, 2017

Re: [Discuss-gnuradio] implementing message ports on an OOT module

EJ, Here is where things go off the rails a little.  There is no C++ for my RFNoC block, it is purely FPGA code (and the two XML files I had to create for GRC).

Somehow the fosphor message passing is working for Sylvain for message handling, and I tried to mimic his, but I can't seem to get past this issue.

Hmmmm, after typing that last sentence, I just did a search through gr-ettus for *fosphor*.cc and he has two files.  So maybe I DO need to have those in order to do message passing....  I will look into it next.

Thanks for jumping in!


On 05/03/2017 10:17 AM, EJ Kreinar wrote:
Hi Jason, 

I believe I have seen this issue when I did not register the message port correctly, or when names did not match between GRC and the message port name. 

You may need to modify the C++ code to add a message handler, if you have not already. Do you have a message port registered in your multiaperture_cpremoval block named 'msg'? Does this have a message handler? https://wiki.gnuradio.org/index.php/Guided_Tutorial_Programming_Topics#5.3.2_Adding_Message_Passing_to_the_Code

Hope this helps, 
EJ

On Wed, May 3, 2017 at 9:14 AM, Jason Matusiak <jason@gardettoengineering.com> wrote:
I had originally asked this question on the USRP site, but it was recommended by someone from Ettus to post over here since there is a chance it is more of a GNURadio issue than USRP.

I am attempting to create an RFNoC block for the X310 and it works fine.  I then wanted to add a message port to the block to pass variable into it.  The message port shows up in GRC and the flowgraph runs fine as long as I leave the message port disconnected.  Once I try to connect something to it, I see the following error:
Could not find port: msg in:
rfnoc
system

Traceback (most recent call last):
  File "/home/jmat/rfnoc-multiaperture/examples/CPremoval.py", line 253, in <module>
    main()
  File "/home/jmat/rfnoc-multiaperture/examples/CPremoval.py", line 241, in main
    tb = top_block_cls()
  File "/home/jmat/rfnoc-multiaperture/examples/CPremoval.py", line 196, in __init__
    self.msg_connect((self.foo_periodic_msg_source_0, 'out'), (self.multiaperture_cpremoval_0, 'msg'))
  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


I can't for the life of me figure out what GR "could not find."  I see other people with similar posts in the past, but I never found a good resolution.

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


No comments:

Post a Comment