discuss-gnuradio
[Top][All Lists]
Advanced

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

proper way in GRC to pass a python dictionary as a parameter to a custom


From: Jason Goldberg
Subject: proper way in GRC to pass a python dictionary as a parameter to a custom python block
Date: Tue, 17 Dec 2019 17:19:17 -0800

I have an OOT module to which I added a custom block via gr_modtool.  This custom hier block is supposed to accept a python dictionary as a parameter.  The yml file associated with the block has a parameters section where the dtype is to be specified.  "dict" appears to be an invalid data type.  I have found that if I set dtype to { $type } or even comment out that line, the flowgraph runs, but the dictionary I pass in to the block (via a variable or a parameter) gets expanded out in the block icon such that the icon becomes huge.  By expanded out I mean that the parameter field in the block icon looks like e.g.,
{'first_key_of_huge_dict;: {'nested_key_1': 9.873, 'nested_key_2': 'a really long string'  etc

rather than just containing the name of the dictionary variable.  How can I pass in a dictionary to my block and avoid this problem?

reply via email to

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