Hi Vipin,
The question I have is this: A_Func calls
B_Func and C_Func. I don’t think I can instantiate the three
custom blocks directly in one GRC flow-graph. What will happen
to the function call made in A_Func for B_Func when A_Func
custom block is kicked off for execution by the GRC scheduler?
Is there any way in GRC to define hierarchical custom blocks?
There are hierarchical blocks in GNU Radio, but only for python. If
your A_Func logic is relatively straight forward calling the other
functions, you can try create a python hier block (you can do this
with gr_modtool as well). But if the function calls don't relate to
the data flow, it makes no sense to create different blocks for each
function in my opinion. Remember that a GR block should fulfill one
logical signal processing step. If your functions separately don't
do that, defining multiple methods in your class of the block is
better way to do it.
One way to solve this issue is the have
Matlab Coder dump all code in one C++ file and then simply
create one giant custom block to instantiate in GRC gui.
Problem is that I won’t be able to debug in GRC gui very well
(granularity of probe points would be severally limited).
Anyway, I think it depends on the structure and purpose of your
different functions. Are they each executing a signal processing
step themselves or is only the ensemble of the three functions one
logical signal processing. In the latter case I would implement the
three functions in one block.
Best
Luca
|