Hello, Something that has tripped me up a couple times when messing around with PMTs is I forget that there's a left-hand argument to pmt::dict_add (especially since the first argument is the pmt dictionary I want to update). Being a little new to this still, it took me a little while to figure out what the problem was.
on http://gnuradio.org/doc/doxygen/page_uhd.html#uhd_command_syntax there is the following example: pmt::pmt_t command = pmt::make_dict(); pmt::dict_add(command, pmt::mp("freq"), pmt::mp(1.1e9)); // Specify frequency pmt::dict_add(command, pmt::mp("chan"), pmt::mp(1)); // Specify channel but, I believe it should be like this instead (unless I've just been doing something wrong): pmt::pmt_t command = pmt::make_dict(); command = pmt::dict_add(command, pmt::mp("freq"), pmt::mp(1.1e9)); // Specify frequency command = pmt::dict_add(command, pmt::mp("chan"), pmt::mp(1)); // Specify channel Again, I could be totally wrong, but it's my experience that pmt::dict_add only returns a new dictionary as a return value, and not to the (address of?) the dictionary that was passed in. Is there a right way to do this that doesn't require a left-hand side assignment? Should I instead be passing the address of the dictionary, or something? Again, total newb. Thanks, Rich
_______________________________________________ Discuss-gnuradio mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
