I would like to make some unit tests for a PMT only block I created, but I haven't been able to find any good examples aside from a StackOverflow post ( http://stackoverflow.com/questions/36342285/testing-a-gnu-radio-message-accepting-block-with-post). The hope was that I could simply access the message port of the block under test and shove PMT messages in there. Is that even possible? I tried making a custom block as outlined in https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/python/blocks/qa_python_message_passing.py with the slight tweak of having a method called 'send' in the producer that would send whatever PMT object you provide as an argument out to the output message port. That fails with:
message_gen.send(pmt.intern('asdf')) TypeError: unbound method send() must be called with message_gen instance as first argument (got swig_int_ptr instance instead) Any tips to test a block like this? Thanks!
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio